Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
eyesis4pi-393-gui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
eyesis4pi-393-gui
Commits
c8d22df3
Commit
c8d22df3
authored
Mar 18, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
download logs and camogm log enable
parent
cd3cb7e8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
0 deletions
+53
-0
eyesis4pi_control.php
eyesis4pi_control.php
+9
-0
tabs.js
js/tabs.js
+44
-0
No files found.
eyesis4pi_control.php
View file @
c8d22df3
...
@@ -59,6 +59,7 @@ $res_xml = "";
...
@@ -59,6 +59,7 @@ $res_xml = "";
$debug
=
true
;
$debug
=
true
;
$run_camogm
=
false
;
$run_camogm
=
false
;
$camogm_log_en
=
false
;
$start
=
false
;
$start
=
false
;
$stop
=
false
;
$stop
=
false
;
$mount
=
false
;
$mount
=
false
;
...
@@ -92,6 +93,7 @@ foreach($_GET as $key=>$value) {
...
@@ -92,6 +93,7 @@ foreach($_GET as $key=>$value) {
case
"test"
:
$test
=
true
;
break
;
case
"test"
:
$test
=
true
;
break
;
case
"run_camogm"
:
$run_camogm
=
true
;
break
;
case
"run_camogm"
:
$run_camogm
=
true
;
break
;
case
"camogm_log_en"
:
$camogm_log_en
=
true
;
break
;
case
"fast_rec"
:
$rec_fast
=
true
;
break
;
case
"fast_rec"
:
$rec_fast
=
true
;
break
;
case
"norm_rec"
:
$rec_norm
=
true
;
break
;
case
"norm_rec"
:
$rec_norm
=
true
;
break
;
case
"exit"
:
$exit
=
true
;
break
;
case
"exit"
:
$exit
=
true
;
break
;
...
@@ -223,6 +225,13 @@ function set_fast_recording($ip){
...
@@ -223,6 +225,13 @@ function set_fast_recording($ip){
fopen
(
"http://
{
$ip
}
/camogm_interface.php?cmd=setjpeg"
,
'r'
);
fopen
(
"http://
{
$ip
}
/camogm_interface.php?cmd=setjpeg"
,
'r'
);
}
}
if
(
$camogm_log_en
){
for
(
$i
=
0
;
$i
<
count
(
$unique_cams
);
$i
++
)
{
file_get_contents
(
"http://
{
$unique_cams
[
$i
][
'ip'
]
}
/eyesis4pi_interface.php?cmd=camogm_debug"
,
'r'
);
}
print
(
"ok"
);
}
//CAMOGM
//CAMOGM
if
(
$run_camogm
)
{
if
(
$run_camogm
)
{
for
(
$i
=
0
;
$i
<
count
(
$unique_cams
);
$i
++
)
{
for
(
$i
=
0
;
$i
<
count
(
$unique_cams
);
$i
++
)
{
...
...
js/tabs.js
View file @
c8d22df3
...
@@ -254,6 +254,13 @@ function tab3_init(){
...
@@ -254,6 +254,13 @@ function tab3_init(){
c
+=
"</div>"
;
c
+=
"</div>"
;
c
+=
"<br/><b>Logs:</b><div>"
;
c
+=
"<button title='enable recorder log' id='other_rec_log_en'>Enable camogm log</button>"
;
c
+=
"<button title='download system logs' id='other_log_dl'>Download logs</button>"
;
c
+=
"</div>"
;
c
+=
"<br/><b>System:</b><div><button id='other_reboot' title='System reboot'>Reboot</button></div>"
;
c
+=
"<br/><b>System:</b><div><button id='other_reboot' title='System reboot'>Reboot</button></div>"
;
$
(
"#tab3_contents"
).
html
(
c
);
$
(
"#tab3_contents"
).
html
(
c
);
...
@@ -264,9 +271,46 @@ function tab3_init(){
...
@@ -264,9 +271,46 @@ function tab3_init(){
$
(
"#other_fast_rec"
).
on
(
"click"
,
system_fast_rec
);
$
(
"#other_fast_rec"
).
on
(
"click"
,
system_fast_rec
);
$
(
"#other_norm_rec"
).
on
(
"click"
,
system_norm_rec
);
$
(
"#other_norm_rec"
).
on
(
"click"
,
system_norm_rec
);
$
(
"#other_rec_log_en"
).
on
(
"click"
,
camogm_log_en
);
$
(
"#other_log_dl"
).
on
(
"click"
,
logs_download
);
}
}
// TAB 3: end
// TAB 3: end
function
camogm_log_en
(){
console
.
log
(
"enable camogm log"
);
var
url
=
"eyesis4pi_control.php?camogm_log_en&rq="
+
cams_to_str
();
$
.
ajax
({
url
:
url
,
success
:
function
(
data
){
console
.
log
(
data
);
}
});
}
function
logs_download
(){
tmp_cams
=
get_unique_cams
();
for
(
var
i
=
0
;
i
<
tmp_cams
.
length
;
i
++
){
logs_download_single
(
tmp_cams
[
i
]);
}
}
function
logs_download_single
(
tmp_cam
){
var
link
=
document
.
createElement
(
'a'
);
link
.
setAttribute
(
'download'
,
null
);
link
.
style
.
display
=
'none'
;
document
.
body
.
appendChild
(
link
);
link
.
setAttribute
(
'href'
,
"http://"
+
tmp_cam
[
"ip"
]
+
"/eyesis4pi_interface.php?cmd=logs_download"
);
link
.
click
();
document
.
body
.
removeChild
(
link
);
}
function
system_reboot
(){
function
system_reboot
(){
console
.
log
(
"system reboot"
);
console
.
log
(
"system reboot"
);
var
url
=
"eyesis4pi_control.php?reboot&rq="
+
cams_to_str
();
var
url
=
"eyesis4pi_control.php?reboot&rq="
+
cams_to_str
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment