This repository has been archived by the owner on Nov 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Various Improvements to Export to FireCloud (#8)
#6 DataBiosphere/dcc-dashboard-service#12 * While exporting, change label of "Export" button to "Exporting..." * Don't use ngrx for the export to FireCloud dialog, since application state is not being changed. This simplifies the code, although we may want to revisit this decision. * Noticed that 401 with FC causes a text/html response to be returned, so add some safeguards for that. * Display existing workspaces in UI. As part of that, need to not only display your namespaces/billing projects, but also the namespaces/billing projects of workspaces that have been shared with you. * Dialog now makes clear whether you are creating a new workspace or exporting to an existing workspace (although the new workspace case should check that it is new). * Add launch icon * Show DOS URI instead of File Id. * Retry up to 5 times in the calls to FireCloud API to fetch workspace and namespaces, as we have sometimes random failures.
- Loading branch information
Showing
18 changed files
with
209 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 0 additions & 27 deletions
27
spa/src/app/files/_ngrx/file-export/file-export.actions.ts
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
spa/src/app/files/_ngrx/file-export/file-export.reducer.ts
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,33 @@ | ||
<h1 mat-dialog-title>Export to FireCloud</h1> | ||
<div mat-dialog-content> | ||
<mat-progress-bar mode="indeterminate" *ngIf="exporting"></mat-progress-bar> | ||
<p *ngIf="exported">The selected files were exported to the FireCloud <a [href]="firecloudUrl" target="_blank">{{data.workspace}} workspace.</a></p> | ||
<p *ngIf="exported">The selected files were exported to the FireCloud <a [href]="firecloudUrl" target="_blank">{{data.workspace}} workspace. <mat-icon style="font-size: 16px;">launch</mat-icon></a></p> | ||
<p *ngIf="errorMessage">There was an error exporting to FireCloud: {{errorMessage}}</p> | ||
<div *ngIf="!exported && !errorMessage"> | ||
<p>Export the selected facets into a new FireCloud workspace.</p> | ||
<p>Export the selected facets into a FireCloud workspace.</p> | ||
<div class="column-flex"> | ||
<mat-form-field> | ||
<input matInput [(ngModel)]="data.workspace" placeholder="Workspace name" required autofocus [disabled]="exporting"> | ||
<mat-select placeholder="Billing project" [(value)]="data.namespace" [disabled]="exporting" required (change)="onBillingProjectChanged($event)"> | ||
<mat-option *ngFor="let namespace of billingProjects" [value]="namespace">{{namespace}}</mat-option> | ||
</mat-select> | ||
</mat-form-field> | ||
<mat-form-field> | ||
<mat-select placeholder="Billing project" [(value)]="data.namespace" [disabled]="exporting" required> | ||
<mat-option *ngFor="let namespace of data.namespaces" [value]="namespace">{{namespace}}</mat-option> | ||
<mat-radio-group [(ngModel)]="workspaceType" (change)="onWorkspaceTypeChanged($event)"> | ||
<mat-radio-button value="new" [disabled]="!canCreateWorkspace">New workspace</mat-radio-button> | ||
<mat-radio-button value="existing">Existing workspace</mat-radio-button> | ||
</mat-radio-group> | ||
<mat-form-field *ngIf="workspaceType === 'new'"> | ||
<input matInput [(ngModel)]="data.workspace" placeholder="Workspace" required autofocus [disabled]="exporting"> | ||
</mat-form-field> | ||
<mat-form-field *ngIf="workspaceType === 'existing'"> | ||
<mat-select placeholder="Workspace" [disabled]="exporting" [(value)]="data.workspace" required> | ||
<mat-option *ngFor="let workspace of filteredWorkspaces" [value]="workspace.workspace.name">{{workspace.workspace.name}}</mat-option> | ||
</mat-select> | ||
</mat-form-field> | ||
</div> | ||
</div> | ||
</div> | ||
<div mat-dialog-actions align="end"> | ||
<button mat-button (click)="onClose()" *ngIf="!exported && !errorMessage">Cancel</button> | ||
<button mat-button (click)="onExport()" *ngIf="!exported && !errorMessage" [disabled]="exporting || !data.workspace">Export</button> | ||
<button mat-button (click)="onExport()" *ngIf="!exported && !errorMessage" [disabled]="exporting || !data.workspace">{{exporting ? 'Exporting...' : 'Export'}}</button> | ||
<button mat-button (click)="onClose()" *ngIf="exported || errorMessage">Close</button> | ||
</div> |
Oops, something went wrong.