rename Datalayers to DataStorage

This commit is contained in:
hxy7yx
2025-05-08 18:14:00 -07:00
parent a999c9f80c
commit edded61904
5 changed files with 11 additions and 12 deletions
+1 -1
View File
@@ -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
+5 -5
View File
@@ -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
}
+3 -3
View File
@@ -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;
}
+2 -2
View File
@@ -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) {