- Paper Dashboard is a beautiful resource built over Bootstrap to allow you to create powerful and beautiful dashboards. We have redesigned all the usual components in Bootstrap to make it look flat, minimalist and easy to use.
-
- Using the dashboard is very simple, but it does require you to understand basic JavaScript functions. To get the desired effect you will need to integrate JS plugins that take a little bit more effort. Down below we list all the files you need to include inside the application to get going.
-
-
-
-
-
Getting Started
-
-
- The Paper Dashboard is built on top of Bootstrap 3, so you can safely use it on your existing or new Bootstrap project. No line of code from Bootstrap 3 was changed, so you don't have to worry about undesired effects in your work.
-
-
- We provide all the necessary CSS resources. So, to immediately change or get started with our design, include the "css/paper-dashboard.css" in your HTML template. Your project will get the new look.
-
-
- To jump start your project, you can use our start-up template where all the files are already included and ready to use. If you do however, want to start from scratch, you can see the file structure below. The core JavaScript is contained in "js/paper-dashboard.js". Some functions are called from "js/demo.js" because they are presented only for demo purpose, you can check there how they are working and duplicate their effect on your projct. For the other files, you should add them if you use the specific element inside your page.
-
-
-
-
-
File Structure
-
-
- Once you have downloaded the archive and opened it, you will find the following structure:
-
- Here is the list of Bootstrap 3 components that we restyled for the Paper Dashboard:
-
-
Buttons
-
Dropdown
-
Images
-
Inputs
-
Navigation Menu
-
Notifications
-
Tables
-
Textarea
-
Typography
-
-
-
-
-
-
New Components
-
-
- Besides giving the existing Bootstrap elements a new look, we added new ones, so that the interface and consistent and homogenous. We also imported more plugins to use depending on your needs.
-
-
- Going through them, we added:
-
-
Charts
-
Google Maps
-
Panels
-
-
-
-
-
-
-
Buttons
-
-
Colors
-
- We worked over the original Bootstrap classes, choosing a different, slightly intenser colour palette:
-
- We added extra classes that help you better customise the look. You can use regular buttons, filled buttons or plain link buttons. Let's see some examples:
-
- Fixed Navbar: If you want to have a "Fixed Navbar" on Desktop and Mobile please add the class navbar-fixed on the tag nav and move the entire nav structure outside of the div with class main-panel. Check the example implementation for more details:
-
-
-
-
-
- <div class="sidebar" data-color="orange" data-image="../assets/img/full-screen-image-3.jpg">
- ....
- </div>
-
- <nav class="navbar navbar-default navbar-fixed">
- <div class="container-fluid">
- ....
- </div>
- </nav>
-
- <div class="main-panel">
- <-- .navbar used to be here, but was moved outside of this div -->
- ....
- </div>
-
-
-
-
-
- Besides the default navbar, we added 5 colors for the 5 classes: primary, info, success, warning, danger. If you want to use one of them, you have to replace the navbar-default with the class for the chosen color navbar-ct-{class}.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Panels
-
-
- If you have information that you don't need to show at once, we suggest you use tabs. You can use them horizontally or vertically.
- Here are the coded examples:
-
Larger, yet dramatically thinner. More powerful, but remarkably power efficient. With a smooth metal surface that seamlessly meets the new Retina HD display.
Larger, yet dramatically thinner. More powerful, but remarkably power efficient. With a smooth metal surface that seamlessly meets the new Retina HD display.
-
It’s one continuous form where hardware and software function in perfect unison, creating a new generation of phone that’s better by any measure.
-
-
-
The first thing you notice when you hold the phone is how great it feels in your hand. The cover glass curves down around the sides to meet the anodized aluminum enclosure in a remarkable, simplified design.
-
There are no distinct edges. No gaps. Just a smooth, seamless bond of metal and glass that feels like one continuous surface.
-
-
-
It’s one continuous form where hardware and software function in perfect unison, creating a new generation of phone that’s better by any measure.
-
Larger, yet dramatically thinner. More powerful, but remarkably power efficient. With a smooth metal surface that seamlessly meets the new Retina HD display.
-
-
-
From the seamless transition of glass and metal to the streamlined profile, every detail was carefully considered to enhance your experience. So while its display is larger, the phone feels just right.
-
It’s one continuous form where hardware and software function in perfect unison, creating a new generation of phone that’s better by any measure.
-
-
-
Larger, yet dramatically thinner. More powerful, but remarkably power efficient. With a smooth metal surface that seamlessly meets the new Retina HD display.
-
It’s one continuous form where hardware and software function in perfect unison, creating a new generation of phone that’s better by any measure.
- All Boostrap classes for tables are supported and improved. Besides the simple and striped tables, we added tables that have actions and tables with switches.
- You can see coded examples below:
-
- The notifications for Paper Dashboard PRO are looking fresh and clean. They go great with the navbar. They come with 4 classes, each for a different color: .alert-info, .alert-success, .alert-warning, .alert-danger.
-
- If you want to add special animations for them, we integrated a third party plugin called Bootstrap Notify. To see the original repository for it, check it out here. Out friend Robert McIntosh did a wonderful job. If you want to see a coded example, you can see it below.
-
-
-
-
-<!-- button to trigger the action -->
-<button class="btn btn-default" onclick="showNotification('top','right')">Top Right Notification</button>
-
-<!-- javascript -->
-function showNotification(from, align){
- color = Math.floor((Math.random() * 4) + 1);
-
- $.notify({
- icon: "ti-gift",
- message: "Welcome to <b>Paper Dashboard</b> - a beautiful freebie for every web developer."
-
- },{
- type: type[color],
- timer: 4000,
- placement: {
- from: from,
- align: align
- }
- });
-}
-
-
-
-
-
-
-
Charts
-
-
For the implementation of graphic charts, we used the Chartist plugin and added our custom styles. The plugin is free to download and use here. Gion Kunz is the guy behind the project; he did an awesome job and we recommend using his stuff. Besides all the great options for customisation that you have using it, it is also fully responsive. We changed the colours, background and typography.
-
-
Multiple Lines Chart
-
We recommend you use this graphic when you need to show multiple functions in the same visual element. For example, you can see a correlation between the registered versus active users. Always try to use a legend when you have multiple elements in the graphic.
- We changed the classic Google Maps by adding special skins and putting them in cards. If you want to see the full documentation from Google, you can see the docs here.
- Below, you will find a coded example:
-
-
-
-
Regular Map
-
-
-
-
-
-
-<div class="card card-map">
- <div class="header">
- <p class="category">Regular Map</p>
- </div>
- <div class="map">
- <div id="regularMap" class="map"></div>
- </div>
-</div>
-
-<!-- javascript for init -->
-var myLatlng = new google.maps.LatLng(40.748817, -73.985428);
-var mapOptions = {
- zoom: 8,
- center: myLatlng,
- scrollwheel: false, //we disable de scroll over the map, it is a really annoing when you scroll through page
-}
-
-var map = new google.maps.Map(document.getElementById("regularMap"), mapOptions);
-
-var marker = new google.maps.Marker({
- position: myLatlng,
- title:"Regular Map!"
-});
-
-marker.setMap(map);
-
-});
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-->
diff --git a/old/dashboard.js b/old/dashboard.js
deleted file mode 100644
index 9dff311..0000000
--- a/old/dashboard.js
+++ /dev/null
@@ -1,618 +0,0 @@
-var MONTHS = { 1: 'Jan', 2: 'Feb', 3: 'Mar', 4: 'Apr', 5: 'May', 6: 'Jun', 7: 'Jul', 8: 'Aug', 9: 'Sep', 10: 'Oct', 11: 'Nov', 12: 'Dec' }
-var monitor = {}
-monitor.utils = {}
-monitor.utils.get = {}
-monitor.utils.get.time = function (item) {
- // date = ([item.day + '-' + MONTHS[item.month] + '-' + item.year, hour + ':' + item.minute]).join(' ')
- var hour = item.hour > 9 ? item.hour : ('0' + item.hour)
- if (hour > 12) {
- var units = 'PM'
- } else {
- var units = 'AM'
- }
- return ([hour+':'+item.minute,units]).join(' ')
-}
-monitor.utils.get.dateTime = function (item) {
- var time = monitor.utils.get.time(item)
- return ([item.day+'-'+MONTHS[item.month]+'-'+item.year,time]).join(' ')
-}
-monitor.processes = {}
-monitor.processes.fetch = function(){
- var httpclient = HttpClient.instance()
- httpclient.get(HTTP_CONTEXT+'/get/processes',monitor.processes.init);
-
-}
-
-monitor.processes.init = function (x) {
-
- var r = JSON.parse(x.responseText)
- monitor.processes.summary.init(r)
- var keys = jx.utils.keys(r)
- jx.dom.set.value('menu','')
- jx.utils.patterns.visitor(keys,function(label){
- var div = jx.dom.get.instance('DIV')
- var frame= jx.dom.get.instance('DIV')
- var i = jx.dom.get.instance('I')
- i.className = 'fa fa-chevron-right left'
-
- div.innerHTML = label
- frame.data = r[label]
- frame.label = label
- frame.appendChild(i)
- frame.appendChild(div)
- frame.className = 'menu-item'
- frame.onclick = function () {
- monitor.processes.render(this.label, this.data);
- jx.dom.set.value('trends_chart','')
- //monitor.processes.trend.init(this.label)
- }
- jx.dom.append('menu',frame)
- })
- //
- // Auto start the first item in the menu
- // This is designed not to let the user wander or wonder what is going on
- //
- var nodes = jx.dom.get.children('menu')
- if (nodes.length > 0) {
- nodes[0].click()
- } else {
- //
- // We should hide the panes for this
- //
- jx.dom.hide('apps')
- }
- monitor.sandbox.init()
- // setTimeout(monitor.sandbox.init,1000)
-}
-
-/**
-* This function renders the grid of processes being monitored,
-* @param label label the list of processes belongs to
-* @param data dataset of a selected set of processes (works a bit like top)
-*/
-monitor.processes.render = function(label,data) {
-
- data = jx.utils.patterns.visitor(data,function(row){
- var status = {"idle":'',"running":'',"crash":''}
-
- if (!row.status.match(/class/)) {
- row.status_id = row.status
- row.status = status[row.status]
-
- }
- return row
- })
- jx.dom.set.value('latest_processes','') ;
- jx.dom.set.value('latest_processes_label', label)
-
- var options = {
- width: "90%", height:'auto', autoload:true
- }
- options.paging = true
- options.pageSize = 4
- options.pageIndex = 1
- options.pageButtonCount = 4
- options.pagerContainer = '#latest_process_pager'
- options.pagerFormat= "{prev} Page {pageIndex} of {pageCount} {next}"
- options.pagePrevText= ''
- options.pageNextText= ""
-
- options.data = data
- options.rowClass = function (item, index,evt) {
-
- return 'small'
- }
- options.rowClick = function(args){
- var item = args.item
- var id = jx.dom.get.value('latest_processes_label')
- var app = item.label
- monitor.processes.trend.init(id, app)
-
- if (item.anomaly == true) {
- jx.dom.show('has_anomaly')
- } else {
- jx.dom.hide('has_anomaly')
- }
- // var hour = item.hour < 10? ('0'+item.hour): item.hour
- // date = ([item.day + '-' + MONTHS[item.month] + '-' + item.year, hour + ':' + item.minute]).join(' ')
-
- jx.dom.set.value('node_last_lookup',monitor.utils.get.dateTime(item))
-
- }
-
- options.autoload = true
- options.fields = [
- { name: 'label', type: 'text', title: "Process", headercss: "small bold", css: "small"},
- { name: "cpu_usage", type: "number", title: "CPU", headercss: "small bold" , width:'64px'},
- { name: "memory_usage", type: "text", title: "Mem. Used", type: "number", headercss: "small bold" },
- { name: "proc_count", type: "number", title: "Proc Count", headercss: "small bold" },
- {name:"status",type:"text",title:"Status",headercss:"small bold",align:"center", width:'64px'}
- ]
- var grid = $('#latest_processes').jsGrid(options) ;
- //
- // We need to auto click the first row
- $('#latest_processes').find('.jsgrid-row')[0].click()
-
-}
-
-monitor.processes.trend = {}
-monitor.processes.trend.init = function (label,app) {
- var httpclient = HttpClient.instance()
- var uri = HTTP_CONTEXT+'/trends?id='+label+'&app='+encodeURIComponent(app)
- httpclient.get(uri, function (x) {
- var logs = JSON.parse(x.responseText)
- var dom = jx.dom.get.instance('trend_info');
- dom.logs = logs
- jx.dom.set.value('trend_info',app.trim())
- // jx.dom.set.attribute(label,'logs',logs)
- monitor.processes.trend.render(logs,null,app)
- })
-}
-monitor.processes.trend.render = function (logs, key,label) {
- // if (key == null) {
- // key = 'memory_usage'
- // }
- // if (logs == null || label == null){
-
- // logs = jx.dom.get.instance('trend_info').logs
- // label= jx.dom.get.value('trend_info') ;
- // }
- var frame = $('#trends_chart')
- jx.dom.set.value('trends_chart','')
- var context = jx.dom.get.instance('CANVAS')
- context.width = $(frame).width()
- context.height= $(frame).height()
-
- var conf = { type: 'line',responsive:true }
- conf.data = {}
- conf.options = { legend: { position: 'bottom' } }
- conf.options.scales = {}
- conf.options.scales.yAxes = [
- {id:'0',scaleLabel:{display:true,labelString:'CPU & MEMORY %'},ticks:{min:0,max:100,beginAtZero:true},gridLines: {display:false}}
- // {id:'1',position:'right',scaleLabel:{display:true,labelString:'PROCESS COUNT'},ticks:{min:0,stepSize:1,beginAtZero:true},gridLines: {display:false}}
- ]
- conf.options.scales.xAxes = [
- {
-
- gridLines: {display:false},
-
- time: {
- format:'HH:mm'
- }
-
- }
-
- ]
- conf.data.datasets = [ ]
- var x_axis = []
- var _x = {}
- // var _y = {}
- var cpu = {label: 'CPU Usage (%)', data: [] ,backgroundColor:'transparent',borderColor:COLORS[187],fill:false,borderWidth:1}
- var mem = {label : 'Memory Usage(%)',data:[],backgroundColor:'transparent',borderColor:COLORS[32],fill:false,borderWidth:1}
- // var proc= {yAxisID:'1',label : 'Proc Count',data:[],backgroundColor:'transparent',borderColor:COLORS[542],fill:false,borderWidth:1}
- // var months={1:"Jan",2:"Feb",3:"Mar",4:"Apr",5:"May",6:"Jun",7:"Jul",8:"Aug",9:"Sep",10:"Oct",11:"Nov",12:"Dec"}
- jx.utils.patterns.visitor(logs,function(item){
- //x = new Date(item.year,item.month-1,item.day,item.hour,item.minute)
- // day = item.day.length > 1? (['0',item.day]).join(''): item.day
- // month = months[item.month]
- // x = ([month, day, item.hour + ':' + item.minute]).join(' ')
- x = monitor.utils.get.time(item).replace(/AM|PM/g,'')
- y = item[key]
- if (_x[x] == null ){//||(_x[x] == null && _y[y] == null)) {
- _x[x] = 1
- // _y[y] = 1
- x_axis.push(x)
- cpu.data.push({ x: x, y: item.cpu_usage })
- mem.data.push({x:x,y:item.memory_usage})
- console.log(item.cpu_usage)
- console.log(item.memory_usage)
- // proc.data.push({x:x,y:item.proc_count})
- // return {x:x,y:y}
-
- }
-
- })
-
- var item = logs[logs.length - 1]
- jx.dom.set.value('trend_last_lookup',monitor.utils.get.dateTime(item))
-
- conf.data.datasets = [cpu,mem]
- x_axis = jx.utils.unique(x_axis)
- conf.data.labels = x_axis
- // console.log(conf)
- jx.dom.append('trends_chart',context)
- var chart = new Chart(context,conf)
-
-}
-
-monitor.processes.summary = {}
-monitor.processes.summary.init = function(logs){
- var xr = 0, xc = 0, xi = 0
- var series = {}
- //var colors = [COLORS[11], COLORS[1], COLORS[2]]
- COLORS = ["#00BFFF", "#b2beb5", "#ffa812"]
- colors = [COLORS[0], COLORS[2], COLORS[1]]
- RUNNING_COLOR = COLORS[0]
- // RUNNING_COLOR = #0072BB
- IDLE_COLOR = COLORS[1]
- 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-1,item.day,item.hour,item.minute)
- // date = ([item.day + '-' + MONTHS[item.month] + '-' + item.year, item.hour + ':' + item.minute]).join(' ')
- date = monitor.utils.get.dateTime(item)
- }
- if (item.status == 'running'){
- xr += 1
- }else if(item.status == 'idle'){
- xi += 1
- }else{
- xc += 1
- }
- })
-
- }
- 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')
- context.id = 'doughnut'
- 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)
- $("#doughnut").attr('width', 50)
- $("#doughnut").attr('height', 50)
-
- var conf = {}//width:100,height:100}//width:'auto',height:$('#process_summary').height}
-
- conf.type = 'doughnut'
- conf.responsive = true
- conf.data = data
- conf.options = { legend: { position: 'right' }, repsonsive: true }
- var _chart = new Chart(context,conf)
-
- $('#summary_chart').click(function (evt) {
- console.log(_chart)
- console.log($(_chart))
- var activePoints = $(_chart).getSegmentsAtEvent(evt);
- console.log(activePoints)
- })
- jx.dom.set.value('summary_ranking','')
- context = jx.dom.get.instance('CANVAS')
- jx.dom.append('summary_ranking',context)
-
- conf = { type: 'bar', responsive: true }
-
- conf.options={scales:{xAxes:[{gridLines: {display:false}}],yAxes:[{gridLines: {display:false},scaleLabel:{display:true,labelString:'PROCESS COUNTS'} }] }}
- conf.options.legend ={position:'right'}
- /*
- conf.data = {labels:['Running','Idle','Crash']}
- var labels = jx.utils.keys(series)
-
- var i = 0
- conf.data.datasets = jx.utils.patterns.visitor(labels,function(id){
- series[id].backgroundColor = COLORS[i++]
- return series[id]})
- chart = new Chart(context,conf);
- */
- var labels = jx.utils.keys(logs)
- conf.data = { labels: labels, backgroundColor:colors }
- var xr = [], xi = [], xc = [],xr_bg = [],xc_bg = [],xi_bg = []
- jx.utils.patterns.visitor(labels, function (id) {
-
- var rows = logs[id]
- var index = xr.length
- xr_bg[index] = RUNNING_COLOR
- xi_bg[index] = IDLE_COLOR
- xc_bg[index] = CRASH_COLOR
- if (xr[index] == null) {
- xr[index] = 0
- xc[index] = 0
- xi[index] = 0
- }
-
- jx.utils.patterns.visitor(logs[id], function (row) {
-
- if (row.status.match(/running/i)) {
- xr[index] += 1
-
- } else if (row.status.match(/idle/i)) {
- xi[index] += 1
-
- } else {
- xc[index] += 1
-
- }
- })
- })
-
- conf.data.datasets = [{ label: 'Running', data:xr,backgroundColor:xr_bg},{label:'Crash',data:xc,backgroundColor:xc_bg},{label:'Idle',data:xi,backgroundColor:xi_bg} ]
- chart = new Chart(context, conf)
-
-}
-
-monitor.sandbox = {}
-monitor.sandbox.init = function () {
- jx.dom.hide('inspect_sandbox')
- var httpclient = HttpClient.instance()
- httpclient.get(HTTP_CONTEXT+'/sandbox', function (x) {
-
- var r = JSON.parse(x.responseText)
-
- if (r.length > 0) {
- jx.dom.show('sandbox')
- monitor.sandbox.render(r);
- } else {
- jx.dom.hide('sandbox')
- }
- })
-}
-monitor.sandbox.render = function (logs) {
- // months = { 1: 'Jan', 2: 'Feb', 3: 'Mar', 4: 'Apr', 5: 'May', 6: 'Jun', 7: 'Jul', 8: 'Aug', 9: 'Sep', 10: 'Oct', 11: 'Nov', 12: 'Dec' }
-
- // var d = ([logs[0].day, '-', MONTHS[logs[0].month], '-', logs[0].year, ' ', logs[0].hour, ':', logs[0].minute]).join('')
- var item = logs[logs.length -1]
- jx.dom.set.value('sandbox_date', monitor.utils.get.dateTime(item))
-
- var options = { width: $('#sandbox_status').width()-8, height: 'auto' }
- options.data = jx.utils.patterns.visitor(logs, function (item) {
- if (item.value == 100) {
- item.status = ''
- } else {
- item.status = ''
- }
- return item
- })
- options.paging = true
- options.pageSize = 4
- options.pageIndex = 1
- options.pageButtonCount = 4
- options.pagerContainer = '#folders_pager'
- options.pagerFormat = "{prev} Page {pageIndex} of {pageCount} {next}"
- options.pagePrevText = ''
- options.pageNextText = "";
- options.rowClass = function (item) {
-
- if (item.value < 70) {
- return 'bad'
- } else if (item.value < 100) {
- return 'warning'
- } else {
- return 'good'
- }
- }
- options.rowClick = function (args) {
- var item = args.item;
- if (item.missing.length > 0) {
- var form = jx.dom.get.instance('FORM')
- var dom = jx.dom.get.instance('INPUT')
- dom.type = 'hidden'
- dom.name = 'missing'
- dom.value = JSON.stringify(item.missing)
-
- form.action = HTTP_CONTEXT+'/download'
- form.method = 'POST'
- form.appendChild(dom)
- form.submit()
-
- }
- }
- options.fields = [
- {name:"status",title:"",width:20},
- { name: 'label',title:'Virtual Environment Label',type:'text',css:'small',headercss:'small bold' },
- { name: 'value', title:'Completeness %',type: 'number', css: 'small', headercss: 'small bold' }
-
- ]
- var grid = $('#sandbox_status').jsGrid(options)
- jx.dom.show('inspect_sandbox')
-
-}
-
-
-
-monitor.folders = {}
-monitor.folders.init = function () {
- var httpclient = HttpClient.instance()
- httpclient.get(HTTP_CONTEXT+'/folders', function (x) {
- var r = JSON.parse(x.responseText)
- var data = []
- for (var id in r) {
- var item = r[id]
- // item.id = id
- data = data.concat(item)
- }
-
- monitor.folders.render.init(data)
- })
-}
-monitor.folders.search = {}
-monitor.folders.search.reset = function () {
- jx.dom.set.value('folder_search', '')
- var data = jx.dom.get.attribute('folder_search', 'data')
- monitor.folders.render.summary(data)
-
-}
-monitor.folders.search.init = function(){
- var term = jx.dom.get.value('folder_search')
- var data = jx.dom.get.attribute('folder_search', 'data')
-
- term = term.replace(/ /g,'')
- if (term.length == 0) {
- monitor.folders.render.summary(data)
- } else if (term.length > 0) {
-
- data = jx.utils.patterns.visitor(data, function (row) {
- pattern = "(.*" + term + ".*)"
-
- if (row.id.match(pattern)) {
- return row
- }
- })
- monitor.folders.render.summary(data)
- }
-}
-monitor.folders.render = {}
-monitor.folders.render.init = function (data) {
- jx.dom.set.attribute('folder_search','data',data)
- monitor.folders.render.summary(data)
-}
-monitor.folders.show = {}
-monitor.folders.show.plan = function () {
- $('#folder_summary').slideUp(function () {
- $('#folder_plan').slideDown()
- })
-
-}
-monitor.folders.show.grid = function () {
- $('#folder_plan').slideUp(function () {
- $('#folder_summary').slideDown()
- })
-
-}
-/***
- * This function is designed to establish a folder clean up strategy i.e :
- * - We will look for anomalies given age,file size
- * - We will also look for where most of the data is distributed (mode)
- */
-monitor.folders.render.details = function (folder,data) {
- //
- // We need to normalize the data at this point so as to be able to show it all in the same chart
- // jx.math.scale x: counts, y: measure ment
- //
- var r = [data.age, data.size]
- var plans = []
- for (var i in r) {
- var xy = r[i]
- var mode = jx.math.mode(jx.utils.vector('x', xy))
- var yvalues = jx.utils.patterns.visitor(xy, function (row) {
- if (row.x == mode) {
- return row.y
- }
- })
- var sd = jx.math.sd(yvalues)
- if (i == 0) {
- prefix = 'age'
- var mean = jx.math.mean(yvalues)
- var max = (mean + (1.5 * sd))
- if (mean > 30 && mean < 365) {
- divide_by = 30
- units = 'MONTHS'
- } else if (mean > 365) {
- divide_by=365
- units = 'YEARS'
- } else {
- divide_by = 1
- units = 'DAYS'
- }
- } else {
- prefix = 'size'
- var mean = jx.math.sum(yvalues)
- var max = 0// (mean + (1.5 * sd))
- if (mean > 1000) {
- divide_by = 1000
- units = 'GB'
- } else {
- divide_by = 1
- units = 'MB'
- }
-
- }
- if (isNaN(mean)) {
- mean = 0
- }
- //
- // We need to assess the outliars i.e too old, too large
- //
- y = jx.utils.vector('y', xy)
- var _mean = jx.math.mean(y)
- var _sd = jx.math.sd(y)
- var outlier = _mean < mean || max > (_mean + (1.5 * _sd))
-
- plans.push({ 'label': prefix, 'max': max, 'sd': sd, 'mean': mean, 'count': yvalues.length, 'outlier': outlier })
- jx.dom.set.value(prefix + '_count', yvalues.length)
- jx.dom.set.value(prefix + '_value', (mean/divide_by).toFixed(2))
- jx.dom.set.value(prefix+'_units',units)
- monitor.folders.show.plan()
-
- }
-
- jx.dom.set.value('folder_name', folder)
-
-
-
-
-}
-monitor.folders.render.summary = function (data) {
-
- jx.dom.set.value('gridfolders', '')
- var options = {
- width: $('#gfolderframe').width()-8, height:'auto'
- }
- options.paging = true
- options.pageSize = 4
- options.pageIndex = 1
- options.pageButtonCount = 4
- options.pagerContainer = '#folderspager'
- options.pagerFormat= "{prev} Page {pageIndex} of {pageCount} {next}"
- options.pagePrevText= ''
- options.pageNextText= ""
-
- options.data = data
- options.rowClass = function (item, index,evt) {
-
- return 'small'
- }
- options.rowClick = function(args){
- // var item = args.item
-
- // age = jx.utils.patterns.visitor(item.details.age, function (row) {
- // return {y:row[0],x:row[1]}
- // })
- // size = jx.utils.patterns.visitor(item.details.size, function (row) {
- // return {y:row[0],x:row[1]}
- // })
-
- // monitor.folders.render.details(item.name,{age:age,size:size})
- }
- //
- // @TODO Add the units in days just in case
- options.autoload = true
- options.fields = [
- { name: 'id', type: 'text', title: "Host", headercss: "small bold", css: "small"},
- { name: 'name', type: 'text', title: "Folder Name", headercss: "small bold", css: "small"},
-
- { name: "size", type: "number", title: "Folder Size", type: "number", headercss: "small bold" },
- { name: "count", type: "number", title: "File Count", type: "number", headercss: "small bold" }
- ]
- 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() - 20
- $('#menuframe').animate({marginLeft:"-20%"})
- } else {
- $('#menuframe').animate({marginLeft:"0"})
- }
-
-}
-/**
- * Socket handler, check for learning status
- */
diff --git a/old/dashboard/changelog.txt b/old/dashboard/changelog.txt
deleted file mode 100644
index 72e4412..0000000
--- a/old/dashboard/changelog.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-V1.0, 29.03.2016 Original Release
-
-V1.1.0, 30 Sept 2016 - New Page
-- added Upgrade to PRO page for those who want to upsell inside the dashboard
-
-V1.1.1, 8 Feb 2017
-- switched to MIT license
\ No newline at end of file
diff --git a/old/dashboard/documentation/css/documentation.css b/old/dashboard/documentation/css/documentation.css
deleted file mode 100644
index b0c8321..0000000
--- a/old/dashboard/documentation/css/documentation.css
+++ /dev/null
@@ -1,260 +0,0 @@
-.nav-mobile-menu{
- position: relative;
- z-index: 2;
-}
-.nav-mobile-menu li a p{
- font-size: 12px;
-}
-
-.nav-mobile-menu .btn-simple,
-.nav-mobile-menu .btn-simple:hover,
-.nav-mobile-menu .btn-simple:focus{
- color: #66615B;
-}
-.nav-mobile-menu .navbar-title{
- display: none;
-}
-.navbar .navbar-nav > li > a.btn{
- margin: 17px 3px;
- padding: 7px 18px;
-}
-.tim-row{
- margin-bottom: 40px;
-}
-pre.prettyprint{
- background-color: #eee;
- border: 0px;
- margin-bottom: 0;
- margin-top: 20px;
- padding: 20px;
- text-align: left;
-}
-.navbar-title{
- height: 100%;
- padding-top: 5px;
-}
-.atv, .str{
- color: #05AE0E;
-}
-.tag, .pln, .kwd{
- color: #3472F7;
-}
-.atn{
- color: #2C93FF;
-}
-.pln{
- color: #333;
-}
-.com{
- color: #999;
-}
-.navbar-title .image-container{
- height: 40px;
- width: 40px;
- display: inline-block;
- top: -3px;
- position: relative;
-}
-.navbar-title img {
- width: 100%;
-}
-.space-top{
- margin-top: 50px;
-}
-.btn-primary .caret{
- border-top-color: #3472F7;
- color: #3472F7;
-}
-.area-line{
- border: 1px solid #999;
- border-left: 0;
- border-right: 0;
- color: #666;
- display: block;
- margin-top: 20px;
- padding: 8px 0;
- text-align: center;
-}
-.area-line a{
- color: #666;
-}
-.container-fluid{
- padding-right: 15px;
- padding-left: 15px;
-}
-.logo-container .logo{
- overflow: hidden;
- border-radius: 50%;
- border: 1px solid #333333;
- width: 50px;
- float: left;
-}
-.header-wrapper {
- position: relative;
- height: 500px;
-}
-
-.header-wrapper .navbar {
- border-radius: 0;
- /*position: absolute;*/
- width: 100%;
- z-index: 1031;
-}
-.header-wrapper .header {
- background-color: #ff8f5e;
- background-position: center center;
- background-size: cover;
- height: 450px;
- overflow: hidden;
- position: absolute;
- width: 100%;
- z-index: 1;
-}
-.header-wrapper .header .filter::after {
-/* background: rgba(0, 0, 0, 0) linear-gradient(to bottom, #9368e9 0%, #943bea 100%) repeat scroll 0 0 / 150% 150%; */
- content: "";
- display: block;
- height: 450px;
- left: 0;
- opacity: 0.77;
- position: absolute;
- top: 0;
- width: 100%;
- z-index: 2;
-}
-.header-wrapper .title-container{
- color: #fff;
- position: relative;
- top: 120px;
- z-index: 3;
-
-}
-.logo-container .brand{
- font-size: 18px;
- color: #FFFFFF;
- line-height: 20px;
- float: left;
- margin-left: 10px;
- margin-top: 5px;
- width: 50px;
- height: 50px;
-}
-.logo-container{
- margin-top: 10px;
- margin-left: 15px;
-}
-.logo-container .logo img{
- width: 100%;
-}
-.title-container img{
- width: 100px;
- height: 100px;
-}
-.navbar-small .logo-container .brand{
- color: #333333;
-}
-.navbar-default.navbar-transparent .navbar-nav>li>a{
- color: #FFFFFF;
-}
-.navbar-default .logo-container .brand{
- color: #444;
-}
-.navbar-default.navbar-transparent .logo-container .brand{
- color: #FFFFFF !important;
-}
-.navbar-center{
- float: none;
- display: inline-block;
- margin-top: -16px;
-}
-.navbar.navbar-transparent{
- background-color: transparent;
- box-shadow: none;
- color: #fff;
- border: 0;
- padding-top: 0px;
-}
-.fixed-section{
- max-height: 80vh;
- overflow: scroll;
- top: 110px;
-}
-.fixed-section ul li{
- list-style: none;
-}
-.fixed-section li a{
- font-size: 14px;
- padding: 2px;
- display: block;
- color: #666666;
-}
-.fixed-section li a.active{
- color: #00bbff;
-}
-.fixed-section.float{
- position: fixed;
- top: 100px;
- width: 200px;
- margin-top: 0;
-}
-.copyright {
- color: #777777;
- padding: 10px 15px;
- font-size: 14px;
- margin: 15px 3px;
- line-height: 20px;
- text-align: center;
-}
-
-.table-bigboy .img-container{
- width: 130px;
- height: 85px;
-}
-
-.table-bigboy .td-name{
- min-width: 170px;
-}
-#buttons-row .btn{
- margin-bottom: 15px;
-}
-@media (max-width: 991px) {
- .fixed-section.affix {
- position: relative;
- margin-bottom: 100px;
- }
-
- .tim-row .nav.nav-pills{
- margin-bottom: 25px;
- }
-
- .nav-mobile-menu .navbar-title{
- display: none;
- }
-
-}
-
-@media (max-width: 1199px) {
-
- .navbar .navbar-brand {
- height: 50px;
- padding: 10px 15px;
- }
-
-}
-
-@media (max-width: 768px) {
- .footer .copyright {
- display: inline-block;
- text-align: center;
- padding: 10px 0;
- float: none !important;
- width: 100%;
- }
-}
-
-@media (max-width: 830px){
- .main-raised{
- margin-left: 10px;
- margin-right: 10px;
- }
-}
diff --git a/old/dashboard/documentation/documentation.html b/old/dashboard/documentation/documentation.html
deleted file mode 100644
index 9510fcd..0000000
--- a/old/dashboard/documentation/documentation.html
+++ /dev/null
@@ -1,1556 +0,0 @@
-
-
-