diff --git a/mindinsight/ui/src/services/request-service.js b/mindinsight/ui/src/services/request-service.js index 7e2a7be7449aec5329345fcc64bc0d59f78f9677..8fb0439756a8bbebf319856015bb3917681c8efb 100644 --- a/mindinsight/ui/src/services/request-service.js +++ b/mindinsight/ui/src/services/request-service.js @@ -104,9 +104,10 @@ export default { }, // query trainJob data - getTrainJobs(isIgnoreError) { + getTrainJobs(params, isIgnoreError) { return axios({ method: 'get', + params: params, url: 'v1/mindinsight/datavisual/train-jobs', headers: { ignoreError: isIgnoreError, diff --git a/mindinsight/ui/src/views/train-manage/compare-plate.vue b/mindinsight/ui/src/views/train-manage/compare-plate.vue index 18fc647e6ce7b5faac4450583ad338cba86dc3d2..c755d0403a84d03906bf5a956d9ef8976d753b6f 100644 --- a/mindinsight/ui/src/views/train-manage/compare-plate.vue +++ b/mindinsight/ui/src/views/train-manage/compare-plate.vue @@ -171,7 +171,7 @@ export default { curBenchX: 'stepData', // Front axle reference curAxisName: this.$t('scalar.step'), // Current chart tip axisBenchChangeTimer: null, // Horizontal axis reference switching timing - cacheStatus: 'CACHING', + cacheStatus: 'CACHING', // cache }; }, computed: { @@ -284,7 +284,11 @@ export default { * Obtain the tag and summary list. */ getScalarsList() { - RequestService.getTrainJobs() + const params={}; + params.offset = 0; + params.limit = 999; + + RequestService.getTrainJobs(params) .then((res) => { // error; if ( @@ -310,6 +314,8 @@ export default { label: summaryObj.train_id, checked: true, show: true, + color: summaryNmeColor, + colorIndex: colorIndex, }); if (summaryObj.cache_status===this.cacheStatus) { @@ -1096,7 +1102,9 @@ export default { return; } this.multiSelectedSummaryNames=selectedItemDict; - this.autoUpdateSamples(); + if (this.isTimeReload) { + this.autoUpdateSamples(); + } this.trainJobsCaches(); this.updateSummary(); }, @@ -1203,13 +1211,6 @@ export default { } if (error.response && error.response.data) { this.clearAllData(); - } else { - if ( - !(error.code === 'ECONNABORTED' && /^timeout/.test(error.message)) - ) { - // Clear data - this.clearAllData(); - } } }, @@ -1326,7 +1327,11 @@ export default { label: summaryObj.train_id, checked: false, show: false, + color: summaryColor, + colorIndex: colorIndex, }); + } else { + summaryColor = this.summaryOperateList[sameSummaryIndex].color; } if (summaryObj.cache_status===this.cacheStatus) { @@ -1335,6 +1340,12 @@ export default { item.loading=true; } }); + } else { + this.summaryOperateList.forEach((item)=>{ + if (item.label=== summaryObj.train_id) { + item.loading=false; + } + }); } summaryObj.plugins.scalar.forEach((tagObj) => { @@ -1395,7 +1406,10 @@ export default { */ updateAllData(ignoreError) { - RequestService.getTrainJobs(ignoreError) + const params={}; + params.offset = 0; + params.limit = 999; + RequestService.getTrainJobs(params, ignoreError) .then((res) => { if (this.isReloading) { this.$store.commit('setIsReload', false); @@ -1420,6 +1434,10 @@ export default { this.$nextTick(() => { this.multiSelectedTagNames = this.$refs.tagsGroup.updateSelectedDic(); + this.multiSelectedSummaryNames = this.$refs.summaryGroup.updateSelectedDic(); + this.$refs.summaryGroup.$forceUpdate(); + this.$refs.tagsGroup.$forceUpdate(); + this.updateTagInPage(!tagRemoveFlag && !tagAddFlag); this.resizeCallback(); this.trainJobsCaches();