Don't change colour of dot to warning when not Enabled and not doing analysis. Add reason to the dot
This commit is contained in:
parent
7b66d751d8
commit
1f78776093
|
@ -260,31 +260,37 @@ for( $monitor_i = 0; $monitor_i < count($displayMonitors); $monitor_i += 1 ) {
|
||||||
?>
|
?>
|
||||||
<tr id="<?php echo 'monitor_id-'.$monitor['Id'] ?>" title="<?php echo $monitor['Id'] ?>">
|
<tr id="<?php echo 'monitor_id-'.$monitor['Id'] ?>" title="<?php echo $monitor['Id'] ?>">
|
||||||
<?php
|
<?php
|
||||||
|
$source_class = 'infoText';
|
||||||
|
$source_class_reason = '';
|
||||||
if ( (!$monitor['Status'] || $monitor['Status'] == 'NotRunning') && $monitor['Type']!='WebSite' ) {
|
if ( (!$monitor['Status'] || $monitor['Status'] == 'NotRunning') && $monitor['Type']!='WebSite' ) {
|
||||||
$source_class = 'errorText';
|
$source_class = 'errorText';
|
||||||
|
$source_class_reason = translate('Not Running');
|
||||||
} else {
|
} else {
|
||||||
if ( $monitor['CaptureFPS'] == '0.00' ) {
|
if ( $monitor['CaptureFPS'] == '0.00' ) {
|
||||||
$source_class = 'errorText';
|
$source_class = 'errorText';
|
||||||
|
$source_class_reason = translate('No capture FPS');
|
||||||
} else if ( (!$monitor['AnalysisFPS']) && ($monitor['Function']!='Monitor') && ($monitor['Function'] != 'Nodect') ) {
|
} else if ( (!$monitor['AnalysisFPS']) && ($monitor['Function']!='Monitor') && ($monitor['Function'] != 'Nodect') ) {
|
||||||
$source_class = 'warnText';
|
$source_class = 'warnText';
|
||||||
} else {
|
$source_class_reason = translate('No analysis FPS');
|
||||||
$source_class = 'infoText';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( $monitor['Function'] == 'None' )
|
|
||||||
$function_class = 'errorText';
|
|
||||||
else
|
|
||||||
$function_class = 'infoText';
|
|
||||||
|
|
||||||
|
$function_class = 'infoText';
|
||||||
|
if ($monitor['Function'] == 'None') {
|
||||||
|
$function_class = 'errorText';
|
||||||
|
}
|
||||||
|
|
||||||
|
$dot_class = $source_class;
|
||||||
|
$dot_class_reason = $source_class_reason;
|
||||||
|
if ( $function_class != 'infoText' ) {
|
||||||
|
$dot_class = $function_class;
|
||||||
|
} else if (($monitor['Function'] == 'Modect' || $monitor['Function'] == 'Mocord') and !$monitor['Enabled']) {
|
||||||
|
$dot_class .= ' warnText';
|
||||||
|
$dot_class_reason .= ' '.translate('Analysis is disabled');
|
||||||
|
}
|
||||||
|
|
||||||
$scale = max(reScale(SCALE_BASE, $monitor['DefaultScale'], ZM_WEB_DEFAULT_SCALE), SCALE_BASE);
|
$scale = max(reScale(SCALE_BASE, $monitor['DefaultScale'], ZM_WEB_DEFAULT_SCALE), SCALE_BASE);
|
||||||
$stream_available = canView('Stream') and $monitor['Type']=='WebSite' or ($monitor['CaptureFPS'] && $monitor['Function'] != 'None');
|
$stream_available = canView('Stream') and $monitor['Type']=='WebSite' or ($monitor['CaptureFPS'] && $monitor['Function'] != 'None');
|
||||||
$dot_class = $source_class;
|
|
||||||
if ( $function_class != 'infoText' ) {
|
|
||||||
$dot_class = $function_class;
|
|
||||||
} else if ( !$monitor['Enabled'] ) {
|
|
||||||
$dot_class .= ' warnText';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( ZM_WEB_ID_ON_CONSOLE ) {
|
if ( ZM_WEB_ID_ON_CONSOLE ) {
|
||||||
?>
|
?>
|
||||||
|
@ -317,7 +323,7 @@ for( $monitor_i = 0; $monitor_i < count($displayMonitors); $monitor_i += 1 ) {
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<td class="colName">
|
<td class="colName">
|
||||||
<i class="material-icons md-18 <?php echo $dot_class ?>">lens</i>
|
<i class="material-icons md-18 <?php echo $dot_class ?>" title="<?php echo $dot_class_reason ?>">lens</i>
|
||||||
<a <?php echo ($stream_available ? 'href="?view=watch&mid='.$monitor['Id'].'">' : '>') . validHtmlStr($monitor['Name']) ?></a><br/>
|
<a <?php echo ($stream_available ? 'href="?view=watch&mid='.$monitor['Id'].'">' : '>') . validHtmlStr($monitor['Name']) ?></a><br/>
|
||||||
<?php echo $imgHTML ?>
|
<?php echo $imgHTML ?>
|
||||||
<div class="small text-nowrap text-muted">
|
<div class="small text-nowrap text-muted">
|
||||||
|
|
Loading…
Reference in New Issue