Default value : [
{
name: 'Alarm list',
title: gettext('Active, critical alarms'),
_x: 4,
_y: 7,
_height: 4,
_width: 4,
config: {
options: {
orderMode: 'ACTIVE_FIRST',
severity: { CRITICAL: true },
status: {
ACTIVE: true,
ACKNOWLEDGED: false,
CLEARED: false
},
types: []
}
}
},
{
name: 'Map',
title: gettext('Location'),
_x: 4,
_y: 11,
_height: 4,
_width: 8
},
{
name: 'Asset Properties',
title: gettext('Device data'),
config: {
options: {
properties: [],
allowDisplayAndEditKnownProperties: true,
hiddenPropertiesKeyPaths: ['owner']
}
},
_x: 0,
_y: 7,
_height: 8,
_width: 4
},
{
name: 'Data points graph',
title: gettext('Device and communication'),
_x: 4,
_y: 2,
_height: 5,
_width: 8,
config: {
interval: 'hours',
aggregation: 'NONE',
realtime: true,
datapointsInitialDisplayLimit: 3,
datapoints: [
{
fragment: 'c8y_Battery',
series: 'level',
label: this.translateService.instant('Battery: level'),
unit: '%',
renderType: 'min',
lineType: 'line',
color: '#5e07b3',
__active: true
},
{
fragment: 'c8y_SignalStrength',
series: 'rssi',
label: this.translateService.instant('Signal: RSSI'),
unit: 'dBm',
renderType: 'min',
lineType: 'line',
color: '#a7d0f1',
__active: true
},
{
fragment: 'c8y_MemoryMeasurement',
series: 'Used',
label: this.translateService.instant('Memory: used'),
unit: 'MB',
renderType: 'min',
lineType: 'line',
color: '#f75229',
__active: true
},
{
fragment: 'c8y_CPUMeasurement',
series: 'Workload',
label: this.translateService.instant('CPU: workload'),
unit: '%',
renderType: 'min',
lineType: 'line',
color: '#b24f3e',
__active: true
},
{
fragment: 'c8y_NetworkStatistics',
series: 'Upload',
label: this.translateService.instant('Network: upload'),
unit: 'KB/s',
renderType: 'min',
lineType: 'line',
color: '#88c039',
__active: true
},
{
fragment: 'c8y_SignalStrength',
series: 'RCSP',
label: this.translateService.instant('Signal: RCSP'),
renderType: 'min',
lineType: 'line',
color: '#5e2f19',
__active: true
},
{
fragment: 'c8y_SignalStrength',
series: 'RSCP',
label: this.translateService.instant('Signal: RSCP'),
renderType: 'min',
lineType: 'line',
color: '#5e2f19',
__active: true
},
{
fragment: 'c8y_SignalStrength',
series: 'RSRP',
label: this.translateService.instant('Signal: RSRP'),
renderType: 'min',
lineType: 'line',
color: '#43ba3b',
__active: true
},
{
fragment: 'c8y_SignalStrength',
series: 'RSRQ',
label: this.translateService.instant('Signal: RSRQ'),
renderType: 'min',
lineType: 'line',
color: '#14b0b3',
__active: true
},
{
fragment: 'c8y_SignalStrength',
series: 'ber',
label: this.translateService.instant('Signal: BER'),
unit: '%',
renderType: 'min',
lineType: 'line',
color: '#44ff33',
__active: true
},
{
fragment: 'c8y_SignalStrength',
series: 'ECN0',
label: this.translateService.instant('Signal: ECN0'),
renderType: 'min',
lineType: 'line',
color: '#873efa',
__active: true
},
{
fragment: 'c8y_NetworkStatistics',
series: 'Download',
label: this.translateService.instant('Network: download'),
unit: 'KB/s',
renderType: 'min',
lineType: 'line',
color: '#f27a45',
__active: true
},
{
fragment: 'c8y_MemoryMeasurement',
series: 'Total',
label: this.translateService.instant('Memory: total'),
unit: 'MB',
renderType: 'min',
lineType: 'line',
color: '#dadd8c',
__active: true
}
],
alarmsEventsConfigs: [
{
label: 'c8y_LocationUpdate',
timelineType: 'EVENT',
color: '#6f6cd0',
filters: {
type: 'c8y_LocationUpdate'
},
__active: true
},
{
label: 'c8y_UnavailabilityAlarm',
timelineType: 'ALARM',
color: '#375bf2',
filters: {
type: 'c8y_UnavailabilityAlarm'
},
__active: true
}
]
},
transformConfigWithContext(config, context, c8yDevices) {
'ngInject';
return c8yDevices
.getSupportedSeries(context.id)
.then(supportedMeasurementSeries =>
config.datapoints.filter(configMeasurement =>
supportedMeasurementSeries.find(
supportedSeries =>
supportedSeries.fragment === configMeasurement.fragment &&
supportedSeries.series === configMeasurement.series
)
)
)
.then(datapoints => ({ ...config, ...{ datapoints } }));
}
},
{
name: 'deviceStatusWidget',
title: gettext('Device status'),
_x: 0,
_y: 2,
_height: 5,
_width: 4
},
{
name: 'deviceGroupAssignmentWidget',
title: gettext('Group assignment'),
_x: 8,
_y: 7,
_height: 4,
_width: 4
},
{
componentId: 'assetNotesWidget',
title: gettext('Message of the day'),
classes: { 'panel-title-hidden': true },
_x: 0,
_y: 0,
_height: 2,
_width: 12
},
{
componentId: 'Map',
title: gettext('Location'),
_x: 4,
_y: 11,
_height: 4,
_width: 8
}
] as Widget[]
|