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

Aline Manera alinefm at linux.vnet.ibm.com
Wed Sep 14 21:34:07 UTC 2016


Please, use 4 spaces for indentation.

On 09/13/2016 04:00 AM, 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 : '';
> +          $('#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 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">




More information about the Kimchi-devel mailing list