[icinga-checkins] icinga.org: icingaweb2-module-director/master: deploymentlink: show even when there are only...

git at icinga.org git at icinga.org
Wed Nov 2 17:50:35 CET 2016


Module: icingaweb2-module-director
Branch: master
Commit: 57e4c441bd9ba68c8230f6526916983766f51930
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=57e4c441bd9ba68c8230f6526916983766f51930

Author: Thomas Gelf <thomas at gelf.net>
Date:   Wed Nov  2 17:37:04 2016 +0100

deploymentlink: show even when there are only...

...unrelated changes

fixes #12032

---

 application/views/scripts/object/deploymentLink.phtml |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/application/views/scripts/object/deploymentLink.phtml b/application/views/scripts/object/deploymentLink.phtml
index 00a3c5d..417e5ad 100644
--- a/application/views/scripts/object/deploymentLink.phtml
+++ b/application/views/scripts/object/deploymentLink.phtml
@@ -1,10 +1,19 @@
 <?php
 
-if (! $this->undeployedChanges) {
+if (! $this->undeployedChanges && ! $this->totalUndeployedChanges) {
     return; 
 }
 
-if ($this->totalUndeployedChanges === 1) {
+if ($this->undeployedChanges === 0) {
+    if ($this->totalUndeployedChanges) {
+        $msg = $this->translate('The is a single pending change');
+    } else {
+        $msg = sprintf(
+            $this->translate('There are %d pending changes'),
+            $this->totalUndeployedChanges
+        );
+    }
+} elseif ($this->totalUndeployedChanges === 1) {
     $msg = $this->translate('There has been a single change to this object, nothing else has been modified');
 } elseif ($this->totalUndeployedChanges === $this->undeployedChanges) {
     $msg = sprintf(



More information about the icinga-checkins mailing list