summaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.html
diff options
context:
space:
mode:
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.html')
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.html119
1 files changed, 18 insertions, 101 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.html
index 256789586..7aaf1a3ab 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.html
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.html
@@ -129,14 +129,14 @@
</div>
- <div id="mapping-table" [hidden]="resourceDictionaryRes?.length == 0" class="mapping-table mx-4 my-2">
+ <div id="mapping-table" [hidden]="mappingRes?.length == 0" class="mapping-table mx-4 my-2">
<div class="mat-elevation-z8">
<!--Edit Buttons-->
<div class="btn-group mapping-editBar" role="group">
<div class="custom-control custom-checkbox" tooltip="Select All" placement="bottom">
<input type="checkbox" (click)="selectAllProps()" class="custom-control-input"
id="customCheck1"
- [checked]="resourceDictionaryRes.length>0&&resourceDictionaryRes.length === this.selectedProps.size">
+ [checked]="mappingRes.length>0&&mappingRes.length === this.selectedProps.size">
<label class="custom-control-label" for="customCheck1"></label>
</div>
<button [disabled]="selectedProps.size <=0" type="button" class="btn" (click)="reMap()"
@@ -146,10 +146,10 @@
class="icon-delete-sm"></i></button>
<div style="line-height: 35px;font-size: 10px;">
<span>{{selectedProps.size}} selected </span>
- <span>({{resourceDictionaryRes.length}} attributes in total)</span>
+ <span>({{mappingRes.length}} attributes in total)</span>
</div>
</div>
- <mat-paginator [pageSizeOptions]="[10, 25,50, 100,this.resourceDictionaryRes.length]">
+ <mat-paginator [pageSizeOptions]="[10, 25,50, 100,this.mappingRes.length]">
</mat-paginator>
<mat-form-field class="tableFilter float-right">
<mat-label>Filter</mat-label>
@@ -174,8 +174,8 @@
<td mat-cell *matCellDef="let dict">
<div class="custom-control custom-checkbox reuiredInput">
<input type="checkbox" class="custom-control-input" #requiredInput
- (click)="setProp(requiredInput,'required',initDataSource.filteredData.indexOf(dict))"
- id="requiredCheck-{{dict.name}}">
+ (ngModelChange)="setProp(requiredInput,'required',initDataSource.filteredData.indexOf(dict))"
+ [ngModel]="dict?.property?.required" id="requiredCheck-{{dict.name}}">
<label class="custom-control-label" for="requiredCheck-{{dict.name}}"></label>
</div>
</td>
@@ -186,8 +186,8 @@
<td mat-cell *matCellDef="let dict">
<div class="custom-control custom-checkbox reuiredInput">
<input type="checkbox" class="custom-control-input" #tempInput
- (click)="setProp(tempInput,'input-param',initDataSource.filteredData.indexOf(dict))"
- id="inputCheck-{{dict.name}}">
+ (ngModelChange)="setProp(tempInput,'input-param',initDataSource.filteredData.indexOf(dict))"
+ [ngModel]="dict['input-param']" id="inputCheck-{{dict.name}}">
<label class="custom-control-label" for="inputCheck-{{dict.name}}"></label>
</div>
</td>
@@ -206,12 +206,15 @@
<ng-container matColumnDef="dictionary-source">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Dictionary Source </th>
<td mat-cell *matCellDef="let dict">
- <select class="custom-select" (click)="selectSource(dict,$event)">
- <option *ngFor="let val of dict.definition.sources | keyvalue">
+ <select *ngIf="dict.sources" class="custom-select"
+ (click)="selectSource(dict,$event)">
+ <option *ngFor="let val of dict.sources | keyvalue">
{{initMap(dict.name,val)}}
</option>
-
</select>
+ <input [disabled]="true" *ngIf="!dict.sources" type="text" class="form-control"
+ [ngModel]="dict['dictionary-source']">
+
</td>
</ng-container>
<!-- Dependancies Column -->
@@ -224,7 +227,7 @@
<!-- Default Column -->
<ng-container matColumnDef="default">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Default </th>
- <td mat-cell *matCellDef="let dict"> {{ dict.definition?.property?.default }} </td>
+ <td mat-cell *matCellDef="let dict"> {{ dict?.property?.default }} </td>
</ng-container>
<!-- Velocity Column -->
<ng-container matColumnDef="Velocity">
@@ -237,12 +240,13 @@
<!-- Data Type Column -->
<ng-container matColumnDef="Data Type">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Data Type </th>
- <td mat-cell *matCellDef="let dict"> {{ dict.definition?.property?.type }} </td>
+ <td mat-cell *matCellDef="let dict"> {{ dict?.property?.type }} </td>
</ng-container>
<!-- Entry Schema Column -->
<ng-container matColumnDef="Entry Schema">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Entry Schema </th>
- <td mat-cell *matCellDef="let dict"> {{dict.definition?.property['entry_schema']}} </td>
+ <td mat-cell *matCellDef="let dict"> {{objectToString(dict?.property['entry_schema'])}}
+ </td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="initColumn"></tr>
<tr mat-row *matRowDef="let row; columns: initColumn;"></tr>
@@ -253,93 +257,6 @@
</table>
</div>
</div>
- <!------ View Table------->
- <div id="mapping-table-res" [hidden]="mappingRes?.length == 0" class="mapping-table mx-4 my-2">
- <div class="mat-elevation-z8">
- <mat-paginator #paginate="matPaginator" [pageSizeOptions]="[10, 25, 50, 100]"></mat-paginator>
- <mat-form-field class="tableFilter float-right">
- <mat-label>Filter</mat-label>
- <input matInput (keyup)="applyFilter($event)" placeholder="Ex. Mia" #input>
- </mat-form-field>
- <table matSortDisableClear mat-table [dataSource]="dataSource" #sort="matSort" matSort>
- <!-- Required Column -->
- <ng-container matColumnDef="Required">
- <th mat-header-cell *matHeaderCellDef> Required </th>
- <td mat-cell *matCellDef="let dict">
- <img *ngIf="dict?.property?.required" src="/assets/img/icon-required-yes.svg">
- <img *ngIf="!dict?.property?.required" src="/assets/img/icon-required-no.svg">
- </td>
- </ng-container>
- <!-- Template Input Column -->
- <ng-container matColumnDef="Template Input">
- <th mat-header-cell *matHeaderCellDef> Template Input </th>
- <td mat-cell *matCellDef="let dict">
- <img *ngIf="dict['input-param']" src="/assets/img/icon-required-yes.svg">
- <img *ngIf="!dict['input-param']" src="/assets/img/icon-required-no.svg">
- </td>
- </ng-container>
- <!-- Parameter Name Column -->
- <ng-container matColumnDef="name">
- <th mat-header-cell *matHeaderCellDef mat-sort-header> Parameter Name </th>
- <td mat-cell *matCellDef="let dict"> {{dict['name'] }} </td>
- </ng-container>
- <!-- Dictionary Name Column -->
- <ng-container matColumnDef="Dictionary Name">
- <th mat-header-cell *matHeaderCellDef mat-sort-header> Dictionary Name </th>
- <td mat-cell *matCellDef="let dict"> {{dict['name'] }} </td>
- </ng-container>
- <!-- Dictionary Source Column -->
- <ng-container matColumnDef="dictionary-source">
- <th mat-header-cell *matHeaderCellDef mat-sort-header> Dictionary Source </th>
- <td mat-cell *matCellDef="let dict">
- <input type="text" class="form-control" [value]="dict['dictionary-source']"
- disabled>
- </td>
- </ng-container>
- <!-- Dependancies Column -->
- <ng-container matColumnDef="dependencies">
- <th mat-header-cell *matHeaderCellDef> Dependancies </th>
- <td mat-cell *matCellDef="let dict">
- <input type="text" class="form-control" [value]="dict['dependencies']" disabled>
- </td>
- </ng-container>
- <!-- default Column -->
- <ng-container matColumnDef="default">
- <th mat-header-cell *matHeaderCellDef mat-sort-header> Default </th>
- <td mat-cell *matCellDef="let dict"> {{dict['property']['default']}} </td>
- </ng-container>
- <!-- Velocity Column -->
- <ng-container matColumnDef="Velocity">
- <th mat-header-cell *matHeaderCellDef mat-sort-header> Velocity </th>
- <td mat-cell *matCellDef="let dict">
- <span *ngIf="dict?.property?.metadata">
- {{dict?.property?.metadata['transform-template']}}
- </span>
- <span *ngIf="!dict?.property?.metadata"></span>
- </td>
-
-
-
- </ng-container>
- <!-- Data Type Column -->
- <ng-container matColumnDef="Data Type">
- <th mat-header-cell *matHeaderCellDef mat-sort-header> Data Type </th>
- <td mat-cell *matCellDef="let dict"> {{ dict['property']['type'] }} </td>
- </ng-container>
- <!-- Entry Schema Column -->
- <ng-container matColumnDef="Entry Schema">
- <th mat-header-cell *matHeaderCellDef mat-sort-header> Entry Schema </th>
- <td mat-cell *matCellDef="let dict"> {{dict['property']['entry_schema']}} </td>
- </ng-container>
- <tr mat-header-row *matHeaderRowDef="resColumns"></tr>
- <tr mat-row *matRowDef="let row; columns: resColumns;"></tr>
- <!-- Row shown when there is no matching data. -->
- <tr class="mat-row" *matNoDataRow>
- <td class="mat-cell" colspan="4">No data matching the filter "{{input.value}}"</td>
- </tr>
- </table>
- </div>
- </div>
</div>
</div>
</div>