소스 검색

chore: Remove logging and use the updated config param

Johannes Schill 7 년 전
부모
커밋
08dc5a4f97
1개의 변경된 파일3개의 추가작업 그리고 5개의 파일을 삭제
  1. 3 5
      public/app/plugins/panel/text/module.ts

+ 3 - 5
public/app/plugins/panel/text/module.ts

@@ -46,9 +46,8 @@ export class TextPanelCtrl extends PanelCtrl {
     $scope.$watch(
       renderWhenChanged,
       _.throttle(() => {
-        console.log('this.render', new Date());
         this.render();
-      }, 2000, {trailing: true, leading: true})
+      }, 100)
     );
   }
 
@@ -93,9 +92,8 @@ export class TextPanelCtrl extends PanelCtrl {
   }
 
   updateContent(html: string) {
-    const { sanitizeInput } = config;
-    html = sanitizeInput ? sanitize(html) : html;
-    console.log('html', html);
+    const { disableSanitizeInput } = config;
+    html = disableSanitizeInput ? html : sanitize(html);
     try {
       this.content = this.$sce.trustAsHtml(this.templateSrv.replace(html, this.panel.scopedVars));
     } catch (e) {