diff options
author | Ezhilarasi <ezhrajam@in.ibm.com> | 2019-09-16 15:07:28 +0530 |
---|---|---|
committer | Ezhilarasi <ezhrajam@in.ibm.com> | 2019-09-16 15:07:34 +0530 |
commit | c047a7767d3772dc2d1d3bc427696632178d7ecd (patch) | |
tree | 65e62d3b9808e99b532d613e28927155449c3da9 /cds-ui/client/src/app | |
parent | 2419999ae7ab0bc8b555a955d5dfbc9eef9d6f3e (diff) |
Properties mode for editor CBA creation
Change-Id: I6fa5d4456d733fa10d5b42ab887328691e4065e4
Issue-ID: CCSDK-1728
Signed-off-by: Ezhilarasi <ezhrajam@in.ibm.com>
Diffstat (limited to 'cds-ui/client/src/app')
-rw-r--r-- | cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts | 62 |
1 files changed, 32 insertions, 30 deletions
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts index f45ee9e55..9367c0638 100644 --- a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts +++ b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts @@ -249,13 +249,43 @@ export class EditorComponent implements OnInit { } } + setEditorMode() { + switch (this.fileExtension) { + case "xml": + this.mode = 'xml'; + break; + case "py": + this.mode = 'python'; + break; + case "kts": + this.mode = 'kotlin'; + break; + case "kt": + this.mode = 'kotlin'; + break; + case "txt": + this.mode = 'text'; + break; + case "meta": + this.mode = 'text'; + break; + case "vtl": + this.mode = 'velocity'; + break; + case "properties": + this.mode = 'properties'; + break; + default: + this.mode = 'json'; + } + } + getEnriched() { this.create(); this.zipFile.generateAsync({ type: "blob" }) .then(blob => { const formData = new FormData(); formData.append("file", blob); - // this.editorService.enrich("/enrich-blueprint/", formData) this.editorService.enrich(formData) .subscribe( (response) => { @@ -275,8 +305,6 @@ export class EditorComponent implements OnInit { }); } - - saveToBackend() { this.create(); this.zipFile.generateAsync({ type: "blob" }) @@ -345,33 +373,7 @@ export class EditorComponent implements OnInit { this.editorService.downloadCBA("/" + this.artifactName + "/" + this.artifactVersion); } - setEditorMode() { - switch (this.fileExtension) { - case "xml": - this.mode = 'xml'; - break; - case "py": - this.mode = 'python'; - break; - case "kts": - this.mode = 'kotlin'; - break; - case "kt": - this.mode = 'kotlin'; - break; - case "txt": - this.mode = 'text'; - break; - case "meta": - this.mode = 'text'; - break; - case "vtl": - this.mode = 'velocity'; - break; - default: - this.mode = 'json'; - } - } + selectFolder(node) { this.currentFilePath = ''; |