Replace the server attribute with a server entry, populated with a dropdown.Makes things more friendly and less error-prone
parent
277fdafa85
commit
7cfa2a5eaa
|
@ -85,7 +85,6 @@ $attrTypes = array(
|
|||
'DiskBlocks' => translate('AttrDiskBlocks'),
|
||||
'SystemLoad' => translate('AttrSystemLoad'),
|
||||
'ServerId' => translate('AttrServerId'),
|
||||
'ServerName' => translate('AttrServerName'),
|
||||
);
|
||||
$opTypes = array(
|
||||
'=' => translate('OpEq'),
|
||||
|
@ -226,6 +225,18 @@ for ( $i = 0; isset($_REQUEST['filter']) && $i < count($_REQUEST['filter']['term
|
|||
?>
|
||||
<td><?php echo buildSelect( "filter[terms][$i][op]", $opTypes ); ?></td>
|
||||
<td><?php echo buildSelect( "filter[terms][$i][val]", $monitors ); ?></td>
|
||||
<?php
|
||||
}
|
||||
elseif ( $_REQUEST['filter']['terms'][$i]['attr'] == "ServerId" )
|
||||
{
|
||||
$servers = array();
|
||||
$servers['ZM_SERVER_ID'] = 'Current Server';
|
||||
foreach ( dbFetchAll( "SELECT Id,Name FROM Servers ORDER BY lower(Name) ASC" ) as $server ) {
|
||||
$servers[$server['Id']] = $server['Name'];
|
||||
}
|
||||
?>
|
||||
<td><?php echo buildSelect( "filter[terms][$i][op]", $opTypes ); ?></td>
|
||||
<td><?php echo buildSelect( "filter[terms][$i][val]", $servers ); ?></td>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue