Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rclnodejs-testing
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
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Oleg Dzhimiev
rclnodejs-testing
Commits
310fad7e
Commit
310fad7e
authored
Jan 10, 2019
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reworked ui
parent
253e5992
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
175 additions
and
107 deletions
+175
-107
index.html
public/index.html
+93
-82
index.js
public/javascripts/index.js
+35
-21
style.css
public/stylesheets/style.css
+47
-4
No files found.
public/index.html
View file @
310fad7e
...
...
@@ -13,87 +13,98 @@
</head>
<body>
<div>
<button
id=
'listmasters'
>
List masters
</button>
<!--<button id='testbutton1'>List slaves</button>-->
<button
id=
'testbutton2'
>
Get states
</button>
<button
id=
'testbutton3'
>
Test wget
</button>
</div>
<hr/>
<div
id=
'controls'
>
<table>
<tr>
<td>
<div
id=
'rec_button'
class=
'rec_outer'
title=
'video recording (on-camera storage)'
>
<div
class=
'rec_inner'
></div>
</div>
</td>
<td>
<div
id=
'snap_button'
class=
'snap_outer'
title=
'take a snapshot (stored on this device)'
>
<div
class=
'snap_inner'
></div>
</div>
</td>
</tr>
</table>
<br/>
<table>
<tr
id=
"set_format"
title=
'Set image format'
>
<td>
Format:
</td>
<td>
<input
type=
'text'
/>
</td>
</tr>
<tr
id=
"set_quality"
title=
'Set compression quality'
>
<td>
Quality:
</td>
<td>
<input
type=
'text'
/>
</td>
</tr>
<tr
id=
"set_fps"
title=
'Set fps'
>
<td>
FPS:
</td>
<td>
<input
type=
'text'
/>
</td>
</tr>
<tr
id=
"toggle_awb"
title=
'Auto White Balance'
>
<td>
Auto WB:
</td>
<td>
<div
id=
"toggle_awb"
class=
"btn-group btn-group-xs btn-toggle"
>
<button
class=
"btn btn-xs btn-success border active"
>
ON
</button>
<button
class=
"btn btn-xs btn-default border"
>
OFF
</button>
</div>
</td>
</tr>
<tr
id=
"toggle_aexp"
title=
'Auto Exposure'
>
<td>
Auto Exposure:
</td>
<td>
<div
id=
"toggle_aexp"
class=
"btn-group btn-group-xs btn-toggle"
>
<button
class=
"btn btn-xs btn-success border active"
>
ON
</button>
<button
class=
"btn btn-xs btn-default border"
>
OFF
</button>
</div>
</td>
</tr>
</table>
</div>
<hr/>
<div>
<table>
<tr>
<td>
Master:
</td>
<td
id=
'masternode'
></td>
</tr>
<tr
valign=
'top'
>
<td>
Slaves:
</td>
<td
id=
'slavenodes'
></td>
</tr>
</table>
</div>
<hr/>
<div
id=
'previews'
>
<table>
</table>
</div>
<div
id=
'nodelist'
></div>
</body>
<table
id=
'container'
>
<tr>
<td
valign=
'top'
>
<div
id=
'controls'
>
<table>
<tr>
<td>
<div
id=
'rec_button'
class=
'rec_outer'
title=
'video recording (on-camera storage)'
>
<div
class=
'rec_inner'
></div>
</div>
</td>
<td>
<div
id=
'snap_button'
class=
'snap_outer'
title=
'take a snapshot (stored on this device)'
>
<div
class=
'snap_inner'
></div>
</div>
</td>
</tr>
</table>
<br/>
<table>
<tr
id=
"set_format"
title=
'Set image format'
>
<td>
Format:
</td>
<td>
<input
type=
'text'
class=
'input-par'
value=
'-'
/>
</td>
</tr>
<tr
id=
"set_quality"
title=
'Set compression quality'
>
<td>
Quality:
</td>
<td>
<input
type=
'text'
class=
'input-par'
value=
'-'
/>
</td>
</tr>
<tr
id=
"set_fps"
title=
'Set fps'
>
<td>
FPS:
</td>
<td>
<input
type=
'text'
class=
'input-par'
value=
'-'
/>
</td>
</tr>
<tr
id=
"toggle_awb"
title=
'Auto White Balance'
>
<td>
Auto WB:
</td>
<td>
<div
id=
"toggle_awb"
class=
"btn-group btn-group-xs btn-toggle"
>
<button
class=
"btn btn-xs btn-success border active"
>
ON
</button>
<button
class=
"btn btn-xs btn-default border"
>
OFF
</button>
</div>
</td>
</tr>
<tr
id=
"toggle_aexp"
title=
'Auto Exposure'
>
<td>
Auto Exposure:
</td>
<td>
<div
id=
"toggle_aexp"
class=
"btn-group btn-group-xs btn-toggle"
>
<button
class=
"btn btn-xs btn-success border active"
>
ON
</button>
<button
class=
"btn btn-xs btn-default border"
>
OFF
</button>
</div>
</td>
</tr>
</table>
</div>
</td>
<td
valign=
'top'
>
<div
id=
'somebuttons'
>
<button
id=
'listmasters'
>
List masters
</button>
<!--<button id='testbutton1'>List slaves</button>-->
<button
id=
'testbutton2'
>
Get states
</button>
<button
id=
'testbutton3'
>
Test wget
</button>
</div>
<div
id=
'mstable'
>
<table
class=
'slave_table'
>
<tr>
<th
colspan=
'2'
style=
'text-align:center;'
>
Master
</th>
<td
colspan=
'10'
>
<div
id=
'masternode'
></div>
</td>
</tr>
<tr
valign=
'top'
>
<th
colspan=
'2'
style=
'text-align:center;'
>
Slave
</th>
<th
style=
'text-align:center;'
>
IP
</th>
<th
style=
'text-align:center;'
>
State
</th>
</tr>
</table>
</div>
<div
id=
'previews'
>
<table>
</table>
</div>
<div
id=
'nodelist'
></div>
</td>
</tr>
</table>
</body>
</html>
public/javascripts/index.js
View file @
310fad7e
...
...
@@ -23,9 +23,9 @@ function init(){
padding
:
'10px 0px'
});
$
(
"#masternode"
).
css
({
'font-weight'
:
'bold'
});
//
$("#masternode").css({
//
'font-weight': 'bold'
//
});
update_master_node
();
parse_url
();
...
...
@@ -127,7 +127,10 @@ function parse_cmd_testing(res){
if
(
$
(
xmlstate
).
find
(
"error"
).
length
!=
0
){
console
.
log
(
name
+
" is not 10393"
);
$
(
"."
+
name
).
append
(
" <b style='color:DarkOrange;'>not 10393</b>"
);
$
(
"tr."
+
name
+
" .slave_state"
).
html
(
"<b style='color:DarkOrange;'>not 10393</b>"
);
//$("."+name).append();
}
else
{
appData
.
nc10393
[
name
]
=
{
...
...
@@ -216,26 +219,14 @@ function refresh_histograms(){
function
parse_cmd_state
(
res
){
let
rtab
=
[
'<table class="slave_table">'
,
' <tr>'
,
' <th>Slave</th>'
,
' <th>State</th>'
,
' </tr>'
];
$
(
res
).
find
(
'response'
).
each
(
function
(){
const
name
=
$
(
this
).
find
(
'node'
).
text
();
const
state
=
$
(
this
).
find
(
'state'
).
text
();
rtab
=
rtab
.
concat
([
'<tr>'
,
' <td class="name">'
+
name
+
'</td>'
,
' <td class="state">'
+
state
+
'</td>'
,
'</tr>'
,
]);
$
(
"tr."
+
name
+
" .slave_state"
).
html
(
state
);
});
rtab
.
push
(
'</table>'
);
$
(
"#nodelist"
).
empty
().
append
(
rtab
.
join
(
'
\
n'
));
}
function
parse_cmd_ifconfig_init
(
res
){
...
...
@@ -249,6 +240,7 @@ function parse_cmd_ifconfig_init(res){
update_slave_list
(
name
);
update_ip_list
(
ip
);
/*
let html = [
'<div class=\''+name+'\'>',
'<input class=\'slave_checkbox\' type=\'checkbox\' checked />',
...
...
@@ -256,7 +248,29 @@ function parse_cmd_ifconfig_init(res){
'(<label class=\'lbl_ip\'>'+ip+'</label>)',
'</div>'
].join('\n');
$
(
"#slavenodes"
).
append
(
html
);
*/
//$("#slavenodes").append(html);
let
html
=
[
'<tr class=
\'
slaverow '
+
name
+
'
\'
>'
,
' <td>'
,
' <input class=
\'
slave_checkbox
\'
type=
\'
checkbox
\'
checked />'
,
' </td>'
,
' <td>'
,
' <div class=
\'
lbl_name
\'
>'
+
name
+
'</div>'
,
' </td>'
,
' <td>'
,
' <div class=
\'
lbl_ip
\'
>'
+
ip
+
'</div>'
,
' </td>'
,
' <td>'
,
' <div class=
\'
slave_state
\'
>-</div>'
,
' </td>'
,
'</tr>'
].
join
(
'
\
n'
);
console
.
log
(
html
);
$
(
"#mstable .slave_table tbody"
).
append
(
html
);
});
...
...
public/stylesheets/style.css
View file @
310fad7e
body
{
padding
:
10px
;
padding
:
10px
5px
;
font
:
14px
"Lucida Grande"
,
Helvetica
,
Arial
,
sans-serif
;
}
...
...
@@ -13,12 +13,12 @@ div.inline{
}
table
td
{
padding
-right
:
10
px
;
padding
:
0px
5
px
;
}
hr
{
margin-top
:
5px
;
margin-bottom
:
5
px
;
margin-bottom
:
1
px
;
}
input
[
type
=
"text"
]
{
...
...
@@ -30,7 +30,8 @@ input[type="checkbox"], input[type="radio"] {
height
:
18px
;
vertical-align
:
middle
;
position
:
relative
;
bottom
:
3px
;
bottom
:
0px
;
margin-top
:
1px
;
}
.btn.active
:focus
,
.btn
:focus
{
...
...
@@ -126,3 +127,45 @@ input[type="checkbox"], input[type="radio"] {
.snap_inner
:active
{
background
:
rgb
(
166
,
14
,
14
);
}
.input-par
{
width
:
64px
;
text-align
:
right
;
}
#container
{
border-collapse
:
collapse
;
}
#controls
{
background
:
rgba
(
200
,
220
,
220
,
0.5
);
padding
:
5px
;
}
#mstable
{
background
:
rgba
(
200
,
220
,
220
,
0.5
);
padding
:
5px
;
}
#somebuttons
{
background
:
rgba
(
200
,
220
,
220
,
0.5
);
padding
:
5px
;
}
#previews
{
background
:
rgba
(
200
,
220
,
220
,
0.5
);
padding
:
5px
;
}
#nodelist
{
background
:
rgba
(
200
,
220
,
220
,
0.5
);
padding
:
5px
;
}
.slaverow
td
{
padding
:
0px
10px
;
}
.slave_state
{
text-align
:
center
;
}
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