diff --git a/src/app/dashboards/blank.json b/src/app/dashboards/blank.json
index e21f69458e0..41e29ce04b3 100644
--- a/src/app/dashboards/blank.json
+++ b/src/app/dashboards/blank.json
@@ -1,32 +1,15 @@
{
"title": "New Dashboard",
"services": {
- "query": {
- "list": {
- "0": {
- "query": "*",
- "alias": "",
- "color": "#7EB26D",
- "id": 0
- }
- },
- "ids": [
- 0
- ]
- },
"filter": {
- "list": {},
- "ids": []
+ "list": [],
+ "time": {
+ "from": "now-5m",
+ "to": "now"
+ }
}
},
- "rows": [
- ],
+ "rows": [],
"editable": true,
- "failover": false,
- "index": {
- "interval": "none",
- "pattern": "[logstash-]YYYY.MM.DD",
- "default": "_all",
- "warm_fields": false
- }
+ "failover": false
}
\ No newline at end of file
diff --git a/src/app/directives/panelMenu.js b/src/app/directives/panelMenu.js
deleted file mode 100644
index d590efe8c07..00000000000
--- a/src/app/directives/panelMenu.js
+++ /dev/null
@@ -1,47 +0,0 @@
-define([
- 'angular'
-],
-function (angular) {
- 'use strict';
-
- angular.module('kibana.directives').directive('panelMenu', [
- '$parse',
- '$compile',
- '$timeout',
- function ($parse, $compile, $timeout) {
- var buildTemplate = function (items, ul) {
- if (!ul)
- ul = [
- '
'
- ];
- angular.forEach(items, function (item, index) {
- if (item.divider)
- return ul.splice(index + 1, 0, '');
- var li = '';
- ul.splice(index + 1, 0, li);
- });
- return ul;
- };
- return {
- restrict: 'EA',
- scope: true,
- link: function postLink(scope, iElement, iAttrs) {
- var getter = $parse(iAttrs.bsDropdown), items = getter(scope);
- $timeout(function () {
- if (!angular.isArray(items)) {
- }
- var dropdown = angular.element(buildTemplate(items).join(''));
- dropdown.insertAfter(iElement);
- $compile(iElement.next('ul.dropdown-menu'))(scope);
- });
- iElement.addClass('dropdown-toggle').attr('data-toggle', 'dropdown');
- }
- };
- }
-]);
-
-});
\ No newline at end of file
diff --git a/src/app/panels/timepicker/editor.html b/src/app/panels/timepicker/editor.html
index f3967158130..9fe80e7833f 100644
--- a/src/app/panels/timepicker/editor.html
+++ b/src/app/panels/timepicker/editor.html
@@ -8,9 +8,5 @@
-
-
-
-
diff --git a/src/app/panels/timepicker/module.js b/src/app/panels/timepicker/module.js
index c9c4d115aa6..35a7963285d 100644
--- a/src/app/panels/timepicker/module.js
+++ b/src/app/panels/timepicker/module.js
@@ -38,9 +38,8 @@ function (angular, app, _, moment, kbn) {
status : "Stable",
time_options : ['5m','15m','1h','6h','12h','24h','2d','7d','30d'],
refresh_intervals : ['5s','10s','30s','1m','5m','15m','30m','1h','2h','1d'],
-
- timefield : '@timestamp'
};
+
_.defaults($scope.panel,_d);
var customTimeModal = $modal({
diff --git a/src/app/services/dashboard.js b/src/app/services/dashboard.js
index 0663e91628d..16cccca0dde 100644
--- a/src/app/services/dashboard.js
+++ b/src/app/services/dashboard.js
@@ -26,19 +26,8 @@ function (angular, $, kbn, _, config, moment, Modernizr) {
failover: false,
panel_hints: true,
rows: [],
- pulldowns: [
- {
- type: 'query',
- },
- {
- type: 'filtering'
- }
- ],
- nav: [
- {
- type: 'timepicker'
- }
- ],
+ pulldowns: [ { type: 'filtering' } ],
+ nav: [ { type: 'timepicker' } ],
services: {},
loader: {
save_gist: false,
@@ -54,12 +43,6 @@ function (angular, $, kbn, _, config, moment, Modernizr) {
load_local: false,
hide: false
},
- index: {
- interval: 'none',
- pattern: '_all',
- default: 'INDEX_MISSING',
- warm_fields: true
- },
refresh: false
};
@@ -136,7 +119,6 @@ function (angular, $, kbn, _, config, moment, Modernizr) {
var dash_defaults = function(dashboard) {
_.defaults(dashboard,_dash);
- _.defaults(dashboard.index,_dash.index);
_.defaults(dashboard.loader,_dash.loader);
var filtering = _.findWhere(dashboard.pulldowns, {type: 'filtering'});
@@ -158,11 +140,6 @@ function (angular, $, kbn, _, config, moment, Modernizr) {
// Make sure the dashboard being loaded has everything required
dashboard = dash_defaults(dashboard);
- // If not using time based indices, use the default index
- if(dashboard.index.interval === 'none') {
- self.indices = [dashboard.index.default];
- }
-
// Set the current dashboard
self.current = _.clone(dashboard);
diff --git a/src/app/services/filterSrv.js b/src/app/services/filterSrv.js
index 9ed1152f6d7..346abc9cd1e 100644
--- a/src/app/services/filterSrv.js
+++ b/src/app/services/filterSrv.js
@@ -9,9 +9,6 @@ define([
var module = angular.module('kibana.services');
module.service('filterSrv', function(dashboard, $rootScope, $timeout) {
- // Create an object to hold our service state on the dashboard
- dashboard.current.services.filter = dashboard.current.services.filter || {};
-
// defaults
var _d = {
list: [],
@@ -23,7 +20,10 @@ define([
// Call this whenever we need to reload the important stuff
this.init = function() {
+ dashboard.current.services.filter = dashboard.current.services.filter || {};
+
_.defaults(dashboard.current.services.filter, _d);
+
self.list = dashboard.current.services.filter.list;
self.time = dashboard.current.services.filter.time;