[Kimchi-devel] [PATCH] [Kimchi] Memory hot plug front-end

peterpnns at gmail.com peterpnns at gmail.com
Mon Jan 18 16:12:50 UTC 2016


From: peterpennings <peterpnns at gmail.com>

Signed-off-by: peterpennings <peterpnns at gmail.com>
---
 ui/css/kimchi.css                    | 4 ++++
 ui/css/src/modules/_edit-guests.scss | 5 +++++
 ui/js/src/kimchi.guest_edit_main.js  | 2 +-
 ui/pages/guest-edit.html.tmpl        | 2 +-
 4 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/ui/css/kimchi.css b/ui/css/kimchi.css
index ec57c93..935f33c 100644
--- a/ui/css/kimchi.css
+++ b/ui/css/kimchi.css
@@ -660,6 +660,10 @@
   position: relative;
 }
 
+#guest-edit-window #form-guest-edit-general #guest-edit-memory-textbox {
+  width: 590px;
+}
+
 #guest-edit-window #form-guest-edit-interface .column-actions {
   width: 23%;
 }
diff --git a/ui/css/src/modules/_edit-guests.scss b/ui/css/src/modules/_edit-guests.scss
index e42919b..d930ca2 100644
--- a/ui/css/src/modules/_edit-guests.scss
+++ b/ui/css/src/modules/_edit-guests.scss
@@ -24,6 +24,11 @@
     .tab-content .tab-pane {
         position: relative;
     }
+    #form-guest-edit-general {
+        #guest-edit-memory-textbox {
+            width: 590px;
+        }
+    }
     #form-guest-edit-interface {
         .column-actions {
             width: 23%;
diff --git a/ui/js/src/kimchi.guest_edit_main.js b/ui/js/src/kimchi.guest_edit_main.js
index 3f9c3e9..1e1ad4f 100644
--- a/ui/js/src/kimchi.guest_edit_main.js
+++ b/ui/js/src/kimchi.guest_edit_main.js
@@ -669,7 +669,7 @@ kimchi.guest_edit_main = function() {
             wok.window.open('plugins/kimchi/guest-storage-add.html', 'extendCreateStorage');
         });
         if ((kimchi.thisVMState === "running") || (kimchi.thisVMState === "paused")) {
-            $("#form-guest-edit-general input").prop("disabled", true);
+            $("#form-guest-edit-general input").not("#guest-edit-memory-textbox").prop("disabled", true);
         }
 
         var onAttached = function(params) {
diff --git a/ui/pages/guest-edit.html.tmpl b/ui/pages/guest-edit.html.tmpl
index 54700fd..e5f5d46 100644
--- a/ui/pages/guest-edit.html.tmpl
+++ b/ui/pages/guest-edit.html.tmpl
@@ -50,7 +50,7 @@
                 </div>
                 <div class="form-group">
                     <label for="guest-edit-memory-textbox">$_("Memory (MB)")</label>
-                    <input id="guest-edit-memory-textbox" class="form-control" name="memory" type="text" />
+                    <input id="guest-edit-memory-textbox" class="form-control" name="memory" type="number" min="1024" step="1024" />
                 </div>
                 <div class="form-group">
                     <label for="guest-edit-icon-textbox">$_("Icon")</label>
-- 
2.5.0




More information about the Kimchi-devel mailing list