From 4bf8777c1cc6814e5e0e45bfcafb9a3a91f4727b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sun, 29 Dec 2013 17:46:50 +0100 Subject: [PATCH] removed timefield from filters --- src/app/controllers/graphiteTarget.js | 1 + src/app/panels/filtering/editor.html | 7 ------- src/app/panels/filtering/meta.html | 15 --------------- src/app/panels/filtering/module.js | 3 +-- src/app/panels/graphite/module.js | 1 - src/app/panels/timepicker/module.js | 1 - src/app/services/dashboard.js | 10 ++++++++++ 7 files changed, 12 insertions(+), 26 deletions(-) delete mode 100644 src/app/panels/filtering/editor.html delete mode 100644 src/app/panels/filtering/meta.html diff --git a/src/app/controllers/graphiteTarget.js b/src/app/controllers/graphiteTarget.js index e5997efdd3f..559f2004f5a 100644 --- a/src/app/controllers/graphiteTarget.js +++ b/src/app/controllers/graphiteTarget.js @@ -15,6 +15,7 @@ function (angular, _, config, graphiteFuncs, Parser) { $scope.init = function() { $scope.funcCategories = graphiteFuncs.getCategories(); parseTarget(); + i = 10; }; function parseTarget() { diff --git a/src/app/panels/filtering/editor.html b/src/app/panels/filtering/editor.html deleted file mode 100644 index 3100415c7f2..00000000000 --- a/src/app/panels/filtering/editor.html +++ /dev/null @@ -1,7 +0,0 @@ -
-
-
- No options here -
-
-
\ No newline at end of file diff --git a/src/app/panels/filtering/meta.html b/src/app/panels/filtering/meta.html deleted file mode 100644 index 8af862ff5bf..00000000000 --- a/src/app/panels/filtering/meta.html +++ /dev/null @@ -1,15 +0,0 @@ -
- - × -
Query Alias
-
- -
- -
-
-
\ No newline at end of file diff --git a/src/app/panels/filtering/module.js b/src/app/panels/filtering/module.js index aaa2fc9c804..4fc31ccd6df 100644 --- a/src/app/panels/filtering/module.js +++ b/src/app/panels/filtering/module.js @@ -18,8 +18,7 @@ function (angular, app, _) { $scope.panelMeta = { status : "Stable", - description : "A controllable list of all filters currently applied to the dashboard. You "+ - "almost certainly want one of these on your dashboard somewhere." + description : "graphite target filters" }; // Set and populate defaults diff --git a/src/app/panels/graphite/module.js b/src/app/panels/graphite/module.js index 77bba7d5646..f523989d5e4 100644 --- a/src/app/panels/graphite/module.js +++ b/src/app/panels/graphite/module.js @@ -737,7 +737,6 @@ function (angular, app, $, _, kbn, moment, timeSeries) { type : 'time', from : moment.utc(ranges.xaxis.from).toDate(), to : moment.utc(ranges.xaxis.to).toDate(), - field : scope.panel.time_field }); }); } diff --git a/src/app/panels/timepicker/module.js b/src/app/panels/timepicker/module.js index 3d324fe6dde..7faf7e9ced4 100644 --- a/src/app/panels/timepicker/module.js +++ b/src/app/panels/timepicker/module.js @@ -153,7 +153,6 @@ function (angular, app, _, moment, kbn) { // Create filter object var _filter = { type : 'time', - field : $scope.panel.timefield, from : "now-"+timespan, to: "now" }; diff --git a/src/app/services/dashboard.js b/src/app/services/dashboard.js index 44777137089..73062cced83 100644 --- a/src/app/services/dashboard.js +++ b/src/app/services/dashboard.js @@ -139,6 +139,16 @@ function (angular, $, kbn, _, config, moment, Modernizr) { _.defaults(dashboard,_dash); _.defaults(dashboard.index,_dash.index); _.defaults(dashboard.loader,_dash.loader); + + var filtering = _.findWhere(dashboard.pulldowns, {type: 'filtering'}); + if (!filtering) { + dashboard.pulldowns.push({ + type: 'filtering', + enable: false, + collapse: true + }); + } + return dashboard; };