Skip to content

Commit

Permalink
refactor(28715): remove MessageHandlingOption from schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
vanch3d committed Dec 10, 2024
1 parent fc404e4 commit c87a95f
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,7 @@ export const mockUISchema: UiSchema = {
simulationToMqttMappings: {
'ui:batchMode': true,
items: {
'ui:order': [
'mqttTopic',
'mqttQos',
'mqttUserProperties',
'messageHandlingOptions',
'includeTimestamp',
'includeTagNames',
'*',
],
'ui:order': ['mqttTopic', 'mqttQos', 'mqttUserProperties', 'includeTimestamp', 'includeTagNames', '*'],
'ui:collapsable': {
titleKey: 'mqttTopic',
},
Expand Down Expand Up @@ -123,19 +115,6 @@ export const mockJSONSchema: JSONSchema7 = {
description: 'Include the unix timestamp of the sample time in the resulting MQTT message',
default: true,
},
messageHandlingOptions: {
type: 'string',
enum: ['MQTTMessagePerTag', 'MQTTMessagePerSubscription'],
title: 'Message Handling Options',
description:
'This setting defines the format of the resulting MQTT message, either a message per changed tag or a message per subscription that may include multiple data points per sample',
default: 'MQTTMessagePerTag',
// @ts-ignore TODO[NVL] enumNames not officially supported
enumNames: [
'MQTT Message Per Device Tag',
'MQTT Message Per Subscription (Potentially Multiple Data Points Per Sample)',
],
},
mqttQos: {
type: 'integer',
title: 'MQTT QoS',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export const MOCK_NORTHBOUND_MAPPING: NorthboundMapping = {
includeTimestamp: true,
maxQoS: MOCK_MAX_QOS,
messageExpiryInterval: -1000,
messageHandlingOptions: NorthboundMapping.messageHandlingOptions.MQTTMESSAGE_PER_TAG,
}

export const mappingHandlers = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,6 @@ export const northboundMappingListSchema: JSONSchema7 = {
description: 'Include the unix timestamp of the sample time in the resulting MQTT message',
default: true,
},
messageHandlingOptions: {
type: 'string',
enum: ['MQTTMessagePerTag', 'MQTTMessagePerSubscription'],
title: 'Message Handling Options',
description:
'This setting defines the format of the resulting MQTT message, either a message per changed tag or a message per subscription that may include multiple data points per sample',
default: 'MQTTMessagePerTag',
},
messageExpiryInterval: {
type: 'number',
description: `The message expiry interval.`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ export const northboundMappingListUISchema: UiSchema = {
maxQoS: {
'ui:enumNames': ['At most once (QoS 0)', 'At least once (QoS 1)', 'Exactly once (QoS 2)'],
},

messageHandlingOptions: {
'ui:enumNames': [
'MQTT Message Per Device Tag',
'MQTT Message Per Subscription (Potentially Multiple Data Points Per Sample)',
],
},
},
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export const createSchema = (items: RJSFSchema) => {
'serverQueueSize',
'includeTagNames',
'includeTimestamp',
'messageHandlingOptions',
'mqttUserProperties'
)
if (!Object.keys(sourceProperties).length) throw new Error(i18n.t('device.errors.noFormSchema'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ describe('useNorthboundMappingManager', () => {
includeTimestamp: true,
maxQoS: MOCK_MAX_QOS,
messageExpiryInterval: -1000,
messageHandlingOptions: 'MQTTMessagePerTag',
tagName: 'my/tag',
topic: 'my/topic',
}),
Expand Down

0 comments on commit c87a95f

Please sign in to comment.