Merge branch 'modern' of github.com:ZoneMinder/ZoneMinder into modern
This commit is contained in:
commit
17b60bf25f
|
@ -66,10 +66,12 @@ class AppController extends Controller {
|
|||
}
|
||||
Configure::write('SCALE_BASE', 100);
|
||||
if ($this->AppModel->daemonStatus()) {
|
||||
$this->set('daemonStatus', ('<span class="alert alert-success">Running</span>'));
|
||||
$this->set('daemonStatusHtml', ('<span class="alert alert-success">Running</span>'));
|
||||
} else {
|
||||
$this->set('daemonStatus', ('<span class="alert alert-danger">Stopped</span>'));
|
||||
$this->set('daemonStatusHtml', ('<span class="alert alert-danger">Stopped</span>'));
|
||||
}
|
||||
|
||||
$this->set('daemonStatus', $this->AppModel->daemonStatus());
|
||||
|
||||
if (Configure::read('ZM_DYN_LAST_VERSION') > Configure::read('ZM_VERSION')) {
|
||||
$zmVersion = '<span class="label label-info">' . Configure::read('ZM_VERSION') . '</span>';
|
||||
|
|
|
@ -2,9 +2,14 @@
|
|||
App::uses('AppHelper', 'View/Helper');
|
||||
|
||||
class LiveStreamHelper extends AppHelper {
|
||||
public function makeLiveStream($name, $src, $id, $width) {
|
||||
public function makeLiveStream($name, $src, $id, $width=0) {
|
||||
$liveStream = "<img id=\"liveStream_$id\" alt=\"Live Stream of $name\" src=\"$src&monitor=$id\" width=\"$width\">";
|
||||
return $liveStream;
|
||||
}
|
||||
|
||||
public function showNoImage($name, $src, $id, $width=0) {
|
||||
$liveStream = "<img id=\"liveStream_$id\" alt=\"Live Stream of $name\" src=\"/img/no-image.jpg".width?"width=\"$width">";
|
||||
return $liveStream;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -45,7 +45,7 @@ $cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework
|
|||
</head>
|
||||
<body>
|
||||
<div class="navbar navbar-default" role="navigation">
|
||||
<p class="navbar-text navbar-right"><?php echo $daemonStatus; ?></p>
|
||||
<p class="navbar-text navbar-right"><?php echo $daemonStatusHtml; ?></p>
|
||||
<p class="navbar-text navbar-right">Used Event Storage: <?php echo $diskSpace; ?>%</p>
|
||||
<p class="navbar-text navbar-right">CPU Load: <?php echo $systemLoad; ?></p>
|
||||
<div class="container">
|
||||
|
|
|
@ -7,7 +7,12 @@
|
|||
<?php foreach ($monitors as $monitor => $mon): ?>
|
||||
<div class="col-sm-6 col-md-3">
|
||||
<div class="thumbnail">
|
||||
<?php echo $this->LiveStream->makeLiveStream($mon['Monitor']['Name'], $streamSrc[$monitor], $mon['Monitor']['Id'], $width); ?>
|
||||
<?php
|
||||
if($daemonStatus && $mon['Monitor']['Function'] != "None" && $mon['Monitor']['Enabled'])
|
||||
echo $this->LiveStream->makeLiveStream($mon['Monitor']['Name'], $streamSrc[$monitor], $mon['Monitor']['Id'], $width);
|
||||
else
|
||||
echo $this->LiveStream->showNoImage($mon['Monitor']['Name'], $streamSrc[$monitor], $mon['Monitor']['Id'], $width);
|
||||
?>
|
||||
<div class="caption">
|
||||
<h3><?php echo $this->Html->link($mon['Monitor']['Name'],array('controller' => 'monitors', 'action' => 'view', $mon['Monitor']['Id'])); ?></h3>
|
||||
<p><?php echo $this->Html->link($mon['Monitor']['Function'], array('action' => 'edit', $mon['Monitor']['Id'])); ?></p>
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
<h2><?php echo $monitor['Monitor']['Name']; ?> Live Stream</h2>
|
||||
|
||||
<?php echo $this->LiveStream->makeLiveStream($monitor['Monitor']['Name'], $streamSrc, $monitor['Monitor']['Id']); ?>
|
||||
<?php
|
||||
if($daemonStatus && $mon['Monitor']['Function'] != "None" && $mon['Monitor']['Enabled'])
|
||||
echo $this->LiveStream->makeLiveStream($monitor['Monitor']['Name'], $streamSrc, $monitor['Monitor']['Id']);
|
||||
else
|
||||
echo $this->LiveStream->showNoImage($monitor['Monitor']['Name'], $streamSrc, $monitor['Monitor']['Id']);
|
||||
?>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 900 KiB |
Loading…
Reference in New Issue