populate dropdown with the available storage areas when StorageId is selected
This commit is contained in:
parent
0cb2d141a5
commit
aa9a6ddcc3
|
@ -84,10 +84,8 @@ $attrTypes = array(
|
|||
'DiskPercent' => translate('AttrDiskPercent'),
|
||||
'DiskBlocks' => translate('AttrDiskBlocks'),
|
||||
'SystemLoad' => translate('AttrSystemLoad'),
|
||||
'StorageId' => translate('AttrStorageId'),
|
||||
'StorageName' => translate('AttrStorageName'),
|
||||
'ServerId' => translate('AttrServerId'),
|
||||
'ServerName' => translate('AttrServerName'),
|
||||
'StorageId' => translate('AttrStorageArea'),
|
||||
'ServerId' => translate('AttrServer'),
|
||||
);
|
||||
$opTypes = array(
|
||||
'=' => translate('OpEq'),
|
||||
|
@ -228,6 +226,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'] == "StorageId" )
|
||||
{
|
||||
$storageareas = array();
|
||||
foreach ( dbFetchAll( "SELECT Id,Name FROM Storage ORDER BY lower(Name) ASC" ) as $storage )
|
||||
{
|
||||
$storageareas[$storage['Id']] = $storage['Name'];
|
||||
}
|
||||
?>
|
||||
<td><?php echo buildSelect( "filter[terms][$i][op]", $opTypes ); ?></td>
|
||||
<td><?php echo buildSelect( "filter[terms][$i][val]", $storageareas ); ?></td>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue