提交 81d9d20e 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!164 UI fix compare plate issue

Merge pull request !164 from 潘慧/master_ph
...@@ -104,9 +104,10 @@ export default { ...@@ -104,9 +104,10 @@ export default {
}, },
// query trainJob data // query trainJob data
getTrainJobs(isIgnoreError) { getTrainJobs(params, isIgnoreError) {
return axios({ return axios({
method: 'get', method: 'get',
params: params,
url: 'v1/mindinsight/datavisual/train-jobs', url: 'v1/mindinsight/datavisual/train-jobs',
headers: { headers: {
ignoreError: isIgnoreError, ignoreError: isIgnoreError,
......
...@@ -171,7 +171,7 @@ export default { ...@@ -171,7 +171,7 @@ export default {
curBenchX: 'stepData', // Front axle reference curBenchX: 'stepData', // Front axle reference
curAxisName: this.$t('scalar.step'), // Current chart tip curAxisName: this.$t('scalar.step'), // Current chart tip
axisBenchChangeTimer: null, // Horizontal axis reference switching timing axisBenchChangeTimer: null, // Horizontal axis reference switching timing
cacheStatus: 'CACHING', cacheStatus: 'CACHING', // cache
}; };
}, },
computed: { computed: {
...@@ -284,7 +284,11 @@ export default { ...@@ -284,7 +284,11 @@ export default {
* Obtain the tag and summary list. * Obtain the tag and summary list.
*/ */
getScalarsList() { getScalarsList() {
RequestService.getTrainJobs() const params={};
params.offset = 0;
params.limit = 999;
RequestService.getTrainJobs(params)
.then((res) => { .then((res) => {
// error; // error;
if ( if (
...@@ -310,6 +314,8 @@ export default { ...@@ -310,6 +314,8 @@ export default {
label: summaryObj.train_id, label: summaryObj.train_id,
checked: true, checked: true,
show: true, show: true,
color: summaryNmeColor,
colorIndex: colorIndex,
}); });
if (summaryObj.cache_status===this.cacheStatus) { if (summaryObj.cache_status===this.cacheStatus) {
...@@ -1096,7 +1102,9 @@ export default { ...@@ -1096,7 +1102,9 @@ export default {
return; return;
} }
this.multiSelectedSummaryNames=selectedItemDict; this.multiSelectedSummaryNames=selectedItemDict;
if (this.isTimeReload) {
this.autoUpdateSamples(); this.autoUpdateSamples();
}
this.trainJobsCaches(); this.trainJobsCaches();
this.updateSummary(); this.updateSummary();
}, },
...@@ -1203,13 +1211,6 @@ export default { ...@@ -1203,13 +1211,6 @@ export default {
} }
if (error.response && error.response.data) { if (error.response && error.response.data) {
this.clearAllData(); this.clearAllData();
} else {
if (
!(error.code === 'ECONNABORTED' && /^timeout/.test(error.message))
) {
// Clear data
this.clearAllData();
}
} }
}, },
...@@ -1326,7 +1327,11 @@ export default { ...@@ -1326,7 +1327,11 @@ export default {
label: summaryObj.train_id, label: summaryObj.train_id,
checked: false, checked: false,
show: false, show: false,
color: summaryColor,
colorIndex: colorIndex,
}); });
} else {
summaryColor = this.summaryOperateList[sameSummaryIndex].color;
} }
if (summaryObj.cache_status===this.cacheStatus) { if (summaryObj.cache_status===this.cacheStatus) {
...@@ -1335,6 +1340,12 @@ export default { ...@@ -1335,6 +1340,12 @@ export default {
item.loading=true; item.loading=true;
} }
}); });
} else {
this.summaryOperateList.forEach((item)=>{
if (item.label=== summaryObj.train_id) {
item.loading=false;
}
});
} }
summaryObj.plugins.scalar.forEach((tagObj) => { summaryObj.plugins.scalar.forEach((tagObj) => {
...@@ -1395,7 +1406,10 @@ export default { ...@@ -1395,7 +1406,10 @@ export default {
*/ */
updateAllData(ignoreError) { updateAllData(ignoreError) {
RequestService.getTrainJobs(ignoreError) const params={};
params.offset = 0;
params.limit = 999;
RequestService.getTrainJobs(params, ignoreError)
.then((res) => { .then((res) => {
if (this.isReloading) { if (this.isReloading) {
this.$store.commit('setIsReload', false); this.$store.commit('setIsReload', false);
...@@ -1420,6 +1434,10 @@ export default { ...@@ -1420,6 +1434,10 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.multiSelectedTagNames = this.$refs.tagsGroup.updateSelectedDic(); 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.updateTagInPage(!tagRemoveFlag && !tagAddFlag);
this.resizeCallback(); this.resizeCallback();
this.trainJobsCaches(); this.trainJobsCaches();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册