summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/components/properties-table
diff options
context:
space:
mode:
authorTal Gitelman <tg851x@intl.att.com>2017-07-03 20:16:55 +0300
committerTal Gitelman <tg851x@intl.att.com>2017-07-03 20:16:55 +0300
commit153a35821f0d25ce23cca467b76c5a7c5092c744 (patch)
tree0c66c4d1310019479e446ea3a4c26faffb0aa33f /catalog-ui/src/app/ng2/components/properties-table
parentffdda7d685029d6a88ac82ac637e43bba96423cb (diff)
[sdc] - last merges before moving to LF
Change-Id: I0df3ec795f0de84229ea4bb4806ec8f959243557 Signed-off-by: Tal Gitelman <tg851x@intl.att.com>
Diffstat (limited to 'catalog-ui/src/app/ng2/components/properties-table')
-rw-r--r--catalog-ui/src/app/ng2/components/properties-table/dynamic-property/dynamic-property.component.html2
-rw-r--r--catalog-ui/src/app/ng2/components/properties-table/properties-table.component.html12
-rw-r--r--catalog-ui/src/app/ng2/components/properties-table/properties-table.component.ts14
3 files changed, 8 insertions, 20 deletions
diff --git a/catalog-ui/src/app/ng2/components/properties-table/dynamic-property/dynamic-property.component.html b/catalog-ui/src/app/ng2/components/properties-table/dynamic-property/dynamic-property.component.html
index 5aa0052cc3..92948b3b0d 100644
--- a/catalog-ui/src/app/ng2/components/properties-table/dynamic-property/dynamic-property.component.html
+++ b/catalog-ui/src/app/ng2/components/properties-table/dynamic-property/dynamic-property.component.html
@@ -38,7 +38,7 @@
<ng-container *ngIf="!property.isDeclared">
<a *ngIf="(propType == derivedPropertyTypes.LIST || propType == derivedPropertyTypes.MAP) && !property.isChildOfListOrMap" class="property-icon add-item" (click)="createNewChildProperty();" [ngClass]="{'disabled':readonly}">Add value to list</a>
<span *ngIf="property.isChildOfListOrMap" (click)="deleteItem.emit(property);" class="property-icon sprite-new delete-item-icon" [ngClass]="{'disabled':readonly}"></span>
- <span *ngIf="!isPropertyFEModel && (propType == derivedPropertyTypes.COMPLEX || ((propType == derivedPropertyTypes.LIST || propType == derivedPropertyTypes.MAP) && hasChildren()))" (click)="expandChildById(propPath)" class="property-icon sprite-new round-expand-icon" [class.open]="propPath == expandedChildId"></span>
+ <span *ngIf="!isPropertyFEModel && (propType == derivedPropertyTypes.COMPLEX || ((propType == derivedPropertyTypes.LIST || propType == derivedPropertyTypes.MAP) && hasChildren()))" (click)="expandChildById(propPath)" class="property-icon sprite-new round-expand-icon" [class.open]="expandedChildId.indexOf(propPath) == 0"></span>
</ng-container>
</div>
diff --git a/catalog-ui/src/app/ng2/components/properties-table/properties-table.component.html b/catalog-ui/src/app/ng2/components/properties-table/properties-table.component.html
index f3259ab3a2..c57998af5e 100644
--- a/catalog-ui/src/app/ng2/components/properties-table/properties-table.component.html
+++ b/catalog-ui/src/app/ng2/components/properties-table/properties-table.component.html
@@ -7,14 +7,14 @@
<div class="table-cell valueCol">Value</div>
</div>
<div class="table-body">
- <div class="no-data" *ngIf="!feInstancesNames || !feInstancesNames.length">No data to display</div>
+ <div class="no-data" *ngIf="!fePropertiesMap || !(fePropertiesMap | keys).length">No data to display</div>
- <ng-container *ngFor="let instanceName of feInstancesNames; trackBy:instanceName">
- <div class="table-rows-header white-sub-header">{{instanceName | contentAfterLastDot}}</div>
+ <ng-container *ngFor="let instanceId of fePropertiesMap | keys; trackBy:instanceId">
+ <div class="table-rows-header white-sub-header">{{feInstanceNamesMap[instanceId]}}</div>
<div class="table-row"
- *ngFor="let property of fePropertiesMap[instanceName] | searchFilter:'name':searchTerm; trackBy:property?.name"
- (click)="onClickPropertyRow(property, instanceName, $event)"
+ *ngFor="let property of fePropertiesMap[instanceId] | searchFilter:'name':searchTerm; trackBy:property?.name"
+ (click)="onClickPropertyRow(property, instanceId, $event)"
[ngClass]="{'selected': selectedPropertyId && selectedPropertyId === property.name }">
<div class="table-cell col1" [ngClass]="{'filtered':property.name === propertyNameSearchText}" [class.round-checkbox]="property.isDeclared">
@@ -49,7 +49,7 @@
[readonly]="readonly"
(valueChanged)="propValueChanged(property);"
(expandChild)="property.updateExpandedChildPropertyId($event)"
- (clickOnPropertyRow)="onClickPropertyInnerRow($event, instanceName)"
+ (clickOnPropertyRow)="onClickPropertyInnerRow($event, instanceId)"
(checkProperty)="propertyChecked(property, $event)"
>
</dynamic-property>
diff --git a/catalog-ui/src/app/ng2/components/properties-table/properties-table.component.ts b/catalog-ui/src/app/ng2/components/properties-table/properties-table.component.ts
index 463de4f018..f1721c0708 100644
--- a/catalog-ui/src/app/ng2/components/properties-table/properties-table.component.ts
+++ b/catalog-ui/src/app/ng2/components/properties-table/properties-table.component.ts
@@ -12,6 +12,7 @@ import { KeysPipe } from 'app/ng2/pipes/keys.pipe';
export class PropertiesTableComponent {
@Input() fePropertiesMap: InstanceFePropertiesMap;
+ @Input() feInstanceNamesMap: Map<string, string>;
@Input() selectedPropertyId: string;
@Input() displayDeleteButton: boolean;
@Input() propertyNameSearchText:string;
@@ -24,23 +25,10 @@ export class PropertiesTableComponent {
@Output() updateCheckedPropertyCount: EventEmitter<boolean> = new EventEmitter<boolean>();
//@Output() selectInstanceRow: EventEmitter<string> = new EventEmitter<string>();
- feInstancesNames: Array<string>;
constructor ( private propertiesService:PropertiesService ){
}
- /**
- * Update feInstancesNames when fePropertiesMap: InstanceFePropertiesMap change (after getting response from server)
- */
- ngOnChanges(changes: SimpleChanges) {
- if (changes['fePropertiesMap']) {
- if (changes['fePropertiesMap'].currentValue) {
- let keysPipe = new KeysPipe();
- let fiteredArr = keysPipe.transform(changes['fePropertiesMap'].currentValue,[]);
- this.feInstancesNames = fiteredArr;
- }
- }
- }
propValueChanged = (property) => {
!property.isDeclared && this.valueChanged.emit(property);