Do not mark relative urls as absolute

refs #5600
refs #10169
This commit is contained in:
Johannes Meyer 2015-09-22 14:12:08 +02:00
parent 8239ec8fb5
commit 57e08e92d4
12 changed files with 18 additions and 18 deletions

View File

@ -32,7 +32,7 @@ class PreferenceController extends BasePreferenceController
array( array(
'title' => t('Adjust the preferences of Icinga Web 2 according to your needs'), 'title' => t('Adjust the preferences of Icinga Web 2 according to your needs'),
'label' => t('Preferences'), 'label' => t('Preferences'),
'url' => Url::fromPath('/preference') 'url' => Url::fromPath('preference')
) )
) )
); );

View File

@ -22,7 +22,7 @@ if ($this->layout()->autorefreshInterval) {
<?php if (Auth::getInstance()->isAuthenticated()): ?> <?php if (Auth::getInstance()->isAuthenticated()): ?>
<?= $this->qlink( <?= $this->qlink(
'', '',
'/dashboard', 'dashboard',
null, null,
array( array(
'icon' => '../logo_icinga-inv.png', 'icon' => '../logo_icinga-inv.png',

View File

@ -63,7 +63,7 @@ $innerLayoutScript = $this->layout()->innerLayout . '.phtml';
<!--<![endif]--> <!--<![endif]-->
<script type="text/javascript"> <script type="text/javascript">
var icinga = new Icinga({ var icinga = new Icinga({
baseUrl: '<?= $this->href('/') ?>' baseUrl: '<?= $this->baseUrl(); ?>'
}); });
</script> </script>
</body> </body>

View File

@ -2,7 +2,7 @@
<?= $tabs; ?> <?= $tabs; ?>
</div> </div>
<div class="content" data-base-target="_next"> <div class="content" data-base-target="_next">
<a href="<?= $this->href('/config/createresource'); ?>"> <a href="<?= $this->href('config/createresource'); ?>">
<?= $this->icon('plus'); ?> <?= $this->translate('Create A New Resource'); ?> <?= $this->icon('plus'); ?> <?= $this->translate('Create A New Resource'); ?>
</a> </a>
<table class="action alternating" id="resource-edit-table"> <table class="action alternating" id="resource-edit-table">

View File

@ -2,7 +2,7 @@
<?= $tabs; ?> <?= $tabs; ?>
</div> </div>
<div class="content" data-base-target="_next"> <div class="content" data-base-target="_next">
<a href="<?= $this->href('/config/createuserbackend'); ?>"> <a href="<?= $this->href('config/createuserbackend'); ?>">
<?= $this->icon('plus'); ?><?= $this->translate('Create A New User Backend'); ?> <?= $this->icon('plus'); ?><?= $this->translate('Create A New User Backend'); ?>
</a> </a>
<div id="authentication-reorder-form"> <div id="authentication-reorder-form">

View File

@ -5,7 +5,7 @@
<div class="content" data-base-target="_next"> <div class="content" data-base-target="_next">
<p> <p>
<a href="<?= $this->href('/monitoring/config/createbackend'); ?>"> <a href="<?= $this->href('monitoring/config/createbackend'); ?>">
<?= $this->icon('plus'); ?> <?= $this->translate('Create New Monitoring Backend'); ?> <?= $this->icon('plus'); ?> <?= $this->translate('Create New Monitoring Backend'); ?>
</a> </a>
</p> </p>
@ -20,7 +20,7 @@
<td> <td>
<?= $this->qlink( <?= $this->qlink(
$backendName, $backendName,
'/monitoring/config/editbackend', 'monitoring/config/editbackend',
array('backend-name' => $backendName), array('backend-name' => $backendName),
array( array(
'icon' => 'edit', 'icon' => 'edit',
@ -35,7 +35,7 @@
<td> <td>
<?= $this->qlink( <?= $this->qlink(
'', '',
'/monitoring/config/removebackend', 'monitoring/config/removebackend',
array('backend-name' => $backendName), array('backend-name' => $backendName),
array( array(
'icon' => 'trash', 'icon' => 'trash',
@ -49,7 +49,7 @@
</table> </table>
<h1><?= $this->translate('Command Transports') ?></h1> <h1><?= $this->translate('Command Transports') ?></h1>
<p> <p>
<a href="<?= $this->href('/monitoring/config/createtransport'); ?>"> <a href="<?= $this->href('monitoring/config/createtransport'); ?>">
<?= $this->icon('plus'); ?> <?= $this->translate('Create New Transport'); ?> <?= $this->icon('plus'); ?> <?= $this->translate('Create New Transport'); ?>
</a> </a>
</p> </p>
@ -64,7 +64,7 @@
<td> <td>
<?= $this->qlink( <?= $this->qlink(
$transportName, $transportName,
'/monitoring/config/edittransport', 'monitoring/config/edittransport',
array('transport' => $transportName), array('transport' => $transportName),
array( array(
'icon' => 'edit', 'icon' => 'edit',
@ -79,7 +79,7 @@
<td> <td>
<?= $this->qlink( <?= $this->qlink(
'', '',
'/monitoring/config/removetransport', 'monitoring/config/removetransport',
array('transport' => $transportName), array('transport' => $transportName),
array( array(
'icon' => 'trash', 'icon' => 'trash',

View File

@ -14,7 +14,7 @@
<div class="content"> <div class="content">
<table data-base-target="_next" <table data-base-target="_next"
class="action comments multiselect" class="action comments multiselect"
data-icinga-multiselect-url="/icingaweb2/monitoring/comments/show" data-icinga-multiselect-url="<?= $this->href('monitoring/comments/show'); ?>"
data-icinga-multiselect-data="comment_id"> data-icinga-multiselect-data="comment_id">
<tbody> <tbody>
<?php foreach ($comments->peekAhead($this->compact) as $comment): ?> <?php foreach ($comments->peekAhead($this->compact) as $comment): ?>

View File

@ -27,7 +27,7 @@ if (count($groupData) === 0) {
<div class="box contents"> <div class="box contents">
<?php foreach ($groupInfo['contacts'] as $c): ?> <?php foreach ($groupInfo['contacts'] as $c): ?>
<div class="box entry"> <div class="box entry">
<?= $this->img('/static/gravatar', array('email' => $c->contact_email)); ?> <?= $this->img('static/gravatar', array('email' => $c->contact_email)); ?>
<?= $this->qlink( <?= $this->qlink(
$c->contact_alias, $c->contact_alias,
'monitoring/show/contact', 'monitoring/show/contact',

View File

@ -10,7 +10,7 @@
<div data-base-target="_next" class="content contacts"> <div data-base-target="_next" class="content contacts">
<?php foreach ($contacts->peekAhead($this->compact) as $contact): ?> <?php foreach ($contacts->peekAhead($this->compact) as $contact): ?>
<div class="contact"> <div class="contact">
<?= $this->img('/static/gravatar', array('email' => $contact->contact_email)); ?> <?= $this->img('static/gravatar', array('email' => $contact->contact_email)); ?>
<strong><?= $this->qlink( <strong><?= $this->qlink(
$contact->contact_name, $contact->contact_name,
'monitoring/show/contact', 'monitoring/show/contact',

View File

@ -20,7 +20,7 @@ if (! $this->compact): ?>
<div class="content"> <div class="content">
<table data-base-target="_next" <table data-base-target="_next"
class="action multiselect" class="action multiselect"
data-icinga-multiselect-url="/icingaweb2/monitoring/downtimes/show" data-icinga-multiselect-url="<?= $this->href('monitoring/downtimes/show'); ?>"
data-icinga-multiselect-data="downtime_id"> data-icinga-multiselect-data="downtime_id">
<tbody> <tbody>
<?php foreach ($downtimes as $downtime): ?> <?php foreach ($downtimes as $downtime): ?>

View File

@ -65,7 +65,7 @@ if (! $beingExtended && !$this->compact): ?>
<div class="timeframe"> <div class="timeframe">
<span><?= $this->qlink( <span><?= $this->qlink(
$timeInfo[0]->end->format($intervalFormat), $timeInfo[0]->end->format($intervalFormat),
'/monitoring/list/eventhistory', 'monitoring/list/eventhistory',
array( array(
'timestamp<' => $timeInfo[0]->start->getTimestamp(), 'timestamp<' => $timeInfo[0]->start->getTimestamp(),
'timestamp>' => $timeInfo[0]->end->getTimestamp() 'timestamp>' => $timeInfo[0]->end->getTimestamp()

View File

@ -263,11 +263,11 @@ $dashboard->add(
); );
$dashboard->add( $dashboard->add(
N_('Service Groups'), N_('Service Groups'),
'/monitoring/list/servicegroups' 'monitoring/list/servicegroups'
); );
$dashboard->add( $dashboard->add(
N_('Host Groups'), N_('Host Groups'),
'/monitoring/list/hostgroups' 'monitoring/list/hostgroups'
); );
/* /*