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
fdcd887c
Commit
fdcd887c
authored
Aug 18, 2016
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 1st launch works 2. function and format show
parent
1222ee72
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
debugfs.js
src/debugfs-webgui/debugfs.js
+10
-0
debugfs.php
src/debugfs-webgui/debugfs.php
+6
-5
No files found.
src/debugfs-webgui/debugfs.js
View file @
fdcd887c
var
CUT_STRING_LIMIT
=
20
;
var
debugfs_data
;
function
init
(){
...
...
@@ -85,9 +87,17 @@ function init(){
checked
=
""
;
}
if
(
r1
[
j
].
function
.
length
>
CUT_STRING_LIMIT
)
cut_function
=
"..."
;
else
cut_function
=
""
;
if
(
r1
[
j
].
format
.
length
>
CUT_STRING_LIMIT
)
cut_format
=
"..."
;
else
cut_format
=
""
;
l
=
"<tr>"
;
l
+=
" <td style='text-align:center' title='"
+
ttl
+
"'>"
+
r1
[
j
].
lineno
+
"</td>"
;
l
+=
" <td style='text-align:center'><input type='checkbox' class='tp debug' "
+
checked
+
" file='"
+
r1
[
j
].
file
+
"' line='"
+
r1
[
j
].
lineno
+
"' /></td>"
;
l
+=
" <td>"
+
r1
[
j
].
function
.
substr
(
0
,
20
)
+
"...</td>"
;
l
+=
" <td>"
+
r1
[
j
].
format
.
substr
(
0
,
20
)
+
"...</td>"
;
l
+=
"</tr>"
;
content
.
find
(
"table"
).
append
(
l
);
}
...
...
src/debugfs-webgui/debugfs.php
View file @
fdcd887c
...
...
@@ -33,12 +33,12 @@ function get_control($f){
$subarr
[
'file'
]
=
substr
(
$line
,
0
,
$d1
);
$subarr
[
'lineno'
]
=
substr
(
$line
,
$d1
+
1
,(
$d2
-
1
)
-
$d1
-
1
);
$subarr
[
'module'
]
=
substr
(
$line
,
$d2
+
1
,(
$d3
-
1
)
-
$d2
);
$subarr
[
'function'
]
=
substr
(
$line
,
$d3
+
1
,(
$d4
-
1
)
-
$d3
);
$subarr
[
'function'
]
=
substr
(
$line
,
$d3
+
1
,(
$d4
-
1
)
-
$d3
-
1
);
$subarr
[
'flags'
]
=
substr
(
$line
,
$d4
+
1
,
1
);
$subarr
[
'format'
]
=
substr
(
$line
,
$d5
+
1
,
-
1
);
if
(
$subarr
[
'file'
]
!=
$oldfile
){
echo
"processing "
.
$subarr
[
'file'
]
.
"
\n
"
;
//
echo "processing ".$subarr['file']."\n";
if
(
$oldfile
!=
""
)
array_push
(
$res
,
$sub
);
$oldfile
=
$subarr
[
'file'
];
$sub
=
Array
(
...
...
@@ -107,9 +107,10 @@ if (($cmd=="do_nothing")||($cmd=="restore")){
if
(
!
is_file
(
"debugfs.json"
))
{
$arr
=
get_control
(
$file
);
print_r
(
$arr
);
//
print_r($arr);
update_config
(
json_encode
(
$arr
));
echo
"debugfs.json was missing, refresh page
\n
"
;
echo
json_encode
(
$arr
);
//echo "debugfs.json was missing, refresh page\n";
}
else
{
$json_data
=
file_get_contents
(
"debugfs.json"
);
//print_r(json_decode($json_data));
...
...
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