From 9f18b5b620cc2f619138d7f21f0cb1dcba698e40 Mon Sep 17 00:00:00 2001 From: EK <20902920+kioie@users.noreply.github.com> Date: Thu, 4 Jul 2019 12:19:32 +0300 Subject: [PATCH] ui: allow for the VM Hostname to be edited when VM is switched off (#3412) Allow for VM name (hostname) to be edited when VM is switched off. --- ui/scripts/instances.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js index e108788aa67..3018d9893c5 100644 --- a/ui/scripts/instances.js +++ b/ui/scripts/instances.js @@ -1477,6 +1477,11 @@ displayName: args.data.displayname }); } + if (args.data.name != args.context.instances[0].name) { + $.extend(data, { + name: args.data.name + }); + } $.ajax({ url: createURL('updateVirtualMachine'), data: data, @@ -2798,7 +2803,8 @@ converter: cloudStack.converters.toLocalDate }, name: { - label: 'label.name' + label: 'label.name', + isEditable: true }, id: { label: 'label.id'