This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
The following commit(s) were added to refs/heads/dev by this push:
new 2006d3c Fix persisting of labels in data explorer
2006d3c is described below
commit 2006d3cd0ede1eec67ed956e453d3b819e6cf0a9
Author: Philipp Zehnder <[email protected]>
AuthorDate: Sun Jul 26 22:27:32 2020 +0200
Fix persisting of labels in data explorer
---
.../components/widgets/line-chart/line-chart-widget.component.ts | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
a/ui/src/app/data-explorer/components/widgets/line-chart/line-chart-widget.component.ts
b/ui/src/app/data-explorer/components/widgets/line-chart/line-chart-widget.component.ts
index 94d7b93..9ee9e94 100644
---
a/ui/src/app/data-explorer/components/widgets/line-chart/line-chart-widget.component.ts
+++
b/ui/src/app/data-explorer/components/widgets/line-chart/line-chart-widget.component.ts
@@ -149,7 +149,7 @@ export class LineChartWidgetComponent extends
BaseDataExplorerWidget implements
// Reduce selected columns when more then 6
this.selectedColumns = this.availableColumns.length > 6 ?
this.availableColumns.slice(0, 5) : this.availableColumns;
if (this.availableNonNumericColumns.length > 0) {
- this.selectedNonNumericColumn = this.availableNonNumericColumns[0];
+ // this.selectedNonNumericColumn = this.availableNonNumericColumns[0];
}
this.xKey =
this.getTimestampProperty(this.dataExplorerWidget.dataLakeMeasure.eventSchema).runtimeName;
this.yKeys = this.getRuntimeNames(this.selectedColumns);
@@ -553,6 +553,9 @@ export class LineChartWidgetComponent extends
BaseDataExplorerWidget implements
private saveLabelsInDatabase(label, start_X, end_X) {
const startdate = new Date(start_X).getTime() - 1;
const enddate = new Date(end_X).getTime() + 1;
+ if (this.nonNumericKey === undefined) {
+ this.nonNumericKey = 'sp_internal_label';
+ }
this.dataLakeRestService.saveLabelsInDatabase(this.data['measureName'],
this.nonNumericKey, startdate, enddate, label).subscribe(
res => {
// console.log('Successfully wrote label ' + currentLabel + '
into database.');