aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/webui/handlers
Commit message (Collapse)AuthorAgeFilesLines
* webui: Redirect to login page if not authenticated on POST requestAaron LI2016-11-183-7/+1
| | | | | | * Remove the authentication requirement on GET operation * "main.js": Redirect to the login page if POST response 403 forbidden * "main.js": Use global AJAX events handling instead of `$.ajaxSetup()`
* webui: console.py: Add timing reportsAaron LI2016-11-181-2/+16
|
* webui: console.py: Change to request/response instead of WebSocketAaron LI2016-11-171-198/+145
| | | | | | | | * Rename to "ConsoleAJAXHandler" * Change to use the request/response model, which accepts the AJAX request and then response. * Update logging handler to push messages to all connected clients * Many simplifications and rewrites.
* webui: WebSocketLogHandler: Support push to multiple websocketsAaron LI2016-11-171-13/+15
| | | | Also change the pushed messages to have "action=push" and "subtype=log"
* webui: app.py: Add new attributes and an option for ConsoleAJAXHandlerAaron LI2016-11-171-2/+2
| | | | | | | * Add new attributes "executor" and "task_status" for "console.py" * Define an option for the "executor" * Rename attribute "ws_clients" to "websockets" * Update docstring and comments
* webui: websocket.py: Remove on_message(); Only push messages to clientAaron LI2016-11-171-77/+30
| | | | See the docstring for more details.
* webui: Move "password" option definition to "login.py"Aaron LI2016-11-171-1/+9
| | | | | | | NOTE: By using the "tornado.options", each module can defines its own options, which are added to the global namespace. And the defined options can also be used by other modules.
* 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.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-161-0/+2
| | | | | NOTE: These two AJAX handlers are currently not finished!
* 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: Rename "FG21simWSHandler" to "WSHandler"Aaron LI2016-11-152-2/+2
|
* webui: Save connected WebSocket clients and allow broadcastAaron LI2016-11-151-11/+19
|
* 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-0/+773
|
* webui: Implement login support (password authentication)Aaron LI2016-11-153-0/+75
|
* webui: To support password authenticationAaron LI2016-11-151-0/+19
Move the "IndexHandler" to separate module located at the "handlers/" directory.