open visualization page with settings
This commit is contained in:
@@ -12,8 +12,6 @@
|
||||
|
||||
<div id="filters">
|
||||
<div id="filterpanel">
|
||||
|
||||
|
||||
<mat-form-field class="pdb-form-full-width">
|
||||
<mat-label>Type:</mat-label>
|
||||
<mat-select multiple [(ngModel)]="selectedPlotType" (ngModelChange)="changePlotType($event)">
|
||||
@@ -66,6 +64,13 @@
|
||||
|
||||
|
||||
<div id="plot-button-bar">
|
||||
<a
|
||||
mat-icon-button
|
||||
[routerLink]="['/vis']"
|
||||
[queryParams]="{config: serializedConfig()}"
|
||||
target="_blank"
|
||||
aria-label="open new window with the same search"
|
||||
title="open new window with the same search"><img src="assets/img/link.svg" aria-hidden="true"/></a>
|
||||
<button
|
||||
*ngIf="!enableGallery && !plotJobActive"
|
||||
[disabled]="plotJobActive"
|
||||
|
||||
@@ -67,5 +67,7 @@
|
||||
}
|
||||
|
||||
#plot-button-bar {
|
||||
text-align: right;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
|
||||
@@ -63,6 +63,12 @@ export class VisualizationPageComponent implements OnInit, AfterViewInit {
|
||||
plotJobActive = false;
|
||||
|
||||
constructor(private plotService: PlotService, private snackBar: MatSnackBar) {
|
||||
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
if (!this.defaultConfig && params.get("config")) {
|
||||
const config = JSON.parse(params.get("config")!);
|
||||
this.defaultConfig = config;
|
||||
}
|
||||
}
|
||||
|
||||
showError(message:string) {
|
||||
@@ -248,4 +254,13 @@ toggleGallery(event: Event){
|
||||
);
|
||||
return request;
|
||||
}
|
||||
|
||||
serializedConfig(): string {
|
||||
try{
|
||||
const config = this.createPlotConfig();
|
||||
return JSON.stringify(config);
|
||||
}catch (e) {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1
pdb-js/src/assets/img/launch.svg
Normal file
1
pdb-js/src/assets/img/launch.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"/></svg>
|
||||
|
After Width: | Height: | Size: 268 B |
Reference in New Issue
Block a user