Browse Source

fix(config): add missing edgex source config message type for ui

Signed-off-by: Jianxiang Ran <rxan_embedded@163.com>
Jianxiang Ran 2 years ago
parent
commit
620db5a7b6

+ 4 - 4
docs/en_US/rules/sources/builtin/edgex.md

@@ -63,7 +63,7 @@ default:
   protocol: tcp
   protocol: tcp
   server: localhost
   server: localhost
   port: 5573
   port: 5573
-  topic: events
+  topic: rules-events
   messageType: event
   messageType: event
 #  optional:
 #  optional:
 #    ClientId: client1
 #    ClientId: client1
@@ -122,7 +122,7 @@ default:
   server: localhost
   server: localhost
   port: 5573
   port: 5573
   connectionSelector: edgex.redisMsgBus
   connectionSelector: edgex.redisMsgBus
-  topic: events
+  topic: rules-events
   messageType: event
   messageType: event
   #  optional:
   #  optional:
   #    ClientId: client1
   #    ClientId: client1
@@ -134,7 +134,7 @@ default:
 
 
 ### topic
 ### topic
 
 
-The topic name of EdgeX message bus, default value is `events`. Users can subscribe to the topics of message bus
+The topic name of EdgeX message bus, default value is `rules-events`. Users can subscribe to the topics of message bus
 directly or subscribe to topics exported by EdgeX application service. Notice that, the message type of the two types of
 directly or subscribe to topics exported by EdgeX application service. Notice that, the message type of the two types of
 topics are different, remember to set the appropriate messageType property.
 topics are different, remember to set the appropriate messageType property.
 
 
@@ -186,7 +186,7 @@ demo1: #Conf_key
   protocol: tcp
   protocol: tcp
   server: 10.211.55.6
   server: 10.211.55.6
   port: 5571
   port: 5571
-  topic: events
+  topic: rules-events
 ```
 ```
 
 
 If you have a specific connection that need to overwrite the default settings, you can create a customized section. In the previous sample, we create a specific setting named with `demo1`.  Then you can specify the configuration with option `CONF_KEY` when creating the stream definition (see [stream specs](../../../sqls/streams.md) for more info).
 If you have a specific connection that need to overwrite the default settings, you can create a customized section. In the previous sample, we create a specific setting named with `demo1`.  Then you can specify the configuration with option `CONF_KEY` when creating the stream definition (see [stream specs](../../../sqls/streams.md) for more info).

+ 4 - 4
docs/zh_CN/rules/sources/builtin/edgex.md

@@ -65,7 +65,7 @@ default:
   protocol: tcp
   protocol: tcp
   server: localhost
   server: localhost
   port: 5573
   port: 5573
-  topic: events
+  topic: rules-events
   messageType: event
   messageType: event
 #  optional:
 #  optional:
 #    ClientId: client1
 #    ClientId: client1
@@ -121,7 +121,7 @@ default:
   server: localhost
   server: localhost
   port: 5573
   port: 5573
   connectionSelector: edgex.redisMsgBus
   connectionSelector: edgex.redisMsgBus
-  topic: events
+  topic: rules-events
   messageType: event
   messageType: event
 ```
 ```
 *注意*: 相应配置组一旦指定 connectionSelector 参数,所有关于连接的参数都会被忽略. 上面例子中,` protocol: tcp | server: localhost | port: 5573` 会被忽略。
 *注意*: 相应配置组一旦指定 connectionSelector 参数,所有关于连接的参数都会被忽略. 上面例子中,` protocol: tcp | server: localhost | port: 5573` 会被忽略。
@@ -129,7 +129,7 @@ default:
 
 
 ## topic
 ## topic
 
 
