aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/webui
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* webui: main.css: Update invalid input stylesAaron LI2016-11-081-0/+8
|
* webui: configs.js: Split out functions "{g,s}etFormConfigSingle()"Aaron LI2016-11-071-73/+90
| | | | | | | | * Split out functions "{g,s}etFormConfigSingle()" from "setConfigForm()"; * Rename original "setConfigForm()" to "setFormConfigs()", and uses "{g,s}etFormConfigSingle()" to simplify; * Update other places accordingly.
* webui: Add "required" attribute for configuration form fieldsAaron LI2016-11-071-22/+22
|
* webui: Fix input[type=number] validation; Add input validation stylesAaron LI2016-11-072-12/+20
| | | | | | | | * Fix the validation for some "input[type=number]" element; By default, the number type input only accept *integer*. By setting the 'step="any"' attribute, the float numbers are also valid. * Add form input validation styles for ":valid" and ":invalid" pseudo classes.
* webui: Use code (monospace font) style for some text inputsAaron LI2016-11-072-26/+26
|
* webui: small misc changesAaron LI2016-11-073-2/+8
| | | | | | * milligram.css: Remove the "sourceMappingURL" * main.js: Add "use strict"; * utils.py: Add a TODO task
* webui: Implement reset form and load configuration files functionsAaron LI2016-11-074-60/+238
| | | | | | | | | * Rewrite "configs.js" to be more modular and generic * Bind functions to button click event * Implement the function to set form fields to given configuration data * Implement the function to reset server-side configurations * Implement the function to load user configuration file on server * Implement get the configuration data from the server
* webui: websocket.py: Use flattened configs; Change "data" to "keys"Aaron LI2016-11-061-3/+3
| | | | | | | * Get the server-side configurations as a flattened one-level dictionary, for easier manipulations. * When get the configurations, specify the requested config options as an Array under the "keys" property (original: "data" property).
* webui: Add "configs.js" with basic support with interact with serverAaron LI2016-11-051-0/+127
| | | | | | | NOTE: Still missing important client-side functions to be usable, e.g., set the configuration form according to the received data from the server, and mark the error states on the fields with invalid values.
* webui: websocket.py: Support "reset", "load", "save" actions.Aaron LI2016-11-051-18/+105
| | | | | | | | | | | * Improve the response data to be more consistent. If the request failed, the returned response has "success" item of value "False" and an "error" item recording the message; * Add method "_reset_configs()" to handle the "reset" action; * Add method "_load_configs()" to handle the "load" action; * Add method "_save_configs()" to handle the "save" action. NOTE: needs tests.
* webui: websocket.py: Make the response message more consistentAaron LI2016-11-041-11/+24
| | | | | | | | All response message has a "success" item indicating whether the request be successfully handled. If anything unexpected happens, "success" is False, and an additional "error" item presents recording the detail. Also add some more stubs which are necessary for the Web UI.
* webui: websocket.py: Implement "set" action for "_handle_configs()"Aaron LI2016-11-041-11/+34
| | | | | | | Finish the "_set_configs()" function to implement the "set" action for "_handle_configs()". Also change the "status" keyword to "success" to be more intuitive.
* webui: websocket.py: Implement the "get" part of "_handle_configs()"Aaron LI2016-11-041-5/+118
| | | | | | | Add internal method "_get_configs()" which implement the "get" action part of the "_handle_configs()" method. TODO: implement the "set" action part.
* webui: websocket.py: Fix wrong exception handlingAaron LI2016-11-041-19/+17
|
* webui: Update server & client sides WebSocket handlersAaron LI2016-11-042-24/+104
| | | | | | | | | | | | * Server side: + Update the "on_message()" method to support 3 types of message requests (i.e., "configs", "console", and "results"); + Add messages stub handlers: "_handle_{configs,console,results}()"; + Reorder the methods + Client side: + Change timeout before reconnection to 3000 ms; + Parse the received JSON message to JS object;
* webui: Add a manual reconnection button to the header bannerAaron LI2016-11-033-6/+60
| | | | | Also add a global variable "ws_reconnect" to control the timeout between reconnection and the maximum reconnection times (default: 100).
* webui: Add "utils.py" to get the IP addressAaron LI2016-11-032-11/+85
| | | | | | | FIXME/TODO: How to determine the WebSocket origin is in the same subnet as the server? An additional network mask required to determine this. How does this additional mask passed?
* webui: Rewrite "websocket.py" with "FG21simWSHandler"Aaron LI2016-11-022-12/+88
| | | | | | NOTE: This "FG21simWSHandler" is still very preliminary, and there are a lot of necessary functions need to be implemented.
* webui: Rewrite and reconnect to WebSocket when closedAaron LI2016-11-021-32/+97
|
* webui: Add preliminary WebSocket support to front-end UIAaron LI2016-11-024-0/+65
| | | | | Add a label to the header banner to show the WebSocket support status and connection status.
* webui: Add FA icons for sections/headers; Adjust header stylesAaron LI2016-11-025-24/+22
|
* webui: fonts.css: Avoid space in font-family name; Some cleanupAaron LI2016-11-011-10/+11
|
* webui: font-awesome: Only keep the WOFF formatAaron LI2016-11-012-2/+1
|
* webui: milligram.css: Fix font-weight to use "bold" and "normal"Aaron LI2016-11-011-5/+5
|
* webui: fonts.css: Use semibold instead of bold for Source Sans ProAaron LI2016-11-011-8/+8
|
* webui: Update header and configs templatesAaron LI2016-11-012-6/+6
|
* webui: Update index template; Add console and results templatesAaron LI2016-11-013-10/+43
|
* webui: Add new style rules (Thanks Bootstrap!)Aaron LI2016-11-011-5/+125
|
* webui: Add the main CSS and JavaScriptAaron LI2016-11-012-0/+287
| | | | The js code still misses many necessary functions.
* webui: Add the index and configs templatesAaron LI2016-11-012-0/+489
|
* webui: Add header and footer templatesAaron LI2016-11-012-0/+42
|
* webui: Add favicon and logo (nyan ~~~)Aaron LI2016-11-013-0/+151
|
* webui: Add fonts.css (Source Sans Pro & Source Code Pro)Aaron LI2016-11-011-0/+63
|
* Serve jQuery locally (use jqyeru-3.1.1.js)Aaron LI2016-11-012-1/+10222
|
* webui: Rearrange structures of the base templateAaron LI2016-10-311-4/+14
|
* webui: Add the base templateAaron LI2016-10-301-0/+37
| | | | Tornado template: http://www.tornadoweb.org/en/stable/guide/templates.html