aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSwapnali Shadanan Pode <sp00501638@techmahindra.com>2019-03-04 12:31:36 +0530
committerSwapnali Shadanan Pode <sp00501638@techmahindra.com>2019-03-04 12:37:02 +0530
commit624fdecc0645103238cb98eee09dcca573387b35 (patch)
treeb4f616ccb3ab58d7a735ceb662db62b5fb01cd55
parent4f459295af885168c804bd5d250d2cceca2940cb (diff)
adding changes in resource-metadata
Change-Id: I458bd8f35cd6357fd0e888532ecf80f418b29deb Issue-ID: CCSDK-807 Signed-off-by: sp00501638 <sp00501638@techmahindra.com>
-rw-r--r--cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-metadata/resource-metadata.component.html16
-rw-r--r--cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-metadata/resource-metadata.component.ts22
2 files changed, 16 insertions, 22 deletions
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-metadata/resource-metadata.component.html b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-metadata/resource-metadata.component.html
index 2ee660fbd..3ad578d36 100644
--- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-metadata/resource-metadata.component.html
+++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-metadata/resource-metadata.component.html
@@ -25,15 +25,21 @@
<input matInput placeholder="Tags" formControlName="_tags">
</mat-form-field>
<mat-form-field class="form-field">
- <input matInput placeholder="Data Type" formControlName="_type">
+ <mat-select matInput placeholder="Data Type" formControlName="_type">
+ <mat-option value="string">string</mat-option>
+ <mat-option value="string">list</mat-option>
+ </mat-select>
</mat-form-field>
- <mat-form-field class="form-field" >
- <textarea matInput placeholder="Description" formControlName="_description"></textarea>
+ <mat-form-field class="form-field" >
+ <input matInput placeholder="entry_schema" formControlName="entry_schema">
</mat-form-field>
<mat-form-field class="form-field" >
- <input matInput placeholder="required" formControlName="_required">
+ <mat-select placeholder="required" formControlName="_required">
+ <mat-option value="true">true</mat-option>
+ <mat-option value="false">false</mat-option>
+ </mat-select>
</mat-form-field>
<mat-form-field class="form-field" >
- <input matInput placeholder="entry_schema" formControlName="entry_schema">
+ <textarea matInput placeholder="Description" formControlName="_description"></textarea>
</mat-form-field>
</form> \ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-metadata/resource-metadata.component.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-metadata/resource-metadata.component.ts
index bc309f4f8..f44c9b0d1 100644
--- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-metadata/resource-metadata.component.ts
+++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-metadata/resource-metadata.component.ts
@@ -20,7 +20,6 @@
import { Component, OnInit } from '@angular/core';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
-import sample_licenses from '../../../../../assets/sample-licenses.json';
@Component({
selector: 'app-resource-metadata',
@@ -30,28 +29,17 @@ import sample_licenses from '../../../../../assets/sample-licenses.json';
export class ResourceMetadataComponent implements OnInit {
ResourceMetadata: FormGroup;
- data=sample_licenses;
constructor(private _formBuilder: FormBuilder) {
this.ResourceMetadata = this._formBuilder.group({
Resource_Name: ['', Validators.required],
_tags: ['', Validators.required],
_description : ['', Validators.required],
- _type: ['', Validators.required],
- _required: ['', Validators.required],
- entry_schema: ['', Validators.required]
- });
+ _type: ['string', Validators.required],
+ _required: ['false', Validators.required],
+ entry_schema: ['']
+ });
}
- ngOnInit() {
- this.ResourceMetadata = this._formBuilder.group({
- Resource_Name: [this.data["name"], Validators.required],
- _tags: [this.data["tags"], Validators.required],
- _required : [this.data["property"]["required"], Validators.required],
- _description : [this.data["property"]["description"], Validators.required],
- _type: [this.data["property"]["type"], Validators.required],
- entry_schema: [this.data["property"]["entry_schema"]["type"], Validators.required]
- });
-
- }
+ ngOnInit() {}
}