[Kimchi-devel] [v3 1/1] Ticket UI to set vnc ticket password
Simon Jin
simonjin at linux.vnet.ibm.com
Mon Oct 13 08:59:01 UTC 2014
Added the password input in "Edit Guest" --> "General"
Signed-off-by: Simon Jin <simonjin at linux.vnet.ibm.com>
Signed-off-by: Wen Wang <wenwang at 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) {
+ data.ticket = {'passwd': data['password']};
+ }
+ delete data['password'];
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>
</fieldset>
</form>
--
1.9.3
More information about the Kimchi-devel
mailing list