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

Archana Singh archus at linux.vnet.ibm.com
Wed Sep 14 10:46:51 UTC 2016


Reviewed by: Archana Singh <archus at linux.vnet.ibm.com>


On 09/14/2016 04:01 PM, Rajat Gupta wrote:
> Hi,
>
> Please find comments below
>
>
> On 9/13/2016 1:58 PM, Archana Singh wrote:
>> Looks good, minor comment.
>>
>>
>> On 09/13/2016 12:30 PM, rajgupta at linux.vnet.ibm.com wrote:
>>> 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 dcaafb8..e2437d7 100644
>>> --- a/ui/js/src/kimchi.guest_edit_main.js
>>> +++ b/ui/js/src/kimchi.guest_edit_main.js
>>> @@ -776,6 +776,19 @@ kimchi.guest_edit_main = function() {
>>>               });
>>>           }
>>>
>>> +        if(kimchi.hostarch === s390xArch){
>>> +          var consoleData = guest.console ? guest.console : '';
>> Is it expected that API should away have console key present in guest?
>> And what if consoleData is other than virtio and sclp? How it is 
>> being taken care?
>
> No, if any other value provided means drop down will take default 
> behavior
>
>>
>>> + $('#guest-edit-console').val(consoleData);
>> Does JS take care of setting the translated string in dropdown, as 
>> html already has translated string mapped to value?
>
> Yes as value and text are separately handle once the vale is set it 
> will show the translated text.
>
>>> +
>>> +          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 a9a468e..ac6a57e 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">
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/kimchi-devel/attachments/20160914/229a5699/attachment.html>


More information about the Kimchi-devel mailing list