<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/14/2016 04:01 PM, Rajat Gupta
wrote:<br>
</div>
<blockquote
cite="mid:c37e61c2-9cd2-1ddd-b6aa-4c41270c3497@linux.vnet.ibm.com"
type="cite">Hi,
<br>
<br>
Please find comments below
<br>
<br>
<br>
On 9/13/2016 1:58 PM, Archana Singh wrote:
<br>
<blockquote type="cite">Looks good, minor comment.
<br>
<br>
<br>
On 09/13/2016 12:30 PM, <a class="moz-txt-link-abbreviated" href="mailto:rajgupta@linux.vnet.ibm.com">rajgupta@linux.vnet.ibm.com</a> wrote:
<br>
<blockquote type="cite">From: Rajat Gupta
<a class="moz-txt-link-rfc2396E" href="mailto:rajgupta@linux.vnet.ibm.com"><rajgupta@linux.vnet.ibm.com></a>
<br>
<br>
Introducing Console for edit Guest module under virtualization
<br>
for s390x
<br>
<br>
Signed-off-by: Rajat Gupta <a class="moz-txt-link-rfc2396E" href="mailto:rajgupta@linux.vnet.ibm.com"><rajgupta@linux.vnet.ibm.com></a>
<br>
---
<br>
ui/js/src/kimchi.guest_edit_main.js | 13 +++++++++++++
<br>
ui/pages/guest-edit.html.tmpl | 8 ++++++++
<br>
2 files changed, 21 insertions(+)
<br>
<br>
diff --git a/ui/js/src/kimchi.guest_edit_main.js
b/ui/js/src/kimchi.guest_edit_main.js
<br>
index dcaafb8..e2437d7 100644
<br>
--- a/ui/js/src/kimchi.guest_edit_main.js
<br>
+++ b/ui/js/src/kimchi.guest_edit_main.js
<br>
@@ -776,6 +776,19 @@ kimchi.guest_edit_main = function() {
<br>
});
<br>
}
<br>
<br>
+ if(kimchi.hostarch === s390xArch){
<br>
+ var consoleData = guest.console ? guest.console :
'';
<br>
</blockquote>
Is it expected that API should away have console key present in
guest?
<br>
And what if consoleData is other than virtio and sclp? How it is
being taken care?
<br>
</blockquote>
<br>
No, if any other value provided means drop down will take default
behavior
<br>
<br>
<blockquote type="cite">
<br>
<blockquote type="cite">+
$('#guest-edit-console').val(consoleData);
<br>
</blockquote>
Does JS take care of setting the translated string in dropdown,
as html already has translated string mapped to value?
<br>
</blockquote>
<br>
Yes as value and text are separately handle once the vale is set
it will show the translated text.
<br>
<br>
<blockquote type="cite">
<blockquote type="cite">+
<br>
+ if (kimchi.thisVMState === "shutoff") {
<br>
+ $('#guest-edit-console').prop('disabled', false);
<br>
+ }else{
<br>
+ $('#guest-edit-console').prop('disabled', true);
<br>
+ }
<br>
+ $('#guest-console-panel').show();
<br>
+ $('#guest-edit-console').selectpicker();
<br>
+ }
<br>
+
<br>
var onAttached = function(params) {
<br>
refreshCDROMs();
<br>
};
<br>
diff --git a/ui/pages/guest-edit.html.tmpl
b/ui/pages/guest-edit.html.tmpl
<br>
index a9a468e..ac6a57e 100644
<br>
--- a/ui/pages/guest-edit.html.tmpl
<br>
+++ b/ui/pages/guest-edit.html.tmpl
<br>
@@ -71,6 +71,14 @@
<br>
<label
for="guest-edit-icon-textbox">$_("Icon")</label>
<br>
<input id="guest-edit-icon-textbox"
class="form-control" name="icon" type="text"
disabled="disabled" />
<br>
</div>
<br>
+ <div class="form-group"
id="guest-console-panel" style="display:none;">
<br>
+ <label
for="guest-edit-console">$_("Console")</label>
<br>
+ <select id="guest-edit-console"
name="console" class="form-control">
<br>
+ <option value=""></option>
<br>
+ <option
value="sclp">$_("sclp")</option>
<br>
+ <option
value="virtio">$_("virtio")</option>
<br>
+ </select>
<br>
+ </div>
<br>
</form>
<br>
<form role="tabpanel" class="tab-pane"
id="form-guest-edit-storage">
<br>
<div class="btn-group action-area">
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>