summaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/package.store.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/package.store.ts')
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/package.store.ts56
1 files changed, 8 insertions, 48 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/package.store.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/package.store.ts
index 4669ef12d..49de59e62 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/package.store.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/package.store.ts
@@ -19,11 +19,11 @@ limitations under the License.
============LICENSE_END============================================
*/
-import { Injectable } from '@angular/core';
-import { Store } from '../../../../common/core/stores/Store';
-import { ConfigurationDashboardService } from './configuration-dashboard.service';
-import { PackageDashboardState } from '../model/package-dashboard.state';
-import { BlueprintURLs } from '../../../../common/constants/app-constants';
+import {Injectable} from '@angular/core';
+import {Store} from '../../../../common/core/stores/Store';
+import {ConfigurationDashboardService} from './configuration-dashboard.service';
+import {PackageDashboardState} from '../model/package-dashboard.state';
+import {BlueprintURLs} from '../../../../common/constants/app-constants';
import * as JSZip from 'jszip';
@Injectable({
@@ -37,53 +37,13 @@ export class PackageStore extends Store<PackageDashboardState> {
super(new PackageDashboardState());
}
- getPagedPackages(id: string) {
+ /* getPagedPackages(id: string) {
return this.configurationDashboardService.getBluePrintModel(id);
}
public downloadResource(path: string) {
- console.log('download resource xx');
- this.configurationDashboardService.downloadResource(BlueprintURLs.download + path).subscribe(response => {
- console.log('try to download ');
- const blob = new Blob([response], { type: 'application/octet-stream' });
- this.zipFile.loadAsync(blob).then((zip) => {
- Object.keys(zip.files).forEach((filename) => {
- console.log(filename);
- zip.files[filename].async('string').then((fileData) => {
- if (fileData) {
- if (filename.includes('Scripts/')) {
- this.setScripts(filename, fileData);
- } else if (filename.includes('templates/')) {
- this.setTemplates(filename, fileData);
- } else if (filename.includes('definitions/')) {
- this.setImports(filename, fileData);
- }
- }
- });
- });
- });
- });
- }
-
- setConfiguration(bluePrintDetailModels) {
- this.setState({
- ...this.state,
- configuration: bluePrintDetailModels[0]
- });
- }
-
- private setScripts(filename: string, fileData: any) {
- this.setState({
- ...this.state,
- scripts: this.state.scripts.setScripts(filename, fileData)
- });
- }
+ return this.configurationDashboardService.downloadResource(BlueprintURLs.download + path);
+ }*/
- private setImports(filename: string, fileData: any) {
- }
-
- private setTemplates(filename: string, fileData: any) {
-
- }
}