diff --git a/app/components/config/config.js b/app/components/config/config.js index d78f209..3d0c15d 100644 --- a/app/components/config/config.js +++ b/app/components/config/config.js @@ -67,14 +67,8 @@ angular.module('bansho.config', []) return developmentConfig; }; - this.loadByTemplate = function (templateName, destination) { - var viewsConfig = config.data; - - angular.forEach(viewsConfig, function (conf, view) { - if (conf.template === templateName) { - destination[view] = conf; - } - }); + this.getConfigData = function (templateName) { + return config.data[templateName]; }; this.readConfig = function () { diff --git a/app/components/config/config.json b/app/components/config/config.json index 7cac146..dd21c47 100644 --- a/app/components/config/config.json +++ b/app/components/config/config.json @@ -7,6 +7,27 @@ "refreshInterval": 30, "template": "dashboard", "components": [ + { + "type": "actionbar", + "config": { + "components": [ + "filter", + "acknowledge", + "downtime", + "recheck", + "more", + "search-filter" + ], + "tableId": [ + 0, + 1, + 2, + 3 + ] + } + } + ], + "extra_components": [ { "type": "tactical", "config": { @@ -188,12 +209,27 @@ "liveHosts": { "title": "Hosts", "refreshInterval": 30, - "template": "single_table", + "template": "tables", "components": [ + { + "type": "actionbar", + "config": { + "components": [ + "filter", + "acknowledge", + "downtime", + "recheck", + "more", + "search-filter" + ], + "tableId": [0] + } + }, { "type": "table", "config": { "title": "Hosts", + "tableId": 0, "cells": { "text": [ "Host", @@ -229,12 +265,27 @@ "liveServices": { "title": "Services", "refreshInterval": 30, - "template": "single_table", + "template": "tables", "components": [ + { + "type": "actionbar", + "config": { + "components": [ + "filter", + "acknowledge", + "downtime", + "recheck", + "more", + "search-filter" + ], + "tableId": [0] + } + }, { "type": "table", "config": { "title": "Services", + "tableId": 0, "cells": { "text": [ "Host", @@ -249,7 +300,6 @@ "status_last_check" ] }, - "headerFollow": true, "inputSource": { "service": "surveilStatus", "config": { @@ -259,9 +309,9 @@ }, "isWrappable": false, "noRepeatCell": "host", - "checkColumn": true, - "containsActionBar": true - + "headerFollow": true, + "containsActionBar": true, + "checkColumn": true } } ] @@ -269,12 +319,24 @@ "liveEvents": { "title": "Events", "refreshInterval": 30, - "template": "single_table", + "template": "tables", "components": [ + { + "type": "actionbar", + "config": { + "components": [ + "filter", + "more", + "search-filter" + ], + "tableId": [0] + } + }, { "type": "table", "config": { "title": "Hosts", + "tableId": 0, "cells": { "text": [ "Event type", diff --git a/app/components/table/actionbar/actionbar.html b/app/components/table/actionbar/actionbar.html index 0cb44b2..2ad68de 100644 --- a/app/components/table/actionbar/actionbar.html +++ b/app/components/table/actionbar/actionbar.html @@ -1,90 +1,4 @@