From 16b359ceb3179344b69223c8ced424be9fac3ba4 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Thu, 30 Apr 2020 02:32:28 +0530 Subject: [PATCH] infra: runDiagnostic output notification for routers and systemvms (#297) Fixes: #293 Signed-off-by: Rohit Yadav Co-authored-by: Rohit Yadav --- ui/src/config/section/infra/routers.js | 3 ++- ui/src/config/section/infra/systemVms.js | 3 ++- ui/src/locales/en.json | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ui/src/config/section/infra/routers.js b/ui/src/config/section/infra/routers.js index a031005db8a..370fdaad4bb 100644 --- a/ui/src/config/section/infra/routers.js +++ b/ui/src/config/section/infra/routers.js @@ -89,7 +89,8 @@ export default { type: { options: ['ping', 'traceroute', 'arping'] } - } + }, + response: (result) => { return result && result.diagnostics ? `Output:
${result.diagnostics.stdout}
Error: ${result.diagnostics.stderr}
Exit Code: ${result.diagnostics.exitcode}` : 'Invalid response' } }, { api: 'getDiagnosticsData', diff --git a/ui/src/config/section/infra/systemVms.js b/ui/src/config/section/infra/systemVms.js index 380bb3060ff..da53efab136 100644 --- a/ui/src/config/section/infra/systemVms.js +++ b/ui/src/config/section/infra/systemVms.js @@ -80,7 +80,8 @@ export default { type: { options: ['ping', 'traceroute', 'arping'] } - } + }, + response: (result) => { return result && result.diagnostics ? `Output:
${result.diagnostics.stdout}
Error: ${result.diagnostics.stderr}
Exit Code: ${result.diagnostics.exitcode}` : 'Invalid response' } }, { api: 'getDiagnosticsData', diff --git a/ui/src/locales/en.json b/ui/src/locales/en.json index 8035422473b..264fa656d55 100644 --- a/ui/src/locales/en.json +++ b/ui/src/locales/en.json @@ -804,6 +804,7 @@ "ovm3vip": "Master Vip IP", "ovmnetworklabel": "OVM Traffic Label", "palp": "Palo Alto Log Profile", +"params": "Parameters", "parentName": "Parent", "passive": "Passive", "password": "Password",