aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/webui
Commit message (Collapse)AuthorAgeFilesLines
...
* webui: Support toggle the body/contents of sectionsAaron LI2016-11-172-3/+38
| | | | | | The section header has class "heading" and a toggle control with class "toggle", which will toggle the display of the next block with the "body" class.
* webui: Add panel toggle and allow expand/collapse its bodyAaron LI2016-11-173-2/+37
|
* webui: configs.js: Confirm before reset the configurationsAaron LI2016-11-171-2/+20
|
* webui: configs.js: Confirm before overwrite the configuration fileAaron LI2016-11-171-18/+74
| | | | Also improve the "showConfigsModal()" to support buttons.
* webui: configs.py: Add "exists" action support through GETAaron LI2016-11-171-0/+40
| | | | | The "exists" action through the GET request will check the existence of the specified filepath (which should be an absolute path).
* webui: configs.js: Re-implement using AJAX instead of WebSocketAaron LI2016-11-162-92/+221
| | | | | | | | | | * Interact with server-side configurations using AJAX GET and POST, instead of sending and receiving messages through the WebSocket. * Add callbacks on both AJAX success and error, to show a modal box displaying the operation results/errors, achieving better user experiences. * Use jQuery deferred and promises to achieve sequential operations. * Also move the binding function from "websocket.js" to "configs.js"
* webui: configs.py: Re-implement using AJAX instead of WebSocketAaron LI2016-11-161-103/+110
|
* webui: websocket.py: Do not handle "configs" and "console" messagesAaron LI2016-11-161-32/+6
| | | | | | | | | | | | | | | | | | | The handling of "configs" and "console" types of messages, will be changed to implement using the AJAX techniques. The basic WebSocket communication is too low-level, and there is no easy way to relate each received message to the corresponding sent message. There are high-level sub-protocols exists (e.g., WAMP [1]) to allow the RPC (remote procedure call) and publish/subscribe operations, however, the Tornado web framework current does not support them, and another client JavaScript library is also required. Using the more traditional AJAX techniques allow the request-response model and sequential operations (e.g., jQuery deferred and promises) be easily implemented. Therefore better operation interaction and reflection and error handling is achieved. [1]: WAMP: Web Application Messaging Protocl, http://wamp-proto.org/
* webui: Add AJAX handlers "ConfigsAJAXHandler" & "ConsoleAJAXHandler"Aaron LI2016-11-162-2/+10
| | | | | NOTE: These two AJAX handlers are currently not finished!
* webui: configs.html: Add XSRF token and a modal dialog containerAaron LI2016-11-161-0/+3
|
* webui: main.js: Add "getCookie()" and "jQuery.postJSON()" functionsAaron LI2016-11-161-0/+56
| | | | | | | | * Add function "getCookie()": get the value of the specified key from the cookies; * Add jQuery extension ".postJSON()": wrapper for easier AJAX post, with the XSRF header and correct content type; * Also set the default "error" handle function for AJAX request.
* webui: Rename "scroll_target()" to "scrollTarget()" and export itAaron LI2016-11-161-17/+16
|
* webui: WSHandler: Remove the "name" attributeAaron LI2016-11-151-24/+17
|
* webui: Push current configs to client when opened WebSocket connectionAaron LI2016-11-151-1/+20
|
* webui: Some minor changesAaron LI2016-11-153-3/+5
| | | | | | | * Change configuration status text from "Valid :)" to "OK" * Reduce maximum WS connection trials from 100 to 21 * Fix the wrong global name of "g_ws_reconnect" * Comment the Console "Stop" button, which is currently not implemented
* webui: Rename "FG21simWSHandler" to "WSHandler"Aaron LI2016-11-153-4/+4
|
* webui: Save connected WebSocket clients and allow broadcastAaron LI2016-11-152-12/+38
|
* webui: Split "handers/configs.py" from "handlers/websocket.py"Aaron LI2016-11-152-246/+268
| | | | Split "ConfigsHandler" from "FG21simWSHandler" as "handlers/configs.py"
* webui: Place handlers under the directory "hnadlers/"Aaron LI2016-11-154-4/+5
|
* webui: Implement login support (password authentication)Aaron LI2016-11-154-0/+105
|
* webui: Fix the issues due to the split of "header-{base,index}.html"Aaron LI2016-11-154-27/+19
| | | | | | | | Tornado currently do NOT support *nested* template extensions. * Rename "header-base.html" back to "header.html" * Merge the contents of "header-index.html" to "index.html" * Add new block "subtitle" to "base.html"
* webui: Enhance the "base.html" and simplify the "index.html"Aaron LI2016-11-152-16/+11
|
* webui: Split "header.html" into "header-{base,index}.html"Aaron LI2016-11-152-12/+32
|
* webui: To support password authenticationAaron LI2016-11-152-8/+31
| | | | | Move the "IndexHandler" to separate module located at the "handlers/" directory.
* webui/utils.py: Add function "gen_cookie_secret()"Aaron LI2016-11-151-0/+13
|
* bin/fg21sim-webui: Add options "host" to allow localhost access onlyAaron LI2016-11-151-3/+3
|
* webui: Change log toggle icons opacity according to toggle statusAaron LI2016-11-152-4/+10
|
* webui: websocket.py: Accept "~" for the "userconfig"Aaron LI2016-11-151-2/+2
|
* webui: Fix the wrong value "galactic/freefree" to "galactic/snr"Aaron LI2016-11-152-2/+3
| | | | configs.js: Update "workdir" and "configfile" to be sync with server.
* webui: Replace "make_application()" with Application classAaron LI2016-11-143-21/+19
|
* webui: Show a modal box indicating there are invalid configsAaron LI2016-11-134-6/+10
|
* webui: Import "jQuery Modal" v0.8.0Aaron LI2016-11-132-0/+317
| | | | | | Thanks: http://jquerymodal.com/ https://github.com/kylefox/jquery-modal
* webui: Store config validity; Check before start taskAaron LI2016-11-132-9/+17
| | | | | | | * "updateFormConfigStatus()": Store the configuration validity as a custom data attribute. * Check the current configuration validity before start the task on the server.
* webui: Fix various bugs with get/set configurationsAaron LI2016-11-112-9/+76
| | | | | | | | | | | | * Fix bug with getting value of the configuration form. "null" is returned if the requested configuration field does not exist or has empty value. Boolean "true/false" is returned if the requested field is a single checkbox with "data-type=boolean". * Improve the "setFormConfigSingle()" to support the boolean single checkbox field. * Improve the "joinPath()" to validate the two input paths to be joined, and return "null" if both paths are empty. * Implement "updateFormConfigStatus()" and enable "#conf-recheck" button.
* webui: configs.html: Set single checkbox with "data-type" of "boolean"Aaron LI2016-11-111-10/+10
| | | | | | For simplicity, a single checkbox is used to control the boolean configuration. For better manipulations of its value, a custom data "data-type=boolean" is attached to such checkbox.
* webui: websocket.py: Ignore "configfile"; Allow set "userconfig"Aaron LI2016-11-111-5/+10
| | | | | * The "workdir" and "configfile" should be both ignored * Update "_set_configs()" method to allow set "userconfig"
* webui: Add the foreground simulation task to ConsoleHandlerAaron LI2016-11-092-2/+89
| | | | | | | | | | * The original sleep test task "_task()" renamed to "_task_test()" * Also add the new "startServerTaskTest()" to trigger the "_task_test()" NOTE/XXX: The foregrounds simulation requires the configurations, which is currently obtained from "self.websocket.configs", which I think is a HACK. How to better solve this??
* webui: Some minor updatesAaron LI2016-11-092-1/+12
|
* webui: Allow to toggle and delete the logging messagesAaron LI2016-11-092-0/+64
|
* webui: Append server-pushed logging messages to the logging boxAaron LI2016-11-093-4/+62
| | | | | * Colorize the logging messages of different level with different colors * Also add a different icon for each message
* webui: consolehandler.py: Fix a minor bugAaron LI2016-11-091-5/+5
|
* webui: Implement status updating functionAaron LI2016-11-093-3/+128
| | | | | | | Add "updateTaskStatus()" to update the "#task-status" element. Also add function "getServerTaskStatus()" to get the task status from the server.
* webui: Add "ConsoleHandler" to handle the "console" type messageAaron LI2016-11-092-12/+219
| | | | | | | | XXX/FIXME: The console task will BLOCK the tornado, which should be FIXED! However, the `WebSocket.on_message` currently may NOT be a coroutine (as of Tornado v4.3), so another way should be taken to solve this problem in order to call the console task asynchronously!
* webui: Add "WebSocketLogHandler" to push log to client through WebSocketAaron LI2016-11-091-0/+61
|
* webui: various small updatesAaron LI2016-11-096-15/+34
|
* webui: utils.py: Improve the docstring of "ip_in_network()"Aaron LI2016-11-091-1/+7
|
* webui: Add support of controlling the allowed hostsAaron LI2016-11-082-13/+47
|
* webui: Add "Source Sans Pro" and "Source Code Pro" web fontsAaron LI2016-11-085-0/+0
| | | | | | | * Source Sans Pro: regular, italic, semibold, semibold italic; WOFF * Source Code Pro: regular; WOFF Thanks Adobe!
* webui: websocket.js: Fix the bug for sending data to the serverAaron LI2016-11-081-1/+2
|
* webui: Add validation errors supportAaron LI2016-11-082-31/+76
| | | | | | | When the configuration form changed, the changed values are synced to the server and validated. The validation errors are then sent back to the client, which set the custom error messages on the corresponding fields.