2015-04-24 14:27:22 +02:00
|
|
|
<?php
|
|
|
|
|
2015-12-10 13:03:28 +01:00
|
|
|
$this->providePermission('director/api', $this->translate('Allow to access the director API'));
|
2016-11-03 16:06:18 +01:00
|
|
|
$this->providePermission('director/audit', $this->translate('Allow to access the full audit log'));
|
2017-01-12 15:03:32 +01:00
|
|
|
$this->providePermission(
|
|
|
|
'director/showconfig',
|
|
|
|
$this->translate('Allow to show configuration (could contain sensitive information)')
|
|
|
|
);
|
2016-11-03 16:06:18 +01:00
|
|
|
$this->providePermission('director/deploy', $this->translate('Allow to deploy configuration'));
|
|
|
|
$this->providePermission('director/hosts', $this->translate('Allow to configure hosts'));
|
2017-06-21 21:31:36 +02:00
|
|
|
$this->providePermission('director/services', $this->translate('Allow to configure services'));
|
2016-11-03 16:06:18 +01:00
|
|
|
$this->providePermission('director/users', $this->translate('Allow to configure users'));
|
|
|
|
$this->providePermission('director/notifications', $this->translate('Allow to configure notifications'));
|
2017-01-12 15:03:32 +01:00
|
|
|
$this->providePermission(
|
|
|
|
'director/inspect',
|
|
|
|
$this->translate(
|
|
|
|
'Allow to inspect objects through the Icinga 2 API (could contain sensitive information)'
|
|
|
|
)
|
|
|
|
);
|
2016-12-07 00:37:35 +01:00
|
|
|
$this->providePermission('director/*', $this->translate('Allow unrestricted access to Icinga Director'));
|
2015-07-30 09:05:32 +02:00
|
|
|
|
2017-03-06 21:46:22 +01:00
|
|
|
$this->provideRestriction(
|
2017-06-21 21:31:36 +02:00
|
|
|
'director/filter/hostgroups',
|
2017-03-06 21:46:22 +01:00
|
|
|
$this->translate(
|
2017-06-21 21:31:36 +02:00
|
|
|
'Limit access to the given comma-separated list of hostgroups'
|
2017-03-06 21:46:22 +01:00
|
|
|
)
|
|
|
|
);
|
|
|
|
|
2017-07-13 11:48:16 +02:00
|
|
|
$this->provideRestriction(
|
|
|
|
'director/service/apply/filter-by-name',
|
|
|
|
$this->translate(
|
|
|
|
'Filter available service apply rules'
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
|
|
|
$this->provideRestriction(
|
|
|
|
'director/notification/apply/filter-by-name',
|
|
|
|
$this->translate(
|
|
|
|
'Filter available notification apply rules'
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
2016-03-18 16:02:58 +01:00
|
|
|
$this->provideSearchUrl($this->translate('Host configs'), 'director/hosts?limit=10', 60);
|
|
|
|
|
2016-12-07 00:37:35 +01:00
|
|
|
/*
|
|
|
|
// Disabled unless available
|
2015-07-30 09:05:32 +02:00
|
|
|
$this->provideRestriction(
|
|
|
|
'director/hosttemplates/filter',
|
|
|
|
$this->translate('Allow to use only host templates matching this filter')
|
|
|
|
);
|
|
|
|
|
|
|
|
$this->provideRestriction(
|
|
|
|
'director/dbresources/use',
|
|
|
|
$this->translate('Allow to use only these db resources (comma separated list)')
|
|
|
|
);
|
2016-12-07 00:37:35 +01:00
|
|
|
*/
|
2015-07-30 09:05:32 +02:00
|
|
|
|
2015-06-29 15:40:24 +02:00
|
|
|
$this->provideConfigTab('config', array(
|
|
|
|
'title' => 'Configuration',
|
|
|
|
'url' => 'settings'
|
|
|
|
));
|
|
|
|
|
2015-06-29 11:31:35 +02:00
|
|
|
$section = $this->menuSection(
|
2017-01-24 11:07:37 +01:00
|
|
|
N_('Icinga Director')
|
2016-02-27 02:02:43 +01:00
|
|
|
)->setUrl('director')->setPriority(60)->setIcon(
|
2016-02-18 16:12:38 +01:00
|
|
|
'cubes'
|
|
|
|
)->setRenderer(array(
|
|
|
|
'SummaryNavigationItemRenderer',
|
|
|
|
'state' => 'critical'
|
|
|
|
));
|
2015-06-29 11:31:35 +02:00
|
|
|
|
2016-11-03 16:06:18 +01:00
|
|
|
$section->add(N_('Hosts'))
|
2017-06-21 20:33:58 +02:00
|
|
|
->setUrl('director/dashboard?name=hosts')
|
2016-11-03 16:06:18 +01:00
|
|
|
->setPermission('director/hosts')
|
|
|
|
->setPriority(30);
|
|
|
|
$section->add(N_('Services'))
|
2017-04-24 12:57:51 +02:00
|
|
|
->setUrl('director/dashboard?name=services')
|
2017-06-21 20:33:58 +02:00
|
|
|
->setPermission('director/services')
|
2016-11-03 16:06:18 +01:00
|
|
|
->setPriority(40);
|
|
|
|
$section->add(N_('Commands'))
|
2017-06-21 20:33:58 +02:00
|
|
|
->setUrl('director/dashboard?name=commands')
|
2016-11-03 16:06:18 +01:00
|
|
|
->setPermission('director/admin')
|
|
|
|
->setPriority(50);
|
2017-06-21 20:33:58 +02:00
|
|
|
$section->add(N_('Notifications'))
|
|
|
|
->setUrl('director/dashboard?name=notifications')
|
|
|
|
->setPermission('director/notifications')
|
2016-11-03 16:06:18 +01:00
|
|
|
->setPriority(70);
|
|
|
|
$section->add(N_('Automation'))
|
2017-08-16 09:43:05 +02:00
|
|
|
->setUrl('director/importsources')
|
2016-11-03 16:06:18 +01:00
|
|
|
->setPermission('director/admin')
|
2015-07-22 10:12:50 +02:00
|
|
|
->setPriority(901);
|
2016-11-03 16:06:18 +01:00
|
|
|
$section->add(N_('Activity log'))
|
2016-05-13 16:57:32 +02:00
|
|
|
->setUrl('director/config/activities')
|
2016-02-18 16:12:38 +01:00
|
|
|
->setPriority(902)
|
2016-11-03 16:06:18 +01:00
|
|
|
->setPermission('director/audit')
|
2016-02-18 16:12:38 +01:00
|
|
|
->setRenderer('ConfigHealthItemRenderer');
|
2016-11-03 16:06:18 +01:00
|
|
|
$section->add(N_('Deployments'))
|
|
|
|
->setUrl('director/config/deployments')
|
|
|
|
->setPriority(902)
|
|
|
|
->setPermission('director/deployments');
|