[Monitor Dashboard | Trunk]: Fix chart indicator modal form
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor_dashboard@59752 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
29537d917d
commit
7fdd099582
|
@ -330,9 +330,9 @@
|
||||||
type="select" [options]="indicatorUtils.indicatorSizes"
|
type="select" [options]="indicatorUtils.indicatorSizes"
|
||||||
label="Chart Size">
|
label="Chart Size">
|
||||||
</div>
|
</div>
|
||||||
<ng-template [ngIf]="chartIndicatorPaths" formArrayName="indicatorPaths">
|
<div *ngIf="chartIndicatorPaths" formArrayName="indicatorPaths" class="uk-width-1-1">
|
||||||
<ng-template ngFor [ngForOf]="chartIndicatorPaths.controls" let-indicatorPath let-i="index"
|
<div *ngFor="let indicatorPath of chartIndicatorPaths.controls; let i=index;"
|
||||||
[formGroup]="toFormGroup(indicatorPath)">
|
[formGroup]="indicatorPath" class="uk-grid" uk-grid>
|
||||||
<div dashboard-input class="uk-width-1-1"
|
<div dashboard-input class="uk-width-1-1"
|
||||||
[title]="indicatorPath.get('url').disabled?'Default chart URLs cannot change':''"
|
[title]="indicatorPath.get('url').disabled?'Default chart URLs cannot change':''"
|
||||||
[formInput]="indicatorPath.get('url')"
|
[formInput]="indicatorPath.get('url')"
|
||||||
|
@ -340,7 +340,7 @@
|
||||||
<div *ngIf="urlParameterizedMessage.length > 0" class="uk-alert-warning uk-alert uk-width-1-1">
|
<div *ngIf="urlParameterizedMessage.length > 0" class="uk-alert-warning uk-alert uk-width-1-1">
|
||||||
{{urlParameterizedMessage}}
|
{{urlParameterizedMessage}}
|
||||||
</div>
|
</div>
|
||||||
<ng-template formArrayName="parameters">
|
<div formArrayName="parameters" class="uk-grid uk-width-1-1" uk-grid>
|
||||||
<div *ngIf="getParameter(i, 'title')" class="uk-width-1-1">
|
<div *ngIf="getParameter(i, 'title')" class="uk-width-1-1">
|
||||||
<div dashboard-input
|
<div dashboard-input
|
||||||
[formInput]="getParameter(i, 'title').get('value')"
|
[formInput]="getParameter(i, 'title').get('value')"
|
||||||
|
@ -386,7 +386,7 @@
|
||||||
<div dashboard-input [formInput]="getParameter(i, 'end_year').get('value')"
|
<div dashboard-input [formInput]="getParameter(i, 'end_year').get('value')"
|
||||||
label="Year (To)"></div>
|
label="Year (To)"></div>
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</div>
|
||||||
<div *ngIf="indicator && indicator.indicatorPaths[i] && indicator.indicatorPaths[i].safeResourceUrl"
|
<div *ngIf="indicator && indicator.indicatorPaths[i] && indicator.indicatorPaths[i].safeResourceUrl"
|
||||||
class="uk-margin-medium-top uk-position-relative uk-width-1-1 uk-flex uk-flex-center">
|
class="uk-margin-medium-top uk-position-relative uk-width-1-1 uk-flex uk-flex-center">
|
||||||
<div *ngIf="(hasDifference(i)) && !indicatorPath.invalid"
|
<div *ngIf="(hasDifference(i)) && !indicatorPath.invalid"
|
||||||
|
@ -408,8 +408,8 @@
|
||||||
<img class="uk-width-1-1 uk-height-large" [src]="indicator.indicatorPaths[i].url">
|
<img class="uk-width-1-1 uk-height-large" [src]="indicator.indicatorPaths[i].url">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</div>
|
||||||
</ng-template>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</modal-alert>
|
</modal-alert>
|
||||||
|
|
|
@ -372,10 +372,6 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV
|
||||||
return this.chartIndicatorFb.get('indicatorPaths') as FormArray;
|
return this.chartIndicatorFb.get('indicatorPaths') as FormArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
public toFormGroup(value: any): FormGroup {
|
|
||||||
return value as FormGroup
|
|
||||||
}
|
|
||||||
|
|
||||||
public addJsonPath(index: number) {
|
public addJsonPath(index: number) {
|
||||||
if(index==0 && this.getJsonPath(index).getRawValue()[index].indexOf(",")!=-1){
|
if(index==0 && this.getJsonPath(index).getRawValue()[index].indexOf(",")!=-1){
|
||||||
//if in the first path there are more than one paaths comma separated, split them and autogenerate the forms
|
//if in the first path there are more than one paaths comma separated, split them and autogenerate the forms
|
||||||
|
|
Loading…
Reference in New Issue