From fda3e9942e60d561509839b7ce4178117e1d8e3c Mon Sep 17 00:00:00 2001 From: Ari Zellner Date: Thu, 2 Nov 2017 12:33:52 +0200 Subject: [PATCH] Allow to pause\resume multiple containers providers at a time --- .../toolbar/ems_container_center.rb | 10 ++++++---- .../toolbar/ems_containers_center.rb | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/app/helpers/application_helper/toolbar/ems_container_center.rb b/app/helpers/application_helper/toolbar/ems_container_center.rb index e75b8d36e64..e560cd80b76 100644 --- a/app/helpers/application_helper/toolbar/ems_container_center.rb +++ b/app/helpers/application_helper/toolbar/ems_container_center.rb @@ -28,16 +28,18 @@ class ApplicationHelper::Toolbar::EmsContainerCenter < ApplicationHelper::Toolba 'pficon pficon-trend-up fa-lg', t = N_('Resume this Containers Provider'), t, - :confirm => N_("Resume this Containers Provider?"), - :enabled => proc { !@record.enabled? }), + :confirm => N_("Resume this Containers Provider?"), + :enabled => proc { !@record.enabled? }, + :url_parms => "main_div"), button( :ems_container_pause, 'pficon pficon-trend-down fa-lg', t = N_('Pause this Containers Provider'), t, - :confirm => N_("Warning: While this provider is paused no data will be collected from it. " \ + :confirm => N_("Warning: While this provider is paused no data will be collected from it. " \ "This may cause gaps in inventory, metrics and events!"), - :enabled => proc { @record.enabled? }), + :enabled => proc { @record.enabled? }, + :url_parms => "main_div"), button( :ems_container_delete, 'pficon pficon-delete fa-lg', diff --git a/app/helpers/application_helper/toolbar/ems_containers_center.rb b/app/helpers/application_helper/toolbar/ems_containers_center.rb index 7ea886fc2f2..7151b11f546 100644 --- a/app/helpers/application_helper/toolbar/ems_containers_center.rb +++ b/app/helpers/application_helper/toolbar/ems_containers_center.rb @@ -40,6 +40,25 @@ class ApplicationHelper::Toolbar::EmsContainersCenter < ApplicationHelper::Toolb :send_checked => true, :enabled => false, :onwhen => "1"), + button( + :ems_container_resume, + 'pficon pficon-trend-up fa-lg', + t = N_('Resume selected Containers Providers'), + t, + :confirm => N_("Resume these Containers Providers?"), + :enabled => false, + :url_parms => "main_div", + :onwhen => "1+"), + button( + :ems_container_pause, + 'pficon pficon-trend-down fa-lg', + t = N_('Pause selected Containers Providers'), + t, + :confirm => N_("Warning: While these providers are paused no data will be collected from them. " \ + "This may cause gaps in inventory, metrics and events!"), + :enabled => false, + :url_parms => "main_div", + :onwhen => "1+"), button( :ems_container_delete, 'pficon pficon-delete fa-lg',