aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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-153-8/+34
| | | | | 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-152-8/+19
|
* 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
|
* configs/manager.py: Expand "~" when read userconfigAaron LI2016-11-151-0/+3
|
* 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-144-23/+21
|
* 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"
* configs/checkers.py: Check missing before validating the valuesAaron LI2016-11-111-4/+12
|
* webui: bin/fg21sim-webui: implement argument "--no-browser"Aaron LI2016-11-101-2/+8
| | | | | Now, by default, this executable will open the Web UI in a new browser tab, unless the "--no-browser" argument presents
* Bump version to 0.2.0v0.2.0Aaron LI2016-11-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * Following major foregrounds have been implemented: + galactic/synchrotron + galactic/freefree + galactic/snr + extragalacitc/clusters + extragalacitc/pointsources NOTE: this component needs further refactor, improvements, integration and tests * A Web UI build upon the Tornado framework and its WebSocket function is implemented and is already barely usable. + The Web interface is beautiful and reasonable + The configurations manipulation part performs quiet well * However, there are also many problems with the Web UI: + The layout should be more compact and concise + There should be some popup/tooltip to reflect the operation results + The console that start the server task is current *BLOCKING* (i.e., synchronous), however, the WebSocket currently (Tornado v4.3) does not support coroutine for the "on_message" method, which further hampers the problem been solved.
* 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-093-3/+12
|
* utils/healpix.py: Fix the import issueAaron LI2016-11-091-1/+1
|
* 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
|
* bin/fg21sim-webui: Use "tornado.options" instead of "argparse"Aaron LI2016-11-081-12/+34
| | | | | | | | | | | | * The "tornado.options" can be used in the *global scope*, therefore, the command line arguments can be stored in the options and then import the options in other modules if needed. * Add argument "--hosts-allowed", which specifies the hosts/network can access the Web UI (i.e., WebSocket) * Add argument "--no-browser", which controls whether to open the Web UI in a browser after startup. (TODO)
* 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
|
* configs/manager.py: Implement the "save()" methodAaron LI2016-11-081-6/+19
|
* 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.
* configs/checkers.py: Add "check_common()"Aaron LI2016-11-071-0/+25
|
* 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
* configs: Add parameters "min" and "max" to float-type optionsAaron LI2016-11-073-10/+10
|
* configs: Change "logging/filemode" to boolean "logging/appendmode"Aaron LI2016-11-072-4/+4
| | | | | * Update the "logging" property in "manager.py" * Also add "extragalactic/clusters" to "common/components"
* configs/manager.py: Replace a filter with list comprehensionAaron LI2016-11-071-4/+1
| | | | | Replace the filter hack with a cleaner list comprehension. Be Pythonic :)
* 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).
* configs/manager.py: Support flattening dumped configs (nested dict)Aaron LI2016-11-061-6/+98
| | | | | | | | * Add helper function "_flatten_dict()" to flatten a nested dictionary into an one-level dictionary, with the keys are concatenated with a separator. * Add a new parameter "flatten" to method "dump()" to allow the dumped configurations been flattened.
* 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.