UNPKG

@c8y/ngx-components

Version:

Angular modules for Cumulocity IoT applications

61 lines (57 loc) 2.49 kB
import { gettext } from '@c8y/ngx-components/gettext'; import { DynamicComponentErrorStrategy, DynamicManagedObjectResolver, hookWidget } from '@c8y/ngx-components'; import { hookWidgetConfig } from '@c8y/ngx-components/context-dashboard'; import { PRESET_NAME } from '@c8y/ngx-components/global-context'; import { defaultWidgetIds } from '@c8y/ngx-components/widgets/definitions'; import { importConfigWithDevice, exportConfigWithDevice } from '@c8y/ngx-components/widgets/import-export-config'; const recentAlarmsDefinition = { id: defaultWidgetIds.RECENT_ALARMS, label: gettext('Recent alarms'), description: gettext('Log of recent alarms from all devices with any severity and status'), loadComponent: () => import('@c8y/ngx-components/widgets/implementations/alarms').then(m => m.AlarmListWidgetComponent), loadConfigComponent: () => import('@c8y/ngx-components/widgets/implementations/alarms').then(m => m.AlarmListWidgetConfigComponent), resolve: { device: DynamicManagedObjectResolver }, errorStrategy: DynamicComponentErrorStrategy.OVERLAY_ERROR, data: { schema: () => import('c8y-schema-loader?interfaceName=AlarmListWidgetConfig&type=widget-config!@c8y/ngx-components/widgets/implementations/alarms'), export: exportConfigWithDevice, import: importConfigWithDevice, settings: { recentAlarmsWidget: true, noNewWidgets: true, widgetDefaults: { _width: 4, _height: 4 }, ng1: { options: { noDeviceTarget: false, groupsSelectable: true, deviceTargetNotRequired: true } } }, displaySettings: { globalAutoRefreshContext: true } } }; const recentAlarmsWidgetProviders = [ hookWidget(recentAlarmsDefinition), hookWidgetConfig({ widgetId: defaultWidgetIds.RECENT_ALARMS, priority: 10, label: gettext('Time context'), initialState: { controls: PRESET_NAME.LIFETIME_LIST_CONFIG }, loadComponent: () => import('@c8y/ngx-components/context-dashboard').then(m => m.GlobalContextSectionComponent) }) ]; /** * Generated bundle index. Do not edit. */ export { recentAlarmsDefinition, recentAlarmsWidgetProviders }; //# sourceMappingURL=c8y-ngx-components-widgets-definitions-alarms-recent-alarms.mjs.map