forked from JointCloud/JCC-RIP
fix
This commit is contained in:
parent
32cf33e859
commit
bc9b64d086
|
@ -3,7 +3,7 @@ import request from '@/utils/request'
|
|||
// 获取顶部指标数据
|
||||
export function getRegion() {
|
||||
return request({
|
||||
url: '/apis/slurm/getRegion',
|
||||
url: '/jcc-hpc/apis/slurm/getRegion',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ export function getRegion() {
|
|||
// 获取超算域
|
||||
export function getListRegions() {
|
||||
return request({
|
||||
url: '/apis/slurm/listRegions',
|
||||
url: '/jcc-hpc/apis/slurm/listRegions',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ export function getListRegions() {
|
|||
// 获取运行中作业列表
|
||||
export function getListJobs() {
|
||||
return request({
|
||||
url: '/apis/slurm/listJobs',
|
||||
url: '/jcc-hpc/apis/slurm/listJobs',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ export function getListJobs() {
|
|||
// 获取历史作业列表
|
||||
export function getListDbJobs() {
|
||||
return request({
|
||||
url: '/apis/slurm/listDbJobs',
|
||||
url: '/jcc-hpc/apis/slurm/listDbJobs',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
|
|
@ -43,22 +43,26 @@ export default {
|
|||
this.ramLoad.push(((element[1] - 0) / 1024 / 1024 / 1024).toFixed(2))
|
||||
// this.date.push(moment(element[0] * 1000).format('MM/DD'))
|
||||
})
|
||||
this.ramLoad = this.ramLoad.slice(0, 7)
|
||||
// CPU整体负载 (Core)
|
||||
const cpuLoad = data.find(item => item.metric_name === 'cpu_total_usage').data.result[0].values || []
|
||||
cpuLoad.forEach(element => {
|
||||
this.cpuLoad.push(((element[1] - 0)).toFixed(2))
|
||||
})
|
||||
this.cpuLoad = this.cpuLoad.slice(0, 7)
|
||||
// cpu 平均负载 (%)
|
||||
const cpuData = data.find(item => item.metric_name === 'cpu_avg_usage').data.result[0].values || []
|
||||
cpuData.forEach(element => {
|
||||
this.cpuAverage.push((element[1] - 0).toFixed(2))
|
||||
// this.date.push(moment(element[0] * 1000).format('MM/DD'))
|
||||
})
|
||||
this.cpuAverage = this.cpuAverage.slice(0, 7)
|
||||
// 内存平均负载 (%)
|
||||
const ramAverage = data.find(item => item.metric_name === 'mem_avg_usage').data.result[0].values || []
|
||||
ramAverage.forEach(element => {
|
||||
this.ramAverage.push(((element[1] - 0) / 1024 / 1024 / 1024).toFixed(2))
|
||||
})
|
||||
this.ramAverage = this.ramAverage.slice(0, 7)
|
||||
})
|
||||
this.initCharts()
|
||||
},
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
:table-list-data="taskList"
|
||||
:pagination="false"
|
||||
/>
|
||||
<span v-if="taskList.length === 0" class="tips">暂无数据</span>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
@ -62,6 +63,7 @@
|
|||
:table-list-data="taskDBList"
|
||||
:pagination="false"
|
||||
/>
|
||||
<span v-if="taskDBList.length === 0" class="tips">暂无数据</span>
|
||||
<!-- <el-row class="resource">
|
||||
<el-col :span="12">
|
||||
<div>CPU <span class="impact num">{{ resource.cpu.core }}</span> 核</div>
|
||||
|
@ -149,15 +151,15 @@ export default {
|
|||
taskColumns: [
|
||||
{ prop: 'name', label: '作业名称' },
|
||||
{ prop: 'StateOfJob', label: '作业状态' },
|
||||
{ prop: 'JobRunTime', label: '作业运行时长' },
|
||||
{ prop: 'JobStartTime', label: '作业开始时间' },
|
||||
{ prop: 'JobRunTime', label: '运行时长' },
|
||||
{ prop: 'JobStartTime', label: '开始时间' },
|
||||
{ prop: 'slurmVersion', label: '作业所在域' }
|
||||
],
|
||||
taskDBColumns: [
|
||||
{ prop: 'jobname', label: '作业名称' },
|
||||
{ prop: 'StateOfJob', label: '作业状态' },
|
||||
{ prop: 'JobRunTime', label: '作业运行时长' },
|
||||
{ prop: 'JobStartTime', label: '作业开始时间' },
|
||||
{ prop: 'JobRunTime', label: '运行时长' },
|
||||
{ prop: 'JobStartTime', label: '开始时间' },
|
||||
{ prop: 'slurmVersion', label: '作业所在域' }
|
||||
],
|
||||
intervalMap: null
|
||||
|
|
|
@ -65,13 +65,6 @@ module.exports = {
|
|||
changeOrigin: true,
|
||||
secure: false
|
||||
},
|
||||
'/apis': {
|
||||
ws: false,
|
||||
// target: 'https://10.101.15.6/apis', /* 测试环境 */
|
||||
target: 'http://192.168.249.113:8880', /* 演示环境 */
|
||||
changeOrigin: true,
|
||||
secure: false
|
||||
},
|
||||
// '/kapis/terminal.kubesphere.io': {
|
||||
// ws: true,
|
||||
// changeOrigin: true,
|
||||
|
|
Loading…
Reference in New Issue