Skip to content

Commit

Permalink
Merge branch 'develop' into release
Browse files Browse the repository at this point in the history
* develop: (23 commits)
  Made the Guided Dashboard the default and moved syslog to syslog.json
  Added Release Notes for Banana 1.2
  Default setting to hide the collection drop-down from dashboard UI. Add sorting by time field to bettermap module. Remove df params from queries used in default.json and guided.json.
  Change the way we include ./leaflet/plugins back to the old Kibana way. Somehow we cannot move the lib to the top of the file. It will cause undefined error.
  Fix bugs SILK-4 and SILK-29 (timepicker issue when using absolute mode or since mode, the date will skip back one day).
  Fix Dashboard Settings Controls tab. Now all controls should work properly. So we can show or hide dashboard menus and sub-menus (e.g. collections picker, load, save, and etc.) from a user.
  Add collections drop-down box to the dashboard.
  Added hits panel and export data to file in table panel
  Major cleanup
  Cleanup bettermap module.
  Added lat,lon field to bettermap and enabled filter queries to use filter service
  Modify silklogo image.
  Fix SOL-76: Add Smooth Line mode for histogram module.
  Move UI Settings of query module to dashboard UI setting for "Global Query Parameters" (e.g. defType and df params).
  Added bettermap support and replaced ejs with sjs
  Fix bug in map module.
  Fix bug in map module not refreshing when query gives no result.
  Remove all hard coded df from the panel modules. Add defType and df settings to query panel. Optimize code by moving some functions to querySrv.
  Fix bugs when getting time field from filterSrv.
  Fix filtering bugs in map, table, terms, and histogram modules. Optimize code by moving functions to filterSrv. Remove some hard coded.
  ...

Conflicts:
	src/app/dashboards/default.json
	src/app/dashboards/guided.json
	src/app/dashboards/syslog.json
	src/app/services/dashboard.js
	src/app/services/kbnIndex.js
  • Loading branch information
athana committed May 12, 2014
2 parents 6515043 + 04b884f commit a03406b
Show file tree
Hide file tree
Showing 34 changed files with 981 additions and 621 deletions.
1 change: 0 additions & 1 deletion src/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ function (angular, $, _, appLevelRequire) {
delete $httpProvider.defaults.headers.common["X-Requested-With"];
}]);


