diff --git a/src/api/index.py b/src/api/index.py index d75e9fb..54c9fdc 100644 --- a/src/api/index.py +++ b/src/api/index.py @@ -103,9 +103,9 @@ def sandbox(): #handler = HANDLERS['sandbox']['class'] #conf = HANDLERS['sandbox']['config'] r = [] - p = Factory.instance('sandbox',CONFIG) - handler = p['class'] - conf = p['config'] + # p = Factory.instance('sandbox',CONFIG) + handler = monitor.Sandbox() + conf = CONFIG['sandbox'] for id in conf: try: diff --git a/src/api/static/css/default.css b/src/api/static/css/default.css index 4959a7f..c49e222 100644 --- a/src/api/static/css/default.css +++ b/src/api/static/css/default.css @@ -2,7 +2,7 @@ body, .default { font-size:14px; font-family:sans-serif; font-weight:lighter; - padding:20px; + padding:10px; } .small { @@ -62,7 +62,7 @@ body, .default { padding:4px; } .menu .fa-chevron-right {color:transparent; margin:4px; } -.menu .menu-item { border:1px solid transparent; text-transform:capitalize; cursor:pointer; padding-bottom:4px; margin:2px;} +.menu .menu-item { border:1px solid transparent; cursor:pointer; padding-bottom:4px; margin:2px;} .menu .menu-item:hover { border-bottom-color:#4682B4; } @@ -90,7 +90,9 @@ input[type=text]:focus{ } -.height-quarter{height:25%;} +.height-quarter{height:24%;} +.height-half{height:47%} +.width-quarter {width:24%} .width-half {width:47%; } .width-75 {width:72%} @@ -100,4 +102,25 @@ input[type=text]:focus{ .number {font-size:42px; font-weight:lighter; padding:2px; margin:2px;} .action {cursor:pointer; padding:2px; margin:2px; border:1px solid transparent} -.action:hover { border-bottom-color:#4682B4} \ No newline at end of file +.action:hover { border-bottom-color:#4682B4} +.shadow{box-shadow: 7px 7px 5px #888888;} +.gradient { + background-image: + linear-gradient( + #4682b4, #ffffff,#ffffff + ); +} +.simple-gradient { +background-image: -ms-linear-gradient(top, #CAD5E0 0%, #F3F3F3 40%); + +background-image: -moz-linear-gradient(top, #CAD5E0 0%, #F3F3F3 40%); + +background-image: -o-linear-gradient(top, #CAD5E0 0%, #F3F3F3 40%); + +background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #CAD5E0), color-stop(40, #F3F3F3)); + +background-image: -webkit-linear-gradient(top, #CAD5E0 0%, #F3F3F3 40%); + +background-image: linear-gradient(to bottom, #CAD5E0 0%, #F3F3F3 40%); + +} \ No newline at end of file diff --git a/src/api/static/js/dashboard.js b/src/api/static/js/dashboard.js index 6f92715..f5d6980 100644 --- a/src/api/static/js/dashboard.js +++ b/src/api/static/js/dashboard.js @@ -205,12 +205,17 @@ monitor.processes.summary.init = function(logs){ CRASH_COLOR=COLORS[2] var i = 0; + var date = null; for( label in logs ){ var rows = logs[label] series[label] = {data:[0,0,0],label:label} jx.utils.patterns.visitor(rows,function(item){ - + if (date == null) { + + date = new Date(item.year,item.month,item.day) + //date = [item.day,item.month,item.year] + } if (item.status == 'running'){ xr += 1 }else if(item.status == 'idle'){ @@ -223,7 +228,13 @@ monitor.processes.summary.init = function(logs){ } var data = {labels:['Running','Crash','Idle'],datasets:[{data:[xr,xc,xi],backgroundColor:[RUNNING_COLOR,CRASH_COLOR,IDLE_COLOR/**COLORS[11],COLORS[2],COLORS[100]*/]}]} var context = jx.dom.get.instance('CANVAS') + jx.dom.set.value('total-running', xr) + jx.dom.set.value('total-crash', xc) + jx.dom.set.value('total-idle', xi) + jx.dom.set.value('total-apps', xr + xi + xc) + + jx.dom.set.value('app-summary-date', date) jx.dom.set.value('summary_chart','') jx.dom.append('summary_chart',context) var conf = {width:50,height:50} @@ -539,7 +550,20 @@ monitor.folders.render.summary = function (data) { var grid = $('#gridfolders').jsGrid(options) ; } - +monitor.menu = {} +monitor.menu.event = {} +monitor.menu.event.toggle = function () { + var dom = jx.dom.get.instance('menuframe') + var value = dom.style.marginLeft.trim() + + if (value==0 || value == "0px" || value == "") { + var width = -$(dom).width() - 10 + $('#menuframe').animate({marginLeft:"-12%"}) + } else { + $('#menuframe').animate({marginLeft:"0"}) + } + +} /** * Socket handler, check for learning status */ diff --git a/src/api/templates/dashboard.html b/src/api/templates/dashboard.html index f41a9c9..259d1be 100644 --- a/src/api/templates/dashboard.html +++ b/src/api/templates/dashboard.html @@ -26,61 +26,76 @@ }) - +
{{title}}
The Phi Technology LLC
-
- + + -
+
-
+
Monitoring - +
-
+
-
-
Global Process Summary By Status
+
+
+
Application Summary By Status
+
+
-
-
+
+
+
0
+
0
+
0
+
0 Applications
+
+ +
-
-
Global Process Summary By Groups
-
+
+
+
Application Summary By Groups
+
+
- -
CPU & Memory Usage Trend for -
Anomaly Detected
+
+
CPU & Memory Usage Trend for
+
Anomaly Detected
+
-
+
-
-
- Python Virtual Environment Analysis - +
+
+ +
Python Virtual Environment Analysis
+
Last Lookup
-
+
@@ -88,19 +103,21 @@
-
+
-
Smart Folder Analysis/Monitoring
+
Folder Analysis/Monitoring
Powered By Machine Learning
-
- - - -
-
-
-
+
+
+ + + +
+
+
+
+