diff --git a/mindinsight/ui/src/components/gridTableSimple.vue b/mindinsight/ui/src/components/gridTableSimple.vue index c98ebf882a1c8e4c59845401a39409d1de93ef4e..7dabc5c57847a85a0e1946540807454fa7c10c63 100644 --- a/mindinsight/ui/src/components/gridTableSimple.vue +++ b/mindinsight/ui/src/components/gridTableSimple.vue @@ -33,7 +33,7 @@ limitations under the License. class="grid-item">
+ v-if="showOperate && (fullData.length || requestError)">
{ let showLimitError = false; + let errorMsg = ''; if ( e.response && e.response.data && e.response.data.error_code && - e.response.data.error_code.toString() === '50545013' + (e.response.data.error_code.toString() === '50545013' || + e.response.data.error_code.toString() === '50545014') ) { showLimitError = true; + errorMsg = this.$t('error')[e.response.data.error_code]; } - this.clearMartixData(sampleItem, showLimitError); + this.clearMartixData(sampleItem, showLimitError, errorMsg); sampleItem.showLoading = false; }, ); @@ -695,8 +698,9 @@ export default { * Clear table display * @param {Object} sampleItem The object that is being operated * @param {Boolean} showLimitError Display request error message + * @param {String} errorMsg Error message */ - clearMartixData(sampleItem, showLimitError) { + clearMartixData(sampleItem, showLimitError, errorMsg) { sampleItem.curData = []; sampleItem.newDataFlag = true; let elementItem = null; @@ -706,7 +710,7 @@ export default { elementItem[0].updateGridData(); if (showLimitError) { elementItem[0].showRequestErrorMessage( - this.$t('error.50545013'), + errorMsg, sampleItem.formateData.value.dims, sampleItem.filterStr, ); diff --git a/mindinsight/ui/src/views/train-manage/training-dashboard.vue b/mindinsight/ui/src/views/train-manage/training-dashboard.vue index 28e3ca658b23c1ea4079b031df8400b1e97de718..88b177e3410af88ea5a172a75ae88255266c807f 100644 --- a/mindinsight/ui/src/views/train-manage/training-dashboard.vue +++ b/mindinsight/ui/src/views/train-manage/training-dashboard.vue @@ -969,12 +969,31 @@ export default { } }); }, - () => { + (e) => { this.tensorData = []; + let showLimitError = false; + let errorMsg = ''; + if ( + e.response && + e.response.data && + e.response.data.error_code && + (e.response.data.error_code.toString() === '50545013' || + e.response.data.error_code.toString() === '50545014') + ) { + showLimitError = true; + if (e.response.data.error_code.toString() === '50545014') { + errorMsg = this.$t('error')[e.response.data.error_code]; + } else { + errorMsg = this.$t('tensors.tensorDashboardLimitErrorMsg'); + } + } this.$nextTick(() => { const elementItem = this.$refs.tensorChart; if (elementItem) { elementItem.updateGridData(); + if (showLimitError) { + elementItem.showRequestErrorMessage(errorMsg); + } } }); },