diff --git a/src/api/index.py b/src/api/index.py index 54c9fdc..5986b4d 100644 --- a/src/api/index.py +++ b/src/api/index.py @@ -253,8 +253,17 @@ def get_folders(): d = gReader.read() if 'folders' in d: d = d['folders'] - index = len(d) - 1 - d = d[index] + hosts = set([row[0]['id'] for row in d]) + m = {} + for id in hosts: + for row in d: + if id == row[0]['id'] : + m[id] = row + d = m.values() + for row in d: + print row[0]['id'] + # index = len(d) - 1 + # d = d[index] # m = {} diff --git a/src/api/static/js/dashboard.js b/src/api/static/js/dashboard.js index 2360b2f..26a271d 100644 --- a/src/api/static/js/dashboard.js +++ b/src/api/static/js/dashboard.js @@ -408,7 +408,7 @@ monitor.folders.search.init = function(){ term = term.replace(/\x32/g,'') if (term.length == 0) { monitor.folders.render.summary(data) - } else if (term.length > 3) { + } else if (term.length > 0) { data = jx.utils.patterns.visitor(data, function (row) { if (row.id.match(term)) { @@ -517,9 +517,9 @@ monitor.folders.render.summary = function (data) { } options.paging = true options.pageSize = 4 - options.pageIndex = 1 + options.pageIndex = 2 options.pageButtonCount = 4 - options.pagerContainer = '#latest_process_pager' + options.pagerContainer = '#folderspager' options.pagerFormat= "{prev} Page {pageIndex} of {pageCount} {next}" options.pagePrevText= '' options.pageNextText= " " @@ -546,7 +546,7 @@ monitor.folders.render.summary = function (data) { options.autoload = true options.fields = [ { name: 'id', type: 'text', title: "Host", headercss: "small bold", css: "small"}, - { name: 'label', type: 'text', title: "Folder Name", 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" } diff --git a/src/api/templates/dashboard.html b/src/api/templates/dashboard.html index 10216fb..ccc3162 100644 --- a/src/api/templates/dashboard.html +++ b/src/api/templates/dashboard.html @@ -114,9 +114,9 @@ -