From 1b4428e8a2dcf8871678d0c1259ab051b327f478 Mon Sep 17 00:00:00 2001 From: Florian Strohmaier Date: Wed, 9 Nov 2016 17:36:15 +0100 Subject: [PATCH 1/6] QuickActions: create quick actions template refs #13187 Signed-off-by: Eric Lippmann --- .../partials/object/quick-actions.phtml | 142 ++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 modules/monitoring/application/views/scripts/partials/object/quick-actions.phtml diff --git a/modules/monitoring/application/views/scripts/partials/object/quick-actions.phtml b/modules/monitoring/application/views/scripts/partials/object/quick-actions.phtml new file mode 100644 index 000000000..d79c8363f --- /dev/null +++ b/modules/monitoring/application/views/scripts/partials/object/quick-actions.phtml @@ -0,0 +1,142 @@ +
+ +
From cea9f5aea1f6f4ba309ffbf3c4e5f243cb54437d Mon Sep 17 00:00:00 2001 From: Florian Strohmaier Date: Wed, 9 Nov 2016 17:36:46 +0100 Subject: [PATCH 2/6] Use quick actions in the host and service detail views refs #13187 Signed-off-by: Eric Lippmann --- modules/monitoring/application/views/scripts/host/show.phtml | 1 + modules/monitoring/application/views/scripts/service/show.phtml | 1 + 2 files changed, 2 insertions(+) diff --git a/modules/monitoring/application/views/scripts/host/show.phtml b/modules/monitoring/application/views/scripts/host/show.phtml index badf7ffcf..a75fc0246 100644 --- a/modules/monitoring/application/views/scripts/host/show.phtml +++ b/modules/monitoring/application/views/scripts/host/show.phtml @@ -10,6 +10,7 @@ $this->baseFilter = Filter::where('host', $object->host_name); echo $this->render('list/components/servicesummary.phtml'); ?> + render('partials/object/quick-actions.phtml') ?> render('partials/object/detail-content.phtml') ?> diff --git a/modules/monitoring/application/views/scripts/service/show.phtml b/modules/monitoring/application/views/scripts/service/show.phtml index 9dd139430..b585d7106 100644 --- a/modules/monitoring/application/views/scripts/service/show.phtml +++ b/modules/monitoring/application/views/scripts/service/show.phtml @@ -3,6 +3,7 @@ tabs ?> render('partials/object/service-header.phtml') ?> + render('partials/object/quick-actions.phtml') ?> render('partials/object/detail-content.phtml') ?> From 4a254f5b3328e762a8a5716c346697f222b4d83d Mon Sep 17 00:00:00 2001 From: Florian Strohmaier Date: Wed, 9 Nov 2016 17:36:59 +0100 Subject: [PATCH 3/6] CSS: Add styles for quick actions refs #13187 Signed-off-by: Eric Lippmann --- modules/monitoring/public/css/module.less | 25 +++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/modules/monitoring/public/css/module.less b/modules/monitoring/public/css/module.less index fa04397f9..1b7ffaabc 100644 --- a/modules/monitoring/public/css/module.less +++ b/modules/monitoring/public/css/module.less @@ -108,6 +108,31 @@ } } +// Quick actions +.quick-actions { + ul { + // Center horizontally + display: table; + margin: 0 auto; + } + + li { + border-right: 1px solid fade(@icinga-blue, 50%); + color: @icinga-blue; + padding: 0 0.6em; + } + + li:last-child { + border-right: none; + padding-right: 0; + } + + li i { + font-size: 1.2em; + vertical-align: middle; + } +} + /* Generic box element */ .boxview > div.box { From 76fb506a895b7be9006d7148a654b75901b1764c Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 14 Nov 2016 13:41:06 +0100 Subject: [PATCH 4/6] Remove control separation in the host and service detail views refs #13187 --- .../monitoring/application/views/scripts/host/show.phtml | 8 +++----- .../application/views/scripts/service/show.phtml | 3 +-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/modules/monitoring/application/views/scripts/host/show.phtml b/modules/monitoring/application/views/scripts/host/show.phtml index a75fc0246..f5beb5a02 100644 --- a/modules/monitoring/application/views/scripts/host/show.phtml +++ b/modules/monitoring/application/views/scripts/host/show.phtml @@ -1,16 +1,14 @@ - -
+
compact): ?> tabs ?> render('partials/object/host-header.phtml') ?> - stats = $object->stats; $this->baseFilter = Filter::where('host', $object->host_name); echo $this->render('list/components/servicesummary.phtml'); - ?> +?> render('partials/object/quick-actions.phtml') ?>
- render('partials/object/detail-content.phtml') ?> diff --git a/modules/monitoring/application/views/scripts/service/show.phtml b/modules/monitoring/application/views/scripts/service/show.phtml index b585d7106..3fcdb2286 100644 --- a/modules/monitoring/application/views/scripts/service/show.phtml +++ b/modules/monitoring/application/views/scripts/service/show.phtml @@ -1,9 +1,8 @@ -
+
compact): ?> tabs ?> render('partials/object/service-header.phtml') ?> render('partials/object/quick-actions.phtml') ?>
- render('partials/object/detail-content.phtml') ?> From df4e51845db6825cbbfc50f669be443fa7fefb68 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 24 Nov 2016 11:23:46 +0100 Subject: [PATCH 5/6] Display host status and service status summary as inline-block refs #13187 --- modules/monitoring/public/css/module.less | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/modules/monitoring/public/css/module.less b/modules/monitoring/public/css/module.less index 1b7ffaabc..8e044f91c 100644 --- a/modules/monitoring/public/css/module.less +++ b/modules/monitoring/public/css/module.less @@ -81,6 +81,7 @@ // Host and service summaries in detail and list views .hosts-summary, .services-summary { + display: inline-block; margin-bottom: 0.5em; > .hosts-link, @@ -90,11 +91,6 @@ } } -.controls > .hosts-summary, -.controls > .services-summary { - float: left; -} - // State table in the host and service multi-selection and detail views .host-detail-state, .service-detail-state { From 9d39391102432c91e5f2c31c0f3e3250d0e85242 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 24 Nov 2016 12:25:35 +0100 Subject: [PATCH 6/6] Use 'Remove acknowledgement' instead of 'Remove problem acknowledgement' refs #13187 --- .../Object/RemoveAcknowledgementCommandForm.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/monitoring/application/forms/Command/Object/RemoveAcknowledgementCommandForm.php b/modules/monitoring/application/forms/Command/Object/RemoveAcknowledgementCommandForm.php index 416e02e59..7d6672225 100644 --- a/modules/monitoring/application/forms/Command/Object/RemoveAcknowledgementCommandForm.php +++ b/modules/monitoring/application/forms/Command/Object/RemoveAcknowledgementCommandForm.php @@ -70,8 +70,8 @@ class RemoveAcknowledgementCommandForm extends ObjectsCommandForm 'ignore' => true, 'label' => $this->getSubmitLabel(), 'title' => $this->translatePlural( - 'Remove problem acknowledgement', - 'Remove problem acknowledgements', + 'Remove acknowledgement', + 'Remove acknowledgements', count($this->objects) ), 'type' => 'submit' @@ -89,8 +89,8 @@ class RemoveAcknowledgementCommandForm extends ObjectsCommandForm $label = $this->getView()->icon('cancel'); if ($this->isLabelEnabled()) { $label .= $this->translatePlural( - 'Remove problem acknowledgement', - 'Remove problem acknowledgements', + 'Remove acknowledgement', + 'Remove acknowledgements', count($this->objects) ); } @@ -111,8 +111,8 @@ class RemoveAcknowledgementCommandForm extends ObjectsCommandForm } Notification::success(mtp( 'monitoring', - 'Removing problem acknowledgement..', - 'Removing problem acknowledgements..', + 'Removing acknowledgement..', + 'Removing acknowledgements..', count($this->objects) ));