Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel-web-393
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
elphel-web-393
Commits
81d29baf
Commit
81d29baf
authored
Aug 19, 2016
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
restore only selected files
parent
3a8afd3f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
14 deletions
+15
-14
debugfs.js
src/debugfs-webgui/debugfs.js
+2
-2
debugfs.php
src/debugfs-webgui/debugfs.php
+13
-12
No files found.
src/debugfs-webgui/debugfs.js
View file @
81d29baf
...
@@ -20,7 +20,7 @@ function init(){
...
@@ -20,7 +20,7 @@ function init(){
}
}
});
});
var
b1
=
$
(
"<button>"
,{
id
:
"b1"
}).
css
({
margin
:
"0px 0px 0px 10px"
}).
html
(
"save to
fs
"
);
var
b1
=
$
(
"<button>"
,{
id
:
"b1"
}).
css
({
margin
:
"0px 0px 0px 10px"
}).
html
(
"save to
persistent storage
"
);
b1
.
click
(
function
(){
b1
.
click
(
function
(){
$
.
ajax
({
$
.
ajax
({
...
@@ -28,7 +28,7 @@ function init(){
...
@@ -28,7 +28,7 @@ function init(){
});
});
});
});
var
b2
=
$
(
"<button>"
,{
id
:
"b2"
}).
css
({
margin
:
"0px 0px 0px 10px"
}).
html
(
"
apply all
"
);
var
b2
=
$
(
"<button>"
,{
id
:
"b2"
}).
css
({
margin
:
"0px 0px 0px 10px"
}).
html
(
"
restore configs for selected files
"
);
b2
.
click
(
function
(){
b2
.
click
(
function
(){
$
.
ajax
({
$
.
ajax
({
...
...
src/debugfs-webgui/debugfs.php
View file @
81d29baf
...
@@ -99,8 +99,8 @@ function update_config($data){
...
@@ -99,8 +99,8 @@ function update_config($data){
function
apply_config_to_control
(){
function
apply_config_to_control
(){
global
$tmp_config
;
global
$tmp_config
;
$arr_config
=
json_decode
(
file_get_contents
(
$tmp_config
),
true
);
$arr_config
=
json_decode
(
file_get_contents
(
$tmp_config
),
true
);
foreach
(
$arr_config
as
$k0
=>
$v0
){
foreach
(
$arr_config
as
$k0
=>
$v0
){
if
(
$v0
[
'state'
]
==
1
){
foreach
(
$v0
[
'configs'
]
as
$k1
=>
$v1
){
foreach
(
$v0
[
'configs'
]
as
$k1
=>
$v1
){
if
(
$v1
[
'state'
]
==
1
){
if
(
$v1
[
'state'
]
==
1
){
foreach
(
$v1
[
'lines'
]
as
$k2
=>
$v2
){
foreach
(
$v1
[
'lines'
]
as
$k2
=>
$v2
){
...
@@ -115,7 +115,8 @@ function apply_config_to_control(){
...
@@ -115,7 +115,8 @@ function apply_config_to_control(){
}
}
}
}
}
}
}
echo
"Done"
;
}
}
function
sync_to_config
(
$file
,
$line
,
$flag
){
function
sync_to_config
(
$file
,
$line
,
$flag
){
...
...
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