mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-21 12:54:26 +02:00
Merge branch 'master' into bugfix/ie8-fixes-6417
This commit is contained in:
commit
4abb30e55b
@ -1,4 +1,4 @@
|
|||||||
<div class="controls">
|
<div class="controls" data-base-target="_main">
|
||||||
<?= $tabs; ?>
|
<?= $tabs; ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="content" data-base-target="_next">
|
<div class="content" data-base-target="_next">
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<div class="controls">
|
<div class="controls" data-base-target="_main">
|
||||||
<?= $this->tabs->render($this); ?>
|
<?= $this->tabs->render($this); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -1,35 +0,0 @@
|
|||||||
<div class="controls">
|
|
||||||
<?= $this->tabs->render($this); ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="content">
|
|
||||||
<?php $errors = $this->form->getErrorMessages(); ?>
|
|
||||||
|
|
||||||
<?php if (isset($this->messageBox)): ?>
|
|
||||||
<?= $this->messageBox->render() ?>
|
|
||||||
<?php endif ?>
|
|
||||||
|
|
||||||
<?php if ($this->successMessage): ?>
|
|
||||||
<div>
|
|
||||||
<i class="icinga-icon-success"></i>
|
|
||||||
<strong><?= $this->escape($this->successMessage); ?></strong>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<?php if (!empty($errors)) : ?>
|
|
||||||
<div>
|
|
||||||
<h4>Errors occured when trying to save the project.</h4>
|
|
||||||
<p>
|
|
||||||
The following errors occured when trying to save the configuration:
|
|
||||||
</p>
|
|
||||||
<ul>
|
|
||||||
<?php foreach($errors as $error): ?>
|
|
||||||
<li><?= $this->escape($error) ?></li>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php endif; ?>
|
|
||||||
<?= $this->form ?>
|
|
||||||
</div>
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
<div class="controls">
|
<div class="controls" data-base-target="_right">
|
||||||
<?= $this->tabs ?>
|
<?= $this->tabs ?>
|
||||||
<h1><?= $this->escape($module->getTitle()) ?></h1>
|
<h1><?= $this->escape($module->getTitle()) ?></h1>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<div class="controls">
|
<div class="controls" data-base-target="_main">
|
||||||
<?= $tabs; ?>
|
<?= $tabs; ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="content" data-base-target="_next">
|
<div class="content" data-base-target="_next">
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<div class="controls">
|
<div class="controls" data-base-target="_main">
|
||||||
<?= $tabs ?>
|
<?= $tabs ?>
|
||||||
<h1><?= $this->translate('Roles') ?></h1>
|
<h1><?= $this->translate('Roles') ?></h1>
|
||||||
</div>
|
</div>
|
||||||
|
@ -218,6 +218,25 @@ EOT;
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove a tab
|
||||||
|
*
|
||||||
|
* @param string $name
|
||||||
|
*
|
||||||
|
* @return self
|
||||||
|
*/
|
||||||
|
public function remove($name)
|
||||||
|
{
|
||||||
|
if ($this->has($name)) {
|
||||||
|
unset($this->tabs[$name]);
|
||||||
|
if (($dropdownIndex = array_search($name, $this->dropdownTabs)) !== false) {
|
||||||
|
array_splice($this->dropdownTabs, $dropdownIndex, 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a tab to the dropdown on the right side of the tab-bar.
|
* Add a tab to the dropdown on the right side of the tab-bar.
|
||||||
*
|
*
|
||||||
|
@ -34,15 +34,7 @@ class Monitoring_HostController extends MonitoredObjectController
|
|||||||
}
|
}
|
||||||
$this->object = $host;
|
$this->object = $host;
|
||||||
$this->createTabs();
|
$this->createTabs();
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Show a host
|
|
||||||
*/
|
|
||||||
public function showAction()
|
|
||||||
{
|
|
||||||
$this->getTabs()->activate('host');
|
$this->getTabs()->activate('host');
|
||||||
parent::showAction();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -34,15 +34,7 @@ class Monitoring_ServiceController extends MonitoredObjectController
|
|||||||
}
|
}
|
||||||
$this->object = $service;
|
$this->object = $service;
|
||||||
$this->createTabs();
|
$this->createTabs();
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Show a service
|
|
||||||
*/
|
|
||||||
public function showAction()
|
|
||||||
{
|
|
||||||
$this->getTabs()->activate('service');
|
$this->getTabs()->activate('service');
|
||||||
parent::showAction();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<div class="controls">
|
<div class="controls" data-base-target="_right">
|
||||||
<?= $tabs; ?>
|
<?= $tabs; ?>
|
||||||
<h1><?= $this->translate('Monitoring Backends') ?></h1>
|
<h1><?= $this->translate('Monitoring Backends') ?></h1>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<div class="controls">
|
<div class="controls" data-base-target="_right">
|
||||||
<?= $this->tabs ?>
|
<?= $this->tabs ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<div class="controls">
|
<div class="controls">
|
||||||
<?= $this->tabs->showOnlyCloseButton() ?>
|
<?= $this->tabs->remove('dashboard') ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<h1><?= $title ?> <?= /** @var \Icinga\Module\Monitoring\Forms\Command\CommandForm $form */ $this->icon('help', $form->getHelp()) ?></h1>
|
<h1><?= $title ?> <?= /** @var \Icinga\Module\Monitoring\Forms\Command\CommandForm $form */ $this->icon('help', $form->getHelp()) ?></h1>
|
||||||
|
@ -35,7 +35,7 @@ if ($object->acknowledged): ?>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<a href="<?= $ackLink ?>">
|
<a href="<?= $ackLink ?>" data-base-target="_self">
|
||||||
<?= $this->icon('ok') ?> <?= $this->translate('Acknowledge') ?>
|
<?= $this->icon('ok') ?> <?= $this->translate('Acknowledge') ?>
|
||||||
</a>
|
</a>
|
||||||
<?php } else {
|
<?php } else {
|
||||||
|
@ -39,7 +39,7 @@ if ($object->getType() === $object::TYPE_HOST) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<a href="<?= $reschedule ?>">
|
<a href="<?= $reschedule ?>" data-base-target="_self">
|
||||||
<?= $this->icon('reschedule') ?>
|
<?= $this->icon('reschedule') ?>
|
||||||
<?= $this->translate('Reschedule') ?>
|
<?= $this->translate('Reschedule') ?>
|
||||||
</a>
|
</a>
|
||||||
|
@ -21,7 +21,7 @@ $command = array_shift($parts);
|
|||||||
array('host' => $object->getHost()->getName(), 'service' => $object->getName())
|
array('host' => $object->getHost()->getName(), 'service' => $object->getName())
|
||||||
);
|
);
|
||||||
} ?>
|
} ?>
|
||||||
<a href="<?= $processCheckResult ?>">
|
<a href="<?= $processCheckResult ?>" data-base-target="_self">
|
||||||
<?= $this->icon('reply') ?>
|
<?= $this->icon('reply') ?>
|
||||||
<?= $this->translate('Process check result') ?>
|
<?= $this->translate('Process check result') ?>
|
||||||
</a>
|
</a>
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<a href="<?= $addCommentLink ?>">
|
<a href="<?= $addCommentLink ?>" data-base-target="_self">
|
||||||
<?= $this->icon('comment') ?>
|
<?= $this->icon('comment') ?>
|
||||||
<?= $this->translate('Add comment') ?>
|
<?= $this->translate('Add comment') ?>
|
||||||
</a>
|
</a>
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<a href="<?= $scheduleDowntimeLink ?>">
|
<a href="<?= $scheduleDowntimeLink ?>" data-base-target="_self">
|
||||||
<?= $this->icon('plug') ?>
|
<?= $this->icon('plug') ?>
|
||||||
<?= $this->translate('Schedule downtime') ?>
|
<?= $this->translate('Schedule downtime') ?>
|
||||||
</a>
|
</a>
|
||||||
|
@ -482,6 +482,16 @@
|
|||||||
targetId = 'col1';
|
targetId = 'col1';
|
||||||
$target = $('#' + targetId);
|
$target = $('#' + targetId);
|
||||||
self.icinga.ui.layout1col();
|
self.icinga.ui.layout1col();
|
||||||
|
} else if (targetId === '_right') {
|
||||||
|
// Ensure that the content is displayed in the rightmost column
|
||||||
|
$target = $el.closest('.container');
|
||||||
|
if ($target.attr('id') === 'col1') {
|
||||||
|
// As it's not possible to detect what's preceding the current state in the
|
||||||
|
// history stack this just simulates _main in case the respective element
|
||||||
|
// is not part of the rightmost column
|
||||||
|
$target = $('#col1');
|
||||||
|
self.icinga.ui.layout1col();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$target = $('#' + targetId);
|
$target = $('#' + targetId);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user