From e29c025d6452d68a6bab6647727c66a543b76d69 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Mon, 18 Oct 2021 07:27:28 +0200 Subject: [PATCH] Service/TemplateController: fix links, use uuids fixes #2411 --- application/controllers/ServiceController.php | 2 +- library/Director/Web/Controller/ObjectController.php | 2 +- library/Director/Web/Controller/TemplateController.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/application/controllers/ServiceController.php b/application/controllers/ServiceController.php index 195386f6..da7ca4b2 100644 --- a/application/controllers/ServiceController.php +++ b/application/controllers/ServiceController.php @@ -145,7 +145,7 @@ class ServiceController extends ObjectController $this->actions()->add(Link::create( $this->translate('back'), 'director/host/services', - ['name' => $this->host->getObjectName()], + ['uuid' => $this->host->getUniqueId()->toString()], ['class' => 'icon-left-big'] )); } diff --git a/library/Director/Web/Controller/ObjectController.php b/library/Director/Web/Controller/ObjectController.php index 9d2ca76c..f756e947 100644 --- a/library/Director/Web/Controller/ObjectController.php +++ b/library/Director/Web/Controller/ObjectController.php @@ -578,7 +578,7 @@ abstract class ObjectController extends ActionController protected function addBackToObjectLink() { $params = [ - 'name' => $this->object->getObjectName(), + 'uuid' => $this->object->getUniqueId()->toString(), ]; if ($this->object instanceof IcingaService) { diff --git a/library/Director/Web/Controller/TemplateController.php b/library/Director/Web/Controller/TemplateController.php index 8bb53d8b..c368a82d 100644 --- a/library/Director/Web/Controller/TemplateController.php +++ b/library/Director/Web/Controller/TemplateController.php @@ -120,7 +120,7 @@ abstract class TemplateController extends CompatController Link::create( $this->translate('Modify'), "director/$type/edit", - ['name' => $templateName], + ['uuid' => $template->getUniqueId()->toString()], ['class' => 'icon-edit'] ) ]);