Sfoglia il codice sorgente

Fixed missing default mandate on filters

Rashid Khan 12 anni fa
parent
commit
113c6fc572
3 ha cambiato i file con 14 aggiunte e 5 eliminazioni
  1. 6 2
      package.json
  2. 2 2
      src/app/dashboards/logstash.js
  3. 6 1
      src/app/services/filterSrv.js

+ 6 - 2
package.json

@@ -5,6 +5,10 @@
   },
   "name": "kibana",
   "version": "3.0.0pre-milestone5",
+  "repository": {
+    "type": "git",
+    "url": "http://github.com/elasticsearch/kibana.git"
+  },
   "devDependencies": {
     "rjs-build-analysis": "0.0.3",
     "grunt": "~0.4.0",
@@ -16,13 +20,13 @@
     "grunt-git-describe": "~2.3.2",
     "grunt-contrib-clean": "~0.5.0",
     "grunt-contrib-cssmin": "~0.6.1",
-    "grunt-contrib-uglify": "~0.2.4",
     "grunt-contrib-jshint": "~0.6.0",
     "grunt-string-replace": "~0.2.4",
     "grunt-contrib-htmlmin": "~0.1.3",
     "grunt-contrib-requirejs": "~0.4.1",
     "grunt-angular-templates": "~0.3.12",
-    "grunt-contrib-compress": "~0.5.2"
+    "grunt-contrib-compress": "~0.5.2",
+    "grunt-contrib-uglify": "~0.2.4"
   },
   "license": "Apache License"
 }

+ 2 - 2
src/app/dashboards/logstash.js

@@ -73,7 +73,7 @@ if(!_.isUndefined(ARGS.query)) {
   queries = {
     0: {
       query: '*',
-      id: 0
+      id: 0,
     }
   };
 }
@@ -93,7 +93,7 @@ dashboard.services.filter = {
       field: ARGS.timefield||"@timestamp",
       type: "time",
       active: true,
-      id: 0
+      id: 0,
     }
   },
   ids: [0]

+ 6 - 1
src/app/services/filterSrv.js

@@ -36,6 +36,10 @@ define([
       self.ids = dashboard.current.services.filter.ids;
       _f = dashboard.current.services.filter;
 
+      _.each(self.list,function(f) {
+        self.set(f,f.id,true);
+      });
+
       // Date filters hold strings now, not dates
       /*
       _.each(self.getByType('time',true),function(time) {
@@ -66,7 +70,8 @@ define([
           var _id = nextId();
           var _filter = {
             alias: '',
-            id: _id
+            id: _id,
+            mandate: 'must'
           };
           _.defaults(filter,_filter);
           self.list[_id] = filter;