-EdgeX 消息总线上监听的主题名称,缺省为 `events`。用户可以直接连接到 EdgeX 消息总线上的主题也可以连接到 application service 暴露的主题。需要注意的是,两种主题的消息数据类型不同,需要设置正确的
+EdgeX 消息总线上监听的主题名称,缺省为 `rules-events`。用户可以直接连接到 EdgeX 消息总线上的主题也可以连接到 application service 暴露的主题。需要注意的是,两种主题的消息数据类型不同,需要设置正确的
 messageType 类型。
 messageType 类型。
 
 
 ## type
 ## type
@@ -177,7 +177,7 @@ demo1: #Conf_key
   protocol: tcp
   protocol: tcp
   server: 10.211.55.6
   server: 10.211.55.6
   port: 5571
   port: 5571
-  topic: events
+  topic: rules-events
 ```
 ```
 
 
 如果你有个特定的源需要覆盖缺省的设置,你可以定义一个自定义的配置段。在上面的例子中,我们创建了一个新的配置 `demo1`,然后你在创建流定义的时候可以使用选项 `CONF_KEY` 来使用新的配置 (参考 [流定义规范](../../../sqls/streams.md) 获取更多详细信息)。
 如果你有个特定的源需要覆盖缺省的设置,你可以定义一个自定义的配置段。在上面的例子中,我们创建了一个新的配置 `demo1`,然后你在创建流定义的时候可以使用选项 `CONF_KEY` 来使用新的配置 (参考 [流定义规范](../../../sqls/streams.md) 获取更多详细信息)。

+ 22 - 3
etc/sources/edgex.json

@@ -56,7 +56,7 @@
 			},
 			},
 			{
 			{
 				"name": "server",
 				"name": "server",
-				"default": "localhost",
+				"default": "edgex-redis",
 				"optional": true,
 				"optional": true,
 				"connection_related": true,
 				"connection_related": true,
 				"control": "text",
 				"control": "text",
@@ -72,7 +72,7 @@
 			},
 			},
 			{
 			{
 				"name": "port",
 				"name": "port",
-				"default": 5573,
+				"default": 6379,
 				"optional": false,
 				"optional": false,
 				"control": "text",
 				"control": "text",
 				"connection_related": true,
 				"connection_related": true,
@@ -88,7 +88,7 @@
 			},
 			},
 			{
 			{
 				"name": "topic",
 				"name": "topic",
-				"default": "events",
+				"default": "rules-events",
 				"optional": false,
 				"optional": false,
 				"control": "text",
 				"control": "text",
 				"type": "string",
 				"type": "string",
@@ -123,6 +123,25 @@
 				}
 				}
 			},
 			},
 			{
 			{
+				"name": "messageType",
+				"default": "event",
+				"optional": true,
+				"control": "select",
+				"values": [
+					"event",
+					"request"
+				],
+				"type": "list_string",
+				"hint": {
+					"en_US": "The EdgeX message model type. If connected to the topic of EdgeX application service, the message model is an event. Otherwise, if connected to the topic of EdgeX message bus directly to receive the message from device service or core data, the message is request.",
+					"zh_CN": "EdgeX 消息模型类型。如果连接到 EdgeX application service 的 topic, 则消息为 event 类型。否则,如果直接连接到消息总线的 topic,接收到 device service 或者 core data 发出的数据,则消息类型为 request。"
+				},
+				"label": {
+					"en_US": "Message Type",
+					"zh_CN": "消息类型"
+				}
+			},
+			{
 				"name": "optional",
 				"name": "optional",
 				"default": [{
 				"default": [{
 						"name": "ClientId",
 						"name": "ClientId",

+ 3 - 3
etc/sources/edgex.yaml

@@ -1,9 +1,9 @@
 #Global Edgex configurations
 #Global Edgex configurations
 default:
 default:
   protocol: redis
   protocol: redis
-  server: localhost
-  port: 5563
-  topic: events
+  server: edgex-redis
+  port: 6379
+  topic: rules-events
   type: redis
   type: redis
   # Could be 'event' or 'request'.
   # Could be 'event' or 'request'.
   # If the message is from app service, the message type is an event;
   # If the message is from app service, the message type is an event;