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
Show 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,13 +13,10 @@
...
@@ -13,13 +13,10 @@
</head>
</head>
<body>
<body>
<div>
<button
id=
'listmasters'
>
List masters
</button>
<table
id=
'container'
>
<!--<button id='testbutton1'>List slaves</button>-->
<tr>
<button
id=
'testbutton2'
>
Get states
</button>
<td
valign=
'top'
>
<button
id=
'testbutton3'
>
Test wget
</button>
</div>
<hr/>
<div
id=
'controls'
>
<div
id=
'controls'
>
<table>
<table>
<tr>
<tr>
...
@@ -40,19 +37,19 @@
...
@@ -40,19 +37,19 @@
<tr
id=
"set_format"
title=
'Set image format'
>
<tr
id=
"set_format"
title=
'Set image format'
>
<td>
Format:
</td>
<td>
Format:
</td>
<td>
<td>
<input
type=
'text
'
/>
<input
type=
'text'
class=
'input-par'
value=
'-
'
/>
</td>
</td>
</tr>
</tr>
<tr
id=
"set_quality"
title=
'Set compression quality'
>
<tr
id=
"set_quality"
title=
'Set compression quality'
>
<td>
Quality:
</td>
<td>
Quality:
</td>
<td>
<td>
<input
type=
'text
'
/>
<input
type=
'text'
class=
'input-par'
value=
'-
'
/>
</td>
</td>
</tr>
</tr>
<tr
id=
"set_fps"
title=
'Set fps'
>
<tr
id=
"set_fps"
title=
'Set fps'
>
<td>
FPS:
</td>
<td>
FPS:
</td>
<td>
<td>
<input
type=
'text
'
/>
<input
type=
'text'
class=
'input-par'
value=
'-
'
/>
</td>
</td>
</tr>
</tr>
<tr
id=
"toggle_awb"
title=
'Auto White Balance'
>
<tr
id=
"toggle_awb"
title=
'Auto White Balance'
>
...
@@ -75,25 +72,39 @@
...
@@ -75,25 +72,39 @@
</tr>
</tr>
</table>
</table>
</div>
</div>
<hr/>
</td>
<div>
<table>
<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>
<tr>
<td>
Master:
</td>
<th
colspan=
'2'
style=
'text-align:center;'
>
Master
</th>
<td
id=
'masternode'
></td>
<td
colspan=
'10'
>
<div
id=
'masternode'
></div>
</td>
</tr>
</tr>
<tr
valign=
'top'
>
<tr
valign=
'top'
>
<td>
Slaves:
</td>
<th
colspan=
'2'
style=
'text-align:center;'
>
Slave
</th>
<td
id=
'slavenodes'
></td>
<th
style=
'text-align:center;'
>
IP
</th>
<th
style=
'text-align:center;'
>
State
</th>
</tr>
</tr>
</table>
</table>
</div>
</div>
<hr/>
<div
id=
'previews'
>
<div
id=
'previews'
>
<table>
<table>
</table>
</table>
</div>
</div>
<div
id=
'nodelist'
></div>
<div
id=
'nodelist'
></div>
</body
>
</td
>
</tr>
</table>
</body>
</html>
</html>
public/javascripts/index.js
View file @
310fad7e
...
@@ -23,9 +23,9 @@ function init(){
...
@@ -23,9 +23,9 @@ function init(){
padding
:
'10px 0px'
padding
:
'10px 0px'
});
});
$
(
"#masternode"
).
css
({
//
$("#masternode").css({
'font-weight'
:
'bold'
//
'font-weight': 'bold'
});
//
});
update_master_node
();
update_master_node
();
parse_url
();
parse_url
();
...
@@ -127,7 +127,10 @@ function parse_cmd_testing(res){
...
@@ -127,7 +127,10 @@ function parse_cmd_testing(res){
if
(
$
(
xmlstate
).
find
(
"error"
).
length
!=
0
){
if
(
$
(
xmlstate
).
find
(
"error"
).
length
!=
0
){
console
.
log
(
name
+
" is not 10393"
);
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
{
}
else
{
appData
.
nc10393
[
name
]
=
{
appData
.
nc10393
[
name
]
=
{
...
@@ -216,26 +219,14 @@ function refresh_histograms(){
...
@@ -216,26 +219,14 @@ function refresh_histograms(){
function
parse_cmd_state
(
res
){
function
parse_cmd_state
(
res
){
let
rtab
=
[
'<table class="slave_table">'
,
' <tr>'
,
' <th>Slave</th>'
,
' <th>State</th>'
,
' </tr>'
];
$
(
res
).
find
(
'response'
).
each
(
function
(){
$
(
res
).
find
(
'response'
).
each
(
function
(){
const
name
=
$
(
this
).
find
(
'node'
).
text
();
const
name
=
$
(
this
).
find
(
'node'
).
text
();
const
state
=
$
(
this
).
find
(
'state'
).
text
();
const
state
=
$
(
this
).
find
(
'state'
).
text
();
rtab
=
rtab
.
concat
([
$
(
"tr."
+
name
+
" .slave_state"
).
html
(
state
);
'<tr>'
,
' <td class="name">'
+
name
+
'</td>'
,
' <td class="state">'
+
state
+
'</td>'
,
'</tr>'
,
]);
});
});
rtab
.
push
(
'</table>'
);
$
(
"#nodelist"
).
empty
().
append
(
rtab
.
join
(
'
\
n'
));
}
}
function
parse_cmd_ifconfig_init
(
res
){
function
parse_cmd_ifconfig_init
(
res
){
...
@@ -249,6 +240,7 @@ function parse_cmd_ifconfig_init(res){
...
@@ -249,6 +240,7 @@ function parse_cmd_ifconfig_init(res){
update_slave_list
(
name
);
update_slave_list
(
name
);
update_ip_list
(
ip
);
update_ip_list
(
ip
);
/*
let html = [
let html = [
'<div class=\''+name+'\'>',
'<div class=\''+name+'\'>',
'<input class=\'slave_checkbox\' type=\'checkbox\' checked />',
'<input class=\'slave_checkbox\' type=\'checkbox\' checked />',
...
@@ -256,7 +248,29 @@ function parse_cmd_ifconfig_init(res){
...
@@ -256,7 +248,29 @@ function parse_cmd_ifconfig_init(res){
'(<label class=\'lbl_ip\'>'+ip+'</label>)',
'(<label class=\'lbl_ip\'>'+ip+'</label>)',
'</div>'
'</div>'
].join('\n');
].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
{
body
{
padding
:
10px
;
padding
:
10px
5px
;
font
:
14px
"Lucida Grande"
,
Helvetica
,
Arial
,
sans-serif
;
font
:
14px
"Lucida Grande"
,
Helvetica
,
Arial
,
sans-serif
;
}
}
...
@@ -13,12 +13,12 @@ div.inline{
...
@@ -13,12 +13,12 @@ div.inline{
}
}
table
td
{
table
td
{
padding
-right
:
10
px
;
padding
:
0px
5
px
;
}
}
hr
{
hr
{
margin-top
:
5px
;
margin-top
:
5px
;
margin-bottom
:
5
px
;
margin-bottom
:
1
px
;
}
}
input
[
type
=
"text"
]
{
input
[
type
=
"text"
]
{
...
@@ -30,7 +30,8 @@ input[type="checkbox"], input[type="radio"] {
...
@@ -30,7 +30,8 @@ input[type="checkbox"], input[type="radio"] {
height
:
18px
;
height
:
18px
;
vertical-align
:
middle
;
vertical-align
:
middle
;
position
:
relative
;
position
:
relative
;
bottom
:
3px
;
bottom
:
0px
;
margin-top
:
1px
;
}
}
.btn.active
:focus
,
.btn
:focus
{
.btn.active
:focus
,
.btn
:focus
{
...
@@ -126,3 +127,45 @@ input[type="checkbox"], input[type="radio"] {
...
@@ -126,3 +127,45 @@ input[type="checkbox"], input[type="radio"] {
.snap_inner
:active
{
.snap_inner
:active
{
background
:
rgb
(
166
,
14
,
14
);
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