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
ab1f734f
Commit
ab1f734f
authored
Mar 30, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
raw partition free space moved
parent
f2221d60
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
4 deletions
+26
-4
camogm.js
js/camogm.js
+26
-4
No files found.
js/camogm.js
View file @
ab1f734f
...
...
@@ -85,8 +85,8 @@ function camogm_create_table(){
table_html
+=
"<tr>
\n
\
t
\
<td>"
+
tmpstr
+
"</td>
\
<td id='"
+
ssdid1
+
"' align='right'></td>
\
<td id='"
+
ssdid2
+
"' align='right'></td>
\
<td id='"
+
ssdid1
+
"'
title='partition with file system: /dev/sda1'
align='right'></td>
\
<td id='"
+
ssdid2
+
"'
title='raw partition: /dev/sda2'
align='right'></td>
\
<td align='center'>"
+
(
i
+
1
)
+
"</td>
\
<td><div id='buffer"
+
i
+
"_sum' class='buffer'><div id='buffer"
+
i
+
"' style='width:200px;' class='buffer_free'>free</div></div></td>
\
<td align='left'><div id='"
+
camogm_err
+
"'></div></td>
\
...
...
@@ -118,9 +118,9 @@ function camogm_parse_hdd_free_space(data){
raw_data
=
$
(
this
).
text
();
raw_data
=
raw_data
.
replace
(
/"/gm
,
''
);
data_arr
=
raw_data
.
split
(
" "
);
if
(
data_arr
.
length
==
2
){
if
(
data_arr
.
length
==
1
){
$
(
"#cam"
+
(
i
)
+
"_sda1"
).
html
(
"<b style='color:"
+
random_color
+
";'> "
+
data_arr
[
0
]
+
" </b>"
);
$
(
"#cam"
+
(
i
)
+
"_sda2"
).
html
(
"<b style='color:"
+
random_color
+
";'> "
+
data_arr
[
1
]
+
" </b>"
);
//
$("#cam"+(i)+"_sda2").html("<b style='color:"+random_color+";'> "+data_arr[1]+" </b>");
}
i
++
;
});
...
...
@@ -158,6 +158,28 @@ function camogm_parse_status(data){
}
*/
var
random_color
=
"rgba("
+
Math
.
floor
(
Math
.
random
()
*
128
)
+
","
+
Math
.
floor
(
Math
.
random
()
*
128
)
+
","
+
Math
.
floor
(
Math
.
random
()
*
128
)
+
",1)"
;
var
unique_cams
=
get_unique_cams
();
for
(
var
i
=
0
;
i
<
unique_cams
.
length
;
i
++
){
ucam_index
=
get_unique_cams_index
(
unique_cams
[
i
]);
lba_start
=
$
(
camogm_states
[
i
]).
find
(
"lba_start"
).
text
();
lba_current
=
$
(
camogm_states
[
i
]).
find
(
"lba_current"
).
text
();
lba_end
=
$
(
camogm_states
[
i
]).
find
(
"lba_end"
).
text
();
console
.
log
(
"index: "
+
i
+
" lba_current="
+
lba_start
+
" lba_end="
+
lba_end
);
free_space
=
((
lba_end
-
lba_current
)
/
1024
/
1024
/
2
);
free_space
=
Math
.
round
(
free_space
*
100
)
/
100
+
"G"
;
if
(
lba_end
!=
0
){
$
(
"#cam"
+
(
i
)
+
"_sda2"
).
html
(
"<b style='color:"
+
random_color
+
";'> "
+
free_space
+
" </b>"
);
}
}
for
(
var
i
=
0
;
i
<
cams
.
length
;
i
++
){
ucam_index
=
get_unique_cams_index
(
cams
[
i
]);
cam_port
=
cams
[
i
].
channel
;
...
...
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