<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"><archus@linux.vnet.ibm.com></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"><rajgupta@linux.vnet.ibm.com></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"><rajgupta@linux.vnet.ibm.com></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 @@
<div class="template-edit-wrapper-label">
<label>$_("Graphics")</label>
</div>
+ <div class="template-edit-wrapper-label console" style="display:none">
+ <label>$_("Console")</label>
+ </div>
</div>
<div class="form-template-inline-wrapper">
<div class="template-edit-wrapper-controls">
@@ -104,6 +107,13 @@
<div class="template-edit-wrapper-controls">
<select id="template-edit-graphics" name="graphics" class="form-control" />
</div>
+ <div class="template-edit-wrapper-controls console" style="display:none">
+ <select id="template-edit-console" name="console" class="form-control">
+ <option value=""></option>
+ <option value="sclp">$_("sclp")</option>
+ <option value="virtio">$_("virtio")</option>
+ </select>
+ </div>
</div>
</form>
</div>
</pre>
</blockquote>
<br>
</body>
</html>