Show an object's instance only if there are multiple instances

refs #9945
This commit is contained in:
Johannes Meyer 2015-08-26 10:55:18 +02:00
parent ffcd33ee7e
commit 1317a6eaf8
2 changed files with 3 additions and 0 deletions

View File

@ -5,10 +5,12 @@ $command = array_shift($parts);
?>
<?php if ($showInstance): ?>
<tr class="newsection">
<th><?= $this->translate('Instance'); ?></th>
<td><?= $this->escape($object->instance_name); ?></td>
</tr>
<?php endif ?>
<tr class="newsection">
<th><?= $this->translate('Command'); ?></th>
<td>

View File

@ -91,6 +91,7 @@ abstract class MonitoredObjectController extends Controller
$delDowntimeForm->handleRequest();
$this->view->delDowntimeForm = $delDowntimeForm;
}
$this->view->showInstance = $this->backend->select()->from('instance')->count() > 1;
$this->view->object = $this->object;
}