Show an object's instance only if there are multiple instances
refs #9945
This commit is contained in:
parent
ffcd33ee7e
commit
1317a6eaf8
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue