replace function with appropriate Analysing/Capturing settings. Remove function popup.

This commit is contained in:
Isaac Connor 2022-01-11 10:45:11 -05:00
parent c97db738a3
commit 6219989884
1 changed files with 20 additions and 17 deletions

View File

@ -128,7 +128,7 @@ for ( $i = 0; $i < count($displayMonitors); $i++ ) {
$status_counts[$monitor['Status']] = 0;
$status_counts[$monitor['Status']] += 1;
if ( $monitor['Function'] != 'None' ) {
if ( $monitor['Capturing'] != 'None' ) {
$scaleWidth = reScale($monitor['Width'], $monitor['DefaultScale'], ZM_WEB_DEFAULT_SCALE);
$scaleHeight = reScale($monitor['Height'], $monitor['DefaultScale'], ZM_WEB_DEFAULT_SCALE);
if ( $maxWidth < $scaleWidth ) $maxWidth = $scaleWidth;
@ -269,28 +269,25 @@ for( $monitor_i = 0; $monitor_i < count($displayMonitors); $monitor_i += 1 ) {
if ( $monitor['CaptureFPS'] == '0.00' ) {
$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['Analysing'] != 'None') ) {
$source_class = 'warnText';
$source_class_reason = translate('No analysis FPS');
}
}
$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']) {
} else if (($monitor['Analysing'] == 'Always') 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);
$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['Capturing'] != 'None');
if (ZM_WEB_ID_ON_CONSOLE) {
?>
@ -298,7 +295,7 @@ for( $monitor_i = 0; $monitor_i < count($displayMonitors); $monitor_i += 1 ) {
<?php
}
$imgHTML = '';
if (ZM_WEB_LIST_THUMBS && $monitor['Function'] != 'None' && ($monitor['Status'] == 'Connected') && $running && canView('Stream')) {
if (ZM_WEB_LIST_THUMBS && ($monitor['Capturing'] != 'None') && ($monitor['Status'] == 'Connected') && $running && canView('Stream')) {
$options = array();
$ratio_factor = $Monitor->ViewHeight() / $Monitor->ViewWidth();
@ -349,8 +346,13 @@ for( $monitor_i = 0; $monitor_i < count($displayMonitors); $monitor_i += 1 ) {
?>
</div></td>
<td class="colFunction">
<a class="functionLnk <?php echo $function_class ?>" data-mid="<?php echo $monitor['Id'] ?>" id="functionLnk-<?php echo $monitor['Id'] ?>" href="#"><?php echo translate('Fn'.$monitor['Function']) ?></a><br/>
<?php echo translate('Status'.$monitor['Status']) ?><br/>
<!--<a class="functionLnk <?php echo $function_class ?>" data-mid="<?php echo $monitor['Id'] ?>" id="functionLnk-<?php echo $monitor['Id'] ?>" href="#"><?php echo translate('Fn'.$monitor['Function']) ?></a>-->
<?php
echo translate('Status'.$monitor['Status']);
if ($monitor['Analysing'] != 'None') {
echo ', '.translate('Analysing');
}
?><br/>
<div class="small text-nowrap text-muted">
<?php
$fps_string = '';
@ -358,7 +360,7 @@ for( $monitor_i = 0; $monitor_i < count($displayMonitors); $monitor_i += 1 ) {
$fps_string .= $monitor['CaptureFPS'];
}
if ( isset($monitor['AnalysisFPS']) and ( $monitor['Function'] == 'Mocord' or $monitor['Function'] == 'Modect' ) ) {
if ( isset($monitor['AnalysisFPS']) and ($monitor['Analysing'] != 'None')) {
$fps_string .= '/' . $monitor['AnalysisFPS'];
}
if ($fps_string) $fps_string .= ' fps';
@ -368,7 +370,8 @@ for( $monitor_i = 0; $monitor_i < count($displayMonitors); $monitor_i += 1 ) {
?>
</div></td>
<?php
if ( count($servers) ) { ?>
if (count($servers)) {
?>
<td class="colServer"><?php $Server = isset($ServersById[$monitor['ServerId']]) ? $ServersById[$monitor['ServerId']] : new ZM\Server($monitor['ServerId']); echo validHtmlStr($Server->Name()); ?></td>
<?php
}