From f66ab8dae2f3d0418759f81a3a64dc9517a62449 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 15:17:31 +0200 Subject: Adding upstream version 1.10.2. Signed-off-by: Daniel Baumann --- application/controllers/BasketsController.php | 53 +++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 application/controllers/BasketsController.php (limited to 'application/controllers/BasketsController.php') diff --git a/application/controllers/BasketsController.php b/application/controllers/BasketsController.php new file mode 100644 index 0000000..6b50b62 --- /dev/null +++ b/application/controllers/BasketsController.php @@ -0,0 +1,53 @@ +setAutorefreshInterval(10); + $this->addSingleTab($this->translate('Baskets')); + $this->actions()->add([ + Link::create( + $this->translate('Create'), + 'director/basket/create', + null, + ['class' => 'icon-plus'] + ), + Link::create( + $this->translate('Upload'), + 'director/basket/upload', + null, + ['class' => 'icon-upload'] + ), + ]); + $this->addTitle($this->translate('Configuration Baskets')); + $this->content()->add(Html::tag('p', $this->translate( + 'A Configuration Basket references specific Configuration' + . ' Objects or all objects of a specific type. It has been' + . ' designed to share Templates, Import/Sync strategies and' + . ' other base Configuration Objects. It is not a tool to' + . ' operate with single Hosts or Services.' + ))); + $this->content()->add(Html::tag('p', $this->translate( + 'You can create Basket snapshots at any time, this will persist' + . ' a serialized representation of all involved objects at that' + . ' moment in time. Snapshots can be exported, imported, shared' + . ' and restored - to the very same or another Director instance.' + ))); + $table = (new BasketTable($this->db())) + ->setAttribute('data-base-target', '_self'); + // TODO: temporarily disabled, this was a thing in dipl + if (/*$table->hasSearch() || */count($table)) { + $table->renderTo($this); + } + } +} -- cgit v1.2.3