[icinga-checkins] icinga.org: icingaweb2/bugfix/ renaming-the-resource-used-for-the-config-backend-9804: Revert "Don' t show the link for resource removal if the resource is utilized for configuration "

git at icinga.org git at icinga.org
Fri Nov 11 11:03:15 CET 2016


Module: icingaweb2
Branch: bugfix/renaming-the-resource-used-for-the-config-backend-9804
Commit: 252ce5d60de7cd601b92b28e41b67bacb513bca9
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=252ce5d60de7cd601b92b28e41b67bacb513bca9

Author: Alexander A. Klimov <alexander.klimov at icinga.com>
Date:   Thu Nov  3 18:28:44 2016 +0100

Revert "Don't show the link for resource removal if the resource is utilized for configuration"

This reverts commit 7331904851ec6bbb5d32a40ead3bfed632f10d1e.

---

 application/controllers/ConfigController.php    |    2 --
 application/views/scripts/config/resource.phtml |   24 ++++++++++-------------
 2 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/application/controllers/ConfigController.php b/application/controllers/ConfigController.php
index 03750fe..c652983 100644
--- a/application/controllers/ConfigController.php
+++ b/application/controllers/ConfigController.php
@@ -315,8 +315,6 @@ class ConfigController extends Controller
     {
         $this->assertPermission('config/application/resources');
         $this->view->resources = Config::app('resources', true);
-        $configResource = Config::app()->get('global', 'config_resource');
-        $this->view->unremovableResources = $configResource === null ? array() : array($configResource);
         $this->createApplicationTabs()->activate('resource');
     }
 
diff --git a/application/views/scripts/config/resource.phtml b/application/views/scripts/config/resource.phtml
index 82f7af0..ec9c0c7 100644
--- a/application/views/scripts/config/resource.phtml
+++ b/application/views/scripts/config/resource.phtml
@@ -58,20 +58,16 @@
             ) ?>
         </td>
         <td class="icon-col text-right">
-            <?php
-            if (! in_array($name, $unremovableResources)) {
-                echo $this->qlink(
-                    '',
-                    'config/removeresource',
-                    array('resource' => $name),
-                    array(
-                        'class'   => 'action-link',
-                        'icon'    => 'cancel',
-                        'title'   => sprintf($this->translate('Remove resource %s'), $name)
-                    )
-                );
-            }
-            ?>
+            <?= $this->qlink(
+                '',
+                'config/removeresource',
+                array('resource' => $name),
+                array(
+                    'class'   => 'action-link',
+                    'icon'    => 'cancel',
+                    'title'   => sprintf($this->translate('Remove resource %s'), $name)
+                )
+            ) ?>
         </td>
     </tr>
 <?php endforeach ?>



More information about the icinga-checkins mailing list