From 40afc348e163ec86325a6b7a80ceb46a4db757e5 Mon Sep 17 00:00:00 2001 From: VLE2FE Date: Tue, 11 Aug 2020 16:25:09 +0200 Subject: [PATCH 1/2] added condition checkbox in JSON download link dialog --- src/app/samples/samples.component.html | 5 ++++- src/app/samples/samples.component.ts | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/app/samples/samples.component.html b/src/app/samples/samples.component.html index 224fc8c..5c6acf2 100644 --- a/src/app/samples/samples.component.html +++ b/src/app/samples/samples.component.html @@ -111,7 +111,10 @@ add spectra - + + add conditions + + flatten object Copy to clipboard diff --git a/src/app/samples/samples.component.ts b/src/app/samples/samples.component.ts index 03266c6..db184fe 100644 --- a/src/app/samples/samples.component.ts +++ b/src/app/samples/samples.component.ts @@ -34,7 +34,8 @@ export class SamplesComponent implements OnInit { @ViewChild('pageSizeSelection') pageSizeSelection: ElementRef; @ViewChild('linkarea') linkarea: ElementRef; - downloadSpectra = false; + downloadSpectra = false; // TODO: streamline these options after csv option handling is clear + downloadCondition = false; downloadFlatten = true; samples: SampleModel[] = []; totalSamples = 0; // total number of samples @@ -236,6 +237,9 @@ export class SamplesComponent implements OnInit { if (this.downloadSpectra) { query.push('fields[]=measurements.spectrum.dpt'); } + if (this.downloadCondition) { + query.push('fields[]=condition'); + } } return (options.host && isDevMode() ? window.location.host : '') + (options.export ? this.api.hostName : '') + From 638868875b1c88965d4d6d92fc70cbfd70794d32 Mon Sep 17 00:00:00 2001 From: VLE2FE Date: Tue, 11 Aug 2020 17:08:47 +0200 Subject: [PATCH 2/2] to the top button --- src/app/app.component.html | 12 +++++++++--- src/app/app.component.scss | 18 ++++++++++++++++++ src/app/app.component.ts | 4 ++++ src/app/samples/samples.component.scss | 1 + src/styles.scss | 4 ++++ 5 files changed, 36 insertions(+), 3 deletions(-) diff --git a/src/app/app.component.html b/src/app/app.component.html index 96aed3a..59d68bc 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,4 +1,4 @@ - +