// TODO: add ajax-solr ?
var apps_deps = [
'elasticjs.service',
Expand Down
20 changes: 6 additions & 14 deletions src/app/controllers/dashLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ function (angular, _) {
};

$scope.showDropdown = function(type) {
var _l = $scope.loader;
// var _l = $scope.loader;
var _l = dashboard.current.loader || $scope.loader;

if(type === 'load') {
return (_l.load_elasticsearch || _l.load_gist || _l.load_local);
}
if(type === 'save') {
return (_l.save_elasticsearch || _l.save_gist || _l.local_local || _l.save_default);
return (_l.save_elasticsearch || _l.save_gist || _l.save_local || _l.save_default);
}
if(type === 'share') {
return (_l.save_temp);
Expand Down Expand Up @@ -58,13 +60,8 @@ function (angular, _) {
($scope.loader.save_temp_ttl_enable ? ttl : false)
).then(
function(result) {
if (DEBUG) {
console.log('result = ',result);
}
if (DEBUG) { console.debug('dashLoader: result = ',result); }

// if(!_.isUndefined(result._id)) {
// alertSrv.set('Dashboard Saved','This dashboard has been saved to Solr as "' +
// result._id + '"','success',5000);
// Solr
if(!_.isUndefined(result.response.docs[0].id)) {
alertSrv.set('Dashboard Saved','This dashboard has been saved to Solr as "' +
Expand Down Expand Up @@ -102,13 +99,8 @@ function (angular, _) {
$scope.elasticsearch_dblist = function(query) {
dashboard.elasticsearch_list(query,$scope.loader.load_elasticsearch_size).then(
function(result) {
// DEBUG
console.debug("dashLoader : result=",result);
if (DEBUG) { console.debug("dashLoader: result=",result); }

// if(!_.isUndefined(result.hits)) {
// $scope.hits = result.hits.total;
// $scope.elasticsearch.dashboards = result.hits.hits;
// }
// Solr
if (!_.isUndefined(result.response.docs)) {
$scope.hits = result.response.numFound;
Expand Down
179 changes: 179 additions & 0 deletions src/app/dashboards/bettermap.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
{
"title": "Better Map Demo",
"services": {
"query": {
"idQueue": [
1
],
"list": {
"0": {
"query": "*:*",
"alias": "",
"color": "#7EB26D",
"id": 0,
"pin": false,
"type": "lucene"
}
},
"ids": [
0
]
},
"filter": {
"idQueue": [
1
],
"list": {
"0": {
"from": "2014-01-31T22:00:00.000Z",
"to": "2014-04-23T09:53:36.013Z",
"field": "start_time",
"type": "time",
"mandate": "must",
"active": true,
"alias": "",
"id": 0
}
},
"ids": [
0
]
}
},
"rows": [
{
"title": "Options",
"height": "50px",
"editable": true,
"collapse": false,
"collapsable": true,
"panels": [
{
"error": false,
"span": 4,
"editable": true,
"type": "filtering",
"loadingEditor": false
},
{
"title": "Set time span",
"error": "",
"span": 4,
"editable": true,
"group": [
"default"
],
"type": "timepicker",
"mode": "since",
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
],
"timespan": "30d",
"timefield": "start_time",
"timeformat": "",
"refresh": {
"enable": false,
"interval": 600,
"min": 3
},
"filter_id": 0,
"status": "Stable",
"time": {
"from": "02/01/2014 00:00:00",
"to": "04/23/2014 11:53:36"
}
},
{
"error": false,
"span": 4,
"editable": true,
"type": "query",
"loadingEditor": false,
"query": "*:*",
"pinned": true,
"history": [
"*:*"
],
"remember": 10,
"title": "Search",
"def_type": ""
}
]
},
{
"title": "BetterMapDemo",
"height": "650px",
"editable": true,
"collapse": false,
"collapsable": true,
"panels": [
{
"title": "Better Map Demo",
"span": 12,
"editable": true,
"tooltip": "start_station_id",
"group": [
"default"
],
"field" : "start_station",
"type" : "bettermap",
"size" : 7000,
"time_field": "start_time",
"lat_start" : 40,
"lat_end" : 45,
"lon_start" : -80,
"lon_end" : -73,
"dist" : 100,
"sort": [
"start_time",
"desc"
],
"queries": {
"mode": "all",
"ids": [
0
],
"custom": ""
},
"spyable": true,
"error": false
}
]
}
],
"editable": true,
"failover": false,
"index": {
"interval": "none",
"pattern": "[logstash-]YYYY.MM.DD",
"default": "NO_TIME_FILTER_OR_INDEX_PATTERN_NOT_MATCHED"
},
"style": "dark",
"panel_hints": true,
"loader": {
"save_gist": false,
"save_elasticsearch": true,
"save_local": true,
"save_default": true,
"save_temp": true,
"save_temp_ttl_enable": true,
"save_temp_ttl": "30d",
"load_gist": true,
"load_elasticsearch": true,
"load_elasticsearch_size": 20,
"load_local": true,
"hide": false
},
"solr": {
"server": "http://localhost:8983/solr/",
"core_name": "bike-trip-geo"
}
}
10 changes: 6 additions & 4 deletions src/app/dashboards/default.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
"ids": [
0
],
"query": "q=*&df=message&df=host&df=path&df=type&wt=json&rows=0&fq=event_timestamp:[2014-04-02T05:07:22.000Z%20TO%202014-04-02T05:22:22.000Z]&facet=true&facet.range=event_timestamp&facet.range.start=2014-04-02T05:07:22.000Z/DAY&facet.range.end=2014-04-02T05:22:22.000Z%2B1DAY/DAY&facet.range.gap=%2B10SECOND",
"query": "q=*&wt=json&rows=0&fq=event_timestamp:[2014-04-02T05:07:22.000Z%20TO%202014-04-02T05:22:22.000Z]&facet=true&facet.range=event_timestamp&facet.range.start=2014-04-02T05:07:22.000Z/DAY&facet.range.end=2014-04-02T05:22:22.000Z%2B1DAY/DAY&facet.range.gap=%2B10SECOND",
"custom": ""
},
"max_rows": 100000,
Expand Down Expand Up @@ -258,7 +258,7 @@
"ids": [
0
],
"query": "q=*&df=message&df=host&df=path&df=type&wt=json&rows=0&fq=event_timestamp:[2014-04-02T05:07:22.000Z%20TO%202014-04-02T05:22:22.000Z]&facet=true&facet.field=message&facet.range=event_timestamp&facet.range.start=2014-04-02T05:07:22.000Z&facet.range.end=2014-04-02T05:22:22.000Z&facet.range.gap=%2B1DAY&facet.limit=100"
"query": "q=*&wt=json&rows=0&fq=event_timestamp:[2014-04-02T05:07:22.000Z%20TO%202014-04-02T05:22:22.000Z]&facet=true&facet.field=message&facet.range=event_timestamp&facet.range.start=2014-04-02T05:07:22.000Z&facet.range.end=2014-04-02T05:22:22.000Z&facet.range.gap=%2B1DAY&facet.limit=100"
},
"field": "message",
"exclude": [],
Expand Down Expand Up @@ -320,7 +320,7 @@
"ids": [
0
],
"query": "q=*&df=message&df=host&df=path&df=type&wt=json&rows=500&fq=event_timestamp:[2014-04-02T05:07:22.000Z%20TO%202014-04-02T05:22:22.000Z]&sort=id desc"
"query": "q=*&wt=json&rows=500&fq=event_timestamp:[2014-04-02T05:07:22.000Z%20TO%202014-04-02T05:22:22.000Z]&sort=id desc"
},
"field_list": true,
"status": "Stable",
Expand Down Expand Up @@ -357,6 +357,8 @@
},
"solr": {
"server": "http://localhost:8983/solr/",
"core_name": "collection1"
"core_name": "collection1",
"core_list": [],
"global_params": "&df=message"
}
}
10 changes: 6 additions & 4 deletions src/app/dashboards/guided.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
"ids": [
0
],
"query": "q=*&df=message&df=host&df=path&df=type&wt=json&rows=0&fq=event_timestamp:[2014-04-02T05:07:22.000Z%20TO%202014-04-02T05:22:22.000Z]&facet=true&facet.range=event_timestamp&facet.range.start=2014-04-02T05:07:22.000Z/DAY&facet.range.end=2014-04-02T05:22:22.000Z%2B1DAY/DAY&facet.range.gap=%2B10SECOND",
"query": "q=*&wt=json&rows=0&fq=event_timestamp:[2014-04-02T05:07:22.000Z%20TO%202014-04-02T05:22:22.000Z]&facet=true&facet.range=event_timestamp&facet.range.start=2014-04-02T05:07:22.000Z/DAY&facet.range.end=2014-04-02T05:22:22.000Z%2B1DAY/DAY&facet.range.gap=%2B10SECOND",
"custom": ""
},
"max_rows": 100000,
Expand Down Expand Up @@ -258,7 +258,7 @@
"ids": [
0
],
"query": "q=*&df=message&df=host&df=path&df=type&wt=json&rows=0&fq=event_timestamp:[2014-04-02T05:07:22.000Z%20TO%202014-04-02T05:22:22.000Z]&facet=true&facet.field=message&facet.range=event_timestamp&facet.range.start=2014-04-02T05:07:22.000Z&facet.range.end=2014-04-02T05:22:22.000Z&facet.range.gap=%2B1DAY&facet.limit=100"
"query": "q=*&wt=json&rows=0&fq=event_timestamp:[2014-04-02T05:07:22.000Z%20TO%202014-04-02T05:22:22.000Z]&facet=true&facet.field=message&facet.range=event_timestamp&facet.range.start=2014-04-02T05:07:22.000Z&facet.range.end=2014-04-02T05:22:22.000Z&facet.range.gap=%2B1DAY&facet.limit=100"
},
"field": "message",
"exclude": [],
Expand Down Expand Up @@ -320,7 +320,7 @@
"ids": [
0
],
"query": "q=*&df=message&df=host&df=path&df=type&wt=json&rows=500&fq=event_timestamp:[2014-04-02T05:07:22.000Z%20TO%202014-04-02T05:22:22.000Z]&sort=id desc"
"query": "q=*&wt=json&rows=500&fq=event_timestamp:[2014-04-02T05:07:22.000Z%20TO%202014-04-02T05:22:22.000Z]&sort=id desc"
},
"field_list": true,
"status": "Stable",
Expand Down Expand Up @@ -357,6 +357,8 @@
},
"solr": {
"server": "http://localhost:8983/solr/",
"core_name": "collection1"
"core_name": "collection1",
"core_list": [],
"global_params": "&df=message"
}
}
11 changes: 7 additions & 4 deletions src/app/dashboards/syslog.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
"ids": [
0
],
"query": "q=error&df=message&df=host&df=path&df=type&wt=json&rows=0&fq=event_timestamp:[2014-04-01T07:47:30.228Z%20TO%202014-04-02T07:47:30.228Z]&facet=true&facet.range=event_timestamp&facet.range.start=2014-04-01T07:47:30.228Z/DAY&facet.range.end=2014-04-02T07:47:30.228Z%2B1DAY/DAY&facet.range.gap=%2B10MINUTE",
"query": "q=error&wt=json&rows=0&fq=event_timestamp:[2014-04-01T07:47:30.228Z%20TO%202014-04-02T07:47:30.228Z]&facet=true&facet.range=event_timestamp&facet.range.start=2014-04-01T07:47:30.228Z/DAY&facet.range.end=2014-04-02T07:47:30.228Z%2B1DAY/DAY&facet.range.gap=%2B10MINUTE",
"custom": ""
},
"title": "System Log Messages",
Expand Down Expand Up @@ -213,7 +213,7 @@
"ids": [
0
],
"query": "q=error&df=message&df=host&df=path&df=type&wt=json&rows=0&fq=event_timestamp:[2014-04-01T07:47:30.228Z%20TO%202014-04-02T07:47:30.228Z]&facet=true&facet.field=syslog_program&facet.range=event_timestamp&facet.range.start=2014-04-01T07:47:30.228Z&facet.range.end=2014-04-02T07:47:30.228Z&facet.range.gap=%2B1DAY&facet.limit=10",
"query": "q=error&wt=json&rows=0&fq=event_timestamp:[2014-04-01T07:47:30.228Z%20TO%202014-04-02T07:47:30.228Z]&facet=true&facet.field=syslog_program&facet.range=event_timestamp&facet.range.start=2014-04-01T07:47:30.228Z&facet.range.end=2014-04-02T07:47:30.228Z&facet.range.gap=%2B1DAY&facet.limit=10",
"custom": ""
},
"field": "syslog_program",
Expand Down Expand Up @@ -279,7 +279,7 @@
"ids": [
0
],
"query": "q=error&df=message&df=host&df=path&df=type&wt=json&rows=1000&fq=event_timestamp:[2014-04-01T07:47:30.228Z%20TO%202014-04-02T07:47:30.228Z]&sort=event_timestamp desc",
"query": "q=error&wt=json&rows=1000&fq=event_timestamp:[2014-04-01T07:47:30.228Z%20TO%202014-04-02T07:47:30.228Z]&sort=event_timestamp desc",
"custom": ""
},
"field_list": true,
Expand All @@ -301,6 +301,7 @@
"style": "light",
"panel_hints": true,
"loader": {
"dropdown_collections": false,
"save_gist": false,
"save_elasticsearch": true,
"save_local": true,
Expand All @@ -316,6 +317,8 @@
},
"solr": {
"server": "http://localhost:8983/solr/",
"core_name": "logstash_logs"
"core_name": "logstash_logs",
"core_list": [],
"global_params": "&df=message"
}
}
25 changes: 23 additions & 2 deletions src/app/directives/kibanaPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,31 @@ function (angular) {
'</span>' +

'<span ng-repeat="task in panelMeta.modals" class="row-button extra" ng-show="task.show">' +
'<span bs-modal="task.partial" class="pointer"><i ' +
'<span bs-modal="task.partial"class="pointer"><i ' +
'bs-tooltip="task.description" ng-class="task.icon" class="pointer"></i></span>'+
'</span>' +

'<span class="dropdown row-button extra" bs-tooltip="\'Export\'" data-placement="bottom" ng-show="panelMeta.exportfile">' +
'<span class="pointer" class="dropdown-toggle" data-toggle="dropdown">' +
'<i class="icon-save" class="pointer"></i>' +
'</span>' +
'<ul class="dropdown-menu" style="padding:10px; left:-150px;">' +
'<li>' +
'<h5>Export to File</h5>' +
'<ul class="unstyled">' +
'<li><a class="link" ng-click="exportfile(\'csv\')"><i class="icon-file"></i> CSV</a></li>' +
'<li><a class="link" ng-click="exportfile(\'xml\')"><i class="icon-file"></i> XML</a></li>' +
'<li><a class="link" ng-click="exportfile(\'json\')"><i class="icon-file"></i> JSON</a></li>' +
'</ul>' +
'</li>' +
'</ul>' +
'</span>' +

// '<span ng-repeat="dropdown in panelMeta.dropdowns" class="row-button extra">' +
// '<span class="dropdown" data-placement="bottom" bs-tooltip="dropdown.description"><a href="#" class="dropdown-toggle" data-toggle="dropdown" bs-dropdown="dropdown.list"><i ' +
// 'ng-class="dropdown.icon" class="pointer"></i></a></span>'+
// '</span>' +

'<span class="row-button extra" ng-show="panelMeta.loading == true">' +
'<span>'+
'<i class="icon-spinner smaller icon-spin icon-large"></i>' +
Expand Down Expand Up @@ -100,4 +121,4 @@ function (angular) {
};
});

});
});
Loading

0 comments on commit a03406b

Please sign in to comment.