This commit is contained in:
Thomas Gelf 2017-06-22 02:09:31 +02:00
parent e883ed70b3
commit f3a11213f7
4 changed files with 16 additions and 13 deletions

View File

@ -24,7 +24,8 @@ class IndexController extends DashboardController
} }
if ($migrations->hasPendingMigrations()) { if ($migrations->hasPendingMigrations()) {
$this->content()->prepend($this $this->content()->prepend(
$this
->loadForm('applyMigrations') ->loadForm('applyMigrations')
->setMigrations($migrations) ->setMigrations($migrations)
->handleRequest() ->handleRequest()

View File

@ -58,11 +58,11 @@ abstract class Dashboard extends Html implements Countable
protected function addDescription($description) protected function addDescription($description)
{ {
if ($description !== null) { if ($description !== null) {
$this->add( $this->add(Html::tag(
Html::tag('p', null, HtmlString::create( 'p',
nl2br(Util::escapeForHtml($description))) null,
) HtmlString::create(nl2br(Util::escapeForHtml($description)))
); ));
} }
return $this; return $this;

View File

@ -156,12 +156,14 @@ class ObjectsTable extends QueryBasedTable
$type = $this->getType(); $type = $this->getType();
$object = IcingaObject::createByType($type); $object = IcingaObject::createByType($type);
$table = $object->getTableName(); $table = $object->getTableName();
$query = $this->applyRestrictions($this->db()->select() $query = $this->applyRestrictions(
->from( $this->db()
['o' => $table], ->select()
$this->getColumns() ->from(
) ['o' => $table],
->order('o.object_name') $this->getColumns()
)
->order('o.object_name')
); );
return $this->applyObjectTypeFilter($query); return $this->applyObjectTypeFilter($query);

View File

@ -61,7 +61,7 @@ class TemplateTreeRenderer extends BaseElement
} }
if ($level === 0) { if ($level === 0) {
$li->add( Html::tag('a', [ $li->add(Html::tag('a', [
'name' => 'Templates', 'name' => 'Templates',
'class' => 'icon-globe' 'class' => 'icon-globe'
], $tree['name'])); ], $tree['name']));