Dashboard, templates: timeperiod, not timePeriod

fixes #1036
This commit is contained in:
Thomas Gelf 2017-07-27 12:12:12 +02:00
parent dac5dbdcc0
commit 313c8168ba
5 changed files with 10 additions and 8 deletions

View File

@ -15,7 +15,7 @@ class TimeperiodsDashlet extends Dashlet
public function getUrl()
{
return 'director/dashboard?name=timePeriods';
return 'director/dashboard?name=timeperiods';
}
public function listRequiredPermissions()

View File

@ -38,7 +38,7 @@ class NotificationsDashboard extends Dashboard
public function getTabs()
{
return $this->createTabsForDashboards(
['notifications', 'users', 'timePeriods']
['notifications', 'users', 'timeperiods']
);
}
}

View File

@ -2,7 +2,7 @@
namespace Icinga\Module\Director\Dashboard;
class TimePeriodsDashboard extends Dashboard
class TimeperiodsDashboard extends Dashboard
{
protected $dashletNames = [
'TimeperiodObject'
@ -27,7 +27,7 @@ class TimePeriodsDashboard extends Dashboard
public function getTabs()
{
return $this->createTabsForDashboards(
['notifications', 'users', 'timePeriods']
['notifications', 'users', 'timeperiods']
);
}
}

View File

@ -30,7 +30,7 @@ class UsersDashboard extends Dashboard
public function getTabs()
{
return $this->createTabsForDashboards(
['notifications', 'users', 'timePeriods']
['notifications', 'users', 'timeperiods']
);
}
}

View File

@ -96,6 +96,8 @@ abstract class ObjectsController extends ActionController
public function templatesAction()
{
$type = $this->getType();
$shortType = IcingaObject::createByType($type)->getShortTableName();
$this
->assertPermission('director/admin')
->addObjectsTabs()
@ -103,11 +105,11 @@ abstract class ObjectsController extends ActionController
$this->translate('All your %s Templates'),
$this->translate(ucfirst($type))
)
->actions(new TemplateActionBar($type, $this->url()));
->actions(new TemplateActionBar($shortType, $this->url()));
$this->params->get('render') === 'tree'
? TemplateTreeRenderer::showType($type, $this, $this->db())
: TemplatesTable::create($type, $this->db())->renderTo($this);
? TemplateTreeRenderer::showType($shortType, $this, $this->db())
: TemplatesTable::create($shortType, $this->db())->renderTo($this);
}
protected function assertApplyRulePermission()