[plugins-functionality | DONE | FIX ] update monitor component

This commit is contained in:
argirok 2024-04-25 15:27:19 +03:00
parent 005f636446
commit 13ab093d79
2 changed files with 9 additions and 11 deletions

View File

@ -91,31 +91,31 @@
<div *ngIf="showIndicator(indicator)"
[ngClass]="getChartClassBySize(indicator.width)">
<div class="uk-card uk-card-default uk-position-relative"
[class.semiFiltered]="chartsActiveType.get(i + '-' + j).filtersApplied < countSelectedFilters()">
[class.semiFiltered]="getActiveIndicatorPath(indicator).filtersApplied < countSelectedFilters()">
<div class="uk-card-body uk-text-center uk-margin-small-bottom">
<h6 class="uk-margin-bottom chartTitle uk-flex uk-flex-bottom">
{{indicator.name + " "}}
</h6>
<div *ngIf="indicator.indicatorPaths.length > 1" class="uk-button-group">
<!--<div *ngIf="indicator.indicatorPaths.length > 1" class="uk-button-group">
<button *ngFor="let indicatorPath of indicator.indicatorPaths;"
class="uk-button"
(click)="setActiveChart(i, j, indicatorPath.type)"
[class.uk-button-secondary]="chartsActiveType.get(i + '-' + j).url === indicatorPath.url">
[class.uk-button-secondary]="getActiveIndicatorPath(indicator).url === indicatorPath.url">
{{indicatorPath.type}}
</button>
</div>
</div>-->
<iframe [class.uk-blend-multiply]="!isFullscreen"
*ngIf=" !properties.disableFrameLoad && chartsActiveType.get(i + '-' + j).source !== 'image'"
[src]="chartsActiveType.get(i + '-' + j).safeResourceUrl"
*ngIf=" !properties.disableFrameLoad && getActiveIndicatorPath(indicator).source !== 'image'"
[src]="getActiveIndicatorPath(indicator).safeResourceUrl"
class="uk-width-1-1" allowfullscreen="true" mozallowfullscreen="true"
[ngClass]="'uk-height-' + (indicator.height?indicator.height.toLowerCase():'medium')"></iframe>
<div *ngIf="properties.disableFrameLoad && chartsActiveType.get(i + '-' + j).source !== 'image'">
<div *ngIf="properties.disableFrameLoad && getActiveIndicatorPath(indicator).source !== 'image'">
<img class="uk-width-1-1 uk-blend-multiply"
[ngClass]="'uk-height-' + (indicator.height?indicator.height.toLowerCase():'medium')"
src="assets/chart-placeholder.png">
</div>
<img *ngIf="chartsActiveType.get(i + '-' + j).source === 'image'"
[src]="chartsActiveType.get(i + '-' + j).safeResourceUrl"
<img *ngIf="getActiveIndicatorPath(indicator).source === 'image'"
[src]="getActiveIndicatorPath(indicator).safeResourceUrl"
class="uk-width-1-1 uk-blend-multiply"
[ngClass]="'uk-height-' + (indicator.height?indicator.height.toLowerCase():'medium')">
</div>

View File

@ -22,7 +22,6 @@ export class MonitorComponent extends MonitorIndicatorStakeholderBaseComponent {
stakeholder = null;
@Input() pluginObject: PluginStats;
profiles;
public chartsActiveType: Map<string, IndicatorPath> = new Map<string, IndicatorPath>();
constructor(protected _route: ActivatedRoute,
protected _router: Router,
protected _meta: Meta,
@ -79,7 +78,6 @@ export class MonitorComponent extends MonitorIndicatorStakeholderBaseComponent {
this.activeCategory = null;
this.activeSubCategory = null;
this.numberResults = new Map<string, number>();
this.chartsActiveType = new Map<string, IndicatorPath>();
this.setView({});
let ids = [];
for (let section of this.activeSubCategory.charts) {