From 9c356c9a0355251edd18fcb22167da296baae699 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Thu, 30 Apr 2020 01:41:01 +0530 Subject: [PATCH] infra: fix getDiagnostics response display (#312) Fixes #201 Fixes #202 Signed-off-by: Abhishek Kumar Signed-off-by: Rohit Yadav --- ui/src/config/section/infra/routers.js | 3 ++- ui/src/config/section/infra/systemVms.js | 3 ++- ui/src/views/AutogenView.vue | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ui/src/config/section/infra/routers.js b/ui/src/config/section/infra/routers.js index 92db3c80995..a031005db8a 100644 --- a/ui/src/config/section/infra/routers.js +++ b/ui/src/config/section/infra/routers.js @@ -102,7 +102,8 @@ export default { targetid: { value: (record) => { return record.id } } - } + }, + response: (result) => { return result && result.diagnostics && result.diagnostics.url ? `Please click the link to download the retrieved diagnostics:

${result.diagnostics.url}

` : 'Invalid response' } }, { api: 'destroyRouter', diff --git a/ui/src/config/section/infra/systemVms.js b/ui/src/config/section/infra/systemVms.js index 67597b45319..380bb3060ff 100644 --- a/ui/src/config/section/infra/systemVms.js +++ b/ui/src/config/section/infra/systemVms.js @@ -93,7 +93,8 @@ export default { targetid: { value: (record) => { return record.id } } - } + }, + response: (result) => { return result && result.diagnostics && result.diagnostics.url ? `Please click the link to download the retrieved diagnostics:

${result.diagnostics.url}

` : 'Invalid response' } }, { api: 'destroySystemVm', diff --git a/ui/src/views/AutogenView.vue b/ui/src/views/AutogenView.vue index 1bbfad6383f..8f7468096d1 100644 --- a/ui/src/views/AutogenView.vue +++ b/ui/src/views/AutogenView.vue @@ -646,7 +646,7 @@ export default { const description = action.response(result.jobresult) if (description) { this.$notification.info({ - message: action.label, + message: this.$t(action.label), description: (), duration: 0 })