mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 09:28:51 +00:00
Filters directive.
This commit is contained in:
parent
362c899632
commit
5ee924a770
@ -77,6 +77,13 @@
|
||||
}
|
||||
};
|
||||
|
||||
var Filters = function() {
|
||||
return {
|
||||
restrict: 'E',
|
||||
templateUrl: '/views/visualizations/filters.html'
|
||||
}
|
||||
}
|
||||
|
||||
var EditVisualizationForm = function(Visualization, growl) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
@ -145,5 +152,6 @@
|
||||
.provider('Visualization', VisualizationProvider)
|
||||
.directive('visualizationRenderer', ['Visualization', VisualizationRenderer])
|
||||
.directive('visualizationOptionsEditor', ['Visualization', VisualizationOptionsEditor])
|
||||
.directive('filters', Filters)
|
||||
.directive('editVisulatizationForm', ['Visualization', 'growl', EditVisualizationForm])
|
||||
})();
|
||||
|
@ -1,17 +1,4 @@
|
||||
<div>
|
||||
<div class="btn-group pull-right" ng-repeat="filter in filters">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
{{filter.friendlyName}}: {{filter.current}}<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li ng-repeat="value in filter.values">
|
||||
<a href="#" ng-click="filter.current = value">{{value}}</a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#" ng-click="filter.current = 'All'">All</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<smart-table rows="gridData" columns="gridColumns"
|
||||
config="gridConfig"
|
||||
class="table table-condensed table-hover"></smart-table>
|
||||
|
12
rd_ui/app/views/visualizations/filters.html
Normal file
12
rd_ui/app/views/visualizations/filters.html
Normal file
@ -0,0 +1,12 @@
|
||||
<div class="well well-sm" ng-show="filters">
|
||||
<div class="btn-group" ng-repeat="filter in filters">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
{{filter.friendlyName}}: {{filter.current}}<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li ng-repeat="value in filter.values">
|
||||
<a href="" ng-click="filter.current = value">{{value}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user