mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fixes to text panel, and alert related to angularjs upgrade
This commit is contained in:
parent
5b475a05ef
commit
e75debbf81
@ -82,11 +82,13 @@ function (angular, app, _, require) {
|
||||
$scope.updateContent = function(html) {
|
||||
try {
|
||||
$scope.content = $sce.trustAsHtml(filterSrv.applyTemplateToTarget(html));
|
||||
|
||||
if(!$scope.$$phase) {
|
||||
$scope.$apply();
|
||||
}
|
||||
} catch(e) {
|
||||
console.log('Text panel error: ', e);
|
||||
$scope.content = $sce.trustAsHtml(html);
|
||||
}
|
||||
|
||||
if(!$scope.$$phase) {
|
||||
$scope.$apply();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -7,7 +7,7 @@ function (angular, _) {
|
||||
|
||||
var module = angular.module('grafana.services');
|
||||
|
||||
module.service('alertSrv', function($timeout) {
|
||||
module.service('alertSrv', function($timeout, $sce) {
|
||||
var self = this;
|
||||
|
||||
// List of all alert objects
|
||||
@ -17,7 +17,7 @@ function (angular, _) {
|
||||
var
|
||||
_a = {
|
||||
title: title || '',
|
||||
text: text || '',
|
||||
text: $sce.trustAsHtml(text || ''),
|
||||
severity: severity || 'info',
|
||||
},
|
||||
_ca = angular.toJson(_a),
|
||||
@ -46,4 +46,4 @@ function (angular, _) {
|
||||
self.list = [];
|
||||
};
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user