diff options
Diffstat (limited to 'fg21sim')
-rw-r--r-- | fg21sim/webui/app.py | 3 | ||||
-rw-r--r-- | fg21sim/webui/static/css/main.css | 4 | ||||
-rw-r--r-- | fg21sim/webui/templates/configs.html | 27 | ||||
-rw-r--r-- | fg21sim/webui/templates/console.html | 10 | ||||
-rw-r--r-- | fg21sim/webui/templates/header.html | 4 | ||||
-rw-r--r-- | fg21sim/webui/templates/index.html | 1 |
6 files changed, 34 insertions, 15 deletions
diff --git a/fg21sim/webui/app.py b/fg21sim/webui/app.py index 4fa0a05..8199aa7 100644 --- a/fg21sim/webui/app.py +++ b/fg21sim/webui/app.py @@ -31,6 +31,9 @@ _settings = { } +# FIXME: +# * Subclass on `tornado.web.Application` +# * hold the attributes (e.g., configs, console) ?? def make_application(**kwargs): settings = _settings settings.update(kwargs) diff --git a/fg21sim/webui/static/css/main.css b/fg21sim/webui/static/css/main.css index 7a673a6..a574990 100644 --- a/fg21sim/webui/static/css/main.css +++ b/fg21sim/webui/static/css/main.css @@ -234,6 +234,8 @@ input:focus { .label { display: inline; padding: 0.2rem 0.6rem 0.3rem 0.6rem; + margin-left: 0.5rem; + margin-right: 0.5rem; color: #fff; font-weight: bold; line-height: 1; @@ -338,6 +340,8 @@ button, .btn { margin-left: 0.5rem; margin-right: 0.5rem; + font-size: 2.2rem; + vertical-align: middle; cursor: pointer; } diff --git a/fg21sim/webui/templates/configs.html b/fg21sim/webui/templates/configs.html index e3ec2f5..f1bb640 100644 --- a/fg21sim/webui/templates/configs.html +++ b/fg21sim/webui/templates/configs.html @@ -8,6 +8,25 @@ <h2><span class="fa fa-wrench" aria-hidden="true"></span> Configurations</h2> <hr /> + <p class="status"><strong> + <span class="fa fa-info-circle" aria-hidden="true"></span> + Configurations status: + <span id="conf-status" class="label label-default"> + <span class="icon fa fa-question-circle" aria-hidden="true"></span> + <span class="text">N/A</span> + </span> + <span id="conf-recheck" class="btn fa fa-refresh" aria-hidden="true"></span> + </strong></p> + + <p class="button-group"> + <!-- NOTE: HTML5 "button" element has a default behavior of submit. + Credit: https://stackoverflow.com/a/10836076/4856091 + --> + <button type="button" id="load-configfile"><span class="fa fa-download" aria-hidden="true"></span> Load Configurations</button> + <button type="button" id="save-configfile"><span class="fa fa-save" aria-hidden="true"></span> Save Configurations</button> + <button type="button" class="button-warning" id="reset-defaults"><span class="fa fa-undo" aria-hidden="true"></span> Reset to Defaults</button> + </p> + <!-- Configuration Form --> <form id="conf-form" class="form-inline" autocomplete="on"> <!-- General controlling configs --> @@ -22,14 +41,6 @@ <input class="form-control code" type="text" id="conf-configfile" name="configfile" required /> </div> </div> - <div class="button-group"> - <!-- NOTE: HTML5 "button" element has a default behavior of submit. - Credit: https://stackoverflow.com/a/10836076/4856091 - --> - <button type="button" id="load-configfile"><span class="fa fa-download" aria-hidden="true"></span> Load Configurations</button> - <button type="button" id="save-configfile"><span class="fa fa-save" aria-hidden="true"></span> Save Configurations</button> - <button type="button" class="button-warning" id="reset-defaults"><span class="fa fa-undo" aria-hidden="true"></span> Reset to Defaults</button> - </div> </fieldset> <!-- Configuration section "[common]" --> diff --git a/fg21sim/webui/templates/console.html b/fg21sim/webui/templates/console.html index 00a2b02..5236a6e 100644 --- a/fg21sim/webui/templates/console.html +++ b/fg21sim/webui/templates/console.html @@ -9,14 +9,14 @@ <hr /> <p class="status"><strong> - <span class="fa fa-dashboard" aria-hidden="true"></span> - Simulation status: - <span id="fg21sim-status" class="label label-default">N/A</span> + <span class="fa fa-dashboard" aria-hidden="true"></span> + Simulation status: + <span id="task-status" class="label label-default">N/A</span> </strong></p> <p class="button-group"> - <button type="button" id="start-fg21sim"><span class="fa fa-play" aria-hidden="true"></span> Start</button> - <button type="button" class="button button-warning" id="stop-fg21sim" disabled="disabled"><span class="fa fa-stop" aria-hidden="true"></span> Stop</button> + <button type="button" id="task-start"><span class="fa fa-play" aria-hidden="true"></span> Start</button> + <button type="button" class="button button-warning" id="task-stop" disabled="disabled"><span class="fa fa-stop" aria-hidden="true"></span> Stop</button> </p> <div id="log-messages" class="panel panel-default"> diff --git a/fg21sim/webui/templates/header.html b/fg21sim/webui/templates/header.html index d96dc48..e1cd367 100644 --- a/fg21sim/webui/templates/header.html +++ b/fg21sim/webui/templates/header.html @@ -13,8 +13,8 @@ <span class="description">Foregrounds Simulation for EoR 21cm Signal Detection</span> <span id="ws-status" class="label label-default"> - <span class="icon fa fa-question-circle" aria-hidden="true"></span> - <span class="text">N/A</span> + <span class="icon fa fa-question-circle" aria-hidden="true"></span> + <span class="text">N/A</span> </span> <span id="ws-reconnect" class="btn fa fa-refresh" aria-hidden="true"></span> diff --git a/fg21sim/webui/templates/index.html b/fg21sim/webui/templates/index.html index 4c1dff1..b23c1b8 100644 --- a/fg21sim/webui/templates/index.html +++ b/fg21sim/webui/templates/index.html @@ -31,5 +31,6 @@ {% block extra_script %} <script src="{{ static_url('js/configs.js') }}"></script> + <script src="{{ static_url('js/console.js') }}"></script> <script src="{{ static_url('js/websocket.js') }}"></script> {% end %} |