@ -21,6 +21,7 @@
* hide _control : : Upon save , hide this panel
* elasticsearch _size : : show this many dashboards under the ES section in the load drop down
* temp : : Allow saving of temp dashboards
* ttl : : Enable setting ttl .
* temp _ttl : : How long should temp dashboards persist
* /
@ -48,6 +49,7 @@ angular.module('kibana.dashcontrol', [])
hide _control : false ,
elasticsearch _size : 20 ,
temp : true ,
ttl _enable : true ,
temp _ttl : '30d'
} ;
_ . defaults ( $scope . panel , _d ) ;
@ -83,7 +85,11 @@ angular.module('kibana.dashcontrol', [])
} ;
$scope . elasticsearch _save = function ( type , ttl ) {
dashboard . elasticsearch _save ( type , ( $scope . elasticsearch . title || dashboard . current . title ) , ttl ) . then (
dashboard . elasticsearch _save (
type ,
( $scope . elasticsearch . title || dashboard . current . title ) ,
( $scope . panel . ttl _enable ? ttl : false )
) . then (
function ( result ) {
if ( ! _ . isUndefined ( result . _id ) ) {
$scope . alert ( 'Dashboard Saved' , 'This dashboard has been saved to Elasticsearch as "' +