Commit 8a521f2a by Rashid Khan

Added font size selector to table panel (issue #10). Added ability to configure…

Added font size selector to table panel (issue #10). Added ability to configure temp url ttl and disable sharing of via short links
parent 5a0f15ba
...@@ -38,6 +38,10 @@ ...@@ -38,6 +38,10 @@
display: none; display: none;
} }
.panel i.editlink span {
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
}
.pointer:hover { .pointer:hover {
color: #0088CC; color: #0088CC;
} }
......
...@@ -7,7 +7,7 @@ angular.module('kibana.directives', []) ...@@ -7,7 +7,7 @@ angular.module('kibana.directives', [])
return { return {
restrict: 'E', restrict: 'E',
link: function(scope, elem, attrs) { link: function(scope, elem, attrs) {
var template = '<img src="common/img/load.gif" class="panel-loading" ng-show="panel.loading == true"> <i class="icon-edit pointer editlink" bs-modal="\'partials/paneleditor.html\'" ng-show="panel.editable != false"></i>'+ var template = '<img src="common/img/load.gif" class="panel-loading" ng-show="panel.loading == true"><i class="icon-edit pointer editlink" bs-modal="\'partials/paneleditor.html\'" ng-show="panel.editable != false"> <span class="small">{{panel.type}}</span></i>'+
'<h4>{{panel.title}}</h4>'; '<h4>{{panel.title}}</h4>';
elem.prepend($compile(angular.element(template))(scope)); elem.prepend($compile(angular.element(template))(scope));
} }
......
...@@ -32,4 +32,13 @@ ...@@ -32,4 +32,13 @@
<label class="small">ES store index</label><input class="input-small" type="text" ng-model="panel.elasticsearch_saveto"> <label class="small">ES store index</label><input class="input-small" type="text" ng-model="panel.elasticsearch_saveto">
</div> </div>
</div> </div>
<h5>Sharing</h5>
<div class="row-fluid">
<div class="span3" >
<label class="small">Allow Sharing</label><input type="checkbox" ng-model="panel.temp" ng-checked="panel.temp">
</div>
<div class="span8" ng-show="panel.temp">
<label class="small">Shared Link TTL (examples: 1m,1d,1w,30d)</label><input class="input-small" type="text" ng-model="panel.temp_ttl">
</div>
</div>
</div> </div>
\ No newline at end of file
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
<label class='small'>Dashboard Control</label> <label class='small'>Dashboard Control</label>
<button class='btn' ng-show="panel.load.gist || panel.load.elasticsearch || panel.load.local" data-placement="bottom" data-unique="1" ng-click="elasticsearch_dblist(elasticsearch.query)" bs-popover="'panels/dashcontrol/load.html'"><i class='icon-folder-open'></i> <i class='icon-caret-down'></i></button> <button class='btn' ng-show="panel.load.gist || panel.load.elasticsearch || panel.load.local" data-placement="bottom" data-unique="1" ng-click="elasticsearch_dblist(elasticsearch.query)" bs-popover="'panels/dashcontrol/load.html'"><i class='icon-folder-open'></i> <i class='icon-caret-down'></i></button>
<button class='btn' ng-show="panel.save.gist || panel.save.elasticsearch || panel.save.local || panel.save.default" data-placement="bottom" data-unique="1" bs-popover="'panels/dashcontrol/save.html'"><i class='icon-save'></i> <i class='icon-caret-down'></i></button> <button class='btn' ng-show="panel.save.gist || panel.save.elasticsearch || panel.save.local || panel.save.default" data-placement="bottom" data-unique="1" bs-popover="'panels/dashcontrol/save.html'"><i class='icon-save'></i> <i class='icon-caret-down'></i></button>
<button class='btn' ng-click="elasticsearch_save('temp')" bs-modal="'panels/dashcontrol/share.html'"><i class='icon-share'></i></button> <button ng-show="panel.temp" class='btn' ng-click="elasticsearch_save('temp')" bs-modal="'panels/dashcontrol/share.html'"><i class='icon-share'></i></button>
</kibana-panel> </kibana-panel>
\ No newline at end of file
...@@ -17,6 +17,7 @@ angular.module('kibana.dashcontrol', []) ...@@ -17,6 +17,7 @@ angular.module('kibana.dashcontrol', [])
}, },
elasticsearch_size: 20, elasticsearch_size: 20,
elasticsearch_saveto: $scope.config.kibana_index, elasticsearch_saveto: $scope.config.kibana_index,
temp: true,
temp_ttl: '30d', temp_ttl: '30d',
} }
_.defaults($scope.panel,_d); _.defaults($scope.panel,_d);
......
...@@ -35,7 +35,8 @@ ...@@ -35,7 +35,8 @@
</div> </div>
<div ng-show="panel.multi && panel.multi_arrange == 'vertical'"> <div ng-show="panel.multi && panel.multi_arrange == 'vertical'">
<form> <form>
<table class="form-horizontal"> <table class="form-horizontal">
<tr><td class="small">Queries</td></tr>
<tr ng-repeat="q in panel.query" style="margin-bottom:10px"> <tr ng-repeat="q in panel.query" style="margin-bottom:10px">
<td width="99%"><input type="text" ng-model="panel.query[$index]" ng-model-onblur style="width:100%"></td> <td width="99%"><input type="text" ng-model="panel.query[$index]" ng-model-onblur style="width:100%"></td>
<td width="1%" style="visibility:hidden"><button class="btn btn-info" type="submit"></button></td> <td width="1%" style="visibility:hidden"><button class="btn btn-info" type="submit"></button></td>
......
...@@ -27,8 +27,10 @@ ...@@ -27,8 +27,10 @@
<select ng-show="all_fields.length>0"style="width:85%" ng-model="panel.sort[0]" ng-options="f for f in all_fields"></select> <select ng-show="all_fields.length>0"style="width:85%" ng-model="panel.sort[0]" ng-options="f for f in all_fields"></select>
<i ng-click="set_sort(panel.sort[0])" ng-class="{'icon-chevron-up': panel.sort[1] == 'asc','icon-chevron-down': panel.sort[1] == 'desc'}"></i> <i ng-click="set_sort(panel.sort[0])" ng-class="{'icon-chevron-up': panel.sort[1] == 'asc','icon-chevron-down': panel.sort[1] == 'desc'}"></i>
</div> </div>
<div class="span1"> <div class="span3">
<h5>Length</h5> <h5>Length</h5>
<input type="number" class="input-mini" ng-model="panel.size" ng-change="get_data()"> <input type="number" class="input-mini" ng-model="panel.size" ng-change="get_data()">
</div> </div>
<div class="span3"><h6>Font Size</h6>
<select class="input-small" ng-model="panel.style['font-size']" ng-options="f for f in ['6pt','7pt','8pt','10pt','12pt','14pt','16pt','18pt','20pt','24pt','28pt','32pt','36pt','42pt','48pt','52pt','60pt','72pt']"></select></span>
</div> </div>
\ No newline at end of file
...@@ -83,6 +83,9 @@ angular.module('kibana.timepicker', []) ...@@ -83,6 +83,9 @@ angular.module('kibana.timepicker', [])
eventBus.register($scope,"get_time", function(event,id) { eventBus.register($scope,"get_time", function(event,id) {
eventBus.broadcast($scope.$id,id,'time',$scope.time) eventBus.broadcast($scope.$id,id,'time',$scope.time)
}); });
$scope.$on('render', function (){
$scope.time_apply();
});
} }
$scope.set_interval = function (refresh_interval) { $scope.set_interval = function (refresh_interval) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment