[Kimchi-devel] [PATCH V2] [Kimchi] Introducing Console for edit Guest module under virtualization

archus at linux.vnet.ibm.com archus at linux.vnet.ibm.com
Thu Sep 15 03:28:15 UTC 2016


From: Rajat Gupta <rajgupta at linux.vnet.ibm.com>

Introducing Console for edit Guest module under virtualization
for s390x

Signed-off-by: Rajat Gupta <rajgupta at linux.vnet.ibm.com>
---
 ui/js/src/kimchi.guest_edit_main.js | 13 +++++++++++++
 ui/pages/guest-edit.html.tmpl       |  8 ++++++++
 2 files changed, 21 insertions(+)

diff --git a/ui/js/src/kimchi.guest_edit_main.js b/ui/js/src/kimchi.guest_edit_main.js
index cc899ff..c3609c2 100644
--- a/ui/js/src/kimchi.guest_edit_main.js
+++ b/ui/js/src/kimchi.guest_edit_main.js
@@ -1014,6 +1014,19 @@ kimchi.guest_edit_main = function() {
             });
         }
 
+        if(kimchi.hostarch === s390xArch){
+            var consoleData = guest.console ? guest.console : '';
+            $('#guest-edit-console').val(consoleData);
+
+            if (kimchi.thisVMState === "shutoff") {
+                $('#guest-edit-console').prop('disabled', false);
+            }else{
+                $('#guest-edit-console').prop('disabled', true);
+            }
+            $('#guest-console-panel').show();
+            $('#guest-edit-console').selectpicker();
+        }
+
         var onAttached = function(params) {
             refreshCDROMs();
         };
diff --git a/ui/pages/guest-edit.html.tmpl b/ui/pages/guest-edit.html.tmpl
index 3a575dc..88ccb10 100644
--- a/ui/pages/guest-edit.html.tmpl
+++ b/ui/pages/guest-edit.html.tmpl
@@ -71,6 +71,14 @@
                     <label for="guest-edit-icon-textbox">$_("Icon")</label>
                     <input id="guest-edit-icon-textbox" class="form-control" name="icon" type="text" disabled="disabled"  />
                 </div>
+                <div class="form-group" id="guest-console-panel" style="display:none;">
+                    <label for="guest-edit-console">$_("Console")</label>
+                    <select id="guest-edit-console" name="console" class="form-control">
+                        <option value=""></option>
+                        <option value="sclp">$_("sclp")</option>
+                        <option value="virtio">$_("virtio")</option>
+                    </select>
+                </div>
             </form>
             <form role="tabpanel" class="tab-pane" id="form-guest-edit-storage">
                 <div class="btn-group action-area">
-- 
2.7.4




More information about the Kimchi-devel mailing list