diff --git a/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.component.html b/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.component.html index 7e639bac6..e805dd05e 100644 --- a/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.component.html +++ b/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.component.html @@ -1,5 +1,5 @@ - + @@ -31,13 +31,26 @@ + + +
Interesting Metadata Goes Here
+
+ +
+ +
+
+ {{ 'NO_POINT_SELECTED' | translate }} +
+
+
+
+ Content 3 +
+ + + +
diff --git a/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.component.ts b/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.component.ts index 4e46fdca3..e587477df 100644 --- a/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.component.ts +++ b/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.component.ts @@ -14,6 +14,7 @@ import { SubSink } from 'subsink'; import { Point} from 'ol/geom'; import { WKT } from 'ol/format'; +import {getPathRange} from '@store/filters'; @Component({ @@ -35,6 +36,8 @@ export class TimeseriesResultsMenuComponent implements OnInit, OnDestroy { public chartCardMaxWidth = '55%'; private minChartWidth = 25.0; + public tsPath: any + public breakpoint: Breakpoints; public breakpoints = Breakpoints; private subs = new SubSink(); @@ -69,10 +72,12 @@ export class TimeseriesResultsMenuComponent implements OnInit, OnDestroy { searchType => this.searchType = searchType ) ); + this.subs.add(this.pointHistoryService.history$.subscribe(history => { this.pointHistory = history; this.mapService.setDisplacementLayer(history); })); + this.subs.add(this.drawService.polygon$.subscribe(polygon => { if(polygon) { let temp = polygon.getGeometry().clone() as Point; @@ -85,6 +90,10 @@ export class TimeseriesResultsMenuComponent implements OnInit, OnDestroy { this.updateChart(temp); } })) + + this.netcdfService.getTimeSeries(getPathRange).pipe(first()).subscribe(data => { + this.tsPath = data; + }); } public onResizeEnd(event: ResizeEvent): void { @@ -121,12 +130,14 @@ export class TimeseriesResultsMenuComponent implements OnInit, OnDestroy { public onOpenHelp(url: string): void { window.open(url); } + public onPointClick(index: number) { this.passDraw = true; var format = new WKT(); - var wktRepresenation = format.writeGeometry(this.pointHistory[index]); - this.mapService.loadPolygonFrom(wktRepresenation.toString()) + var wktRepresentation = format.writeGeometry(this.pointHistory[index]); + this.mapService.loadPolygonFrom(wktRepresentation.toString()) } + public updateChart(geometry): void { this.netcdfService.getTimeSeries(geometry).pipe(first()).subscribe(data => { this.chartData.next(data); diff --git a/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.module.ts b/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.module.ts index f466ef685..f11a8f30f 100644 --- a/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.module.ts +++ b/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.module.ts @@ -16,6 +16,7 @@ import { TimeseriesChartModule } from '@components/timeseries-chart/timeseries-c import { ResizableModule } from 'angular-resizable-element'; import { MatRadioModule } from '@angular/material/radio'; import { PipesModule } from '@pipes'; +import {MatTab, MatTabGroup} from '@angular/material/tabs'; @NgModule({ @@ -36,7 +37,9 @@ import { PipesModule } from '@pipes'; TimeseriesChartModule, ResizableModule, MatRadioModule, - PipesModule + PipesModule, + MatTabGroup, + MatTab ], exports: [ TimeseriesResultsMenuComponent diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 76f7bb633..0665f1792 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -16,6 +16,7 @@ "ADD_ALL_RESULTS_TO_DOWNLOADS": "Add all results to downloads", "ADD_ALL_RESULTS_TO_ON_DEMAND_QUEUE": "Add all results to On Demand queue", "ADD_BEAM_MODE_TO_SEARCH": "Add beam mode to search", + "ADD_BY_PRODUCT_TYPE": "Add by product type", "ADD_FILE_TO_DOWNLOADS": "Add file to downloads", "ADD_FILE_TO_QUEUE": "Add file to queue", "ADD_JOB": "Add job", diff --git a/src/assets/i18n/es.json b/src/assets/i18n/es.json index 2fd96d5cc..8fd5a9eda 100644 --- a/src/assets/i18n/es.json +++ b/src/assets/i18n/es.json @@ -16,6 +16,7 @@ "ADD_ALL_RESULTS_TO_DOWNLOADS": "Agregar todos los resultados a las descargas", "ADD_ALL_RESULTS_TO_ON_DEMAND_QUEUE": "Agregar todos los resultados a la lista de On Demand", "ADD_BEAM_MODE_TO_SEARCH": "Agregar modo de haz para buscar", + "ADD_BY_PRODUCT_TYPE": "AƱadir por tipo de producto", "ADD_FILE_TO_DOWNLOADS": "Agregar archivo a las descargas", "ADD_FILE_TO_QUEUE": "Agregar archivo a la lista", "ADD_JOB": "Agregar trabajo",