Various: cosmetics, hints, more links
This commit is contained in:
parent
99ab56e6f9
commit
5ca7740285
|
@ -138,8 +138,7 @@ abstract class TemplateController extends CompatController
|
|||
$this->translate('Template'),
|
||||
"director/$type/add",
|
||||
['imports' => $templateName, 'type' => 'template']
|
||||
)
|
||||
]
|
||||
)]
|
||||
));
|
||||
}
|
||||
if ($template->supportsApplyRules()) {
|
||||
|
|
|
@ -5,6 +5,7 @@ namespace Icinga\Module\Director\Web\Table;
|
|||
use Icinga\Authentication\Auth;
|
||||
use Icinga\Data\Filter\Filter;
|
||||
use Icinga\Exception\IcingaException;
|
||||
use Icinga\Module\Director\Db;
|
||||
use Icinga\Module\Director\Db\IcingaObjectFilterHelper;
|
||||
use Icinga\Module\Director\IcingaConfig\AssignRenderer;
|
||||
use Icinga\Module\Director\Objects\IcingaObject;
|
||||
|
@ -24,6 +25,13 @@ class ApplyRulesTable extends ZfQueryBasedTable
|
|||
|
||||
private $type;
|
||||
|
||||
public static function create($type, Db $db)
|
||||
{
|
||||
$table = new static($db);
|
||||
$table->setType($type);
|
||||
return $table;
|
||||
}
|
||||
|
||||
public function setType($type)
|
||||
{
|
||||
$this->type = $type;
|
||||
|
|
|
@ -68,6 +68,7 @@ class ObjectsTableEndpoint extends ObjectsTable
|
|||
public function prepareQuery()
|
||||
{
|
||||
if ($this->deploymentEndpoint === null) {
|
||||
/** @var \Icinga\Module\Director\Db $c */
|
||||
$c = $this->connection();
|
||||
if ($c->hasDeploymentEndpoint()) {
|
||||
$this->deploymentEndpoint = $c->getDeploymentEndpointName();
|
||||
|
|
|
@ -55,12 +55,17 @@ class TemplatesTable extends ZfQueryBasedTable
|
|||
'name' => $name
|
||||
]);
|
||||
|
||||
return $this::tr([
|
||||
$this::td(new Link($caption, $url)),
|
||||
$this::td(new Link(new Icon('plus'), "director/$type/add", [
|
||||
return $this::row([
|
||||
new Link($caption, $url),
|
||||
[
|
||||
new Link(new Icon('plus'), "director/$type/add", [
|
||||
'type' => 'object',
|
||||
'imports' => $name
|
||||
]))
|
||||
]),
|
||||
new Link(new Icon('history'), "director/$type/history", [
|
||||
'name' => $name
|
||||
])
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue