mirror of
https://github.com/emqx/neuron.git
synced 2026-10-17 04:40:42 +08:00
rename Datalayers to DataStorage
This commit is contained in:
@@ -8,7 +8,7 @@ set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
set(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/plugins")
|
||||
|
||||
file(COPY ${CMAKE_SOURCE_DIR}/plugins/datalayers/datalayers.json DESTINATION ${CMAKE_BINARY_DIR}/plugins/schema/)
|
||||
file(COPY ${CMAKE_SOURCE_DIR}/plugins/datalayers/datastorage.json DESTINATION ${CMAKE_BINARY_DIR}/plugins/schema/)
|
||||
|
||||
add_library(${PROJECT_NAME} SHARED
|
||||
datalayers_config.c
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
|
||||
#include "datalayers_plugin_intf.h"
|
||||
|
||||
#define DESCRIPTION "Northbound Datalayers plugin."
|
||||
#define DESCRIPTION_ZH "北向应用 Datalayers 插件"
|
||||
#define DESCRIPTION "Northbound DataStorage plugin."
|
||||
#define DESCRIPTION_ZH "北向应用 DataStorage 插件"
|
||||
|
||||
const neu_plugin_module_t neu_plugin_module = {
|
||||
.version = NEURON_PLUGIN_VER_1_0,
|
||||
.schema = "datalayers",
|
||||
.module_name = "Datalayers",
|
||||
.schema = "datastorage",
|
||||
.module_name = "DataStorage",
|
||||
.module_descr = DESCRIPTION,
|
||||
.module_descr_zh = DESCRIPTION_ZH,
|
||||
.intf_funs = &datalayers_plugin_intf_funs,
|
||||
@@ -33,5 +33,5 @@ const neu_plugin_module_t neu_plugin_module = {
|
||||
.type = NEU_NA_TYPE_APP,
|
||||
.display = true,
|
||||
.single = true,
|
||||
.single_name = "Datalayers",
|
||||
.single_name = "DataStorage",
|
||||
};
|
||||
@@ -43,7 +43,6 @@
|
||||
"description_zh": "Datalayers 用户密码",
|
||||
"attribute": "required",
|
||||
"type": "string",
|
||||
"default": "public",
|
||||
"valid": {
|
||||
"length": 255
|
||||
}
|
||||
@@ -45,7 +45,7 @@ void handle_add_adapter(nng_aio *aio)
|
||||
if (strlen(req->name) >= NEU_NODE_NAME_LEN) {
|
||||
CHECK_NODE_NAME_LENGTH_ERR;
|
||||
} else if (strcmp(req->name, "monitor") == 0 ||
|
||||
strcmp(req->name, "Datalayers") == 0) {
|
||||
strcmp(req->name, "DataStorage") == 0) {
|
||||
CHECK_NODE_SINGLE_ERR;
|
||||
} else {
|
||||
int ret = 0;
|
||||
@@ -89,8 +89,8 @@ static inline int send_node_update_req(nng_aio * aio,
|
||||
|
||||
if (strcmp(req->new_name, "monitor") == 0 ||
|
||||
strcmp(req->name, "monitor") == 0 ||
|
||||
strcmp(req->new_name, "Datalayers") == 0 ||
|
||||
strcmp(req->name, "Datalayers") == 0) {
|
||||
strcmp(req->new_name, "DataStorage") == 0 ||
|
||||
strcmp(req->name, "DataStorage") == 0) {
|
||||
return NEU_ERR_NODE_NOT_ALLOW_UPDATE;
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ void handle_datalayers_get_groups(nng_aio *aio)
|
||||
NEU_VALIDATE_JWT(aio);
|
||||
|
||||
// required parameter
|
||||
snprintf(cmd.app, sizeof(cmd.app), "%s", "datalayers");
|
||||
snprintf(cmd.app, sizeof(cmd.app), "%s", "DataStorage");
|
||||
|
||||
// optional parameter
|
||||
ret = neu_http_get_param_str(aio, "driver", cmd.driver, sizeof(cmd.driver));
|
||||
@@ -112,7 +112,7 @@ void handle_datalayers_get_tags(nng_aio *aio)
|
||||
NEU_VALIDATE_JWT(aio);
|
||||
|
||||
// required parameter
|
||||
snprintf(cmd.app, sizeof(cmd.app), "%s", "datalayers");
|
||||
snprintf(cmd.app, sizeof(cmd.app), "%s", "DataStorage");
|
||||
|
||||
ret = neu_plugin_op(plugin, header, &cmd);
|
||||
if (ret != 0) {
|
||||
|
||||
Reference in New Issue
Block a user