You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2019/07/04 09:19:42 UTC

[cloudstack] branch master updated: ui: allow for the VM Hostname to be edited when VM is switched off (#3412)

This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/master by this push:
     new 9f18b5b  ui: allow for the VM Hostname to be edited  when VM is switched off  (#3412)
9f18b5b is described below

commit 9f18b5b620cc2f619138d7f21f0cb1dcba698e40
Author: EK <20...@users.noreply.github.com>
AuthorDate: Thu Jul 4 12:19:32 2019 +0300

    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 e108788..3018d98 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'