Merge branch 'tesla' into storageareas
This commit is contained in:
commit
dfb69a2c5b
|
@ -225,6 +225,9 @@ sub Sql {
|
||||||
) {
|
) {
|
||||||
$value = "'$temp_value'";
|
$value = "'$temp_value'";
|
||||||
} elsif ( $term->{attr} eq 'DateTime' or $term->{attr} eq 'StartDateTime' or $term->{attr} eq 'EndDateTime' ) {
|
} elsif ( $term->{attr} eq 'DateTime' or $term->{attr} eq 'StartDateTime' or $term->{attr} eq 'EndDateTime' ) {
|
||||||
|
if ( $temp_value == 'NULL' ) {
|
||||||
|
$value = $temp_value;
|
||||||
|
} else {
|
||||||
$value = DateTimeToSQL( $temp_value );
|
$value = DateTimeToSQL( $temp_value );
|
||||||
if ( !$value ) {
|
if ( !$value ) {
|
||||||
Error( "Error parsing date/time '$temp_value', "
|
Error( "Error parsing date/time '$temp_value', "
|
||||||
|
@ -232,7 +235,11 @@ sub Sql {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$value = "'$value'";
|
$value = "'$value'";
|
||||||
|
}
|
||||||
} elsif ( $term->{attr} eq 'Date' or $term->{attr} eq 'StartDate' or $term->{attr} eq 'EndDate' ) {
|
} elsif ( $term->{attr} eq 'Date' or $term->{attr} eq 'StartDate' or $term->{attr} eq 'EndDate' ) {
|
||||||
|
if ( $temp_value == 'NULL' ) {
|
||||||
|
$value = $temp_value;
|
||||||
|
} else {
|
||||||
$value = DateTimeToSQL( $temp_value );
|
$value = DateTimeToSQL( $temp_value );
|
||||||
if ( !$value ) {
|
if ( !$value ) {
|
||||||
Error( "Error parsing date/time '$temp_value', "
|
Error( "Error parsing date/time '$temp_value', "
|
||||||
|
@ -240,7 +247,11 @@ sub Sql {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$value = "to_days( '$value' )";
|
$value = "to_days( '$value' )";
|
||||||
|
}
|
||||||
} elsif ( $term->{attr} eq 'Time' or $term->{attr} eq 'StartTime' or $term->{attr} eq 'EndTime' ) {
|
} elsif ( $term->{attr} eq 'Time' or $term->{attr} eq 'StartTime' or $term->{attr} eq 'EndTime' ) {
|
||||||
|
if ( $temp_value == 'NULL' ) {
|
||||||
|
$value = $temp_value;
|
||||||
|
} else {
|
||||||
$value = DateTimeToSQL( $temp_value );
|
$value = DateTimeToSQL( $temp_value );
|
||||||
if ( !$value ) {
|
if ( !$value ) {
|
||||||
Error( "Error parsing date/time '$temp_value', "
|
Error( "Error parsing date/time '$temp_value', "
|
||||||
|
@ -248,6 +259,7 @@ sub Sql {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$value = "extract( hour_second from '$value' )";
|
$value = "extract( hour_second from '$value' )";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$value = $temp_value;
|
$value = $temp_value;
|
||||||
}
|
}
|
||||||
|
|
|
@ -206,6 +206,7 @@ foreach( array_map( 'basename', glob('skins/'.$current_skin.'/css/*',GLOB_ONLYDI
|
||||||
<th class="colName"><?php echo translate('Name') ?></th>
|
<th class="colName"><?php echo translate('Name') ?></th>
|
||||||
<th class="colHostname"><?php echo translate('Hostname') ?></th>
|
<th class="colHostname"><?php echo translate('Hostname') ?></th>
|
||||||
<th class="colStatus"><?php echo translate('Status') ?></th>
|
<th class="colStatus"><?php echo translate('Status') ?></th>
|
||||||
|
<th class="colMonitorCount"><?php echo translate('Monitors') ?></th>
|
||||||
<th class="colCpuLoad"><?php echo translate('CpuLoad') ?></th>
|
<th class="colCpuLoad"><?php echo translate('CpuLoad') ?></th>
|
||||||
<th class="colMemory"><?php echo translate('Free').'/'.translate('Total') . ' ' . translate('Memory') ?></th>
|
<th class="colMemory"><?php echo translate('Free').'/'.translate('Total') . ' ' . translate('Memory') ?></th>
|
||||||
<th class="colSwap"><?php echo translate('Free').'/'.translate('Total') . ' ' . translate('Swap') ?></th>
|
<th class="colSwap"><?php echo translate('Free').'/'.translate('Total') . ' ' . translate('Swap') ?></th>
|
||||||
|
@ -213,11 +214,12 @@ foreach( array_map( 'basename', glob('skins/'.$current_skin.'/css/*',GLOB_ONLYDI
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php foreach( dbFetchAll( 'SELECT * FROM Servers' ) as $row ) { ?>
|
<?php foreach( dbFetchAll( 'SELECT *,(SELECT COUNT(Id) FROM Monitors WHERE ServerId=Servers.Id) AS MonitorCount FROM Servers' ) as $row ) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="colName"><?php echo makePopupLink( '?view=server&id='.$row['Id'], 'zmServer', 'server', validHtmlStr($row['Name']), $canEdit ) ?></td>
|
<td class="colName"><?php echo makePopupLink( '?view=server&id='.$row['Id'], 'zmServer', 'server', validHtmlStr($row['Name']), $canEdit ) ?></td>
|
||||||
<td class="colHostname"><?php echo makePopupLink( '?view=server&id='.$row['Id'], 'zmServer', 'server', validHtmlStr($row['Hostname']), $canEdit ) ?></td>
|
<td class="colHostname"><?php echo makePopupLink( '?view=server&id='.$row['Id'], 'zmServer', 'server', validHtmlStr($row['Hostname']), $canEdit ) ?></td>
|
||||||
<td class="colStatus"><?php echo makePopupLink( '?view=server&id='.$row['Id'], 'zmServer', 'server', validHtmlStr($row['Status']), $canEdit ) ?></td>
|
<td class="colStatus"><?php echo makePopupLink( '?view=server&id='.$row['Id'], 'zmServer', 'server', validHtmlStr($row['Status']), $canEdit ) ?></td>
|
||||||
|
<td class="colMonitorCount"><?php echo makePopupLink( '?view=server&id='.$row['Id'], 'zmServer', 'server', validHtmlStr($row['MonitorCount']), $canEdit ) ?></td>
|
||||||
<td class="colCpuLoad"><?php echo makePopupLink( '?view=server&id='.$row['Id'], 'zmServer', 'server',$row['CpuLoad'], $canEdit ) ?></td>
|
<td class="colCpuLoad"><?php echo makePopupLink( '?view=server&id='.$row['Id'], 'zmServer', 'server',$row['CpuLoad'], $canEdit ) ?></td>
|
||||||
<td class="colMemory"><?php echo makePopupLink( '?view=server&id='.$row['Id'], 'zmServer', 'server', human_filesize($row['FreeMem']) . ' / ' . human_filesize($row['TotalMem']), $canEdit ) ?></td>
|
<td class="colMemory"><?php echo makePopupLink( '?view=server&id='.$row['Id'], 'zmServer', 'server', human_filesize($row['FreeMem']) . ' / ' . human_filesize($row['TotalMem']), $canEdit ) ?></td>
|
||||||
<td class="colSwap"><?php echo makePopupLink( '?view=server&id='.$row['Id'], 'zmServer', 'server', human_filesize($row['FreeSwap']) . ' / ' . human_filesize($row['TotalSwap']) , $canEdit ) ?></td>
|
<td class="colSwap"><?php echo makePopupLink( '?view=server&id='.$row['Id'], 'zmServer', 'server', human_filesize($row['FreeSwap']) . ' / ' . human_filesize($row['TotalSwap']) , $canEdit ) ?></td>
|
||||||
|
|
Loading…
Reference in New Issue