diff --git a/extras/chrome_extension/css/popup.css b/extras/chrome_extension/css/popup.css index a736abea57..e505e720cc 100644 --- a/extras/chrome_extension/css/popup.css +++ b/extras/chrome_extension/css/popup.css @@ -247,4 +247,11 @@ button h3 { } .sev-Maintenance { background: #A8A8A8; +} +.sev-Minor { + background: #F099A2; + color: #333; +} +.sev-Major { + background: #C97A4A; } \ No newline at end of file diff --git a/extras/chrome_extension/js/background.js b/extras/chrome_extension/js/background.js index 14960d849a..ce5d1254e5 100644 --- a/extras/chrome_extension/js/background.js +++ b/extras/chrome_extension/js/background.js @@ -29,11 +29,13 @@ function main() { if (isFetching) return; isFetching = true; - var feedUrl = localStorage["ip_address"]+'/include/api.php?op=get&op2=events&return_type=csv&apipass='+localStorage["api_pass"]+'&user='+localStorage["user_name"]+'&pass='+localStorage["pass"]; + var feedUrl = localStorage["ip_address"]+'/include/api.php?op=get&op2=events&return_type=json&apipass='+localStorage["api_pass"]+'&user='+localStorage["user_name"]+'&pass='+localStorage["pass"]; + req = new XMLHttpRequest(); req.onload = handleResponse; req.onerror = handleError; req.open("GET", feedUrl, true); + req.withCredentials = true req.send(null); } @@ -132,25 +134,23 @@ function fetchNewEvents(A,B){ function parseReplyEvents (reply) { // Split the API response - var e_array = reply.split("\n"); + var data = JSON.parse(reply) + var e_array = JSON.parse(reply).data; // Form a properly object var fetchedEvents=new Array(); for(var i=0;i