From 4f47d1db3140caf0af6c3cc42417c2a271c6a159 Mon Sep 17 00:00:00 2001 From: Pearl Dsilva Date: Thu, 24 Jun 2021 14:18:05 +0530 Subject: [PATCH] ui: Notify users of new VM password on resetting VM's SSH key --- ui/src/config/section/compute.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ui/src/config/section/compute.js b/ui/src/config/section/compute.js index 48e9a10742bd..a9ffbe0b7858 100644 --- a/ui/src/config/section/compute.js +++ b/ui/src/config/section/compute.js @@ -146,7 +146,6 @@ export default { } }, successMethod: (obj, result) => { - console.log('here') const vm = result.jobresult.virtualmachine || {} if (result.jobstatus === 1 && vm.password) { const name = vm.displayname || vm.name || vm.id @@ -356,6 +355,17 @@ export default { domainid: { value: (record) => { return record.domainid } } + }, + successMethod: (obj, result) => { + const vm = result.jobresult.virtualmachine || {} + if (result.jobstatus === 1 && vm.password) { + const name = vm.displayname || vm.name || vm.id + obj.$notification.success({ + message: `${obj.$t('label.reset.ssh.key.pair.on.vm')}: ` + name, + description: `${obj.$t('label.password.reset.confirm')}: ` + vm.password, + duration: 0 + }) + } } }, {