refactor: 资源池监控相关文件
This commit is contained in:
parent
7c28dcac87
commit
58f9d5ea26
|
@ -97,7 +97,7 @@ import {getNodeOperationInfo, getTestResourcePools} from '@/api/test-resource-po
|
|||
import {getCurrentProjectID} from 'metersphere-frontend/src/utils/token';
|
||||
import EnvSelectPopover from '@/business/automation/scenario/EnvSelectPopover';
|
||||
import {getApiCaseEnvironments} from '@/api/api-test-case';
|
||||
import NodeOperationLabel from "metersphere-frontend/src/components/node/NodeOperationLabel";
|
||||
import NodeOperationLabel from "metersphere-frontend/src/components/resource-pool/NodeOperationLabel";
|
||||
|
||||
export default {
|
||||
name: 'ApiRunMode',
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
<template>
|
||||
<div>
|
||||
<span :class="labelClassName" :title="nodeName" >{{nodeName}}</span>
|
||||
<el-tag size="mini" v-if="nodeOperationInfo!== undefined && nodeOperationInfo.runningTask>0" style="color:#E5594B;background-color: #FFFFFF;border-color: #E5594B;margin-left: 5px;margin-right: 5px">
|
||||
{{$t("commons.running")}}</el-tag>
|
||||
<el-tag size="mini" v-else-if="nodeOperationInfo!== undefined" style="color:#89DB7E;background-color: #FFFFFF;border-color: #89DB7E;margin-left: 5px;margin-right: 5px">
|
||||
{{$t("commons.idle")}}</el-tag>
|
||||
<span v-if="nodeOperationInfo!== undefined && nodeOperationInfo.runningTask>0" style="color:#A9A9A9">
|
||||
{{" CPU:"+nodeOperationInfo.cpuUsage}}</span>
|
||||
<span v-if="nodeOperationInfo!== undefined " style="color:#A9A9A9;">
|
||||
{{" CPU:"+nodeOperationInfo.cpuUsage}}</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "NodeOperationLabel",
|
||||
props: {
|
||||
nodeName: String,
|
||||
nodeOperationInfo:Object,
|
||||
labelClassName: {
|
||||
type: String,
|
||||
default: "node-label"
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loaded: true,
|
||||
defaultInitOptions: this.initOptions
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.node-label{
|
||||
display: inline-flex;
|
||||
width:240px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
|
@ -297,7 +297,7 @@
|
|||
|
||||
<script>
|
||||
import MsChart from "metersphere-frontend/src/components/chart/MsChart";
|
||||
import NodeOperationLabel from "metersphere-frontend/src/components/node/NodeOperationLabel";
|
||||
import NodeOperationLabel from "metersphere-frontend/src/components/resource-pool/NodeOperationLabel";
|
||||
import {findThreadGroup} from "../../../business/test/model/ThreadGroup";
|
||||
import {getJmxContent, getLoadConfig, getNodeOperationInfo, getResourcePools} from "../../../api/performance";
|
||||
|
||||
|
|
|
@ -172,7 +172,7 @@ import EnvGroupWithOption from "../env/EnvGroupWithOption";
|
|||
import EnvironmentGroup from "@/business/plan/env/EnvironmentGroupList";
|
||||
import EnvSelectPopover from "@/business/plan/env/EnvSelectPopover";
|
||||
import {getNodeOperationInfo, getProjectConfig} from "@/api/project";
|
||||
import NodeOperationLabel from "metersphere-frontend/src/components/node/NodeOperationLabel";
|
||||
import NodeOperationLabel from "metersphere-frontend/src/components/resource-pool/NodeOperationLabel";
|
||||
|
||||
export default {
|
||||
name: "MsTestPlanRunModeWithEnv",
|
||||
|
|
Loading…
Reference in New Issue