Merge branch 'master' of github.com:elasticsearch/kibana
This commit is contained in:
+6
-3
@@ -136,9 +136,12 @@ function (angular, $, _, appLevelRequire) {
|
||||
var $scope = this;
|
||||
$scope.requireContext(deps, function () {
|
||||
var deps = _.toArray(arguments);
|
||||
$scope.$apply(function () {
|
||||
fn.apply($scope, deps);
|
||||
});
|
||||
// Check that this is a valid scope.
|
||||
if($scope.$id) {
|
||||
$scope.$apply(function () {
|
||||
fn.apply($scope, deps);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
}]);
|
||||
|
||||
@@ -12,6 +12,11 @@ function (angular, app, _) {
|
||||
return {
|
||||
restrict: 'A',
|
||||
link: function($scope, elem) {
|
||||
|
||||
$scope.$on("$destroy",function() {
|
||||
elem.remove();
|
||||
});
|
||||
|
||||
$scope.$watch('panel.type', function() {
|
||||
var _type = $scope.panel.type;
|
||||
$scope.reset_panel(_type);
|
||||
|
||||
@@ -13,7 +13,6 @@ function (angular) {
|
||||
|
||||
'<div class="row-fluid panel-extra"><div class="panel-extra-container">' +
|
||||
|
||||
|
||||
'<span class="extra row-button" ng-show="panel.editable != false">' +
|
||||
'<span ng-click="remove_panel_from_row(row,panel)" class="pointer">'+
|
||||
'<i class="icon-remove pointer" bs-tooltip="\'Remove\'"></i></span>'+
|
||||
@@ -61,16 +60,22 @@ function (angular) {
|
||||
link: function($scope, elem, attr) {
|
||||
// once we have the template, scan it for controllers and
|
||||
// load the module.js if we have any
|
||||
var newScope = $scope.$new();
|
||||
|
||||
// compile the module and uncloack. We're done
|
||||
function loadModule($module) {
|
||||
$module.appendTo(elem);
|
||||
elem.wrap(container);
|
||||
/* jshint indent:false */
|
||||
$compile(elem.contents())($scope);
|
||||
$compile(elem.contents())(newScope);
|
||||
elem.removeClass("ng-cloak");
|
||||
}
|
||||
|
||||
newScope.$on('$destroy',function(){
|
||||
elem.unbind();
|
||||
elem.remove();
|
||||
});
|
||||
|
||||
$scope.$watch(attr.type, function (name) {
|
||||
elem.addClass("ng-cloak");
|
||||
// load the panels module file, then render it in the dom.
|
||||
|
||||
@@ -528,7 +528,7 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
|
||||
restrict: 'A',
|
||||
template: '<div></div>',
|
||||
link: function(scope, elem) {
|
||||
var data;
|
||||
var data, plot;
|
||||
|
||||
scope.$on('refresh',function(){
|
||||
scope.get_data();
|
||||
@@ -700,7 +700,7 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
|
||||
data[i].data = _d;
|
||||
}
|
||||
|
||||
scope.plot = $.plot(elem, data, options);
|
||||
plot = $.plot(elem, data, options);
|
||||
|
||||
} catch(e) {
|
||||
// Nothing to do here
|
||||
|
||||
@@ -134,6 +134,9 @@ function (angular, $, kbn, _, config, moment, Modernizr) {
|
||||
// here before telling the panels to refresh
|
||||
this.refresh = function() {
|
||||
if(self.current.index.interval !== 'none') {
|
||||
if(_.isUndefined(filterSrv)) {
|
||||
return;
|
||||
}
|
||||
if(filterSrv.idsByType('time').length > 0) {
|
||||
var _range = filterSrv.timeRange('last');
|
||||
kbnIndex.indices(_range.from,_range.to,
|
||||
|
||||
Reference in New Issue
Block a user