Преглед изворни кода

removed timefield from filters

Torkel Ödegaard пре 12 година
родитељ
комит
4bf8777c1c

+ 1 - 0
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() {

+ 0 - 7
src/app/panels/filtering/editor.html

@@ -1,7 +0,0 @@
-<div>
-  <div class="row-fluid">    
-    <div class="span12">
-      No options here
-    </div>
-  </div>
-</div>

+ 0 - 15
src/app/panels/filtering/meta.html

@@ -1,15 +0,0 @@
-<div>
-  <style>
-    .input-query-alias {
-      margin-bottom: 5px !important;
-    }
-  </style>
-  <a class="close" ng-click="render();dismiss();" href="">×</a>
-  <h6>Query Alias</h6>
-  <form>
-    <input class="input-medium input-query-alias" type="text" ng-model="queries.list[id].alias" placeholder='Alias...' />
-    <div>
-      <i ng-repeat="color in queries.colors" class="pointer" ng-class="{'icon-circle-blank':queries.list[id].color == color,'icon-circle':queries.list[id].color != color}" style="color:{{color}}" ng-click="queries.list[id].color = color;render();"> </i>
-    </div>
-  </form>
-</div>

+ 1 - 2
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

+ 0 - 1
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
           });
         });
       }

+ 0 - 1
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"
       };

+ 10 - 0
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;
     };