From 0b92218c5b815abf9c9e7cb8168a1d2f01912eb8 Mon Sep 17 00:00:00 2001
From: Aaron LI <aaronly.me@outlook.com>
Date: Thu, 17 Nov 2016 22:44:30 +0800
Subject: configs: Update logging message format

* Also update the logging messages styles for the Web UI
* Show a modal notification when the task finished.
---
 fg21sim/webui/static/js/console.js | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

(limited to 'fg21sim/webui/static')

diff --git a/fg21sim/webui/static/js/console.js b/fg21sim/webui/static/js/console.js
index 69b475a..6392b96 100644
--- a/fg21sim/webui/static/js/console.js
+++ b/fg21sim/webui/static/js/console.js
@@ -83,8 +83,9 @@ var appendLogMessage = function (msg) {
   var ele = $("<p>").addClass("code log log-" + level);
   ele.append($(log_icons[level]));
   ele.append($("<span>").addClass("asctime").text(msg.asctime));
-  ele.append($("<span>").addClass("levelname").text(msg.levelname));
-  ele.append($("<span>").addClass("name").text(msg.name));
+  ele.append($("<span>").addClass("levelname")
+             .text("[" + msg.levelname + "]"));
+  ele.append($("<span>").addClass("name").text("<" + msg.name + ">"));
   ele.append($("<span>").addClass("message").text(msg.message));
   ele.appendTo("#log-messages");
 };
@@ -206,6 +207,11 @@ $(document).ready(function () {
           getServerTaskStatus(ajax_url)
             .done(function (response) {
               updateTaskStatus(response.status);
+              // Popup a modal notification
+              var modalData = {};
+              modalData.icon = "check-circle";
+              modalData.message = "Simulation task successfully finished.";
+              showModalConfigs(modalData);
             });
         });
     } else {
-- 
cgit v1.2.2