[Kimchi-devel] [PATCH] [Kimchi] Storagebuttons not behaving properly

Aline Manera alinefm at linux.vnet.ibm.com
Tue Sep 6 13:03:47 UTC 2016


Hi Socorro,

I could not apply this patch:

[alinefm at alinefm-TP440 kimchi]$ git am -3 
/home/alinefm/mail-patches/\[PATCH\]\ \[Kimchi\]\ Storagebuttons\ not\ 
behaving\ properly.eml
Applying: Storagebuttons not behaving properly
Using index info to reconstruct a base tree...
M    ui/js/src/kimchi.storage_main.js
Falling back to patching base and 3-way merge...
Auto-merging ui/js/src/kimchi.storage_main.js
CONFLICT (content): Merge conflict in ui/js/src/kimchi.storage_main.js
Failed to merge in the changes.
Patch failed at 0001 Storagebuttons not behaving properly
The copy of the patch that failed is found in:
/home/alinefm/wok/.git/modules/src/wok/plugins/kimchi/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

Could you rebase on master and resend, please?

Thanks,
Aline Manera

On 08/31/2016 06:43 PM, Socorro Stoppler wrote:
> From: Socorro <socorro at linux.vnet.ibm.com>
>
> This patch fixes the behavior of the actions - Deactivate and Undefine -
> taken on the storage pools listed in the Storage tab.  Prior to the patch,
> even if the menu item was disabled, the user is still able to click on it
> and perform the action.  Now clicking on those disabled menu items does not
> do anything which is the intended behavior.
>
> Signed-off-by: Socorro <socorro at linux.vnet.ibm.com>
> ---
>   ui/js/src/kimchi.storage_main.js | 17 +++++++++++++++++
>   1 file changed, 17 insertions(+)
>
> diff --git a/ui/js/src/kimchi.storage_main.js b/ui/js/src/kimchi.storage_main.js
> index 6c99f93..ea58012 100644
> --- a/ui/js/src/kimchi.storage_main.js
> +++ b/ui/js/src/kimchi.storage_main.js
> @@ -310,6 +310,14 @@ kimchi.storageBindClick = function() {
>           $('.pool-delete').on('click', function(event) {
>               event.preventDefault();
>               var $pool = $(this);
> +            var in_use = $pool.data('inuse');
> +            if ('active' === $pool.data('stat') || in_use) {
> +                $pool.parent().addClass('disabled');
> +                return false;
> +            } else {
> +                $pool.parent().removeClass('disabled');
> +            }
> +
>               var settings = {
>                   title : i18n['KCHAPI6001M'],
>                   content : i18n['KCHPOOL6001M'],
> @@ -339,6 +347,15 @@ kimchi.storageBindClick = function() {
>           $('.pool-deactivate').on('click', function(event) {
>               event.preventDefault();
>               var poolName = $(this).data('name');
> +            var $poolDeactivate = $(this);
> +            var in_use = $poolDeactivate.data('inuse');
> +            if (in_use) {
> +                $poolDeactivate.parent().addClass('disabled');
> +                return false;
> +            } else {
> +                $poolDeactivate.parent().removeClass('disabled');
> +            }
> +
>               var settings = {
>                   title : i18n['KCHAPI6001M'],
>                   content : i18n['KCHPOOL6012M'],




More information about the Kimchi-devel mailing list