|
|
|
@ -357,8 +357,14 @@ monitor.folders.init = function () {
|
|
|
|
|
var httpclient = HttpClient.instance()
|
|
|
|
|
httpclient.get('/folders', function (x) {
|
|
|
|
|
var r = JSON.parse(x.responseText)
|
|
|
|
|
r = r[0]
|
|
|
|
|
monitor.folders.render.init(r)
|
|
|
|
|
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.render = {}
|
|
|
|
@ -426,7 +432,9 @@ monitor.folders.render.details = function (folder,data) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (isNaN(mean)) {
|
|
|
|
|
mean = 0
|
|
|
|
|
}
|
|
|
|
|
//
|
|
|
|
|
// We need to assess the outliars i.e too old, too large
|
|
|
|
|
//
|
|
|
|
@ -450,6 +458,7 @@ monitor.folders.render.details = function (folder,data) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
monitor.folders.render.summary = function (data) {
|
|
|
|
|
|
|
|
|
|
jx.dom.set.value('gridfolders', '')
|
|
|
|
|
var options = {
|
|
|
|
|
width: $('#gridfolders').width(), height:'auto'
|
|
|
|
@ -470,6 +479,7 @@ monitor.folders.render.summary = function (data) {
|
|
|
|
|
}
|
|
|
|
|
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]}
|
|
|
|
|
})
|
|
|
|
@ -477,13 +487,14 @@ monitor.folders.render.summary = function (data) {
|
|
|
|
|
return {y:row[0],x:row[1]}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
monitor.folders.render.details(item.label,{age:age,size:size})
|
|
|
|
|
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: 'label', type: 'text', title: "Folder Name", headercss: "small bold", css: "small"},
|
|
|
|
|
{ name: 'id', type: 'text', title: "Context", headercss: "small bold", css: "small"},
|
|
|
|
|
{ name: 'name', type: 'text', title: "Folder Name", headercss: "small bold", css: "small"},
|
|
|
|
|
|
|
|
|
|
{ name: "summary.size", type: "number", title: "Size (MB)", type: "number", headercss: "small bold" },
|
|
|
|
|
{ name: "summary.count", type: "number", title: "File Count", type: "number", headercss: "small bold" }
|
|
|
|
|