On 10/13/2014 03:30 PM, Aline Manera wrote:
On 10/13/2014 05:59 AM, Simon Jin wrote:
Added the password input in "Edit Guest" --> "General" Signed-off-by: Simon Jin <simonjin@linux.vnet.ibm.com> Signed-off-by: Wen Wang <wenwang@linux.vnet.ibm.com> --- 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']); }
+ if(data['password'].length > 0) {
How do I reset the password?
+ data.ticket = {'passwd': data['password']}; + } + delete data['password'];
The "ticket" parameter does not exist anymore. The "passwd" and "passwdValidTo" were mode to "graphics" data structure.
{
"users":[],
"screenshot":null,
"cpus":1,
"persistent":true,
"groups":[],
"graphics":{
"passwd":null,
"passwdValidTo":null,
"type":"spice",
"port":null,
"listen":"127.0.0.1"
},
"icon":"images/icon-fedora.png",
"stats":{
"net_throughput":0,
"io_throughput_peak":100,
"cpu_utilization":0,
"io_throughput":0,
"net_throughput_peak":100
},
"name":"a-spice",
"uuid":"e26a39c0-f57b-42a8-9663-c91711ff004d",
"access":"full",
"state":"shutoff",
"memory":1024
}
You also need to get/display the password on dialog initialization.
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)
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") </label> </div>
+ <div class="guest-edit-wrapper-label"> + <label for="guest-edit-password-textbox"> + $_("Console Password") + </label> + </div> </div> <div class="edit-general-inline"> <div class="guest-edit-wrapper-controls"> @@ -89,6 +94,12 @@ type="text" disabled="disabled" /> </div> + <div class="guest-edit-wrapper-controls"> + <input + id="guest-edit-password-textbox" + name="password" + type="text" /> + </div> </div>
Also the console password fieldset should be in a conditional as a VM may not have a graphics drive configured.
The console password should be valid only for VNC and Spice.
I know I suggested to insert the "Console Password" in the "General" tab instead of adding a new tab "Graphics", but Brent sent patches to allow switching the console type on VM, which means we will need to display a combo box with console types there too. So maybe now the new tab "Graphics" makes more sense. What do you think?
</fieldset> </form>
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel