Project

General

Profile

« Previous | Next » 

Revision 57481

[Monitor Dashboard]: Fix satinizer of iframe

View differences:

monitor.component.ts
48 48
    private statisticsService: StatisticsService,
49 49
    private sidebarOpenService: SidebarOpenService,
50 50
    private seoService: SEOService,
51
    private cdr: ChangeDetectorRef,
51 52
    private sanitizer: DomSanitizer) {
52 53
      this.errorCodes = new ErrorCodes();
53 54
      this.errorMessages = new ErrorMessagesComponent();
......
202 203
    });
203 204
    this.activeSubCategory.charts.forEach((chart, index) => {
204 205
      if (chart.indicatorPaths.length > 0) {
206
        chart.indicatorPaths[0].safeResourceUrl = this.getUrlByStakeHolder(chart.indicatorPaths[0]);
205 207
        this.chartsActiveType.set(index, chart.indicatorPaths[0]);
206 208
      }
207 209
    });
210
    this.cdr.detectChanges();
208 211
  }
209 212

  
210 213
  public getUrlByStakeHolder(indicatorPath: IndicatorPath) {
......
212 215
  }
213 216

  
214 217
  public setActiveChart(index, type: string) {
215
    this.chartsActiveType.set(index, this.activeSubCategory.charts[index].indicatorPaths.filter(indicatorPath => indicatorPath.type === type)[0]);
218
    let activeChart = this.activeSubCategory.charts[index].indicatorPaths.filter(indicatorPath => indicatorPath.type === type)[0];
219
    activeChart.safeResourceUrl = this.getUrlByStakeHolder(activeChart);
220
    this.chartsActiveType.set(index, activeChart);
216 221
  }
217 222

  
218 223
  private navigateToError() {

Also available in: Unified diff