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'),
|
'DiskPercent' => translate('AttrDiskPercent'),
|
||||||
'DiskBlocks' => translate('AttrDiskBlocks'),
|
'DiskBlocks' => translate('AttrDiskBlocks'),
|
||||||
'SystemLoad' => translate('AttrSystemLoad'),
|
'SystemLoad' => translate('AttrSystemLoad'),
|
||||||
'StorageId' => translate('AttrStorageId'),
|
'StorageId' => translate('AttrStorageArea'),
|
||||||
'StorageName' => translate('AttrStorageName'),
|
'ServerId' => translate('AttrServer'),
|
||||||
'ServerId' => translate('AttrServerId'),
|
|
||||||
'ServerName' => translate('AttrServerName'),
|
|
||||||
);
|
);
|
||||||
$opTypes = array(
|
$opTypes = array(
|
||||||
'=' => translate('OpEq'),
|
'=' => 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][op]", $opTypes ); ?></td>
|
||||||
<td><?php echo buildSelect( "filter[terms][$i][val]", $monitors ); ?></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
|
<?php
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue