mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
more angular 1.3 upgrade fixes
This commit is contained in:
parent
387ec89b95
commit
d70c81f03b
@ -1,4 +1,4 @@
|
|||||||
<div ng-controller='text' ng-init="init()" style="min-height:{{panel.height || row.height}}" ng-dblclick="openEditor()">
|
<div ng-controller='text' ng-init="init()" style="min-height:{{panel.height || row.height}}" ng-dblclick="openEditor()">
|
||||||
<p ng-bind-html-unsafe="content">
|
<p ng-bind-html="content">
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -23,7 +23,7 @@ function (angular, app, _, require) {
|
|||||||
var module = angular.module('grafana.panels.text', []);
|
var module = angular.module('grafana.panels.text', []);
|
||||||
app.useModule(module);
|
app.useModule(module);
|
||||||
|
|
||||||
module.controller('text', function($scope, filterSrv) {
|
module.controller('text', function($scope, filterSrv, $sce) {
|
||||||
|
|
||||||
$scope.panelMeta = {
|
$scope.panelMeta = {
|
||||||
description : "A static text panel that can use plain text, markdown, or (sanitized) HTML"
|
description : "A static text panel that can use plain text, markdown, or (sanitized) HTML"
|
||||||
@ -81,7 +81,7 @@ function (angular, app, _, require) {
|
|||||||
|
|
||||||
$scope.updateContent = function(html) {
|
$scope.updateContent = function(html) {
|
||||||
try {
|
try {
|
||||||
$scope.content = filterSrv.applyTemplateToTarget(html);
|
$scope.content = $sce.trustAsHtml(filterSrv.applyTemplateToTarget(html));
|
||||||
|
|
||||||
if(!$scope.$$phase) {
|
if(!$scope.$$phase) {
|
||||||
$scope.$apply();
|
$scope.$apply();
|
||||||
|
@ -58,7 +58,6 @@ module.exports = function(config,grunt) {
|
|||||||
'angular-strap',
|
'angular-strap',
|
||||||
'directives/all',
|
'directives/all',
|
||||||
'jquery.flot.pie',
|
'jquery.flot.pie',
|
||||||
'angular-sanitize',
|
|
||||||
'angular-dragdrop',
|
'angular-dragdrop',
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user