From fe2c9c21ad83e63cad20114a191b09169ad0f112 Mon Sep 17 00:00:00 2001 From: Rashid Khan Date: Fri, 24 May 2013 11:19:44 -0700 Subject: [PATCH 1/2] Add example apache/ldap proxy config, fixed timepicker init bug, removed debug statement from stack --- common/lib/panels/jquery.flot.stack.js | 1 - panels/timepicker/module.js | 6 +-- sample/apache_ldap.conf | 61 ++++++++++++++++++++++++++ sample/{kibana.conf => nginx.conf} | 0 4 files changed, 64 insertions(+), 4 deletions(-) create mode 100644 sample/apache_ldap.conf rename sample/{kibana.conf => nginx.conf} (100%) diff --git a/common/lib/panels/jquery.flot.stack.js b/common/lib/panels/jquery.flot.stack.js index bbeb0f71010..b35967536c1 100644 --- a/common/lib/panels/jquery.flot.stack.js +++ b/common/lib/panels/jquery.flot.stack.js @@ -203,7 +203,6 @@ charts or filled areas). //set percentage for stacked chart function processRawData(plot, series, data, datapoints) { - console.log(plot) if (!processed) { processed = true; stackSums = getStackSums(plot.getData()); diff --git a/panels/timepicker/module.js b/panels/timepicker/module.js index c4e4ef41c97..2c72a97eda8 100644 --- a/panels/timepicker/module.js +++ b/panels/timepicker/module.js @@ -61,13 +61,13 @@ angular.module('kibana.timepicker', []) switch($scope.panel.mode) { case 'absolute': $scope.time = { - from : moment($scope.panel.time.from,'YYYY-MM-DD HH:mm:ss') || moment(time_ago($scope.panel.timespan)), - to : moment($scope.panel.time.to,'YYYY-MM-DD HH:mm:ss') || moment() + from : moment($scope.panel.time.from,'MM/DD/YYYY HH:mm:ss') || moment(time_ago($scope.panel.timespan)), + to : moment($scope.panel.time.to,'MM/DD/YYYY HH:mm:ss') || moment() } break; case 'since': $scope.time = { - from : moment($scope.panel.time.from,'YYYY-MM-DD HH:mm:ss') || moment(time_ago($scope.panel.timespan)), + from : moment($scope.panel.time.from,'MM/DD/YYYY HH:mm:ss') || moment(time_ago($scope.panel.timespan)), to : moment() } break; diff --git a/sample/apache_ldap.conf b/sample/apache_ldap.conf new file mode 100644 index 00000000000..31d395470c8 --- /dev/null +++ b/sample/apache_ldap.conf @@ -0,0 +1,61 @@ +# Courtesy of https://github.com/sgzijl +# config.js includes elasticsearch: "https://"+window.location.hostname+":443", + + + ServerName your.domain.tld + RewriteEngine On + RewriteCond %{HTTPS} off + RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} + + + + ServerName your.domain.tld + + SSLEngine on + SSLCertificateFile /path/to/public.crt + SSLCertificateKeyFile /path/to/private.key + + DocumentRoot /path/to/kibana3 + + Allow from all + Options -Multiviews + + + LogLevel debug + ErrorLog /path/to/logs/error_log + CustomLog /path/to/logs/access_log combined + + # Set global proxy timeouts + + ProxySet connectiontimeout=5 timeout=90 + + + # Proxy for _aliases and .*/_search + + ProxyPass http://127.0.0.1:9200 + ProxyPassReverse http://127.0.0.1:9200 + + + # Proxy for kibana-int/{dashboard,temp} stuff (if you don't want auth on /, then you will want these to be protected) + + ProxyPass http://127.0.0.1:9200 + ProxyPassReverse http://127.0.0.1:9200 + + + # Optional disable auth for a src IP (eg: your monitoring host or subnet) + + Allow from 5.6.7.8 + Deny from all + Satisfy any + + AuthLDAPBindDN "CN=_ldapbinduser,OU=Users,DC=example,DC=com" + AuthLDAPBindPassword "ldapbindpass" + AuthLDAPURL "ldaps://ldap01.example.com ldap02.example.com/OU=Users,DC=example,DC=com?sAMAccountName?sub?(objectClass=*)" + AuthType Basic + AuthBasicProvider ldap + AuthName "Please authenticate for Example dot com" + AuthLDAPGroupAttributeIsDN on + require valid-user + + + diff --git a/sample/kibana.conf b/sample/nginx.conf similarity index 100% rename from sample/kibana.conf rename to sample/nginx.conf From 82e40230a82debd05b7cc6f83130e0fe8b3c33a4 Mon Sep 17 00:00:00 2001 From: Rashid Khan Date: Sun, 26 May 2013 09:38:18 -0700 Subject: [PATCH 2/2] Fixed bug in pie editor, switched up edit icon, added ability to disable drag to select in histogram --- index.html | 17 +++++++++-------- js/app.js | 8 ++++---- js/directives.js | 4 ++-- panels/histogram/editor.html | 3 ++- panels/histogram/module.js | 17 ++++++++++------- panels/pie/editor.html | 8 ++++---- partials/dashboard.html | 2 +- 7 files changed, 32 insertions(+), 27 deletions(-) diff --git a/index.html b/index.html index ce4cae0a61d..a1e471a87fd 100644 --- a/index.html +++ b/index.html @@ -19,6 +19,14 @@ + + + + + + + + @@ -32,7 +40,7 @@
{{dashboards.title}} -
+
@@ -43,11 +51,4 @@ - - - - - - - diff --git a/js/app.js b/js/app.js index 751fcbdfc83..2040ac3f18c 100644 --- a/js/app.js +++ b/js/app.js @@ -17,12 +17,9 @@ var modules = [ var scripts = [] var labjs = $LAB - .script("common/lib/jquery-1.8.0.min.js").wait() + .script("common/lib/jquery-1.8.0.min.js") .script("common/lib/modernizr-2.6.1.min.js") .script("common/lib/underscore.min.js") - .script("common/lib/bootstrap.min.js") - .script('common/lib/datepicker.js') - .script('common/lib/timepicker.js') .script("common/lib/angular.min.js") .script("common/lib/angular-strap.min.js") .script("common/lib/angular-sanitize.min.js") @@ -31,6 +28,9 @@ var labjs = $LAB .script("common/lib/moment.js") .script("common/lib/shared.js") .script("common/lib/filesaver.js") + .script("common/lib/bootstrap.min.js") + .script('common/lib/datepicker.js') + .script('common/lib/timepicker.js') .script("js/services.js") .script("js/controllers.js") .script("js/filters.js") diff --git a/js/directives.js b/js/directives.js index ddc058ec014..d44e6b923df 100644 --- a/js/directives.js +++ b/js/directives.js @@ -8,8 +8,8 @@ angular.module('kibana.directives', []) restrict: 'E', link: function(scope, elem, attrs) { var template = ''+ - ''+ - '{{panel.type}} '+ + ' '+ + '{{panel.type}} '+ '

{{panel.title}}

'; elem.prepend($compile(angular.element(template))(scope)); } diff --git a/panels/histogram/editor.html b/panels/histogram/editor.html index dd3c2a43544..53cb0c849fd 100644 --- a/panels/histogram/editor.html +++ b/panels/histogram/editor.html @@ -66,10 +66,11 @@
-
+
+
diff --git a/panels/histogram/module.js b/panels/histogram/module.js index d91c0de992d..cbbc68e14a4 100644 --- a/panels/histogram/module.js +++ b/panels/histogram/module.js @@ -31,6 +31,7 @@ * legend :: Show the legend? * x-axis :: Show x-axis labels and grid lines * y-axis :: Show y-axis labels and grid lines + * interactive :: Allow drag to select time range ### Group Events #### Receives * time :: An object containing the time range to use and the index(es) to query @@ -64,7 +65,8 @@ angular.module('kibana.histogram', []) legend : true, 'x-axis' : true, 'y-axis' : true, - percentage : false + percentage : false, + interactive : true, } _.defaults($scope.panel,_d) @@ -288,7 +290,7 @@ angular.module('kibana.histogram', []) // Populate element try { - scope.plot = $.plot(elem, scope.data, { + var options = { legend: { show: false }, series: { stackpercent: scope.panel.stack ? scope.panel.percentage : false, @@ -317,10 +319,6 @@ angular.module('kibana.histogram', []) label: "Datetime", color: "#c8c8c8", }, - selection: { - mode: "x", - color: '#ccc' - }, grid: { backgroundColor: null, borderWidth: 0, @@ -329,7 +327,12 @@ angular.module('kibana.histogram', []) hoverable: true, }, colors: ['#86B22D','#BF6730','#1D7373','#BFB930','#BF3030','#77207D'] - }) + } + + if(scope.panel.interactive) + options.selection = { mode: "x", color: '#aaa' }; + + scope.plot = $.plot(elem, scope.data, options) // Work around for missing legend at initialization if(!scope.$$phase) diff --git a/panels/pie/editor.html b/panels/pie/editor.html index 9411e027630..bd5d5de33cc 100644 --- a/panels/pie/editor.html +++ b/panels/pie/editor.html @@ -1,10 +1,10 @@
+
+ + +
-
- - -
diff --git a/partials/dashboard.html b/partials/dashboard.html index 0d9f5ba16bf..5e7ec05602a 100644 --- a/partials/dashboard.html +++ b/partials/dashboard.html @@ -9,7 +9,7 @@
{{row.title}} - +
{{row.title}}