aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/webui/static/js/websocket.js
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2016-11-09 23:12:34 +0800
committerAaron LI <aaronly.me@outlook.com>2016-11-09 23:12:34 +0800
commit39d0ce0fdb7ee6198da7d5b2b91045f2c4f02b47 (patch)
tree884686e12582838a41c25d58f55b64e8097d0243 /fg21sim/webui/static/js/websocket.js
parent33fa91fccdf81bcaa0ad42e897d7d6d95c44985f (diff)
downloadfg21sim-39d0ce0fdb7ee6198da7d5b2b91045f2c4f02b47.tar.bz2
webui: Allow to toggle and delete the logging messages
Diffstat (limited to 'fg21sim/webui/static/js/websocket.js')
-rw-r--r--fg21sim/webui/static/js/websocket.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/fg21sim/webui/static/js/websocket.js b/fg21sim/webui/static/js/websocket.js
index 8f726b8..cff66b2 100644
--- a/fg21sim/webui/static/js/websocket.js
+++ b/fg21sim/webui/static/js/websocket.js
@@ -234,6 +234,24 @@ $(document).ready(function () {
getServerTaskStatus(g_ws);
});
+ /* Logging messages controls */
+ $("#log-toggle-debug").on("click", function () {
+ toggleLogMessages("debug");
+ });
+ $("#log-toggle-info").on("click", function () {
+ toggleLogMessages("info");
+ });
+ $("#log-toggle-warning").on("click", function () {
+ toggleLogMessages("warning");
+ });
+ $("#log-toggle-error").on("click", function () {
+ toggleLogMessages("error");
+ toggleLogMessages("critical");
+ });
+ $("#log-delete").on("click", function () {
+ deleteLogMessages();
+ });
+
} else {
// WebSocket NOT supported
console.error("Oops, WebSocket is NOT supported!");