<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <div class="moz-cite-prefix">On 10/13/2014 05:59 AM, Simon Jin
      wrote:<br>
    </div>
    <blockquote
cite="mid:91bde943d2fd772c2176046aab8546d16d6a34fb.1413189274.git.simonjin@linux.vnet.ibm.com"
      type="cite">
      <pre wrap="">Added the password input in "Edit Guest" --&gt; "General"

Signed-off-by: Simon Jin <a class="moz-txt-link-rfc2396E" href="mailto:simonjin@linux.vnet.ibm.com">&lt;simonjin@linux.vnet.ibm.com&gt;</a>
Signed-off-by: Wen Wang <a class="moz-txt-link-rfc2396E" href="mailto:wenwang@linux.vnet.ibm.com">&lt;wenwang@linux.vnet.ibm.com&gt;</a>
---
 ui/css/theme-default/guest-edit.css |  2 +-
 ui/js/src/kimchi.guest_edit_main.js |  4 ++++
 ui/pages/guest-edit.html.tmpl       | 11 +++++++++++
 3 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/ui/css/theme-default/guest-edit.css b/ui/css/theme-default/guest-edit.css
index 76fbaf2..6c47e7d 100644
--- a/ui/css/theme-default/guest-edit.css
+++ b/ui/css/theme-default/guest-edit.css
@@ -18,7 +18,7 @@
 #guest-edit-window {
     font-size: 13px;
     height: 400px;
-    width: 610px;
+    width: 660px;
 }

 #guest-edit-tabs {
diff --git a/ui/js/src/kimchi.guest_edit_main.js b/ui/js/src/kimchi.guest_edit_main.js
index c281289..a80fdff 100644
--- a/ui/js/src/kimchi.guest_edit_main.js
+++ b/ui/js/src/kimchi.guest_edit_main.js
@@ -418,6 +418,10 @@ kimchi.guest_edit_main = function() {
         if(data['cpus']!=undefined) {
             data['cpus']   = Number(data['cpus']);
         }</pre>
    </blockquote>
    <br>
    <blockquote
cite="mid:91bde943d2fd772c2176046aab8546d16d6a34fb.1413189274.git.simonjin@linux.vnet.ibm.com"
      type="cite">
      <pre wrap="">
+        if(data['password'].length &gt; 0) {</pre>
    </blockquote>
    <br>
    How do I reset the password?<br>
    <br>
    <blockquote
cite="mid:91bde943d2fd772c2176046aab8546d16d6a34fb.1413189274.git.simonjin@linux.vnet.ibm.com"
      type="cite">
      <pre wrap="">
+            data.ticket = {'passwd': data['password']};
+        }
+        delete data['password'];</pre>
    </blockquote>
    <br>
    The "ticket" parameter does not exist anymore. The "passwd" and
    "passwdValidTo" were mode to "graphics" data structure.<br>
    <br>
    <div selected="true" role="tabpanel" class="netInfoResponseText
      netInfoText ">
      <pre role="list"><code class="wrappedText focusRow" role="listitem">{
</code><code class="wrappedText focusRow" role="listitem">  "users":[],
</code><code class="wrappedText focusRow" role="listitem">  "screenshot":null,
</code><code class="wrappedText focusRow" role="listitem">  "cpus":1,
</code><code class="wrappedText focusRow" role="listitem">  "persistent":true,
</code><code class="wrappedText focusRow" role="listitem">  "groups":[],
</code><code class="wrappedText focusRow" role="listitem"> <b> "graphics":{
</b></code><b><code class="wrappedText focusRow" role="listitem">    "passwd":null,
</code></b><b><code class="wrappedText focusRow" role="listitem">    "passwdValidTo":null,
</code></b><b><code class="wrappedText focusRow" role="listitem">    "type":"spice",
</code></b><b><code class="wrappedText focusRow" role="listitem">    "port":null,
</code></b><b><code class="wrappedText focusRow" role="listitem">    "listen":"127.0.0.1"
</code></b><code class="wrappedText focusRow" role="listitem"><b>  },</b>
</code><code class="wrappedText focusRow" role="listitem">  "icon":"images/icon-fedora.png",
</code><code class="wrappedText focusRow" role="listitem">  "stats":{
</code><code class="wrappedText focusRow" role="listitem">    "net_throughput":0,
</code><code class="wrappedText focusRow" role="listitem">    "io_throughput_peak":100,
</code><code class="wrappedText focusRow" role="listitem">    "cpu_utilization":0,
</code><code class="wrappedText focusRow" role="listitem">    "io_throughput":0,
</code><code class="wrappedText focusRow" role="listitem">    "net_throughput_peak":100
</code><code class="wrappedText focusRow" role="listitem">  },
</code><code class="wrappedText focusRow" role="listitem">  "name":"a-spice",
</code><code class="wrappedText focusRow" role="listitem">  "uuid":"e26a39c0-f57b-42a8-9663-c91711ff004d",
</code><code class="wrappedText focusRow" role="listitem">  "access":"full",
</code><code class="wrappedText focusRow" role="listitem">  "state":"shutoff",
</code><code class="wrappedText focusRow" role="listitem">  "memory":1024
</code><code class="wrappedText focusRow" role="listitem">}</code></pre>
    </div>
    <br>
    You also need to get/display the password on dialog initialization.<br>
    <br>
    And as we will provide this feature on Kimchi (ability to set/change
    the console password) we need to make sure spice and novnc code
    works fine with that in all supported distros (RHEL6.5, RHEL7,
    openSUSE13.1, Ubuntu 14.04 and Fedora 20)<br>
    <br>
    <blockquote
cite="mid:91bde943d2fd772c2176046aab8546d16d6a34fb.1413189274.git.simonjin@linux.vnet.ibm.com"
      type="cite">
      <pre wrap="">

         kimchi.updateVM(kimchi.selectedGuest, data, function() {
             kimchi.listVmsAuto();
diff --git a/ui/pages/guest-edit.html.tmpl b/ui/pages/guest-edit.html.tmpl
index 917b2e8..30ced5b 100644
--- a/ui/pages/guest-edit.html.tmpl
+++ b/ui/pages/guest-edit.html.tmpl
@@ -65,6 +65,11 @@
                                 $_("Icon")
                             &lt;/label&gt;
                         &lt;/div&gt;
+                        &lt;div class="guest-edit-wrapper-label"&gt;
+                            &lt;label for="guest-edit-password-textbox"&gt;
+                                $_("Console Password")
+                            &lt;/label&gt;
+                        &lt;/div&gt;
                     &lt;/div&gt;
                     &lt;div class="edit-general-inline"&gt;
                         &lt;div class="guest-edit-wrapper-controls"&gt;
@@ -89,6 +94,12 @@
                                 type="text"
                                 disabled="disabled" /&gt;
                         &lt;/div&gt;
+                        &lt;div class="guest-edit-wrapper-controls"&gt;
+                            &lt;input
+                                id="guest-edit-password-textbox"
+                                name="password"
+                                type="text" /&gt;
+                        &lt;/div&gt;
                     &lt;/div&gt;
                 &lt;/fieldset&gt;
             &lt;/form&gt;
</pre>
    </blockquote>
    <br>
  </body>
</html>