You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ze...@apache.org on 2020/05/22 21:24:33 UTC

[incubator-streampipes] branch STREAMPIPES-79 updated: Fix time selection in data explorer

This is an automated email from the ASF dual-hosted git repository.

zehnder pushed a commit to branch STREAMPIPES-79
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git


The following commit(s) were added to refs/heads/STREAMPIPES-79 by this push:
     new 160bf47  Fix time selection in data explorer
160bf47 is described below

commit 160bf477142acb28f4541a0e3715ec1f0f2d3962
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Fri May 22 23:24:10 2020 +0200

    Fix time selection in data explorer
---
 ui/src/app/core-services/datalake/datalake-rest.service.ts          | 6 +++++-
 .../components/time-selector/timeRangeSelector.component.ts         | 1 +
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/ui/src/app/core-services/datalake/datalake-rest.service.ts b/ui/src/app/core-services/datalake/datalake-rest.service.ts
index 6cc927d..c17ac18 100644
--- a/ui/src/app/core-services/datalake/datalake-rest.service.ts
+++ b/ui/src/app/core-services/datalake/datalake-rest.service.ts
@@ -137,7 +137,11 @@ export class DatalakeRestService {
 
     get_timeseries_labels() {
         // mocked labels
-        const labels = {state: ['online', 'offline', 'active', 'inactive'], trend: ['increasing', 'decreasing'], daytime: ['day', 'night']};
+        const labels = {
+          state: ['online', 'offline', 'active', 'inactive'],
+          coffee: ['coffee', 'coffee special', 'espresso', '2x espresso', 'hot water'],
+          trend: ['increasing', 'decreasing'],
+          daytime: ['day', 'night']};
         return labels;
     }
 
diff --git a/ui/src/app/data-explorer-v2/components/time-selector/timeRangeSelector.component.ts b/ui/src/app/data-explorer-v2/components/time-selector/timeRangeSelector.component.ts
index 2c41be2..123fa78 100644
--- a/ui/src/app/data-explorer-v2/components/time-selector/timeRangeSelector.component.ts
+++ b/ui/src/app/data-explorer-v2/components/time-selector/timeRangeSelector.component.ts
@@ -57,6 +57,7 @@ export class TimeRangeSelectorComponent implements OnInit {
 
   changeCustomDateRange() {
     this.selectedTimeButton =  this.possibleTimeButtons[this.possibleTimeButtons.length - 1];
+    this.dateRange = new DateRange(this.dateRange.startDate, this.dateRange.endDate)
     this.reloadData();
   }