summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEzhilarasi <ezhrajam@in.ibm.com>2019-09-09 17:57:56 +0530
committerBrinda Santh Muthuramalingam <brindasanth@in.ibm.com>2019-09-10 00:29:00 +0000
commite23e6bf1b03fd7573c88dc77885c0ab9bcf1eb25 (patch)
tree102d40473268e5a2e8e8b18895d0d1c8f611c15e
parent85f7fb219f6e1f4227ac1463290f6a6aafc2b84f (diff)
Added mode for kt and create method
Change-Id: I4c1c20077a2da5269724fff12fc456a86b5168f4 Issue-ID: CCSDK-1275 Signed-off-by: Ezhilarasi <ezhrajam@in.ibm.com>
-rw-r--r--cds-ui/client/src/app/common/utility/zipfile-extraction.component.ts12
-rw-r--r--cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts8
2 files changed, 16 insertions, 4 deletions
diff --git a/cds-ui/client/src/app/common/utility/zipfile-extraction.component.ts b/cds-ui/client/src/app/common/utility/zipfile-extraction.component.ts
index fcadee816..279405a6b 100644
--- a/cds-ui/client/src/app/common/utility/zipfile-extraction.component.ts
+++ b/cds-ui/client/src/app/common/utility/zipfile-extraction.component.ts
@@ -39,11 +39,21 @@ export class ZipfileExtractionComponent implements OnInit {
private entryDefinition: string;
validfile: boolean = false;
uploadedFileName: string;
-
+ filesData: any = [];
+
constructor(private loader: LoaderService) { }
ngOnInit() {
}
+
+ create() {
+ this.filesData.forEach((path) => {
+ let index = path.name.indexOf("/");
+ let name = path.name.slice(index + 1, path.name.length);
+ this.zipFile.file(name, path.data);
+ });
+ }
+
async buildFileViewData(zip) {
this.validfile = false;
this.paths = [];
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 08f1ca130..f45ee9e55 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
@@ -244,9 +244,8 @@ export class EditorComponent implements OnInit {
})
this.fileExtension = this.selectedFile.substr(this.selectedFile.lastIndexOf('.') + 1);
this.setEditorMode();
- if(this.options == '3')
- {
- this.editorReadOnly= true;
+ if (this.options == '3') {
+ this.editorReadOnly = true;
}
}
@@ -357,6 +356,9 @@ export class EditorComponent implements OnInit {
case "kts":
this.mode = 'kotlin';
break;
+ case "kt":
+ this.mode = 'kotlin';
+ break;
case "txt":
this.mode = 'text';
break;