[PATCH] Change behavior of pause VM button

From: Socorro Stoppler <socorrob@us.ibm.com> Make the Pause button behave like the Reset button Make the Resume icon in the tile more visible when hovering over it This addresses the following: https://github.com/kimchi-project/kimchi/issues/649#issuecomment-107569954 Socorro Stoppler (1): Change button behavior for pause/resume VM ui/css/theme-default/list.css | 2 +- ui/js/src/kimchi.guest_main.js | 4 +++- ui/pages/guest.html.tmpl | 8 ++++---- 3 files changed, 8 insertions(+), 6 deletions(-) -- 1.9.1

From: Socorro Stoppler <socorrob@us.ibm.com> Make the resume icon more visible in the tile Make the Pause button behave like Reset button Signed-off-by: Socorro Stoppler <socorrob@us.ibm.com> --- ui/css/theme-default/list.css | 2 +- ui/js/src/kimchi.guest_main.js | 4 +++- ui/pages/guest.html.tmpl | 8 ++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ui/css/theme-default/list.css b/ui/css/theme-default/list.css index 9b4f88f..718c855 100644 --- a/ui/css/theme-default/list.css +++ b/ui/css/theme-default/list.css @@ -283,7 +283,7 @@ } .list-vm .paused img { - opacity: 0.1; + opacity: 0.6; } .list-title { diff --git a/ui/js/src/kimchi.guest_main.js b/ui/js/src/kimchi.guest_main.js index 57150e7..7e25b68 100644 --- a/ui/js/src/kimchi.guest_main.js +++ b/ui/js/src/kimchi.guest_main.js @@ -379,11 +379,13 @@ kimchi.createGuestLi = function(vmObject, prevScreenImage, openMenu) { guestActions.find(".running-disabled").prop("disabled", vmRunningBool); guestActions.find(".non-persistent-disabled").prop("disabled", !vmPersistent); guestActions.find(".reset-disabled").prop("disabled", vmPoweredOffBool || !vmPersistent); + guestActions.find(".pause-disabled").prop("disabled", vmPoweredOffBool || !vmPersistent); if (vmSuspendedBool) { //VM is paused //Hide Start guestActions.find(".running-hidden").hide(); - //Hide Pause + //Hide Pause button and menu + guestActions.find(".pause-disabled").hide(); guestActions.find(".pause-hidden").hide(); } diff --git a/ui/pages/guest.html.tmpl b/ui/pages/guest.html.tmpl index 57563c1..1bc1006 100644 --- a/ui/pages/guest.html.tmpl +++ b/ui/pages/guest.html.tmpl @@ -51,10 +51,10 @@ <div class="sortable guest-actions" name="guest-actions"> <div class="top"> <button class="btn reset-disabled" name="vm-reset" href="javascript:void(0);" title="$_("Reset")"><span class="icon reset"></span></button> + <button class="btn pause-disabled" name="vm-pause" href="javascript:void(0);" title="$_("Pause")"><span class="icon pause"></span></button> + <button class="btn resume-hidden" name="vm-resume" href="javascript:void(0);" title="$_("Resume")"><span class="icon resume"></span></button> <button class="btn running-hidden" name="vm-start" href="javascript:void(0);" title="$_("Start")"><span class="icon power-down"></span></button> <button class="btn shutoff-hidden" name="vm-poweroff" href="javascript:void(0);" title="$_("Power Off")"><span class="icon power-up"></span></button> - <button class="btn pause-hidden" name="vm-pause" href="javascript:void(0);" title="$_("Pause")"><span class="icon pause"></span></button> - <button class="btn resume-hidden" name="vm-resume" href="javascript:void(0);" title="$_("Resume")"><span class="icon resume"></span></button> </div> <div class="bottom"> <div name="actionmenu" class="btn dropdown popable vm-action" style="width: 70px"> @@ -64,11 +64,11 @@ <button class="button-big running-disabled" name="vm-clone"><span class="text">$_("Clone")</span></button> <button class="button-big" name="vm-edit"><span class="text">$_("Edit")</span></button> <button class="button-big shutoff-hidden non-persistent-disabled" name="vm-reset"><span class="text">$_("Reset")</span></button> + <button class="button-big pause-hidden non-persistent-disabled" name="vm-pause"><span class="text">$_("Pause")</span></button> + <button class="button-big resume-hidden" name="vm-resume"><span class="text">$_("Resume")</span></button> <button class="button-big shutoff-hidden" name="vm-shutdown"><span class="text">$_("Shut Down")</span></button> <button class="button-big running-hidden" name="vm-start"><span class="text">$_("Start")</span></button> <button class="button-big shutoff-hidden" name="vm-poweroff"><span class="text">$_("Power Off")</span></button> - <button class="button-big pause-hidden" name="vm-pause"><span class="text">$_("Pause")</span></button> - <button class="button-big resume-hidden" name="vm-resume"><span class="text">$_("Resume")</span></button> <button class="button-big red non-persistent-disabled" name="vm-delete">$_("Delete")</button> </div> </div> -- 1.9.1

I want to suggest to increase the "Actions" width to fit the 3 buttons width like in the first guest in the image below. What do you think about it? On 03/06/2015 17:28, Socorro Stoppler wrote:
From: Socorro Stoppler <socorrob@us.ibm.com>
Make the Pause button behave like the Reset button Make the Resume icon in the tile more visible when hovering over it This addresses the following: https://github.com/kimchi-project/kimchi/issues/649#issuecomment-107569954
Socorro Stoppler (1): Change button behavior for pause/resume VM
ui/css/theme-default/list.css | 2 +- ui/js/src/kimchi.guest_main.js | 4 +++- ui/pages/guest.html.tmpl | 8 ++++---- 3 files changed, 8 insertions(+), 6 deletions(-)

I am ok about increase the button width, but, shouldn't kimchi have all buttons with same size ? Rodrigo On 06/05/2015 10:03 AM, Aline Manera wrote:
I want to suggest to increase the "Actions" width to fit the 3 buttons width like in the first guest in the image below.
What do you think about it?
On 03/06/2015 17:28, Socorro Stoppler wrote:
From: Socorro Stoppler<socorrob@us.ibm.com>
Make the Pause button behave like the Reset button Make the Resume icon in the tile more visible when hovering over it This addresses the following: https://github.com/kimchi-project/kimchi/issues/649#issuecomment-107569954
Socorro Stoppler (1): Change button behavior for pause/resume VM
ui/css/theme-default/list.css | 2 +- ui/js/src/kimchi.guest_main.js | 4 +++- ui/pages/guest.html.tmpl | 8 ++++---- 3 files changed, 8 insertions(+), 6 deletions(-)
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel

On 05/06/2015 15:33, Rodrigo Trujillo wrote:
I am ok about increase the button width, but, shouldn't kimchi have all buttons with same size ?
The drop down widget has different widths according to its appliance. You can check on network creation dialog, Template edit, Storage pool creation dialog, for example.
Rodrigo
On 06/05/2015 10:03 AM, Aline Manera wrote:
I want to suggest to increase the "Actions" width to fit the 3 buttons width like in the first guest in the image below.
What do you think about it?
On 03/06/2015 17:28, Socorro Stoppler wrote:
From: Socorro Stoppler<socorrob@us.ibm.com>
Make the Pause button behave like the Reset button Make the Resume icon in the tile more visible when hovering over it This addresses the following: https://github.com/kimchi-project/kimchi/issues/649#issuecomment-107569954
Socorro Stoppler (1): Change button behavior for pause/resume VM
ui/css/theme-default/list.css | 2 +- ui/js/src/kimchi.guest_main.js | 4 +++- ui/pages/guest.html.tmpl | 8 ++++---- 3 files changed, 8 insertions(+), 6 deletions(-)
_______________________________________________ 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

Yes, that makes sense now that there's always 3 buttons visible. On 06/05/2015 06:03 AM, Aline Manera wrote:
I want to suggest to increase the "Actions" width to fit the 3 buttons width like in the first guest in the image below.
What do you think about it?
On 03/06/2015 17:28, Socorro Stoppler wrote:
From: Socorro Stoppler<socorrob@us.ibm.com>
Make the Pause button behave like the Reset button Make the Resume icon in the tile more visible when hovering over it This addresses the following: https://github.com/kimchi-project/kimchi/issues/649#issuecomment-107569954
Socorro Stoppler (1): Change button behavior for pause/resume VM
ui/css/theme-default/list.css | 2 +- ui/js/src/kimchi.guest_main.js | 4 +++- ui/pages/guest.html.tmpl | 8 ++++---- 3 files changed, 8 insertions(+), 6 deletions(-)
participants (3)
-
Aline Manera
-
Rodrigo Trujillo
-
Socorro Stoppler