|
|
@ -21,7 +21,7 @@ import { EntityId } from '@shared/models/id/entity-id'; |
|
|
import { TimePageLink } from '@shared/models/page/page-link'; |
|
|
import { TimePageLink } from '@shared/models/page/page-link'; |
|
|
import { NULL_UUID } from '@shared/models/id/has-uuid'; |
|
|
import { NULL_UUID } from '@shared/models/id/has-uuid'; |
|
|
import { EntityType } from '@shared/models/entity-type.models'; |
|
|
import { EntityType } from '@shared/models/entity-type.models'; |
|
|
import { isString } from '@core/utils'; |
|
|
import { CustomerId } from '@shared/models/id/customer-id'; |
|
|
|
|
|
|
|
|
export enum AlarmSeverity { |
|
|
export enum AlarmSeverity { |
|
|
CRITICAL = 'CRITICAL', |
|
|
CRITICAL = 'CRITICAL', |
|
|
@ -87,6 +87,7 @@ export const alarmSeverityColors = new Map<AlarmSeverity, string>( |
|
|
|
|
|
|
|
|
export interface Alarm extends BaseData<AlarmId> { |
|
|
export interface Alarm extends BaseData<AlarmId> { |
|
|
tenantId: TenantId; |
|
|
tenantId: TenantId; |
|
|
|
|
|
customerId: CustomerId; |
|
|
type: string; |
|
|
type: string; |
|
|
originator: EntityId; |
|
|
originator: EntityId; |
|
|
severity: AlarmSeverity; |
|
|
severity: AlarmSeverity; |
|
|
@ -110,6 +111,7 @@ export interface AlarmDataInfo extends AlarmInfo { |
|
|
export const simulatedAlarm: AlarmInfo = { |
|
|
export const simulatedAlarm: AlarmInfo = { |
|
|
id: new AlarmId(NULL_UUID), |
|
|
id: new AlarmId(NULL_UUID), |
|
|
tenantId: new TenantId(NULL_UUID), |
|
|
tenantId: new TenantId(NULL_UUID), |
|
|
|
|
|
customerId: new CustomerId(NULL_UUID), |
|
|
createdTime: new Date().getTime(), |
|
|
createdTime: new Date().getTime(), |
|
|
startTs: new Date().getTime(), |
|
|
startTs: new Date().getTime(), |
|
|
endTs: 0, |
|
|
endTs: 0, |
|
|
|