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">
|
<tr class="newsection">
|
||||||
<th><?= $this->translate('Instance'); ?></th>
|
<th><?= $this->translate('Instance'); ?></th>
|
||||||
<td><?= $this->escape($object->instance_name); ?></td>
|
<td><?= $this->escape($object->instance_name); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?php endif ?>
|
||||||
<tr class="newsection">
|
<tr class="newsection">
|
||||||
<th><?= $this->translate('Command'); ?></th>
|
<th><?= $this->translate('Command'); ?></th>
|
||||||
<td>
|
<td>
|
||||||
|
|
|
@ -91,6 +91,7 @@ abstract class MonitoredObjectController extends Controller
|
||||||
$delDowntimeForm->handleRequest();
|
$delDowntimeForm->handleRequest();
|
||||||
$this->view->delDowntimeForm = $delDowntimeForm;
|
$this->view->delDowntimeForm = $delDowntimeForm;
|
||||||
}
|
}
|
||||||
|
$this->view->showInstance = $this->backend->select()->from('instance')->count() > 1;
|
||||||
$this->view->object = $this->object;
|
$this->view->object = $this->object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue