Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
adc2019-system
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
adc2019
adc2019-system
Commits
a4c73f4e
You need to sign in or sign up before continuing.
Commit
a4c73f4e
authored
Aug 13, 2019
by
Kento HASEGAWA
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve UI
parent
491bda31
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
8 deletions
+7
-8
main.py
main.py
+0
-1
host.py
roles/host.py
+5
-4
adc2019-viewer.js
static/js/adc2019-viewer.js
+2
-3
No files found.
main.py
View file @
a4c73f4e
...
...
@@ -40,7 +40,6 @@ def webui_parte_workers():
def
webui_part_request_status
(
request_id
=
None
):
if
(
adc2019system
.
role
is
not
None
)
and
(
adc2019system
.
role
.
type
==
'host'
):
request_status
=
adc2019system
.
role
.
get_request_status
(
float
(
request_id
))
print
(
request_status
)
return
render_template
(
'part_request_status.html'
,
status
=
request_status
)
else
:
return
abort
(
404
)
...
...
roles/host.py
View file @
a4c73f4e
...
...
@@ -189,7 +189,7 @@ class Worker(object):
self
.
host
=
params
[
'host'
]
self
.
role
=
params
[
'role'
]
self
.
params
=
params
self
.
status
=
'
Setting up
'
self
.
status
=
'
Ready
'
self
.
configure
()
...
...
@@ -220,7 +220,6 @@ class Request(object):
self
.
timeout
=
timeout
self
.
request_id
=
time
.
time
()
self
.
broadcast_time
=
None
self
.
response
=
dict
()
...
...
@@ -267,13 +266,15 @@ class Request(object):
progress_time
=
(
time
.
time
()
-
self
.
broadcast_time
)
/
self
.
timeout
*
100
progress
=
min
(
100
,
max
(
progress_problem
,
progress_time
))
worker_list
=
self
.
worker_manager
.
get_workers
()
.
keys
()
worker_status
=
dict
()
for
v
in
all_workers
:
if
v
in
self
.
response
:
worker_status
[
v
]
=
self
.
response
[
v
][
'status'
]
else
:
worker_status
[
v
]
=
'Waiting for response'
if
self
.
worker_manager
.
workers
[
v
]
.
status
==
'Not connected'
:
worker_status
[
v
]
=
'Not connected'
else
:
worker_status
[
v
]
=
'Waiting for response'
return
{
'status'
:
status
,
...
...
static/js/adc2019-viewer.js
View file @
a4c73f4e
...
...
@@ -129,7 +129,6 @@ class ADC2019BoardViewer {
.
attr
(
"stroke"
,
"#d00"
)
.
attr
(
"stroke-width"
,
2
);
let
colors
=
d3
.
schemeCategory10
// Reference
...
...
@@ -175,7 +174,7 @@ class ADC2019BoardViewer {
var
cellContainer
=
itemContainer
.
append
(
'g'
)
.
attr
(
'class'
,
'cellContainer'
)
.
attr
(
'data-color'
,
(
d
,
i
)
=>
colors
[
i
])
.
attr
(
'data-color'
,
(
d
,
i
)
=>
colors
[
i
%
colors
.
length
])
.
attr
(
'x'
,
0
)
.
attr
(
'y'
,
0
)
...
...
@@ -240,7 +239,7 @@ class ADC2019BoardViewer {
var
lineContainer
=
lineItemContainer
.
append
(
'g'
)
.
attr
(
'class'
,
'lineContainer'
)
.
attr
(
'data-color'
,
(
d
,
i
)
=>
lineColors
[
i
]);
.
attr
(
'data-color'
,
(
d
,
i
)
=>
lineColors
[
i
%
lineColors
.
length
]);
lineContainer
.
selectAll
(
'g'
)
.
data
((
d
)
=>
d
)
...
...
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