Convert most of console to bootstrap theme
This commit is contained in:
parent
1c400f0966
commit
8ec86ae255
|
@ -348,39 +348,6 @@ th.table-th-sort-rev span.table-th-sort-span {
|
||||||
* Primary layout styles
|
* Primary layout styles
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#header {
|
|
||||||
width: 96%;
|
|
||||||
line-height: 24px;
|
|
||||||
margin: 8px auto;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header h2 {
|
|
||||||
left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header h2.floating {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
#headerControl {
|
|
||||||
width: 50%;
|
|
||||||
text-align: center;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
#headerButtons {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
#headerButtons a {
|
|
||||||
margin-left: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#headerButtons input {
|
|
||||||
margin-left: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#content {
|
#content {
|
||||||
width: 96%;
|
width: 96%;
|
||||||
margin: 8px auto;
|
margin: 8px auto;
|
||||||
|
@ -428,7 +395,8 @@ th.table-th-sort-rev span.table-th-sort-span {
|
||||||
}
|
}
|
||||||
|
|
||||||
#footer {
|
#footer {
|
||||||
width: 96%;
|
position: absolute;
|
||||||
margin: 8px auto;
|
bottom: 0px;
|
||||||
|
width: 100%;
|
||||||
|
background-color: #F5F5F5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,6 +70,11 @@ $eventCounts = array(
|
||||||
|
|
||||||
$running = daemonCheck();
|
$running = daemonCheck();
|
||||||
$status = $running?$SLANG['Running']:$SLANG['Stopped'];
|
$status = $running?$SLANG['Running']:$SLANG['Stopped'];
|
||||||
|
if ($status == 'Running') {
|
||||||
|
$statusClass = 'success';
|
||||||
|
} else {
|
||||||
|
$statusClass = 'danger';
|
||||||
|
}
|
||||||
|
|
||||||
$group = NULL;
|
$group = NULL;
|
||||||
if ( ! empty($_COOKIE['zmGroup']) ) {
|
if ( ! empty($_COOKIE['zmGroup']) ) {
|
||||||
|
@ -181,55 +186,36 @@ $versionClass = (ZM_DYN_DB_VERSION&&(ZM_DYN_DB_VERSION!=ZM_VERSION))?'errorText'
|
||||||
xhtmlHeaders( __FILE__, $SLANG['Console'] );
|
xhtmlHeaders( __FILE__, $SLANG['Console'] );
|
||||||
?>
|
?>
|
||||||
<body>
|
<body>
|
||||||
<div class="container-fluid">
|
|
||||||
<form name="monitorForm" method="get" action="<?= $_SERVER['PHP_SELF'] ?>">
|
<form name="monitorForm" method="get" action="<?= $_SERVER['PHP_SELF'] ?>">
|
||||||
<input type="hidden" name="view" value="<?= $view ?>"/>
|
<input type="hidden" name="view" value="<?= $view ?>"/>
|
||||||
<input type="hidden" name="action" value=""/>
|
<input type="hidden" name="action" value=""/>
|
||||||
<div id="header">
|
<nav class="navbar navbar-default" role="navigation">
|
||||||
<h3 id="systemTime"><?= preg_match( '/%/', DATE_FMT_CONSOLE_LONG )?strftime( DATE_FMT_CONSOLE_LONG ):date( DATE_FMT_CONSOLE_LONG ) ?></h3>
|
<div class="container-fluid">
|
||||||
<h3 id="systemStats"><?= $SLANG['Load'] ?>: <?= getLoad() ?> / <?= $SLANG['Disk'] ?>: <?= getDiskPercent() ?>%</h3>
|
<a href="?view=state" class="btn btn-<?= $statusClass ?> btn-md navbar-btn pull-right" onclick="createPopup( '?view=state', 'zmState', 'state' ); return( false );">
|
||||||
<h2 id="title"><a href="http://www.zoneminder.com" target="ZoneMinder">ZoneMinder</a> <?= $SLANG['Console'] ?> - <?= makePopupLink( '?view=state', 'zmState', 'state', $status, canEdit( 'System' ) ) ?> - <?= makePopupLink( '?view=version', 'zmVersion', 'version', '<span class="'.$versionClass.'">v'.ZM_VERSION.'</span>', canEdit( 'System' ) ) ?></h2>
|
<span class="glyphicon glyphicon-off"></span>
|
||||||
<div class="clear"></div>
|
</a>
|
||||||
<div id="monitorSummary"><?= makePopupLink( '?view=groups', 'zmGroups', 'groups', sprintf( $CLANG['MonitorCount'], count($displayMonitors), zmVlang( $VLANG['Monitor'], count($displayMonitors) ) ).($group?' ('.$group['Name'].')':''), canView( 'System' ) ); ?></div>
|
<ul class="nav navbar-nav pull-right">
|
||||||
<?php
|
<li>
|
||||||
if ( ZM_OPT_X10 && canView( 'Devices' ) )
|
<?= makePopupLink( '?view=options', 'zmOptions', 'options', $SLANG['Options'] ) ?>
|
||||||
{
|
</li>
|
||||||
?>
|
<?php if ( logToDatabase() > Logger::NOLOG ) { ?>
|
||||||
<div id="devices"><?= makePopupLink( '?view=devices', 'zmDevices', 'devices', $SLANG['Devices'] ) ?></div>
|
<li>
|
||||||
<?php
|
<?= makePopupLink( '?view=log', 'zmLog', 'log', '<span class="'.logState().'">'.$SLANG['Log'].'</span>' ) ?>
|
||||||
}
|
</li>
|
||||||
if ( canView( 'System' ) )
|
<?php } ?>
|
||||||
{
|
<li>
|
||||||
?>
|
<?= makePopupLink( '?view=groups', 'zmGroups', 'groups', sprintf( $CLANG['MonitorCount'], count($displayMonitors), zmVlang( $VLANG['Monitor'], count($displayMonitors) ) ).($group?' ('.$group['Name'].')':''), canView( 'System' ) ); ?>
|
||||||
<div id="options"><?= makePopupLink( '?view=options', 'zmOptions', 'options', $SLANG['Options'] ) ?><?php if ( logToDatabase() > Logger::NOLOG ) { ?> / <?= makePopupLink( '?view=log', 'zmLog', 'log', '<span class="'.logState().'">'.$SLANG['Log'].'</span>' ) ?><?php } ?></div>
|
</li>
|
||||||
<?php
|
<?php if ( ZM_OPT_X10 && canView( 'Devices' ) ) { ?>
|
||||||
}
|
<li><?= makePopupLink( '?view=devices', 'zmDevices', 'devices', $SLANG['Devices'] ) ?></li>
|
||||||
if ( canView( 'Stream' ) && $cycleCount > 1 )
|
<?php } ?>
|
||||||
{
|
<li><?= makePopupLink( '?view=cycle&group='.$cycleGroup, 'zmCycle'.$cycleGroup, array( 'cycle', $cycleWidth, $cycleHeight ), $SLANG['Cycle'], $running ) ?></li>
|
||||||
$cycleGroup = isset($_COOKIE['zmGroup'])?$_COOKIE['zmGroup']:0;
|
<li><?= makePopupLink( '?view=montage&group='.$cycleGroup, 'zmMontage'.$cycleGroup, 'montage', $SLANG['Montage'], $running ) ?></li>
|
||||||
?>
|
</ul>
|
||||||
<div id="cycleMontage"><?= makePopupLink( '?view=cycle&group='.$cycleGroup, 'zmCycle'.$cycleGroup, array( 'cycle', $cycleWidth, $cycleHeight ), $SLANG['Cycle'], $running ) ?> / <?= makePopupLink( '?view=montage&group='.$cycleGroup, 'zmMontage'.$cycleGroup, 'montage', $SLANG['Montage'], $running ) ?></div>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
?>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<h3 id="loginBandwidth"><?php
|
|
||||||
if ( ZM_OPT_USE_AUTH )
|
|
||||||
{
|
|
||||||
?><?= $SLANG['LoggedInAs'] ?> <?= makePopupLink( '?view=logout', 'zmLogout', 'logout', $user['Username'], (ZM_AUTH_TYPE == "builtin") ) ?>, <?= strtolower( $SLANG['ConfiguredFor'] ) ?><?php
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
?><?= $SLANG['ConfiguredFor'] ?><?php
|
|
||||||
}
|
|
||||||
?> <?= makePopupLink( '?view=bandwidth', 'zmBandwidth', 'bandwidth', $bwArray[$_COOKIE['zmBandwidth']], ($user && $user['MaxBandwidth'] != 'low' ) ) ?> <?= $SLANG['BandwidthHead'] ?></h3>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="content">
|
</nav>
|
||||||
<table id="consoleTable" cellspacing="0">
|
<div id="content" class="container-fluid">
|
||||||
|
<table id="consoleTable" class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="colName"><?= $SLANG['Name'] ?></th>
|
<th class="colName"><?= $SLANG['Name'] ?></th>
|
||||||
|
@ -258,7 +244,7 @@ if ( canEdit('Monitors') )
|
||||||
<tfoot>
|
<tfoot>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="colLeftButtons" colspan="3">
|
<td class="colLeftButtons" colspan="3">
|
||||||
<input type="button" value="<?= $SLANG['Refresh'] ?>" onclick="location.reload(true);"/>
|
<input class="btn btn-default" type="button" value="<?= $SLANG['Refresh'] ?>" onclick="location.reload(true);"/>
|
||||||
<?= makePopupButton( '?view=monitor', 'zmMonitor0', 'monitor', $SLANG['AddNewMonitor'], (canEdit( 'Monitors' ) && !$user['MonitorIds']) ) ?>
|
<?= makePopupButton( '?view=monitor', 'zmMonitor0', 'monitor', $SLANG['AddNewMonitor'], (canEdit( 'Monitors' ) && !$user['MonitorIds']) ) ?>
|
||||||
<?= makePopupButton( '?view=filter&filter[terms][0][attr]=DateTime&filter[terms][0][op]=%3c&filter[terms][0][val]=now', 'zmFilter', 'filter', $SLANG['Filters'], canView( 'Events' ) ) ?>
|
<?= makePopupButton( '?view=filter&filter[terms][0][attr]=DateTime&filter[terms][0][op]=%3c&filter[terms][0][val]=now', 'zmFilter', 'filter', $SLANG['Filters'], canView( 'Events' ) ) ?>
|
||||||
</td>
|
</td>
|
||||||
|
@ -272,7 +258,7 @@ for ( $i = 0; $i < count($eventCounts); $i++ )
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<td class="colZones"><?= $zoneCount ?></td>
|
<td class="colZones"><?= $zoneCount ?></td>
|
||||||
<td class="colRightButtons" colspan="<?= canEdit('Monitors')?2:1 ?>"><input type="button" name="editBtn" value="<?= $SLANG['Edit'] ?>" onclick="editMonitor( this )" disabled="disabled"/><input type="button" name="deleteBtn" value="<?= $SLANG['Delete'] ?>" onclick="deleteMonitor( this )" disabled="disabled"/></td>
|
<td class="colRightButtons" colspan="<?= canEdit('Monitors')?2:1 ?>"><input class="btn btn-default" type="button" name="editBtn" value="<?= $SLANG['Edit'] ?>" onclick="editMonitor( this )" disabled="disabled"/><input class="btn btn-default" type="button" name="deleteBtn" value="<?= $SLANG['Delete'] ?>" onclick="deleteMonitor( this )" disabled="disabled"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -338,7 +324,7 @@ foreach( $displayMonitors as $monitor )
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<td class="colMark"><input type="checkbox" name="markMids[]" value="<?= $monitor['Id'] ?>" onclick="setButtonStates( this )"<?php if ( !canEdit( 'Monitors' ) ) { ?> disabled="disabled"<?php } ?>/></td>
|
<td class="colMark"><input class="btn btn-default" type="checkbox" name="markMids[]" value="<?= $monitor['Id'] ?>" onclick="setButtonStates( this )"<?php if ( !canEdit( 'Monitors' ) ) { ?> disabled="disabled"<?php } ?>/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
@ -346,7 +332,24 @@ foreach( $displayMonitors as $monitor )
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
<div id="footer">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<p class="pull-right text-muted"><?= $SLANG['Load'] ?>: <?= getLoad() ?> -
|
||||||
|
<?= $SLANG['Disk'] ?>: <?= getDiskPercent() ?>% -
|
||||||
|
<?= makePopupLink( '?view=version', 'zmVersion', 'version', 'v' . ZM_VERSION, canEdit( 'System' ) ) ?> -
|
||||||
|
<?php
|
||||||
|
if ( ZM_OPT_USE_AUTH )
|
||||||
|
{
|
||||||
|
?><?= $SLANG['LoggedInAs'] ?> <?= makePopupLink( '?view=logout', 'zmLogout', 'logout', $user['Username'], (ZM_AUTH_TYPE == "builtin") ) ?>, <?= strtolower( $SLANG['ConfiguredFor'] ) ?><?php
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
?><?= $SLANG['ConfiguredFor'] ?><?php
|
||||||
|
}
|
||||||
|
?> <?= makePopupLink( '?view=bandwidth', 'zmBandwidth', 'bandwidth', $bwArray[$_COOKIE['zmBandwidth']], ($user && $user['MaxBandwidth'] != 'low' ) ) ?> <?= $SLANG['BandwidthHead'] ?>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue