forked from JointCloud/JCC-RIP
This commit is contained in:
parent
48c8368007
commit
90f9af892a
|
@ -1,11 +1,10 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 获取顶部指标数据
|
||||
export function getDataList0(params) {
|
||||
export function getRegion() {
|
||||
return request({
|
||||
url: '/jcc-schedule/api/v1/cluster/list',
|
||||
method: 'get',
|
||||
params
|
||||
url: '/apis/slurm/getRegion',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -18,9 +18,9 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
xAxis: [],
|
||||
data: [21, 44, 55, 77, 22, 32],
|
||||
data2: [22, 33, 22, 11, 44, 77],
|
||||
data3: [11, 22, 55, 44, 66, 33]
|
||||
data: [],
|
||||
data2: [],
|
||||
data3: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -35,7 +35,7 @@ export default {
|
|||
this.xAxis = e.map(n => n?.regionName || 0)
|
||||
this.data = e.map(n => n?.slurmNum || 0)
|
||||
this.data2 = e.map(n => n?.adaptorInterfaceSum || 0)
|
||||
this.data3 = e.map(n => n?.task || 0)
|
||||
this.data3 = e.map(n => n?.runningJobs || 0)
|
||||
this.drawChart()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
import List from '@/components/list'
|
||||
import Exhibition from '@/components/Exhibition'
|
||||
import BarChart from './components/barChart.vue'
|
||||
import { getListJobs, getListDbJobs, getListRegions } from '@/api/hpc/hpcManagement'
|
||||
import { getListJobs, getListDbJobs, getListRegions, getRegion } from '@/api/hpc/hpcManagement'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
@ -144,7 +144,7 @@ export default {
|
|||
{ prop: 'regionName', label: '超算域' },
|
||||
{ prop: 'slurmNum', label: '适配版本数量' },
|
||||
{ prop: 'adaptorInterfaceSum', label: '适配接口数量' },
|
||||
{ prop: 'task', label: '运行作业' }
|
||||
{ prop: 'runningJobs', label: '运行作业' }
|
||||
],
|
||||
taskColumns: [
|
||||
{ prop: 'name', label: '作业名称' },
|
||||
|
@ -159,20 +159,29 @@ export default {
|
|||
{ prop: 'JobRunTime', label: '作业运行时长' },
|
||||
{ prop: 'JobStartTime', label: '作业开始时间' },
|
||||
{ prop: 'slurmVersion', label: '作业所在域' }
|
||||
]
|
||||
],
|
||||
intervalMap: null
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
clearInterval(this.intervalMap)
|
||||
this.getData()
|
||||
this.intervalMap = setInterval(() => {
|
||||
this.getData()
|
||||
}, 60000)
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.intervalMap)
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
Promise.all([
|
||||
getListJobs(),
|
||||
getListDbJobs(),
|
||||
getListRegions()
|
||||
getListRegions(),
|
||||
getRegion()
|
||||
]).then(res => {
|
||||
this.taskList = res[0]?.jobInfos || []
|
||||
this.exhibitionArray[2].value = res[0]?.recordCount || 0
|
||||
|
@ -180,11 +189,11 @@ export default {
|
|||
this.taskDBList = res[1]?.jobInfoDbs || []
|
||||
this.exhibitionArray[3].value = res[1]?.recordCount || 0
|
||||
|
||||
// const topData = res[0]
|
||||
// this.exhibitionArray[0].value = topData.aaa
|
||||
// this.exhibitionArray[1].value = topData.bbb
|
||||
|
||||
this.domainList = res[2]?.regionSlurmInfo || []
|
||||
|
||||
const topData = res[3]
|
||||
this.exhibitionArray[0].value = topData?.regionSlurmSumInfo?.[0]?.regionSum
|
||||
this.exhibitionArray[1].value = topData?.regionSlurmSumInfo?.[0]?.softStackSum
|
||||
})
|
||||
},
|
||||
clickLeft(row) {
|
||||
|
|
Loading…
Reference in New Issue