Removed logging of post data
This commit is contained in:
parent
b0c5732620
commit
4430399b1e
|
@ -4,14 +4,14 @@
|
||||||
|
|
||||||
public function index() {
|
public function index() {
|
||||||
$zmBandwidth = $this->Cookie->read('zmBandwidth');
|
$zmBandwidth = $this->Cookie->read('zmBandwidth');
|
||||||
$this->set('width', Configure::read('ZM_WEB_LIST_THUMB_WIDTH'));
|
$this->set('width', Configure::read('ZM_WEB_LIST_THUMB_WIDTH'));
|
||||||
$monitoroptions = array('fields' => array('Name', 'Id', 'Function', 'Enabled', 'Sequence'), 'order' => 'Sequence ASC', 'recursive' => -1);
|
$monitoroptions = array('fields' => array('Name', 'Id', 'Function', 'Enabled', 'Sequence'), 'order' => 'Sequence ASC', 'recursive' => -1);
|
||||||
$this->set('monitors', $this->Monitor->find('all', $monitoroptions));
|
$this->set('monitors', $this->Monitor->find('all', $monitoroptions));
|
||||||
$monitors = $this->Monitor->find('all', array('recursive' => -1, 'fields' => array('Id', 'StreamReplayBuffer')));
|
$monitors = $this->Monitor->find('all', array('recursive' => -1, 'fields' => array('Id', 'StreamReplayBuffer')));
|
||||||
foreach ($monitors as $monitor => $mon) {
|
foreach ($monitors as $monitor => $mon) {
|
||||||
$streamSrc[$monitor] = $this->Monitor->getStreamSrc($monitor['Monitor']['Id'], $zmBandwidth, $monitor['Monitor']['StreamReplayBuffer']);
|
$streamSrc[$monitor] = $this->Monitor->getStreamSrc($monitor['Monitor']['Id'], $zmBandwidth, $monitor['Monitor']['StreamReplayBuffer']);
|
||||||
}
|
}
|
||||||
$this->set('streamSrc', $streamSrc);
|
$this->set('streamSrc', $streamSrc);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function view($id = null) {
|
public function view($id = null) {
|
||||||
|
@ -34,117 +34,117 @@
|
||||||
|
|
||||||
public function edit($id = null) {
|
public function edit($id = null) {
|
||||||
if (!$id) {
|
if (!$id) {
|
||||||
throw new NotFoundException(__('Invalid monitor'));
|
throw new NotFoundException(__('Invalid monitor'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$monitor = $this->Monitor->findById($id);
|
$monitor = $this->Monitor->findById($id);
|
||||||
if (!$monitor) {
|
if (!$monitor) {
|
||||||
throw new NotFoundException(__('Invalid monitor'));
|
throw new NotFoundException(__('Invalid monitor'));
|
||||||
}
|
}
|
||||||
$this->set('monitor', $monitor['Monitor']);
|
$this->set('monitor', $monitor['Monitor']);
|
||||||
|
|
||||||
$typeoptions = array(
|
$typeoptions = array(
|
||||||
'Local' => 'Local',
|
'Local' => 'Local',
|
||||||
'Remote' => 'Remote',
|
'Remote' => 'Remote',
|
||||||
'File' => 'File',
|
'File' => 'File',
|
||||||
'Ffmpeg' => 'Ffmpeg'
|
'Ffmpeg' => 'Ffmpeg'
|
||||||
);
|
);
|
||||||
$this->set('typeoptions', $typeoptions);
|
$this->set('typeoptions', $typeoptions);
|
||||||
|
|
||||||
$functionoptions = array(
|
$functionoptions = array(
|
||||||
'Modect' => 'Modect',
|
'Modect' => 'Modect',
|
||||||
'Monitor' => 'Monitor',
|
'Monitor' => 'Monitor',
|
||||||
'Record' => 'Record',
|
'Record' => 'Record',
|
||||||
'None' => 'None',
|
'None' => 'None',
|
||||||
'Nodect' => 'Nodect',
|
'Nodect' => 'Nodect',
|
||||||
'Mocord' => 'Mocord'
|
'Mocord' => 'Mocord'
|
||||||
);
|
);
|
||||||
$this->set('functionoptions', $functionoptions);
|
$this->set('functionoptions', $functionoptions);
|
||||||
|
|
||||||
$protocoloptions = array(
|
$protocoloptions = array(
|
||||||
'rtsp' => 'RTSP',
|
'rtsp' => 'RTSP',
|
||||||
'http' => 'HTTP'
|
'http' => 'HTTP'
|
||||||
);
|
);
|
||||||
$this->set('protocoloptions', $protocoloptions);
|
$this->set('protocoloptions', $protocoloptions);
|
||||||
|
|
||||||
$methodoptions = array(
|
$methodoptions = array(
|
||||||
'simple' => 'Simple',
|
'simple' => 'Simple',
|
||||||
'regexp' => 'Regexp'
|
'regexp' => 'Regexp'
|
||||||
);
|
);
|
||||||
$this->set('methodoptions', $methodoptions);
|
$this->set('methodoptions', $methodoptions);
|
||||||
|
|
||||||
$optionsColours = array(
|
$optionsColours = array(
|
||||||
1 => '8 bit grayscale',
|
1 => '8 bit grayscale',
|
||||||
3 => '24 bit color',
|
3 => '24 bit color',
|
||||||
4 => '32 bit color'
|
4 => '32 bit color'
|
||||||
);
|
);
|
||||||
$this->set('optionsColours', $optionsColours);
|
$this->set('optionsColours', $optionsColours);
|
||||||
|
|
||||||
$channeloptions = array();
|
$channeloptions = array();
|
||||||
for ($i=1; $i<32; $i++) {
|
for ($i=1; $i<32; $i++) {
|
||||||
array_push($channeloptions, $i);
|
array_push($channeloptions, $i);
|
||||||
}
|
}
|
||||||
$this->set('channeloptions', $channeloptions);
|
$this->set('channeloptions', $channeloptions);
|
||||||
|
|
||||||
$formatoptions = array(
|
$formatoptions = array(
|
||||||
255 => "PAL",
|
255 => "PAL",
|
||||||
45056 => "NTSC",
|
45056 => "NTSC",
|
||||||
1 => "PAL B",
|
1 => "PAL B",
|
||||||
2 => "PAL B1",
|
2 => "PAL B1",
|
||||||
4 => "PAL G",
|
4 => "PAL G",
|
||||||
8 => "PAL H",
|
8 => "PAL H",
|
||||||
16 => "PAL I",
|
16 => "PAL I",
|
||||||
32 => "PAL D",
|
32 => "PAL D",
|
||||||
64 => "PAL D1",
|
64 => "PAL D1",
|
||||||
128 => "PAL K",
|
128 => "PAL K",
|
||||||
256 => "PAL M",
|
256 => "PAL M",
|
||||||
512 => "PAL N",
|
512 => "PAL N",
|
||||||
1024 => "PAL Nc",
|
1024 => "PAL Nc",
|
||||||
2048 => "PAL 60",
|
2048 => "PAL 60",
|
||||||
4096 => "NTSC M",
|
4096 => "NTSC M",
|
||||||
8192 => "NTSC M JP",
|
8192 => "NTSC M JP",
|
||||||
16384 => "NTSC 443",
|
16384 => "NTSC 443",
|
||||||
32768 => "NTSC M KR",
|
32768 => "NTSC M KR",
|
||||||
65536 => "SECAM B",
|
65536 => "SECAM B",
|
||||||
131072 => "SECAM D",
|
131072 => "SECAM D",
|
||||||
262144 => "SECAM G",
|
262144 => "SECAM G",
|
||||||
524288 => "SECAM H",
|
524288 => "SECAM H",
|
||||||
1048576 => "SECAM K",
|
1048576 => "SECAM K",
|
||||||
2097152 => "SECAM K1",
|
2097152 => "SECAM K1",
|
||||||
4194304 => "SECAM L",
|
4194304 => "SECAM L",
|
||||||
8388608 => "SECAM LC",
|
8388608 => "SECAM LC",
|
||||||
16777216 => "ATSC 8 VSB",
|
16777216 => "ATSC 8 VSB",
|
||||||
33554432 => "ATSC 16 VSB"
|
33554432 => "ATSC 16 VSB"
|
||||||
);
|
);
|
||||||
$this->set('formatoptions', $formatoptions);
|
$this->set('formatoptions', $formatoptions);
|
||||||
|
|
||||||
$optionsPalette = array(
|
$optionsPalette = array(
|
||||||
0 => 'Auto',
|
0 => 'Auto',
|
||||||
1497715271 => 'Gray',
|
1497715271 => 'Gray',
|
||||||
877807426 => 'BGR32',
|
877807426 => 'BGR32',
|
||||||
876758866 => 'RGB32',
|
876758866 => 'RGB32',
|
||||||
861030210 => 'BGR24',
|
861030210 => 'BGR24',
|
||||||
859981650 => 'RGB24',
|
859981650 => 'RGB24',
|
||||||
1448695129 => '*YUYV',
|
1448695129 => '*YUYV',
|
||||||
1195724874 => '*JPEG',
|
1195724874 => '*JPEG',
|
||||||
1196444237 => '*MJPEG',
|
1196444237 => '*MJPEG',
|
||||||
875836498 => '*RGB444',
|
875836498 => '*RGB444',
|
||||||
1329743698 => '*RGB555',
|
1329743698 => '*RGB555',
|
||||||
1346520914 => '*RGB565',
|
1346520914 => '*RGB565',
|
||||||
1345466932 => '*YUV422P',
|
1345466932 => '*YUV422P',
|
||||||
1345401140 => '*YUV411P',
|
1345401140 => '*YUV411P',
|
||||||
875836505 => '*YUV444',
|
875836505 => '*YUV444',
|
||||||
961959257 => '*YUV410',
|
961959257 => '*YUV410',
|
||||||
842093913 => '*YUV420'
|
842093913 => '*YUV420'
|
||||||
);
|
);
|
||||||
$this->set('optionsPalette', $optionsPalette);
|
$this->set('optionsPalette', $optionsPalette);
|
||||||
|
|
||||||
$optionsMethod = array(
|
$optionsMethod = array(
|
||||||
'v4l2' => 'Video For Linux 2'
|
'v4l2' => 'Video For Linux 2'
|
||||||
);
|
);
|
||||||
$this->set('optionsMethod', $optionsMethod);
|
$this->set('optionsMethod', $optionsMethod);
|
||||||
|
|
||||||
$this->set('linkedMonitors', $this->Monitor->find('list', array('fields' => array('Id', 'Name'))));
|
$this->set('linkedMonitors', $this->Monitor->find('list', array('fields' => array('Id', 'Name'))));
|
||||||
|
|
||||||
if ($this->request->is('put') || $this->request->is('post')) {
|
if ($this->request->is('put') || $this->request->is('post')) {
|
||||||
$this->Monitor->id = $id;
|
$this->Monitor->id = $id;
|
||||||
|
@ -161,19 +161,19 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function add() {
|
public function add() {
|
||||||
if ($this->request->is('post')) {
|
if ($this->request->is('post')) {
|
||||||
$this->Monitor->create();
|
$this->Monitor->create();
|
||||||
if ($this->Monitor->save($this->request->data)) {
|
if ($this->Monitor->save($this->request->data)) {
|
||||||
$this->Session->setFlash('Your monitor has been created.');
|
$this->Session->setFlash('Your monitor has been created.');
|
||||||
$this->redirect(array('action' => 'index'));
|
$this->redirect(array('action' => 'index'));
|
||||||
} else {
|
} else {
|
||||||
$this->Session->setFlash('Unable to create your monitor.');
|
$this->Session->setFlash('Unable to create your monitor.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function reorder() {
|
public function reorder() {
|
||||||
$this->log(print_r($this->data['Monitor'],true));
|
|
||||||
foreach ($this->data['Monitor'] as $key => $value) {
|
foreach ($this->data['Monitor'] as $key => $value) {
|
||||||
$this->log($value);
|
$this->log($value);
|
||||||
$this->Monitor->id = $value;
|
$this->Monitor->id = $value;
|
||||||
|
@ -183,5 +183,4 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue