add a Storage Area dropdown to set where this monitor will storage it's events
This commit is contained in:
parent
9ffbaabde5
commit
14dc447145
|
@ -19,6 +19,7 @@
|
|||
//
|
||||
|
||||
require_once( 'includes/Server.php');
|
||||
require_once( 'includes/Storage.php');
|
||||
|
||||
if ( !canView( 'Monitors' ) )
|
||||
{
|
||||
|
@ -29,7 +30,6 @@ if ( !canView( 'Monitors' ) )
|
|||
$tabs = array();
|
||||
$tabs["general"] = translate('General');
|
||||
$tabs["source"] = translate('Source');
|
||||
$tabs["storage"] = translate('Storage');
|
||||
$tabs["timestamp"] = translate('Timestamp');
|
||||
$tabs["buffers"] = translate('Buffers');
|
||||
if ( ZM_OPT_CONTROL && canView( 'Control' ) )
|
||||
|
@ -576,7 +576,7 @@ if ( $tab != 'source' || ($newMonitor['Type'] != 'Remote' && $newMonitor['Protoc
|
|||
}
|
||||
if ( $tab != 'storage' ) {
|
||||
?>
|
||||
<input type="hidden" name="newMonitor[storage_id]" value="<?= validHtmlStr($newMonitor['storage_id']) ?>"/>
|
||||
<input type="hidden" name="newMonitor[StorageId]" value="<?= validHtmlStr($newMonitor['StorageId']) ?>"/>
|
||||
<?php
|
||||
}
|
||||
if ( $tab != 'timestamp' )
|
||||
|
@ -661,8 +661,19 @@ switch ( $tab )
|
|||
foreach ( $results as $row => $server_obj ) {
|
||||
$servers[$server_obj->Id] = $server_obj->Name();
|
||||
}
|
||||
echo buildSelect( "newMonitor[ServerId]", $servers );
|
||||
?>
|
||||
</td></tr>
|
||||
<tr><td><?php echo translate('StorageArea') ?></td><td>
|
||||
<?php
|
||||
$storage_areas = array(''=>'Default');
|
||||
$result = dbQuery( 'SELECT * FROM Storage ORDER BY Name');
|
||||
$results = $result->fetchALL(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, 'Storage' );
|
||||
foreach ( $results as $row => $storage_obj ) {
|
||||
$storage_areas[$storage_obj->Id] = $storage_obj->Name();
|
||||
}
|
||||
echo buildSelect( "newMonitor[StorageId]", $storage_areas );
|
||||
?>
|
||||
<?php echo buildSelect( "newMonitor[ServerId]", $servers ); ?>
|
||||
</td></tr>
|
||||
<tr><td><?php echo translate('SourceType') ?></td><td><?php echo buildSelect( "newMonitor[Type]", $sourceTypes ); ?></td></tr>
|
||||
<tr><td><?php echo translate('Function') ?></td><td><select name="newMonitor[Function]">
|
||||
|
@ -853,11 +864,6 @@ switch ( $tab )
|
|||
?>
|
||||
<?php
|
||||
break;
|
||||
} case 'storage' : {
|
||||
$areas = dbFetchAll( 'SELECT Id, Name FROM Storage ORDER BY Name' );
|
||||
?>
|
||||
<tr><td?<?= $SLANG['StorageArea'] ?></td><td><?= buildSelect( "newMonitor[storage_id]", $areas ); ?></td></tr>
|
||||
<?php
|
||||
}
|
||||
case 'timestamp' :
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue