aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/package-list/package-list.component.html8
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/package-list/package-list.component.ts21
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.store.ts2
3 files changed, 21 insertions, 10 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/package-list/package-list.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/package-list/package-list.component.html
index 91c7f5b96..9db3ce110 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/package-list/package-list.component.html
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/package-list/package-list.component.html
@@ -30,7 +30,7 @@
<!-- <img class="icon-deployed" src="/assets/img/icon-deploy.svg"> -->
<p class="packageName" tooltip="{{bluePrint.artifactName}}" placement="bottom">
{{bluePrint.artifactName}}</p>
- <span class="package-version">V 1.0.2</span>
+ <span class="package-version">{{bluePrint.artifactVersion}}</span>
</a>
</div>
@@ -55,7 +55,7 @@
</a>
</li>
<li class="action-archive">
- <a href="#">
+ <a (click)="downloadPackage(bluePrint.artifactName,bluePrint.artifactVersion)">
<i class="icon-download" aria-hidden="true"></i>
Download
</a>
@@ -75,7 +75,7 @@
<div class="col">
<p class="mb-0 mt-1">Last modified {{ bluePrint.createdDate | date:'short' }}
</p>
- <p class="mb-2">By {{bluePrint.updatedBy}}</p>
+<!-- <p class="mb-2">By {{bluePrint.updatedBy}}</p>-->
<p class="package-desc" [delay]="300"
tooltip="DESCRIPTION:
The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from de Finibus Bonorum et Malorum by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham."
@@ -122,4 +122,4 @@
</div>
</div>
-</div> \ No newline at end of file
+</div>
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/package-list/package-list.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/package-list/package-list.component.ts
index b7bc05ff9..352f33b91 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/package-list/package-list.component.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/package-list/package-list.component.ts
@@ -1,7 +1,9 @@
-import { Component, OnInit } from '@angular/core';
-import { BlueprintModel } from '../../model/BluePrint.model';
-import { PackagesStore } from '../../packages.store';
-import { Router } from '@angular/router';
+import {Component, OnInit} from '@angular/core';
+import {BlueprintModel} from '../../model/BluePrint.model';
+import {PackagesStore} from '../../packages.store';
+import {Router} from '@angular/router';
+import {ConfigurationDashboardService} from '../../configuration-dashboard/configuration-dashboard.service';
+import {saveAs} from 'file-saver';
@Component({
selector: 'app-packages-list',
@@ -13,7 +15,8 @@ export class PackageListComponent implements OnInit {
viewedPackages: BlueprintModel[] = [];
- constructor(private packagesStore: PackagesStore, private router: Router) {
+ constructor(private packagesStore: PackagesStore, private router: Router
+ , private configurationDashboardService: ConfigurationDashboardService) {
console.log('PackageListComponent');
this.packagesStore.state$.subscribe(state => {
console.log(state);
@@ -30,7 +33,15 @@ export class PackageListComponent implements OnInit {
view(id) {
this.router.navigate(['/packages/package', id]);
}
+
testDispatch(bluePrint: BlueprintModel) {
console.log(bluePrint.id);
}
+
+ downloadPackage(artifactName: string, artifactVersion: string) {
+ this.configurationDashboardService.downloadResource(artifactName + '/' + artifactVersion).subscribe(response => {
+ const blob = new Blob([response], {type: 'application/octet-stream'});
+ saveAs(blob, artifactName + '-' + artifactVersion + '-CBA.zip');
+ });
+ }
}
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.store.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.store.ts
index b1f730f06..863adfbd7 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.store.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.store.ts
@@ -31,7 +31,7 @@ import {Observable, of} from 'rxjs';
})
export class PackagesStore extends Store<PackagesDashboardState> {
// TDOD fixed for now as there is no requirement to change it from UI
- public pageSize = 5;
+ public pageSize = 15;
private bluePrintContent: BluePrintPage = new BluePrintPage();
constructor(private packagesServiceList: PackagesApiService) {