org.dromara.jpom.controller.DataStatController Maven / Gradle / Ivy
/*
* Copyright (c) 2019 Of Him Code Technology Studio
* Jpom is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PSL v2 for more details.
*/
package org.dromara.jpom.controller;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.db.Entity;
import cn.keepbx.jpom.IJsonMessage;
import cn.keepbx.jpom.model.JsonMessage;
import lombok.extern.slf4j.Slf4j;
import org.dromara.jpom.func.assets.server.MachineDockerServer;
import org.dromara.jpom.func.assets.server.MachineNodeServer;
import org.dromara.jpom.func.assets.server.MachineSshServer;
import org.dromara.jpom.func.files.service.FileStorageService;
import org.dromara.jpom.func.files.service.StaticFileStorageService;
import org.dromara.jpom.func.system.service.ClusterInfoService;
import org.dromara.jpom.model.user.UserModel;
import org.dromara.jpom.permission.SystemPermission;
import org.dromara.jpom.service.docker.DockerInfoService;
import org.dromara.jpom.service.docker.DockerSwarmInfoService;
import org.dromara.jpom.service.node.NodeService;
import org.dromara.jpom.service.node.ProjectInfoCacheService;
import org.dromara.jpom.service.node.script.NodeScriptServer;
import org.dromara.jpom.service.node.ssh.SshCommandService;
import org.dromara.jpom.service.node.ssh.SshService;
import org.dromara.jpom.service.outgiving.OutGivingServer;
import org.dromara.jpom.service.script.ScriptServer;
import org.dromara.jpom.service.system.WorkspaceService;
import org.dromara.jpom.service.user.UserService;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author bwcx_jzy
* @since 24/1/4 004
*/
@RestController
@RequestMapping(value = "stat")
@Slf4j
public class DataStatController {
private final NodeService nodeService;
private final ProjectInfoCacheService projectInfoCacheService;
private final NodeScriptServer nodeScriptServer;
private final OutGivingServer outGivingServer;
private final SshService sshService;
private final SshCommandService sshCommandService;
private final ScriptServer scriptServer;
private final DockerInfoService dockerInfoService;
private final FileStorageService fileStorageService;
private final StaticFileStorageService staticFileStorageService;
private final DockerSwarmInfoService dockerSwarmInfoService;
private final UserService userService;
private final WorkspaceService workspaceService;
private final ClusterInfoService clusterInfoService;
private final MachineNodeServer machineNodeServer;
private final MachineSshServer machineSshServer;
private final MachineDockerServer machineDockerServer;
public DataStatController(NodeService nodeService,
ProjectInfoCacheService projectInfoCacheService,
NodeScriptServer nodeScriptServer,
OutGivingServer outGivingServer,
SshService sshService,
SshCommandService sshCommandService,
ScriptServer scriptServer,
DockerInfoService dockerInfoService,
FileStorageService fileStorageService,
StaticFileStorageService staticFileStorageService,
DockerSwarmInfoService dockerSwarmInfoService,
UserService userService,
WorkspaceService workspaceService,
ClusterInfoService clusterInfoService,
MachineNodeServer machineNodeServer,
MachineSshServer machineSshServer,
MachineDockerServer machineDockerServer) {
this.nodeService = nodeService;
this.projectInfoCacheService = projectInfoCacheService;
this.nodeScriptServer = nodeScriptServer;
this.outGivingServer = outGivingServer;
this.sshService = sshService;
this.sshCommandService = sshCommandService;
this.scriptServer = scriptServer;
this.dockerInfoService = dockerInfoService;
this.fileStorageService = fileStorageService;
this.staticFileStorageService = staticFileStorageService;
this.dockerSwarmInfoService = dockerSwarmInfoService;
this.userService = userService;
this.workspaceService = workspaceService;
this.clusterInfoService = clusterInfoService;
this.machineNodeServer = machineNodeServer;
this.machineSshServer = machineSshServer;
this.machineDockerServer = machineDockerServer;
}
@RequestMapping(value = "workspace", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
public IJsonMessage
© 2015 - 2024 Weber Informatics LLC | Privacy Policy