diff --git a/config.js b/config.js
index 6f2508fcd85..02ebf9691b4 100644
--- a/config.js
+++ b/config.js
@@ -1,6 +1,8 @@
/*
elasticsearch: URL to your elasticsearch server
+kibana_index: The default ES index to use for storing Kibana specific object
+ such as stored dashboards
timeformat: Format for time in histograms (might go away)
modules: Panel modules to load. In the future these will be inferred
from your initial dashboard, though if you share dashboards you
@@ -13,9 +15,11 @@ If you need to configure the default dashboard, please see dashboard.js
*/
var config = new Settings(
{
- elasticsearch: 'http://localhost:9200',
+ elasticsearch: 'http://demo.kibana.org',
+ kibana_index: "kibana-int",
timeformat: 'mm/dd HH:MM:ss',
modules: ['histogram','map','pie','table','stringquery','sort',
- 'timepicker','text','fields','hits','dashcontrol'],
+ 'timepicker','text','fields','hits','dashcontrol',
+ 'column'],
}
);
diff --git a/js/controllers.js b/js/controllers.js
index ebcfa3791e5..12dc6effb0e 100644
--- a/js/controllers.js
+++ b/js/controllers.js
@@ -65,6 +65,11 @@ angular.module('kibana.controllers', [])
$scope.global_alert = []
}
+ $scope.edit_path = function(type) {
+ if(type)
+ return 'panels/'+type+'/editor.html';
+ }
+
$scope.init();
})
diff --git a/js/filters.js b/js/filters.js
index 6a7403baeb6..3679ddec1e3 100644
--- a/js/filters.js
+++ b/js/filters.js
@@ -2,4 +2,9 @@
/*global angular:true */
'use strict';
-angular.module('kibana.filters', [])
\ No newline at end of file
+angular.module('kibana.filters', [])
+.filter('stringSort', function() {
+ return function(input) {
+ return input.sort();
+ }
+ });
\ No newline at end of file
diff --git a/panels/column/editor.html b/panels/column/editor.html
new file mode 100644
index 00000000000..e459cdec342
--- /dev/null
+++ b/panels/column/editor.html
@@ -0,0 +1,33 @@
+
+
+
Add Panel to Column
+
+ Select Type
+
+
+
+
+
+
+
+
Panels
+
+
+
Title
+
Type
+
Height
+
Delete
+
Move
+
+
+
{{app.title}}
+
{{app.type}}
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/panels/column/module.html b/panels/column/module.html
new file mode 100644
index 00000000000..9b68bec19fb
--- /dev/null
+++ b/panels/column/module.html
@@ -0,0 +1,17 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/panels/column/module.js b/panels/column/module.js
new file mode 100644
index 00000000000..f55d46dde08
--- /dev/null
+++ b/panels/column/module.js
@@ -0,0 +1,76 @@
+angular.module('kibana.column', [])
+.controller('column', function($scope, $rootScope) {
+ // Set and populate defaults
+ var _d = {
+ panels : [
+ ]
+ }
+ _.defaults($scope.panel,_d);
+
+ $scope.init = function(){
+ $scope.reset_panel();
+ }
+
+ $scope.toggle_row = function(panel) {
+ panel.collapse = panel.collapse ? false : true;
+ if (!panel.collapse) {
+ $timeout(function() {
+ $scope.send_render();
+ });
+ }
+ }
+
+ $scope.send_render = function() {
+ $scope.$broadcast('render');
+ }
+
+ $scope.add_panel = function(panel) {
+ $scope.panel.panels.push(panel);
+ }
+
+ $scope.reset_panel = function(type) {
+ $scope.new_panel = {
+ loading: false,
+ error: false,
+ sizeable: false,
+ span: 12,
+ height: "150px",
+ editable: true,
+ group: ['default'],
+ type: type,
+ };
+ };
+
+})
+.directive('columnEdit', function($compile,$timeout) {
+ return {
+ scope : {
+ new_panel:"=panel",
+ row:"=",
+ config:"=",
+ dashboards:"=",
+ type:"=type"
+ },
+ link: function(scope, elem, attrs, ctrl) {
+ scope.$on('render', function () {
+
+ // Make sure the digest has completed and populated the attributes
+ $timeout(function() {
+ // Create a reference to the new_panel as panel so that the existing
+ // editors work with our isolate scope
+ scope.panel = scope.new_panel
+ var template = ''
+
+ if(!(_.isUndefined(scope.type)) && scope.type != "")
+ template = template+'';
+ //var new_elem = $compile(angular.element(template))(scope))
+ elem.html($compile(angular.element(template))(scope));
+ })
+ })
+ }
+ }
+}).filter('withoutColumn', function() {
+ return function() {
+ return _.without(config.modules,'column');
+ };
+});
\ No newline at end of file
diff --git a/panels/column/panelgeneral.html b/panels/column/panelgeneral.html
new file mode 100644
index 00000000000..404499b7828
--- /dev/null
+++ b/panels/column/panelgeneral.html
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/panels/dashcontrol/editor.html b/panels/dashcontrol/editor.html
index d6199f93595..ad304bc15a9 100644
--- a/panels/dashcontrol/editor.html
+++ b/panels/dashcontrol/editor.html
@@ -1,4 +1,4 @@
-