|
|
|
@ -62,6 +62,7 @@ import { MediaBreakpoints } from '@shared/models/constants'; |
|
|
|
import { AuthUser } from '@shared/models/user.model'; |
|
|
|
import { getCurrentAuthState } from '@core/auth/auth.selectors'; |
|
|
|
import { |
|
|
|
DatasourceType, |
|
|
|
Widget, |
|
|
|
WidgetConfig, |
|
|
|
WidgetInfo, |
|
|
|
@ -891,6 +892,10 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC |
|
|
|
const config: WidgetConfig = JSON.parse(widgetTypeInfo.defaultConfig); |
|
|
|
config.title = 'New ' + widgetTypeInfo.widgetName; |
|
|
|
config.datasources = []; |
|
|
|
config.alarmSource = { |
|
|
|
type: DatasourceType.entity, |
|
|
|
dataKeys: config.alarmSource.dataKeys |
|
|
|
}; |
|
|
|
const newWidget: Widget = { |
|
|
|
isSystemType: widget.isSystemType, |
|
|
|
bundleAlias: widget.bundleAlias, |
|
|
|
|