mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-28 08:14:04 +02:00
Dashboard: introduce "Director" section with...
..."Basket"
This commit is contained in:
parent
f4220016d8
commit
93cbd4f020
@ -45,9 +45,7 @@ class BasketController extends ActionController
|
|||||||
$this->translate('Back'),
|
$this->translate('Back'),
|
||||||
'director/baskets',
|
'director/baskets',
|
||||||
null,
|
null,
|
||||||
[
|
['class' => 'icon-left-big']
|
||||||
'class' => 'icon-left-big'
|
|
||||||
]
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$uuid = hex2bin($this->params->get('uuid'));
|
$uuid = hex2bin($this->params->get('uuid'));
|
||||||
@ -71,9 +69,7 @@ class BasketController extends ActionController
|
|||||||
$this->translate('back'),
|
$this->translate('back'),
|
||||||
'director/baskets',
|
'director/baskets',
|
||||||
null,
|
null,
|
||||||
[
|
['class' => 'icon-left-big']
|
||||||
'class' => 'icon-left-big'
|
|
||||||
]
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$this->addSingleTab($this->translate('Create Basket'));
|
$this->addSingleTab($this->translate('Create Basket'));
|
||||||
@ -84,6 +80,9 @@ class BasketController extends ActionController
|
|||||||
$this->content()->add($form);
|
$this->content()->add($form);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws \Icinga\Exception\NotFoundError
|
||||||
|
*/
|
||||||
public function snapshotsAction()
|
public function snapshotsAction()
|
||||||
{
|
{
|
||||||
$uuid = $this->params->get('uuid');
|
$uuid = $this->params->get('uuid');
|
||||||
|
@ -31,7 +31,7 @@ class DashboardController extends ActionController
|
|||||||
$this->setAutorefreshInterval(10);
|
$this->setAutorefreshInterval(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
$mainDashboards = ['Objects', 'Alerts', 'Automation', 'Deployment', 'Data'];
|
$mainDashboards = ['Objects', 'Alerts', 'Automation', 'Deployment', 'Director', 'Data'];
|
||||||
$this->setTitle($this->translate('Icinga Director - Main Dashboard'));
|
$this->setTitle($this->translate('Icinga Director - Main Dashboard'));
|
||||||
$names = $this->params->getValues('name', $mainDashboards);
|
$names = $this->params->getValues('name', $mainDashboards);
|
||||||
if (! $this->params->has('name')) {
|
if (! $this->params->has('name')) {
|
||||||
|
30
library/Director/Dashboard/Dashlet/BasketDashlet.php
Normal file
30
library/Director/Dashboard/Dashlet/BasketDashlet.php
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Icinga\Module\Director\Dashboard\Dashlet;
|
||||||
|
|
||||||
|
class BasketDashlet extends Dashlet
|
||||||
|
{
|
||||||
|
protected $icon = 'tag';
|
||||||
|
|
||||||
|
public function getTitle()
|
||||||
|
{
|
||||||
|
return $this->translate('Object Basket');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSummary()
|
||||||
|
{
|
||||||
|
return $this->translate(
|
||||||
|
'Preserve specific objects in a specific state'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getUrl()
|
||||||
|
{
|
||||||
|
return 'director/baskets';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function listRequiredPermissions()
|
||||||
|
{
|
||||||
|
return array('director/admin');
|
||||||
|
}
|
||||||
|
}
|
17
library/Director/Dashboard/DirectorDashboard.php
Normal file
17
library/Director/Dashboard/DirectorDashboard.php
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Icinga\Module\Director\Dashboard;
|
||||||
|
|
||||||
|
class DirectorDashboard extends Dashboard
|
||||||
|
{
|
||||||
|
protected $dashletNames = array(
|
||||||
|
'Settings',
|
||||||
|
'Basket',
|
||||||
|
'SelfService',
|
||||||
|
);
|
||||||
|
|
||||||
|
public function getTitle()
|
||||||
|
{
|
||||||
|
return $this->translate('Icinga Director Configuration');
|
||||||
|
}
|
||||||
|
}
|
@ -8,11 +8,9 @@ class InfrastructureDashboard extends Dashboard
|
|||||||
{
|
{
|
||||||
protected $dashletNames = array(
|
protected $dashletNames = array(
|
||||||
'Kickstart',
|
'Kickstart',
|
||||||
'SelfService',
|
|
||||||
'ApiUserObject',
|
'ApiUserObject',
|
||||||
'EndpointObject',
|
'EndpointObject',
|
||||||
'ZoneObject',
|
'ZoneObject',
|
||||||
'Settings',
|
|
||||||
);
|
);
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user