From 1057d8a9268edfac37cc2855be90e0097768b7e2 Mon Sep 17 00:00:00 2001 From: ann Date: Mon, 17 Jun 2024 15:41:04 +0800 Subject: [PATCH 01/17] task detail --- public/locales/en.json | 9 +++++++-- public/locales/zh.json | 9 +++++++-- src/views/taskManagement/taskList/detail.vue | 18 ++++++++++++++++++ 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/public/locales/en.json b/public/locales/en.json index 48f7519..9e9bbe2 100644 --- a/public/locales/en.json +++ b/public/locales/en.json @@ -39,7 +39,8 @@ "close": "Close", "userNameMsg": "Please enter the correct user name", "passwordMsg": "The password can not be less than 6 digits", - "check": "Check" + "check": "Check", + "submit": "Submit" }, "menu": { "taskManagement": "Task", @@ -534,6 +535,10 @@ "adapterCheckText": "After filling in the adapter information, click the Validate button. Check if the adapter is connected successfully; it must be connected successfully before you can click the Confirm button.", "bindClusterText": "After binding the cluster, return to the homepage to create a new task.", "newTask": "Add Task", - "guideFinish": " Guidance has been completed." + "guideFinish": " Guidance has been completed.", + "taskInvocation": "Task Invocation", + "taskCmdInput": "Task command input", + "taskResult": "Task result output", + "taskSimulateNum": "Number of task simulation" } } \ No newline at end of file diff --git a/public/locales/zh.json b/public/locales/zh.json index 94adc31..07a229d 100644 --- a/public/locales/zh.json +++ b/public/locales/zh.json @@ -39,7 +39,8 @@ "close": "关闭", "userNameMsg": "请输入正确的用户名", "passwordMsg": "密码不能少于6位", - "check": "验证" + "check": "验证", + "submit": "提交" }, "menu": { "taskManagement": "任务管理", @@ -534,6 +535,10 @@ "adapterCheckText": "填写完成适配器信息后,点击验证按钮。校验适配器是否连接成功,必须连接成功,才能点击确定保存。", "bindClusterText": "绑定集群后返回首页新建任务。", "newTask": "新建任务", - "guideFinish": "引导已完成" + "guideFinish": "引导已完成", + "taskInvocation": "任务调用", + "taskCmdInput": "任务指令输入", + "taskResult": "任务结果输出", + "taskSimulateNum": "任务模拟提交数" } } \ No newline at end of file diff --git a/src/views/taskManagement/taskList/detail.vue b/src/views/taskManagement/taskList/detail.vue index 95ec097..47254d1 100644 --- a/src/views/taskManagement/taskList/detail.vue +++ b/src/views/taskManagement/taskList/detail.vue @@ -39,6 +39,21 @@

+ + + + + + + + + {{ $t('message.submit') }} + + + + + + @@ -62,6 +77,9 @@ export default { strategy: this.$t('page.policy'), synergyStatus: this.$t('page.synergyStatus') }, + taskInput: '', + taskSimulateNum: '', + taskOutput: '', cluster: '', formData: { 'clusterInfos': [], From a69bb128f14be95a8238b7825e508b447e22a046 Mon Sep 17 00:00:00 2001 From: ann Date: Mon, 17 Jun 2024 17:05:32 +0800 Subject: [PATCH 02/17] fix --- public/locales/en.json | 10 +- public/locales/zh.json | 10 +- .../taskList/components/deductiveForm.vue | 183 ++++++++++++++++++ src/views/taskManagement/taskList/create.vue | 9 +- src/views/taskManagement/taskList/detail.vue | 56 +++++- 5 files changed, 261 insertions(+), 7 deletions(-) create mode 100644 src/views/taskManagement/taskList/components/deductiveForm.vue diff --git a/public/locales/en.json b/public/locales/en.json index 9e9bbe2..513f9f2 100644 --- a/public/locales/en.json +++ b/public/locales/en.json @@ -539,6 +539,14 @@ "taskInvocation": "Task Invocation", "taskCmdInput": "Task command input", "taskResult": "Task result output", - "taskSimulateNum": "Number of task simulation" + "taskSimulateNum": "Number of task simulation", + "picName": "Picture Name", + "result": "Result", + "pictureUpload": "Picture Upload", + "createDeductiveTask": "Create Deductive Task", + "image": "Image", + "initFile": "Init File", + "codeUpload": "Code Upload", + "selectModel": "Select Model" } } \ No newline at end of file diff --git a/public/locales/zh.json b/public/locales/zh.json index 07a229d..69b5ba2 100644 --- a/public/locales/zh.json +++ b/public/locales/zh.json @@ -539,6 +539,14 @@ "taskInvocation": "任务调用", "taskCmdInput": "任务指令输入", "taskResult": "任务结果输出", - "taskSimulateNum": "任务模拟提交数" + "taskSimulateNum": "任务模拟提交数", + "picName": "图片名称", + "result": "结果", + "pictureUpload": "图片上传", + "createDeductiveTask": "创建推理任务", + "image": "镜像", + "initFile": "启动文件", + "codeUpload": "代码上传", + "selectModel": "选择模型" } } \ No newline at end of file diff --git a/src/views/taskManagement/taskList/components/deductiveForm.vue b/src/views/taskManagement/taskList/components/deductiveForm.vue new file mode 100644 index 0000000..fe719c6 --- /dev/null +++ b/src/views/taskManagement/taskList/components/deductiveForm.vue @@ -0,0 +1,183 @@ + + + + diff --git a/src/views/taskManagement/taskList/create.vue b/src/views/taskManagement/taskList/create.vue index f0ca940..02a62bd 100644 --- a/src/views/taskManagement/taskList/create.vue +++ b/src/views/taskManagement/taskList/create.vue @@ -44,8 +44,9 @@

