mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
BranchesDashboard: prominent hint -> active branch
This commit is contained in:
parent
b321327634
commit
607f53fecc
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Icinga\Module\Director\Dashboard;
|
namespace Icinga\Module\Director\Dashboard;
|
||||||
|
|
||||||
use gipfl\IcingaWeb2\Icon;
|
use gipfl\Web\Widget\Hint;
|
||||||
use Icinga\Application\Hook;
|
use Icinga\Application\Hook;
|
||||||
use Icinga\Module\Director\Db\Branch\Branch;
|
use Icinga\Module\Director\Db\Branch\Branch;
|
||||||
use Icinga\Module\Director\Db\Branch\BranchStore;
|
use Icinga\Module\Director\Db\Branch\BranchStore;
|
||||||
@ -15,10 +15,10 @@ class BranchesDashboard extends Dashboard
|
|||||||
{
|
{
|
||||||
$branch = Branch::detect(new BranchStore($this->getDb()));
|
$branch = Branch::detect(new BranchStore($this->getDb()));
|
||||||
if ($branch->isBranch()) {
|
if ($branch->isBranch()) {
|
||||||
return Html::sprintf(
|
$this->prepend(Hint::info(Html::sprintf(
|
||||||
$this->translate('Working in a Configuration Branch: %s'),
|
$this->translate('You\'re currently working in a Configuration Branch: %s'),
|
||||||
Html::tag('span', ['class' => 'active-branch'], $branch->getName())
|
Branch::requireHook()->linkToBranch($branch, $this->getAuth(), $branch->getName())
|
||||||
);
|
)));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->translate('Prepare your configuration in a safe Environment');
|
return $this->translate('Prepare your configuration in a safe Environment');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user