diff --git a/js/app.js b/js/app.js index d7aef44584f..b812468c198 100644 --- a/js/app.js +++ b/js/app.js @@ -5,9 +5,9 @@ // Base modules var modules = [ 'kibana.services', - 'kibana.controllers', - 'kibana.filters', - 'kibana.directives', + 'kibana.controllers', + 'kibana.filters', + 'kibana.directives', 'elasticjs.service', '$strap.directives', 'kibana.panels', diff --git a/js/controllers.js b/js/controllers.js index 3cb76a0535b..21070740421 100644 --- a/js/controllers.js +++ b/js/controllers.js @@ -3,7 +3,7 @@ 'use strict'; angular.module('kibana.controllers', []) -.controller('DashCtrl', function($scope, $rootScope, $http, $timeout, $route, ejsResource, +.controller('DashCtrl', function($scope, $rootScope, $http, $timeout, $route, ejsResource, fields, dashboard, alertSrv) { $scope.editor = { @@ -23,7 +23,7 @@ angular.module('kibana.controllers', []) $scope.fields = fields; $scope.reset_row(); - var ejs = $scope.ejs = ejsResource(config.elasticsearch); + var ejs = $scope.ejs = ejsResource(config.elasticsearch); }; $scope.add_row = function(dash,row) { @@ -58,7 +58,7 @@ angular.module('kibana.controllers', []) return $scope.editorTabs; }; - // This is whoafully incomplete, but will do for now + // This is whoafully incomplete, but will do for now $scope.parse_error = function(data) { var _error = data.match("nested: (.*?);"); return _.isNull(_error) ? data : _error[1]; diff --git a/js/directives.js b/js/directives.js index 4dde7de11f2..3157eb6255e 100644 --- a/js/directives.js +++ b/js/directives.js @@ -9,7 +9,7 @@ angular.module('kibana.directives', []) link: function(scope, elem, attrs) { var template = ''+ - ' '+ '{{panel.type}} '+ '
"+
'curl -XGET '+config.elasticsearch+'/'+dashboard.indices+"/_search?pretty -d'\n"+
angular.toJson(JSON.parse(request.toString()),true)+
- "'",
- };
+ "'",
+ };
};
$scope.build_search = function(field,value) {
@@ -137,12 +137,12 @@ angular.module('kibana.map', [])
// Using LABjs, wait until all scripts are loaded before rendering panel
var scripts = $LAB.script("panels/map/lib/jquery.jvectormap.min.js").wait()
.script("panels/map/lib/map."+scope.panel.map+".js");
-
+
// Populate element. Note that jvectormap appends, does not replace.
scripts.wait(function(){
elem.text('');
$('.jvectormap-zoomin,.jvectormap-zoomout,.jvectormap-label').remove();
- var map = elem.vectorMap({
+ var map = elem.vectorMap({
map: scope.panel.map,
regionStyle: {initial: {fill: '#8c8c8c'}},
zoomOnScroll: false,
diff --git a/panels/pie/module.js b/panels/pie/module.js
index fb8386b8230..2a19cfca2ba 100644
--- a/panels/pie/module.js
+++ b/panels/pie/module.js
@@ -14,7 +14,7 @@
* legend :: Show the legend?
* labels :: Label the slices of the pie?
* mode :: 'terms' or 'goal'
- * default_field :: LOL wat? A dumb fail over field if for some reason the query object
+ * default_field :: LOL wat? A dumb fail over field if for some reason the query object
doesn't have a field
* spyable :: Show the 'eye' icon that displays the last ES query for this panel
*/
@@ -36,7 +36,7 @@ angular.module('kibana.pie', [])
editorTabs : [
{title:'Queries', src:'partials/querySelect.html'}
],
- query : { field:"_type", goal: 100},
+ query : { field:"_type", goal: 100},
queries : {
mode : 'all',
ids : []
@@ -70,8 +70,8 @@ angular.module('kibana.pie', [])
}
};
- $scope.set_refresh = function (state) {
- $scope.refresh = state;
+ $scope.set_refresh = function (state) {
+ $scope.refresh = state;
};
$scope.close_edit = function() {
@@ -83,18 +83,18 @@ angular.module('kibana.pie', [])
};
$scope.get_data = function() {
-
+
// Make sure we have everything for the request to complete
if(dashboard.indices.length === 0) {
return;
- }
+ }
$scope.panelMeta.loading = true;
var request = $scope.ejs.Request().indices(dashboard.indices);
$scope.panel.queries.ids = querySrv.idsByMode($scope.panel.queries);
- // This could probably be changed to a BoolFilter
+ // This could probably be changed to a BoolFilter
var boolQuery = $scope.ejs.BoolQuery();
_.each($scope.panel.queries.ids,function(id) {
boolQuery = boolQuery.should(querySrv.getEjsObj(id));
@@ -127,7 +127,7 @@ angular.module('kibana.pie', [])
$scope.data = [];
var k = 0;
_.each(results.facets.pie.terms, function(v) {
- var slice = { label : v.term, data : v.count };
+ var slice = { label : v.term, data : v.count };
$scope.data.push();
$scope.data.push(slice);
k = k + 1;
@@ -140,9 +140,9 @@ angular.module('kibana.pie', [])
.query(boolQuery)
.filter(filterSrv.getBoolFilter(filterSrv.ids))
.size(0);
-
+
$scope.populate_modal(request);
-
+
results = request.doSearch();
results.then(function(results) {
@@ -165,8 +165,8 @@ angular.module('kibana.pie', [])
body : ""+
'curl -XGET '+config.elasticsearch+'/'+dashboard.indices+"/_search?pretty -d'\n"+
angular.toJson(JSON.parse(request.toString()),true)+
- "'",
- };
+ "'",
+ };
};
})
@@ -194,11 +194,11 @@ angular.module('kibana.pie', [])
var scripts = $LAB.script("common/lib/panels/jquery.flot.js").wait()
.script("common/lib/panels/jquery.flot.pie.js");
-
+
var label;
if(scope.panel.mode === 'goal') {
- label = {
+ label = {
show: scope.panel.labels,
radius: 0,
formatter: function(label, series){
@@ -211,15 +211,15 @@ angular.module('kibana.pie', [])
}
},
};
- } else {
- label = {
+ } else {
+ label = {
show: scope.panel.labels,
radius: 2/3,
formatter: function(label, series){
return '