- + +
@@ -224,11 +225,12 @@ import { getClusterList } from '@/api/container/cluster' import aiCreate from './components/aiCreate.vue' import { getAdapterList } from '@/api/pcm/adapter' import vmForm from './components/virtualmachineForm.vue' +import deductiveForm from './components/deductiveForm.vue' import { mapGetters } from 'vuex' // import jobForm from './components/jobForm.vue' export default { - components: { applicationForm, List, hpcCreate, aiCreate, vmForm }, + components: { applicationForm, List, hpcCreate, aiCreate, vmForm, deductiveForm }, data() { return { getClusterList, @@ -259,7 +261,8 @@ export default { }, 'ai': { 'aiBase': 'createAibase', - 'aiCard': 'createAiCard' + 'aiCard': 'createAiCard', + 'deductive': 'createDeductiveTask' } }, adapterList: { diff --git a/src/views/taskManagement/taskList/detail.vue b/src/views/taskManagement/taskList/detail.vue index 47254d1..a7c4bb0 100644 --- a/src/views/taskManagement/taskList/detail.vue +++ b/src/views/taskManagement/taskList/detail.vue @@ -41,7 +41,7 @@ - + + + + + 选取文件 +
只能上传jpg/png文件,且不超过500kb
+
+ {{ $t('message.submit') }} + + + + +
@@ -91,7 +119,14 @@ export default { 'synergyStatus': '0' }, activeName: '', - log: '' + log: '', + taskResult: [{ + name: 'AAAAAAAAAAAAAA', + clusterName: '1111', + card: 'XXX', + result: '阿猫' + }], + fileList: [{ name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100' }, { name: 'food2.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100' }] } }, computed: { @@ -105,6 +140,14 @@ export default { { prop: 'status', label: this.$t('page.taskStatus') }, { prop: 'remark', label: this.$t('page.description') } ] + }, + taskColumns() { + return [ + { prop: 'name', label: this.$t('page.picName') }, + { prop: 'clusterName', label: this.$t('page.clusterIn') }, + { prop: 'card', label: this.$t('page.card') }, + { prop: 'result', label: this.$t('page.result') } + ] } }, mounted() { @@ -114,6 +157,15 @@ export default { goBack() { this.$router.push('taskList') }, + submitUpload() { + this.$refs.upload.submit() + }, + handleRemove(file, fileList) { + console.log(file, fileList) + }, + handlePreview(file) { + console.log(file) + }, getFormData() { getTaskDetail({ id: this.$route.query.id }).then(res => { if (res.data) { From bf16adab087874eceea6c991004e69f703bc2773 Mon Sep 17 00:00:00 2001 From: jhnine Date: Thu, 20 Jun 2024 17:29:14 +0800 Subject: [PATCH 03/17] china map to world map --- src/views/prometheusMonitor/earth.vue | 168 +++++++++------- src/views/prometheusMonitor/province.vue | 244 ++++++++--------------- 2 files changed, 179 insertions(+), 233 deletions(-) diff --git a/src/views/prometheusMonitor/earth.vue b/src/views/prometheusMonitor/earth.vue index 0a1e3cb..57e19b7 100644 --- a/src/views/prometheusMonitor/earth.vue +++ b/src/views/prometheusMonitor/earth.vue @@ -26,8 +26,8 @@ 东数西算 新型网络 - + + diff --git a/src/views/monitorSelectPcm/index.vue b/src/views/monitorSelectPcm/index.vue index ae1cfb9..df85291 100644 --- a/src/views/monitorSelectPcm/index.vue +++ b/src/views/monitorSelectPcm/index.vue @@ -44,7 +44,7 @@

存储资源用量

- +
From 32adba193e8e2158099fd0e30ada85b6d0bbba4f Mon Sep 17 00:00:00 2001 From: jhnine Date: Mon, 24 Jun 2024 15:46:59 +0800 Subject: [PATCH 15/17] fix bug --- .../components/ComputeDomain.vue | 5 +++-- .../components/ComputingPowerTrend.vue | 2 +- .../components/ComputingResourceLoad.vue | 2 +- src/views/monitorSelectPcm/index.vue | 16 +++++++--------- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/views/monitorSelectPcm/components/ComputeDomain.vue b/src/views/monitorSelectPcm/components/ComputeDomain.vue index 40fea8e..f308190 100644 --- a/src/views/monitorSelectPcm/components/ComputeDomain.vue +++ b/src/views/monitorSelectPcm/components/ComputeDomain.vue @@ -33,7 +33,7 @@ -
+
@@ -249,8 +249,9 @@ export default { } } .bottom{ + margin-top: 2vh; .text{ - margin-top: 0.5vh; + margin-top: 1.5vh; height: 14vh; } table tr td:nth-child(2) { diff --git a/src/views/monitorSelectPcm/components/ComputingPowerTrend.vue b/src/views/monitorSelectPcm/components/ComputingPowerTrend.vue index 3c7e1d3..f63c79f 100644 --- a/src/views/monitorSelectPcm/components/ComputingPowerTrend.vue +++ b/src/views/monitorSelectPcm/components/ComputingPowerTrend.vue @@ -95,7 +95,7 @@ export default { }, axisLabel: { show: true, - interval: 28, + // interval: 28, // rotate: -18, // padding: [1, 0, 0, -10], margin: scaleRate ? 14 : 10, diff --git a/src/views/monitorSelectPcm/components/ComputingResourceLoad.vue b/src/views/monitorSelectPcm/components/ComputingResourceLoad.vue index fa95144..d109d9a 100644 --- a/src/views/monitorSelectPcm/components/ComputingResourceLoad.vue +++ b/src/views/monitorSelectPcm/components/ComputingResourceLoad.vue @@ -14,7 +14,7 @@ export default { const day = [[], [], [], [], [], [], []] for (let i = 0; i < 7; i++) { day[i][0] = moment().subtract(7 - i, 'days').endOf('day').unix() - day[i][1] = moment().subtract(7 - i, 'days').endOf('day').format('MMDD') + day[i][1] = moment().subtract(7 - i, 'days').endOf('day').format('MM/DD') } return { day, diff --git a/src/views/monitorSelectPcm/index.vue b/src/views/monitorSelectPcm/index.vue index df85291..cb0e068 100644 --- a/src/views/monitorSelectPcm/index.vue +++ b/src/views/monitorSelectPcm/index.vue @@ -190,7 +190,7 @@ export default { this.tendData = { used: [], xData: [] } const arr = res.data?.chart?.thirtyDayData // 模拟一个假数据 if (arr !== null) { - arr.forEach((item) => { + arr.reverse().forEach((item) => { this.tendData.used.push(item.cardTime) this.tendData.xData.push(item.perDay) }) @@ -198,7 +198,8 @@ export default { }) }, getAccrueCenter() { - getCPUsage().then((res) => { + getCPUsage().then((response) => { + const res = response.data?.chart this.centerData = { used: [], xData: [] } if (res.perCenterComputerPowers) { const data = res.accOtJobInfo @@ -218,7 +219,7 @@ export default { data1.sort(order) data1.forEach((item) => { if (item.computerPower !== 0) { - this.centerData.used.push(item.computerPower.toFixed(1)) + this.centerData.used.push(item.computerPower.toFixed(2)) this.centerData.xData.push(item.centerName) } }) @@ -439,18 +440,15 @@ export default { left: -2vh; } .left_1{ - height: 29vh; + height: 34vh; overflow: hidden; } .left_2 { - height: 21vh; + height: 26vh; } .left_3 { width: 100%; - height: 23vh; - } - .left_4{ - height: 12vh; + height: 24vh; } } } From 2839c75adaf75691a0dcd46f6a5c5cf130b84908 Mon Sep 17 00:00:00 2001 From: jhnine Date: Tue, 25 Jun 2024 11:34:42 +0800 Subject: [PATCH 16/17] monitor page change --- .../components/ComputeDomain.vue | 2 +- .../components/ComputingPowerTotal.vue | 6 +- .../components/ComputingPowerTrend.vue | 6 +- .../components/ComputingPowerUse.vue | 4 +- .../components/StorageResourceUsage.vue | 4 +- src/views/monitorSelectPcm/index.vue | 96 +++++++++---------- 6 files changed, 54 insertions(+), 64 deletions(-) diff --git a/src/views/monitorSelectPcm/components/ComputeDomain.vue b/src/views/monitorSelectPcm/components/ComputeDomain.vue index f308190..5e60055 100644 --- a/src/views/monitorSelectPcm/components/ComputeDomain.vue +++ b/src/views/monitorSelectPcm/components/ComputeDomain.vue @@ -288,7 +288,7 @@ export default { background-color: rgba(135, 189, 245, 0.2); } .el-progress-bar__inner{ - background-image: linear-gradient(90deg, #419eff, #00d9a6); + background: rgba(17, 252, 254, 1); } } // @media screen and (min-width: 1921px) { diff --git a/src/views/monitorSelectPcm/components/ComputingPowerTotal.vue b/src/views/monitorSelectPcm/components/ComputingPowerTotal.vue index ceaf09b..d0421b0 100644 --- a/src/views/monitorSelectPcm/components/ComputingPowerTotal.vue +++ b/src/views/monitorSelectPcm/components/ComputingPowerTotal.vue @@ -62,8 +62,8 @@ export default { >div{ padding: 10px; padding-top: 0; - background: url('../../../assets/images/monitorSelect/dataBg.png') no-repeat left; - background-size: auto 100%; + // background: url('../../../assets/images/monitorSelect/dataBg.png') no-repeat left; + // background-size: auto 100%; } .title{ font-size: 1.1rem; @@ -78,7 +78,7 @@ export default { font-family: Impact; font-weight: 400; // padding-bottom: 5px; - text-align: right; + // text-align: right; width: 80%; // text-indent: 130%; letter-spacing: 0.1rem; diff --git a/src/views/monitorSelectPcm/components/ComputingPowerTrend.vue b/src/views/monitorSelectPcm/components/ComputingPowerTrend.vue index f63c79f..3844e94 100644 --- a/src/views/monitorSelectPcm/components/ComputingPowerTrend.vue +++ b/src/views/monitorSelectPcm/components/ComputingPowerTrend.vue @@ -68,7 +68,7 @@ export default { color: '#008B45' } }, - color: ['rgba(79, 172, 254, 1)'], + color: ['rgba(14, 214, 250, 1)'], tooltip: { trigger: 'axis', axisPointer: { @@ -188,11 +188,11 @@ export default { color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [ { offset: 0, - color: 'rgba(0, 242, 254, 1)' // 0% 处的颜色 + color: 'rgba(10, 227, 244, 1)' // 0% 处的颜色 }, { offset: 1, - color: 'rgba(79, 172, 254, 1)' // 100% 处的颜色 + color: 'rgba(14, 214, 250, 1)' // 100% 处的颜色 } ]) } diff --git a/src/views/monitorSelectPcm/components/ComputingPowerUse.vue b/src/views/monitorSelectPcm/components/ComputingPowerUse.vue index 5485a4f..097bc68 100644 --- a/src/views/monitorSelectPcm/components/ComputingPowerUse.vue +++ b/src/views/monitorSelectPcm/components/ComputingPowerUse.vue @@ -267,11 +267,11 @@ export default { colorStops: [ { offset: 0, - color: 'rgb(24, 144, 255)' // 0% 处的颜色 + color: 'rgba(135, 189, 245, 1)' // 0% 处的颜色 }, { offset: 1, - color: 'rgba(24, 144, 255,0.5)' // 100% 处的颜色 + color: 'rgba(1, 16, 37, 1)' // 100% 处的颜色 } ], global: false // 缺省为 false diff --git a/src/views/monitorSelectPcm/components/StorageResourceUsage.vue b/src/views/monitorSelectPcm/components/StorageResourceUsage.vue index 49334c1..da6504f 100644 --- a/src/views/monitorSelectPcm/components/StorageResourceUsage.vue +++ b/src/views/monitorSelectPcm/components/StorageResourceUsage.vue @@ -109,12 +109,12 @@ export default { -moz-transform: matrix(-1, 0, 0, 1, 0, 0); -webkit-transform: matrix(-1, 0, 0, 1, 0, 0); -o-transform: matrix(-1, 0, 0, 1, 0, 0); - z-index: -1; + // z-index: -1; .num, .percent{ -moz-transform: matrix(-1, 0, 0, 1, 0, 0); -webkit-transform: matrix(-1, 0, 0, 1, 0, 0); -o-transform: matrix(-1, 0, 0, 1, 0, 0); - z-index: -1; + // z-index: -1; } .num{ text-align: left; diff --git a/src/views/monitorSelectPcm/index.vue b/src/views/monitorSelectPcm/index.vue index cb0e068..73ea415 100644 --- a/src/views/monitorSelectPcm/index.vue +++ b/src/views/monitorSelectPcm/index.vue @@ -1,7 +1,7 @@