summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/components/inputs-table
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-ui/src/app/ng2/components/inputs-table')
-rw-r--r--catalog-ui/src/app/ng2/components/inputs-table/inputs-table.component.html37
-rw-r--r--catalog-ui/src/app/ng2/components/inputs-table/inputs-table.component.ts33
2 files changed, 70 insertions, 0 deletions
diff --git a/catalog-ui/src/app/ng2/components/inputs-table/inputs-table.component.html b/catalog-ui/src/app/ng2/components/inputs-table/inputs-table.component.html
new file mode 100644
index 0000000000..e7801b82cf
--- /dev/null
+++ b/catalog-ui/src/app/ng2/components/inputs-table/inputs-table.component.html
@@ -0,0 +1,37 @@
+<div class="properties-table">
+ <div class="table-header">
+ <div class="table-cell col1">Property Name</div>
+ <div class="table-cell col2">Type</div>
+ <div class="table-cell col3">ES</div>
+ <div class="table-cell valueCol">Value</div>
+ </div>
+ <div class="table-body">
+ <div class="no-data" *ngIf="!inputs || !inputs.length">No data to display</div>
+ <div class="table-row" *ngFor="let input of inputs">
+ <div class="table-cell col1">
+ <span tooltip="{{input.name}}" >{{input.name}}</span>
+ <span *ngIf="input.description"
+ class="property-description-icon sprite-new show-desc"
+ tooltip="{{input.description}}"></span>
+ </div>
+ <div class="table-cell col2">{{input.type | contentAfterLastDot}}</div>
+ <div class="table-cell col3">{{input.schema && input.schema.property && input.schema.property.type ? (input.schema.property.type | contentAfterLastDot) : ''}}</div>
+ <div class="table-cell valueCol input-value-col" [class.inner-table-container]="input.childrenProperties || !input.isSimpleType">
+ <dynamic-element class="value-input"
+ *ngIf="input.isSimpleType"
+ pattern="validationUtils.getValidationPattern(input.type)"
+ [(value)]="input.defaultValue"
+ [type]="input.type"
+ [name]="input.name"
+ (change)="onInputValueChanged(input);">
+ </dynamic-element>
+ <div class="delete-button-container">
+ <span class="sprite-new delete-btn" (click)="onDeleteInput(input)"></span>
+ </div>
+ </div>
+
+ </div>
+ </div>
+</div>
+
+
diff --git a/catalog-ui/src/app/ng2/components/inputs-table/inputs-table.component.ts b/catalog-ui/src/app/ng2/components/inputs-table/inputs-table.component.ts
new file mode 100644
index 0000000000..ea01edf043
--- /dev/null
+++ b/catalog-ui/src/app/ng2/components/inputs-table/inputs-table.component.ts
@@ -0,0 +1,33 @@
+/**
+ * Created by rc2122 on 5/4/2017.
+ */
+import {Component, Input, Output, EventEmitter} from "@angular/core";
+import {InputFEModel} from "app/models";
+
+@Component({
+ selector: 'inputs-table',
+ templateUrl: './inputs-table.component.html',
+ styleUrls: ['../properties-table/properties-table.component.less']
+})
+export class InputsTableComponent {
+
+ @Input() inputs: Array<InputFEModel>;
+
+ @Output() inputValueChanged: EventEmitter<any> = new EventEmitter<any>();
+ @Output() deleteInput: EventEmitter<any> = new EventEmitter<any>();
+
+ constructor (){
+ }
+
+ onInputValueChanged = (input) => {
+ this.inputValueChanged.emit(input);
+ };
+
+ onDeleteInput = (input) => {
+ this.deleteInput.emit(input);
+ }
+
+
+}
+
+