提交 789343af 编写于 作者: P ph

UI fix timeline button state and error tip issue

上级 717517ed
...@@ -50,8 +50,7 @@ axios.interceptors.response.use( ...@@ -50,8 +50,7 @@ axios.interceptors.response.use(
// error returned by backend // error returned by backend
if (error.response && error.response.data && error.response.data.error_code) { if (error.response && error.response.data && error.response.data.error_code) {
if (error.response.data.error_code.toString() === '50545005' || if (error.response.data.error_code.toString() === '50545005') {
error.response.data.error_code.toString() === '50545006') {
if (error.config.headers.ignoreError || if (error.config.headers.ignoreError ||
router.currentRoute.path === '/train-manage/training-dashboard') { router.currentRoute.path === '/train-manage/training-dashboard') {
return Promise.reject(error); return Promise.reject(error);
...@@ -59,6 +58,9 @@ axios.interceptors.response.use( ...@@ -59,6 +58,9 @@ axios.interceptors.response.use(
} else if ( error.response.data.error_code.toString() === '50542216' && } else if ( error.response.data.error_code.toString() === '50542216' &&
router.currentRoute.path === '/train-manage/training-dashboard') { router.currentRoute.path === '/train-manage/training-dashboard') {
return Promise.reject(error); return Promise.reject(error);
} else if ( router.currentRoute.path === '/profiling/profiling-dashboard' &&
error.config.headers.ignoreError ) {
return Promise.reject(error);
} }
if (errorData[error.response.data.error_code]) { if (errorData[error.response.data.error_code]) {
Vue.prototype.$message.error(errorData[error.response.data.error_code]); Vue.prototype.$message.error(errorData[error.response.data.error_code]);
...@@ -84,6 +86,5 @@ axios.interceptors.response.use( ...@@ -84,6 +86,5 @@ axios.interceptors.response.use(
return Promise.reject(error); return Promise.reject(error);
} }
} }
store.commit('setIsReload', false);
}, },
); );
...@@ -923,7 +923,7 @@ export default { ...@@ -923,7 +923,7 @@ export default {
this.timeLine.waiting = true; this.timeLine.waiting = true;
RequestService.queryTimeline(params) RequestService.queryTimeline(params)
.then((res) => { .then((res) => {
if (res && res.data) { if (res && res.data && res.data.length) {
this.timeLine.data = this.stringToUint8Array( this.timeLine.data = this.stringToUint8Array(
JSON.stringify(res.data), JSON.stringify(res.data),
); );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册