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/03/03 09:26:35 UTC
[incubator-streampipes] branch STREAMPIPES-79 updated: Add a second
widget type for a line chart
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 1015386 Add a second widget type for a line chart
1015386 is described below
commit 1015386ebf896b33a67d12e443e93ffee78153f1
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Tue Mar 3 10:19:06 2020 +0100
Add a second widget type for a line chart
---
.../model/dashboard/DashboardWidgetModel.java | 3 ++
.../model/datalake/DataExplorerWidgetModel.java | 11 ++++
.../apache/streampipes/vocabulary/StreamPipes.java | 1 +
.../core-model/datalake/DataExplorerWidgetModel.ts | 3 ++
ui/src/app/dashboard-v2/models/dashboard.model.ts | 1 +
.../data-explorer-dashboard-panel.component.ts | 2 +-
.../time-selector/timeRangeSelector.component.ts | 4 +-
.../data-explorer-dashboard-widget.component.html | 12 +++--
.../widgets/line-chart/line-chart-config.ts} | 36 ++++++--------
.../line-chart/line-chart-widget.component.css} | 32 ++++++------
.../line-chart/line-chart-widget.component.html | 26 ++++++++++
.../line-chart/line-chart-widget.component.ts | 58 ++++++++++++++++++++++
.../data-explorer-v2.component.html | 2 +-
.../data-explorer-v2/data-explorer-v2.component.ts | 5 ++
.../data-explorer-v2/data-explorer-v2.module.ts | 13 ++---
...-explorer-add-visualization-dialog.component.ts | 1 +
.../models/dataview-dashboard.model.ts | 1 +
.../registry/data-explorer-widget-registry.ts | 2 +-
.../time-selector/timeRangeSelector.component.ts | 2 +-
19 files changed, 162 insertions(+), 53 deletions(-)
diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/dashboard/DashboardWidgetModel.java b/streampipes-model/src/main/java/org/apache/streampipes/model/dashboard/DashboardWidgetModel.java
index 70bf68a..d3f2491 100644
--- a/streampipes-model/src/main/java/org/apache/streampipes/model/dashboard/DashboardWidgetModel.java
+++ b/streampipes-model/src/main/java/org/apache/streampipes/model/dashboard/DashboardWidgetModel.java
@@ -34,6 +34,9 @@ public class DashboardWidgetModel extends DashboardEntity {
@RdfProperty(StreamPipes.HAS_DASHBOARD_WIDGET_ID)
private String widgetId;
+ @RdfProperty(StreamPipes.HAS_DASHBOARD_WIDGET_TYPE)
+ private String widgetType;
+
@OneToOne(fetch = FetchType.EAGER,
cascade = {CascadeType.PERSIST, CascadeType.MERGE})
@RdfProperty(StreamPipes.HAS_DASHBOARD_WIDGET_SETTINGS)
diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/datalake/DataExplorerWidgetModel.java b/streampipes-model/src/main/java/org/apache/streampipes/model/datalake/DataExplorerWidgetModel.java
index 51881de..31055a3 100644
--- a/streampipes-model/src/main/java/org/apache/streampipes/model/datalake/DataExplorerWidgetModel.java
+++ b/streampipes-model/src/main/java/org/apache/streampipes/model/datalake/DataExplorerWidgetModel.java
@@ -36,6 +36,9 @@ public class DataExplorerWidgetModel extends DashboardEntity {
@RdfProperty(StreamPipes.HAS_DASHBOARD_WIDGET_ID)
private String widgetId;
+ @RdfProperty(StreamPipes.HAS_DASHBOARD_WIDGET_TYPE)
+ private String widgetType;
+
@RdfProperty(StreamPipes.HAS_MEASUREMENT_NAME)
private String measureName;
@@ -71,4 +74,12 @@ public class DataExplorerWidgetModel extends DashboardEntity {
public void setMeasureName(String measureName) {
this.measureName = measureName;
}
+
+ public String getWidgetType() {
+ return widgetType;
+ }
+
+ public void setWidgetType(String widgetType) {
+ this.widgetType = widgetType;
+ }
}
diff --git a/streampipes-vocabulary/src/main/java/org/apache/streampipes/vocabulary/StreamPipes.java b/streampipes-vocabulary/src/main/java/org/apache/streampipes/vocabulary/StreamPipes.java
index 54f2218..90a4bff 100644
--- a/streampipes-vocabulary/src/main/java/org/apache/streampipes/vocabulary/StreamPipes.java
+++ b/streampipes-vocabulary/src/main/java/org/apache/streampipes/vocabulary/StreamPipes.java
@@ -373,6 +373,7 @@ public class StreamPipes {
public static final String ENTITY_CONTAINER = NS + "EntityContainer";
public static final String CONTAINS_ELEMENTS = NS + "containsElement";
public static final String HAS_DASHBOARD_WIDGET_ID = NS + "hasDashboardWidgetId";
+ public static final String HAS_DASHBOARD_WIDGET_TYPE = NS + "hasDashboardWidgetType";
public static final String DASHBOARD_WIDGET_DATA_CONFIG = NS + "DashboardWidgetDataConfig" ;
public static final String COLOR_PICKER_STATIC_PROPERTY = NS + "ColorPickerStaticProperty";
public static final String SELECTED_COLOR = NS + "hasSelectedColor";
diff --git a/ui/src/app/core-model/datalake/DataExplorerWidgetModel.ts b/ui/src/app/core-model/datalake/DataExplorerWidgetModel.ts
index 17f55c5..f4b33c3 100644
--- a/ui/src/app/core-model/datalake/DataExplorerWidgetModel.ts
+++ b/ui/src/app/core-model/datalake/DataExplorerWidgetModel.ts
@@ -36,6 +36,9 @@ export class DataExplorerWidgetModel extends UnnamedStreamPipesEntity {
@RdfProperty('sp:hasMeasurementName')
measureName: string;
+ @RdfProperty('sp:hasDashboardWidgetType')
+ widgetType: string;
+
@RdfProperty('sp:hasSchema')
eventSchema: EventSchema;
diff --git a/ui/src/app/dashboard-v2/models/dashboard.model.ts b/ui/src/app/dashboard-v2/models/dashboard.model.ts
index 1193e71..30fb8ef 100644
--- a/ui/src/app/dashboard-v2/models/dashboard.model.ts
+++ b/ui/src/app/dashboard-v2/models/dashboard.model.ts
@@ -22,6 +22,7 @@ export interface DashboardConfig extends GridsterConfig {}
export interface DashboardItem extends GridsterItem {
widgetId: string;
+ widgetType: string;
id: string;
}
diff --git a/ui/src/app/data-explorer-v2/components/panel/data-explorer-dashboard-panel.component.ts b/ui/src/app/data-explorer-v2/components/panel/data-explorer-dashboard-panel.component.ts
index e9681e0..895ce1b 100644
--- a/ui/src/app/data-explorer-v2/components/panel/data-explorer-dashboard-panel.component.ts
+++ b/ui/src/app/data-explorer-v2/components/panel/data-explorer-dashboard-panel.component.ts
@@ -71,7 +71,7 @@ export class DataExplorerDashboardPanelComponent implements OnInit {
const dashboardItem = {} as IDataViewDashboardItem;
dashboardItem.widgetId = widget._id;
dashboardItem.id = widget._id;
- // TODO there should be a widget type DashboardWidget
+ dashboardItem.widgetType = widget.widgetType;
dashboardItem.cols = 2;
dashboardItem.rows = 2;
dashboardItem.x = 0;
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 154353c..77718e3 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
@@ -16,7 +16,7 @@
*
*/
-import { Component, EventEmitter, OnInit, Output } from "@angular/core";
+import { Component, EventEmitter, OnInit, Output } from '@angular/core';
import { DateRange } from '../../../core-model/datalake/DateRange';
@Component({
@@ -26,7 +26,6 @@ import { DateRange } from '../../../core-model/datalake/DateRange';
})
export class TimeRangeSelectorComponent implements OnInit {
- // [0] start, [1] end
@Output()
dateRangeEmitter = new EventEmitter<DateRange>();
@@ -64,5 +63,6 @@ export class TimeRangeSelectorComponent implements OnInit {
this.selectedTimeButton = item;
const current = new Date();
this.dateRange = new DateRange(new Date(current.getTime() - item.offset * 60000), current);
+ this.reloadData();
}
}
diff --git a/ui/src/app/data-explorer-v2/components/widget/data-explorer-dashboard-widget.component.html b/ui/src/app/data-explorer-v2/components/widget/data-explorer-dashboard-widget.component.html
index b1708a1..01f4a26 100644
--- a/ui/src/app/data-explorer-v2/components/widget/data-explorer-dashboard-widget.component.html
+++ b/ui/src/app/data-explorer-v2/components/widget/data-explorer-dashboard-widget.component.html
@@ -31,11 +31,15 @@
<div class="h-100 p-0 row content">
<!-- <div *ngIf="widget."></div>-->
<div *ngIf="widgetLoaded" class="h-100">
- <!--<div *ngIf="widget.widgetType === 'number'" class="h-100 p-0">-->
- <div class="h-100 p-0">
+ <div *ngIf="widget.widgetType === 'table'" class="h-100 p-0">
<sp-data-explorer-table-widget [gridsterItemComponent]="gridsterItemComponent" [gridsterItem]="item"
- [widget]="widget" [editMode]="editMode"
- [widgetConfig]="configuredWidget" class="h-100"></sp-data-explorer-table-widget>
+ [widget]="widget" [editMode]="editMode"
+ [widgetConfig]="configuredWidget" class="h-100"></sp-data-explorer-table-widget>
+ </div>
+ <div *ngIf="widget.widgetType === 'line-chart'" class="h-100 p-0">
+ <sp-data-explorer-line-chart-widget [gridsterItemComponent]="gridsterItemComponent" [gridsterItem]="item"
+ [widget]="widget" [editMode]="editMode"
+ [widgetConfig]="configuredWidget" class="h-100"></sp-data-explorer-line-chart-widget>
</div>
</div>
</div>
diff --git a/ui/src/app/core-model/datalake/DataExplorerWidgetModel.ts b/ui/src/app/data-explorer-v2/components/widgets/line-chart/line-chart-config.ts
similarity index 50%
copy from ui/src/app/core-model/datalake/DataExplorerWidgetModel.ts
copy to ui/src/app/data-explorer-v2/components/widgets/line-chart/line-chart-config.ts
index 17f55c5..8fb099f 100644
--- a/ui/src/app/core-model/datalake/DataExplorerWidgetModel.ts
+++ b/ui/src/app/data-explorer-v2/components/widgets/line-chart/line-chart-config.ts
@@ -16,30 +16,26 @@
*
*/
-import { UnnamedStreamPipesEntity } from '../../connect/model/UnnamedStreamPipesEntity';
-import { EventSchema } from '../../connect/schema-editor/model/EventSchema';
-import { RdfsClass } from '../../platform-services/tsonld/RdfsClass';
-import { RdfProperty } from '../../platform-services/tsonld/RdfsProperty';
+import { DashboardWidgetSettings } from '../../../../core-model/dashboard/DashboardWidgetSettings';
+import { WidgetConfigBuilder } from '../../../registry/widget-config-builder';
+import { SchemaRequirementsBuilder } from '../../../sdk/schema-requirements-builder';
+import { WidgetConfig } from '../base/base-config';
-@RdfsClass('sp:DataExplorerWidgetModel')
-export class DataExplorerWidgetModel extends UnnamedStreamPipesEntity {
+export class LineChartConfig extends WidgetConfig {
- @RdfProperty('sp:couchDbId')
- _id: string;
-
- @RdfProperty('sp:couchDbRev')
- _ref: string;
-
- @RdfProperty('sp:hasDashboardWidgetId')
- widgetId: string;
-
- @RdfProperty('sp:hasMeasurementName')
- measureName: string;
-
- @RdfProperty('sp:hasSchema')
- eventSchema: EventSchema;
+ static readonly NUMBER_MAPPING_KEY: string = 'number-mapping';
constructor() {
super();
}
+
+ getConfig(): DashboardWidgetSettings {
+ return WidgetConfigBuilder.createWithSelectableColorsAndTitlePanel('Line Chart', 'line-chart')
+ .requiredSchema(SchemaRequirementsBuilder
+ .create()
+ // .requiredPropertyWithUnaryMapping(TableConfig.NUMBER_MAPPING_KEY, 'Select property', '', EpRequirements.numberReq())
+ .build())
+ .build();
+ }
+
}
diff --git a/ui/src/app/data-explorer/time-selector/timeRangeSelector.component.ts b/ui/src/app/data-explorer-v2/components/widgets/line-chart/line-chart-widget.component.css
similarity index 66%
copy from ui/src/app/data-explorer/time-selector/timeRangeSelector.component.ts
copy to ui/src/app/data-explorer-v2/components/widgets/line-chart/line-chart-widget.component.css
index 911aedd..eaf8444 100644
--- a/ui/src/app/data-explorer/time-selector/timeRangeSelector.component.ts
+++ b/ui/src/app/data-explorer-v2/components/widgets/line-chart/line-chart-widget.component.css
@@ -16,23 +16,21 @@
*
*/
-import { Component } from '@angular/core';
-
-@Component({
- selector: 'sp-time-range-selector',
- templateUrl: 'timeRangeSelector.component.html',
- styleUrls: ['./timeRangeSelector.component.css']
-})
-export class TimeRangeSelectorComponent {
-
- selectedTimeUnit = '1 Hour';
-
- dateRange: Date []; // [0] start, [1] end
+.circleNumber {
+ width:100%;
+ height: 100%;
+ text-align: center;
+ left: 50%;
+ display:inline-grid;
+ align-content: center;
+}
- constructor() {
- }
- selectTimeUnit(value) {
- this.selectedTimeUnit = value;
- }
+.numberItem {
+ font-size:60px;
+ font-weight:bold;
}
+
+.title-panel {
+ font-size:20px;
+}
\ No newline at end of file
diff --git a/ui/src/app/data-explorer-v2/components/widgets/line-chart/line-chart-widget.component.html b/ui/src/app/data-explorer-v2/components/widgets/line-chart/line-chart-widget.component.html
new file mode 100644
index 0000000..665f3ba
--- /dev/null
+++ b/ui/src/app/data-explorer-v2/components/widgets/line-chart/line-chart-widget.component.html
@@ -0,0 +1,26 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ ~
+ -->
+
+<div class="circleNumber" [ngStyle]="{'background-color': selectedBackgroundColor, 'color': selectedPrimaryTextColor}">
+ <div class="title-panel" *ngIf="hasTitlePanelSettings">
+ {{selectedTitle}}
+ </div>
+
+ <sp-old-explorer></sp-old-explorer>
+
+</div>
diff --git a/ui/src/app/data-explorer-v2/components/widgets/line-chart/line-chart-widget.component.ts b/ui/src/app/data-explorer-v2/components/widgets/line-chart/line-chart-widget.component.ts
new file mode 100644
index 0000000..2b5e22b
--- /dev/null
+++ b/ui/src/app/data-explorer-v2/components/widgets/line-chart/line-chart-widget.component.ts
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+import { Component, Input, OnDestroy, OnInit } from '@angular/core';
+import { StaticPropertyExtractor } from '../../../sdk/extractor/static-property-extractor';
+import { BaseDataExplorerWidget } from '../base/base-data-explorer-widget';
+
+@Component({
+ selector: 'sp-data-explorer-line-chart-widget',
+ templateUrl: './line-chart-widget.component.html',
+ styleUrls: ['./line-chart-widget.component.css']
+})
+export class LineChartWidgetComponent extends BaseDataExplorerWidget implements OnInit, OnDestroy {
+
+ item: any;
+
+ selectedProperty: string;
+
+ constructor() {
+ super();
+ }
+
+ ngOnInit(): void {
+ super.ngOnInit();
+ }
+
+ ngOnDestroy(): void {
+ super.ngOnDestroy();
+ }
+
+ extractConfig(extractor: StaticPropertyExtractor) {
+ // this.selectedProperty = extractor.mappingPropertyValue(TableConfig.NUMBER_MAPPING_KEY);
+ }
+
+ isNumber(item: any): boolean {
+ return false;
+ }
+
+ protected onEvent(event: any) {
+ this.item = event[this.selectedProperty];
+ }
+
+}
diff --git a/ui/src/app/data-explorer-v2/data-explorer-v2.component.html b/ui/src/app/data-explorer-v2/data-explorer-v2.component.html
index 81a2d35..c67ef0d 100644
--- a/ui/src/app/data-explorer-v2/data-explorer-v2.component.html
+++ b/ui/src/app/data-explorer-v2/data-explorer-v2.component.html
@@ -28,7 +28,7 @@
<!--</div>-->
<!--<div fxFlex fxLayoutAlign="start center" class="mr-20">-->
- <sp-time-range-selector *ngIf="selectedIndex"></sp-time-range-selector>
+ <sp-time-range-selector *ngIf="selectedIndex" (dateRangeEmitter)="updateDate($event)"></sp-time-range-selector>
<button mat-button mat-icon-button color="primary"
*ngIf="selectedIndex > 0" (click)="toggleEditMode()" [disabled]="editMode">
diff --git a/ui/src/app/data-explorer-v2/data-explorer-v2.component.ts b/ui/src/app/data-explorer-v2/data-explorer-v2.component.ts
index 45bd06d..3e9ee37 100644
--- a/ui/src/app/data-explorer-v2/data-explorer-v2.component.ts
+++ b/ui/src/app/data-explorer-v2/data-explorer-v2.component.ts
@@ -17,6 +17,7 @@
*/
import { Component, OnInit } from '@angular/core';
+import { DateRange } from '../core-model/datalake/DateRange';
import { IDataViewDashboard } from './models/dataview-dashboard.model';
import { DataViewDataExplorerService } from './services/data-view-data-explorer.service';
import { RefreshDashboardService } from './services/refresh-dashboard.service';
@@ -80,4 +81,8 @@ export class DataExplorerV2Component implements OnInit {
toggleEditMode() {
this.editMode = ! (this.editMode);
}
+
+ updateDate(dateRange: DateRange) {
+ console.log(dateRange);
+ }
}
diff --git a/ui/src/app/data-explorer-v2/data-explorer-v2.module.ts b/ui/src/app/data-explorer-v2/data-explorer-v2.module.ts
index 8e37c01..bc52703 100644
--- a/ui/src/app/data-explorer-v2/data-explorer-v2.module.ts
+++ b/ui/src/app/data-explorer-v2/data-explorer-v2.module.ts
@@ -43,6 +43,7 @@ import { DataExplorerDashboardOverviewComponent } from './components/overview/da
import { DataExplorerDashboardPanelComponent } from './components/panel/data-explorer-dashboard-panel.component';
import { TimeRangeSelectorComponent } from './components/time-selector/timeRangeSelector.component';
import { DataExplorerDashboardWidgetComponent } from './components/widget/data-explorer-dashboard-widget.component';
+import { LineChartWidgetComponent } from './components/widgets/line-chart/line-chart-widget.component';
import { DataDownloadDialog } from './components/widgets/old-explorer-widget/datadownloadDialog/dataDownload.dialog';
import { OldExplorerComponent } from './components/widgets/old-explorer-widget/old-explorer.component';
import { TableWidgetComponent } from './components/widgets/table/table-widget.component';
@@ -63,7 +64,7 @@ export const MY_NATIVE_FORMATS = {
timePickerInput: {hour: 'numeric', minute: 'numeric', hour12: false},
monthYearLabel: {year: 'numeric', month: 'short', hour12: false},
dateA11yLabel: {year: 'numeric', month: 'long', day: 'numeric', hour12: false},
- monthYearA11yLabel: {year: 'numeric', month: 'long', hour12: false},
+ monthYearA11yLabel: {year: 'numeric', month: 'long', hour12: false}
};
@@ -91,7 +92,7 @@ export const MY_NATIVE_FORMATS = {
CoreUiModule,
OwlDateTimeModule,
OwlNativeDateTimeModule,
- PlotlyViaWindowModule,
+ PlotlyViaWindowModule
],
declarations: [
DataExplorerV2Component,
@@ -102,6 +103,7 @@ export const MY_NATIVE_FORMATS = {
DataExplorerAddVisualizationDialogComponent,
DataExplorerEditDataViewDialogComponent,
TableWidgetComponent,
+ LineChartWidgetComponent,
DataDownloadDialog,
TimeRangeSelectorComponent,
OldExplorerComponent
@@ -115,11 +117,11 @@ export const MY_NATIVE_FORMATS = {
{
provide: 'RestApi',
useFactory: ($injector: any) => $injector.get('RestApi'),
- deps: ['$injector'],
+ deps: ['$injector']
},
ElementIconText,
{
- provide: InjectableRxStompConfig,
+ provide: InjectableRxStompConfig
},
{
provide: RxStompService,
@@ -128,7 +130,7 @@ export const MY_NATIVE_FORMATS = {
},
{
provide: OWL_DATE_TIME_FORMATS, useValue: MY_NATIVE_FORMATS
- },
+ }
],
exports: [
DataExplorerV2Component
@@ -143,5 +145,4 @@ export class DataExplorerV2Module {
constructor() {
}
-
}
diff --git a/ui/src/app/data-explorer-v2/dialogs/add-widget/data-explorer-add-visualization-dialog.component.ts b/ui/src/app/data-explorer-v2/dialogs/add-widget/data-explorer-add-visualization-dialog.component.ts
index 750c272..d5bc8ba 100644
--- a/ui/src/app/data-explorer-v2/dialogs/add-widget/data-explorer-add-visualization-dialog.component.ts
+++ b/ui/src/app/data-explorer-v2/dialogs/add-widget/data-explorer-add-visualization-dialog.component.ts
@@ -131,6 +131,7 @@ export class DataExplorerAddVisualizationDialogComponent implements OnInit {
// }
configuredWidget.measureName = this.selectedDataSet.measureName;
+ configuredWidget.widgetType = this.selectedWidget;
this.dataViewDataExplorerService.saveWidget(configuredWidget).subscribe(response => {
this.dialogRef.close(response);
});
diff --git a/ui/src/app/data-explorer-v2/models/dataview-dashboard.model.ts b/ui/src/app/data-explorer-v2/models/dataview-dashboard.model.ts
index fed67f7..832c02d 100644
--- a/ui/src/app/data-explorer-v2/models/dataview-dashboard.model.ts
+++ b/ui/src/app/data-explorer-v2/models/dataview-dashboard.model.ts
@@ -22,6 +22,7 @@ export interface IDataViewDashboardConfig extends GridsterConfig {}
export interface IDataViewDashboardItem extends GridsterItem {
widgetId: string;
+ widgetType: string;
id: string;
}
diff --git a/ui/src/app/data-explorer-v2/registry/data-explorer-widget-registry.ts b/ui/src/app/data-explorer-v2/registry/data-explorer-widget-registry.ts
index a44f611..4f34cc2 100644
--- a/ui/src/app/data-explorer-v2/registry/data-explorer-widget-registry.ts
+++ b/ui/src/app/data-explorer-v2/registry/data-explorer-widget-registry.ts
@@ -33,7 +33,7 @@ export class DataExplorerWidgetRegistry {
// }
private static availableWidgets: string[] = [
- 'table',
+ 'table', 'line-chart'
];
static getAvailableWidgetTemplates(): string[] {
diff --git a/ui/src/app/data-explorer/time-selector/timeRangeSelector.component.ts b/ui/src/app/data-explorer/time-selector/timeRangeSelector.component.ts
index 911aedd..beaff8c 100644
--- a/ui/src/app/data-explorer/time-selector/timeRangeSelector.component.ts
+++ b/ui/src/app/data-explorer/time-selector/timeRangeSelector.component.ts
@@ -19,7 +19,7 @@
import { Component } from '@angular/core';
@Component({
- selector: 'sp-time-range-selector',
+ selector: 'sp-old-time-range-selector',
templateUrl: 'timeRangeSelector.component.html',
styleUrls: ['./timeRangeSelector.component.css']
})