Added collapsable rows, error handling in table panel, ground work for new kinds of binding, refactored view a bit
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<div ng-controller='histogram'>
|
||||
<div ng-controller='histogram' style="height:{{row.height}}">
|
||||
<h4>{{panel.title}}</h4>
|
||||
<div histogram params="{{panel}}" style="height:{{row.height}}"></div>
|
||||
</div>
|
||||
@@ -87,12 +87,15 @@ angular.module('kibana.histogram', [])
|
||||
restrict: 'A',
|
||||
link: function(scope, elem, attrs, ctrl) {
|
||||
|
||||
scope.$watch('data', function() {
|
||||
// If the data or row state changes, re-render
|
||||
scope.$watch(function () {
|
||||
return angular.toJson([scope.data, scope.row])
|
||||
}, function() {
|
||||
if(!(_.isUndefined(scope.data)))
|
||||
render_panel(scope,elem,attrs);
|
||||
});
|
||||
|
||||
// Re-render if the window is
|
||||
// Re-render if the window is resized
|
||||
angular.element(window).bind('resize', function(){
|
||||
render_panel(scope,elem,attrs);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user