diff --git a/package.json b/package.json index 8faee773bfed71ce30d91632abd1f7be4f2eceb1..4d72c6409a96a9ac18033a711986b58753ccb5ab 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@ngrx/store": "^9.1.1", "@types/node": "12.12.39", "export-nehuba": "0.0.2", - "hbp-connectivity-component": "^0.3.3", + "hbp-connectivity-component": "^0.3.5", "zone.js": "^0.10.2" } } diff --git a/src/ui/connectivityBrowser/connectivityBrowser.component.ts b/src/ui/connectivityBrowser/connectivityBrowser.component.ts index 1b8d45857f19bdfeed417f2390d160357a56ca3f..ed930b686cc5796da8146b22cde3871f3a527ceb 100644 --- a/src/ui/connectivityBrowser/connectivityBrowser.component.ts +++ b/src/ui/connectivityBrowser/connectivityBrowser.component.ts @@ -44,7 +44,7 @@ export class ConnectivityBrowserComponent implements AfterViewInit, OnDestroy, A } @ViewChild('connectivityComponent', {read: ElementRef}) public connectivityComponentElement: ElementRef<HTMLHbpConnectivityMatrixRowElement> - + @ViewChild('fullConnectivityGrid') public fullConnectivityGridElement: ElementRef<HTMLFullConnectivityGridElement> @Output() public closeConnectivity: EventEmitter<boolean> = new EventEmitter() @Output() public connectedAreaCount: EventEmitter<number> = new EventEmitter() @@ -248,6 +248,10 @@ export class ConnectivityBrowserComponent implements AfterViewInit, OnDestroy, A } } + public exportFullConnectivity() { + this.fullConnectivityGridElement.nativeElement['downloadCSV']() + } + } function getWindow(): any { diff --git a/src/ui/connectivityBrowser/connectivityBrowser.template.html b/src/ui/connectivityBrowser/connectivityBrowser.template.html index 9f626cf3207340f3a1622d5d36fa75fd43f30c08..5cce4d81ad5eddc5973a63570d0b72d40d4a7b96 100644 --- a/src/ui/connectivityBrowser/connectivityBrowser.template.html +++ b/src/ui/connectivityBrowser/connectivityBrowser.template.html @@ -1,5 +1,6 @@ -<div class="w-100 h-100 d-block d-flex flex-column pb-2" #connectivityComponent> +<div class="w-100 h-100 d-block d-flex flex-column pb-2"> <hbp-connectivity-matrix-row + #connectivityComponent *ngIf="region" [region]="region" theme="dark" @@ -41,6 +42,12 @@ [iav-dataset-show-dataset-dialog-description]="selectedDataset.description"> <i class="fas fa-info"></i> </button> + <button class="flex-grow-0 flex-shrink-0" + mat-icon-button + (click)="exportFullConnectivity()" + matTooltip="Export full connectivity profile"> + <i class="fas fa-download"></i> + </button> </ng-container> </div> @@ -67,4 +74,8 @@ </div> </div> </hbp-connectivity-matrix-row> + <full-connectivity-grid #fullConnectivityGrid + dataset-url="https://connectivityquery-connectivity.apps-dev.hbp.eu/studies" + onlyExport="true"> + </full-connectivity-grid> </div> \ No newline at end of file