<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Reviewed by: Archana Singh <a class="moz-txt-link-rfc2396E"
        href="mailto:archus@linux.vnet.ibm.com">&lt;archus@linux.vnet.ibm.com&gt;</a></p>
    <br>
    <div class="moz-cite-prefix">On 09/13/2016 10:48 AM,
      <a class="moz-txt-link-abbreviated" href="mailto:rajgupta@linux.vnet.ibm.com">rajgupta@linux.vnet.ibm.com</a> wrote:<br>
    </div>
    <blockquote
      cite="mid:1473743933-13479-1-git-send-email-rajgupta@linux.vnet.ibm.com"
      type="cite">
      <pre wrap="">From: Rajat Gupta <a class="moz-txt-link-rfc2396E" href="mailto:rajgupta@linux.vnet.ibm.com">&lt;rajgupta@linux.vnet.ibm.com&gt;</a>

Introducing Console for edit template module under virtualization

Signed-off-by: Rajat Gupta <a class="moz-txt-link-rfc2396E" href="mailto:rajgupta@linux.vnet.ibm.com">&lt;rajgupta@linux.vnet.ibm.com&gt;</a>
---
 ui/js/src/kimchi.template_edit_main.js | 13 ++++++++++++-
 ui/pages/template-edit.html.tmpl       | 10 ++++++++++
 2 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/ui/js/src/kimchi.template_edit_main.js b/ui/js/src/kimchi.template_edit_main.js
index a2032cc..ad6857f 100644
--- a/ui/js/src/kimchi.template_edit_main.js
+++ b/ui/js/src/kimchi.template_edit_main.js
@@ -62,6 +62,12 @@ kimchi.template_edit_main = function() {
             }
             $('input[name="' + prop + '"]', templateEditMain).val(value);
         }
+        if(kimchi.hostarch == s390xArch){
+          $('.console', templateEditMain).show();
+          var consoleData = template.console ? template.console : '';
+          $('#template-edit-console', templateEditMain).val(consoleData);
+          $('#template-edit-console').selectpicker();
+        }

         $('#template-edit-memory-textbox').val(template.memory.current);
         $('#template-edit-max-memory-textbox').val(template.memory.maxmemory);
@@ -356,7 +362,12 @@ kimchi.template_edit_main = function() {
         $('.modal input[type="checkbox"]').prop('disabled', true);
         $('.modal select').prop('disabled', true);
         $('.modal .selectpicker').addClass('disabled');
-        var editableFields = ['name', 'memory', 'graphics', 'max-memory'];
+        if(kimchi.hostarch === s390xArch){
+          var editableFields = ['name', 'memory', 'graphics', 'max-memory', 'console'];
+        }else {
+          var editableFields = ['name', 'memory', 'graphics', 'max-memory'];
+        }
+
         var data = {};
         var disks = $('.template-tab-body .item', '#form-template-storage');
         var disksForUpdate = new Array();
diff --git a/ui/pages/template-edit.html.tmpl b/ui/pages/template-edit.html.tmpl
index 6cac885..d37df8d 100644
--- a/ui/pages/template-edit.html.tmpl
+++ b/ui/pages/template-edit.html.tmpl
@@ -73,6 +73,9 @@
                             &lt;div class="template-edit-wrapper-label"&gt;
                                 &lt;label&gt;$_("Graphics")&lt;/label&gt;
                             &lt;/div&gt;
+                            &lt;div class="template-edit-wrapper-label console" style="display:none"&gt;
+                                        &lt;label&gt;$_("Console")&lt;/label&gt;
+                                    &lt;/div&gt;
                         &lt;/div&gt;
                         &lt;div class="form-template-inline-wrapper"&gt;
                             &lt;div class="template-edit-wrapper-controls"&gt;
@@ -104,6 +107,13 @@
                             &lt;div class="template-edit-wrapper-controls"&gt;
                                     &lt;select id="template-edit-graphics" name="graphics" class="form-control"  /&gt;
                             &lt;/div&gt;
+                            &lt;div class="template-edit-wrapper-controls console" style="display:none"&gt;
+                                            &lt;select id="template-edit-console" name="console" class="form-control"&gt;
+                                              &lt;option value=""&gt;&lt;/option&gt;
+                                              &lt;option value="sclp"&gt;$_("sclp")&lt;/option&gt;
+                                              &lt;option value="virtio"&gt;$_("virtio")&lt;/option&gt;
+                                           &lt;/select&gt;
+                                    &lt;/div&gt;
                         &lt;/div&gt;
                     &lt;/form&gt;
                 &lt;/div&gt;
</pre>
    </blockquote>
    <br>
  </body>
</html>