summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/components
diff options
context:
space:
mode:
authorKrupaNagabhushan <krupa.nagabhushan@est.tech>2020-11-19 14:28:00 +0000
committerChristophe Closset <christophe.closset@intl.att.com>2021-01-14 13:56:39 +0000
commit3849231a17930b1bb2ba09af15673bfd07538b9d (patch)
tree9ca26d4457093bbb30924d6731b5615e795ed238 /catalog-ui/src/app/ng2/components
parent0d38c9a8ed4701b860901f67049920e9b1ca72f2 (diff)
Create inputs independent of properties
Issue-ID: SDC-3431 Signed-off-by: KrupaNagabhushan <krupa.nagabhushan@est.tech> Change-Id: I4f29d0e490a14292fd1aa9f96ca6621b37f325d8
Diffstat (limited to 'catalog-ui/src/app/ng2/components')
-rw-r--r--catalog-ui/src/app/ng2/components/logic/inputs-table/inputs-table.component.html6
-rw-r--r--catalog-ui/src/app/ng2/components/logic/inputs-table/inputs-table.component.less3
-rw-r--r--catalog-ui/src/app/ng2/components/logic/inputs-table/inputs-table.component.ts12
3 files changed, 11 insertions, 10 deletions
diff --git a/catalog-ui/src/app/ng2/components/logic/inputs-table/inputs-table.component.html b/catalog-ui/src/app/ng2/components/logic/inputs-table/inputs-table.component.html
index ee090245f0..e1638fb00f 100644
--- a/catalog-ui/src/app/ng2/components/logic/inputs-table/inputs-table.component.html
+++ b/catalog-ui/src/app/ng2/components/logic/inputs-table/inputs-table.component.html
@@ -49,6 +49,9 @@
<span *ngIf="input.description"
class="property-description-icon sprite-new show-desc"
tooltip="{{input.description}}" tooltipDelay="0"></span>
+ <div class="delete-button-container">
+ <span *ngIf="showDelete" class="sprite-new delete-btn" (click)="openDeleteModal(input)" data-tests-id="delete-input-button"></span>
+ </div>
</div>
<!-- From Instance -->
<div class="table-cell col3">
@@ -124,9 +127,6 @@
[testId]="'input-' + input.name"
[constraints] = "getConstraints(input)">
</dynamic-element>
- <div class="delete-button-container">
- <span *ngIf="input.instanceUniqueId && !readonly" class="sprite-new delete-btn" (click)="openDeleteModal(input)" data-tests-id="delete-input-button"></span>
- </div>
</div>
</div>
</div>
diff --git a/catalog-ui/src/app/ng2/components/logic/inputs-table/inputs-table.component.less b/catalog-ui/src/app/ng2/components/logic/inputs-table/inputs-table.component.less
index 74520b6314..ae6d58e72e 100644
--- a/catalog-ui/src/app/ng2/components/logic/inputs-table/inputs-table.component.less
+++ b/catalog-ui/src/app/ng2/components/logic/inputs-table/inputs-table.component.less
@@ -182,7 +182,8 @@
// Column: Property Name
&.col1 {
flex: 1 0 130px;
- max-width: 250px;
+ max-width: 300px;
+ display: flex;
justify-content: space-between;
diff --git a/catalog-ui/src/app/ng2/components/logic/inputs-table/inputs-table.component.ts b/catalog-ui/src/app/ng2/components/logic/inputs-table/inputs-table.component.ts
index 3fa7ab4a80..5ca119c075 100644
--- a/catalog-ui/src/app/ng2/components/logic/inputs-table/inputs-table.component.ts
+++ b/catalog-ui/src/app/ng2/components/logic/inputs-table/inputs-table.component.ts
@@ -43,14 +43,14 @@ export class InputsTableComponent {
@Input() readonly: boolean;
@Input() isLoading: boolean;
@Input() componentType: string;
-
+ @Input() showDelete:boolean;
@Output() inputChanged: EventEmitter<any> = new EventEmitter<any>();
@Output() deleteInput: EventEmitter<any> = new EventEmitter<any>();
@Input() fePropertiesMap: InstanceFePropertiesMap;
@ViewChildren('metadataViewChildren') public metadataViewChildren: QueryList<DynamicElementComponent>;
-
+
sortBy: String;
reverse: boolean;
selectedInputToDelete: InputFEModel;
@@ -107,15 +107,15 @@ export class InputsTableComponent {
var mapKeyError = input.metadataMapKeyError;
if(input.metadataMapKeyError){
dynamicElementComponent.cmpRef.instance.control.setErrors({mapKeyError});
- }
+ }
};
onMetadataValueChanged = (input: InputFEModel, event, metadataEntry: MetadataEntry) => {
input.updateMetadataValue(metadataEntry, event.value);
this.inputChanged.emit(input);
};
-
-
+
+
createNewMetadataEntry = (input: InputFEModel): void => {
let metadataEntry = new MetadataEntry("", "");
input.addMetadataEntry(metadataEntry);
@@ -126,7 +126,7 @@ export class InputsTableComponent {
input.deleteMetadataEntry(metadataEntry);
this.inputChanged.emit(input);
}
-
+
onDeleteInput = () => {
this.deleteInput.emit(this.selectedInputToDelete);
this.modalService.closeCurrentModal();