| Commit message (Collapse) | Author | Age | Files | Lines | 
| | 
| 
| 
| 
|  | 
Wrap the section contents with a div of class "body", separating from
its heading.
 | 
| | 
| 
| 
| 
| 
|  | 
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.
 | 
| |  | 
 | 
| |  | 
 | 
| | 
| 
| 
|  | 
Also improve the "showConfigsModal()" to support buttons.
 | 
| | 
| 
| 
| 
|  | 
The "exists" action through the GET request will check the existence of
the specified filepath (which should be an absolute path).
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* 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"
 | 
| |  | 
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
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/
 | 
| | 
| 
| 
| 
|  | 
NOTE:
These two AJAX handlers are currently not finished!
 | 
| |  | 
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
* 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.
 | 
| |  | 
 | 
| |  | 
 | 
| |  | 
 | 
| | 
| 
| 
| 
| 
| 
|  | 
* 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
 | 
| |  | 
 | 
| |  | 
 | 
| | 
| 
| 
|  | 
Split "ConfigsHandler" from "FG21simWSHandler" as "handlers/configs.py"
 | 
| |  | 
 | 
| |  | 
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
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"
 | 
| |  | 
 | 
| |  | 
 | 
| | 
| 
| 
| 
|  | 
Move the "IndexHandler" to separate module located at the "handlers/"
directory.
 | 
| |  | 
 | 
| |  | 
 | 
| |  | 
 | 
| |  | 
 | 
| | 
| 
| 
|  | 
configs.js: Update "workdir" and "configfile" to be sync with server.
 | 
| |  | 
 | 
| |  | 
 | 
| | 
| 
| 
| 
| 
|  | 
Thanks:
http://jquerymodal.com/
https://github.com/kylefox/jquery-modal
 | 
| | 
| 
| 
| 
| 
| 
|  | 
* "updateFormConfigStatus()": Store the configuration validity as a
  custom data attribute.
* Check the current configuration validity before start the task on the
  server.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* 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.
 | 
| | 
| 
| 
| 
| 
|  | 
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.
 | 
| | 
| 
| 
| 
|  | 
* The "workdir" and "configfile" should be both ignored
* Update "_set_configs()" method to allow set "userconfig"
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* 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??
 | 
| |  | 
 | 
| |  | 
 | 
| | 
| 
| 
| 
|  | 
* Colorize the logging messages of different level with different colors
* Also add a different icon for each message
 | 
| |  | 
 | 
| | 
| 
| 
| 
| 
| 
|  | 
Add "updateTaskStatus()" to update the "#task-status" element.
Also add function "getServerTaskStatus()" to get the task status from
the server.
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
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!
 | 
| |  | 
 | 
| |  | 
 | 
| |  | 
 | 
| |  | 
 | 
| | 
| 
| 
| 
| 
| 
|  | 
* Source Sans Pro: regular, italic, semibold, semibold italic; WOFF
* Source Code Pro: regular; WOFF
Thanks Adobe!
 | 
| |  | 
 |