Merge pull request #8732 from thalesmg/fix-missing-descs-license
docs: add missing descriptions for license schema fields
This commit is contained in:
commit
82377d4b33
|
@ -0,0 +1,77 @@
|
||||||
|
emqx_license_schema {
|
||||||
|
license_root {
|
||||||
|
desc {
|
||||||
|
en: "Defines the EMQX Enterprise license. \n\n"
|
||||||
|
"A license is either a `key` or a `file`.\n"
|
||||||
|
"When `key` and `file` are both configured, `key` is used.\n"
|
||||||
|
"\n"
|
||||||
|
"EMQX comes with a default trial license. For production use, please \n"
|
||||||
|
"visit https://www.emqx.com/apply-licenses/emqx to apply."
|
||||||
|
zh: "EMQX企业许可证。\n"
|
||||||
|
"许可证是一个 `key` 或一个 `file`。\n"
|
||||||
|
"当 `key` 和 `file` 同时被配置时,优先使用 `key`。\n"
|
||||||
|
"\n"
|
||||||
|
"EMQX 自带一个默认的试用许可证,若需要在生产环境部署,\n"
|
||||||
|
"请访问 https://www.emqx.com/apply-licenses/emqx 来申请。\n"
|
||||||
|
}
|
||||||
|
label {
|
||||||
|
en: "License"
|
||||||
|
zh: "许可证"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
license_type_field {
|
||||||
|
desc {
|
||||||
|
en: "License type"
|
||||||
|
zh: "许可证类型"
|
||||||
|
}
|
||||||
|
label {
|
||||||
|
en: "License type"
|
||||||
|
zh: "许可证类型"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
key_field {
|
||||||
|
desc {
|
||||||
|
en: "License string"
|
||||||
|
zh: "许可证字符串"
|
||||||
|
}
|
||||||
|
label {
|
||||||
|
en: "License string"
|
||||||
|
zh: "许可证字符串"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
file_field {
|
||||||
|
desc {
|
||||||
|
en: "Path to the license file"
|
||||||
|
zh: "许可证文件的路径"
|
||||||
|
}
|
||||||
|
label {
|
||||||
|
en: "Path to the license file"
|
||||||
|
zh: "许可证文件的路径"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
connection_low_watermark_field {
|
||||||
|
desc {
|
||||||
|
en: "Low watermark limit below which license connection quota usage alarms are deactivated"
|
||||||
|
zh: "低水位限制,低于此水位线时系统会清除连接配额使用告警"
|
||||||
|
}
|
||||||
|
label {
|
||||||
|
en: "Connection low watermark"
|
||||||
|
zh: "连接低水位线"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
connection_high_watermark_field {
|
||||||
|
desc {
|
||||||
|
en: "High watermark limit above which license connection quota usage alarms are activated"
|
||||||
|
zh: "高水位线,连接数超过这个水位线时,系统会触发许可证连接配额使用告警"
|
||||||
|
}
|
||||||
|
label {
|
||||||
|
en: "Connection high watermark"
|
||||||
|
zh: "连接高水位"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -5,6 +5,7 @@
|
||||||
-module(emqx_license_schema).
|
-module(emqx_license_schema).
|
||||||
|
|
||||||
-include_lib("typerefl/include/types.hrl").
|
-include_lib("typerefl/include/types.hrl").
|
||||||
|
-include_lib("hocon/include/hoconsc.hrl").
|
||||||
|
|
||||||
%%------------------------------------------------------------------------------
|
%%------------------------------------------------------------------------------
|
||||||
%% hocon_schema callbacks
|
%% hocon_schema callbacks
|
||||||
|
@ -26,13 +27,7 @@ roots() ->
|
||||||
hoconsc:mk(
|
hoconsc:mk(
|
||||||
license_type(),
|
license_type(),
|
||||||
#{
|
#{
|
||||||
desc =>
|
desc => ?DESC(license_root)
|
||||||
"EMQX Enterprise license.\n"
|
|
||||||
"A license is either a `key` or a `file`.\n"
|
|
||||||
"When `key` and `file` are both configured, `key` is used.\n"
|
|
||||||
"\n"
|
|
||||||
"EMQX by default starts with a trial license. For a different license,\n"
|
|
||||||
"visit https://www.emqx.com/apply-licenses/emqx to apply.\n"
|
|
||||||
}
|
}
|
||||||
)}
|
)}
|
||||||
].
|
].
|
||||||
|
@ -41,18 +36,20 @@ fields(key_license) ->
|
||||||
[
|
[
|
||||||
{type, #{
|
{type, #{
|
||||||
type => key,
|
type => key,
|
||||||
required => true
|
required => true,
|
||||||
|
desc => ?DESC(license_type_field)
|
||||||
}},
|
}},
|
||||||
{key, #{
|
{key, #{
|
||||||
type => string(),
|
type => string(),
|
||||||
%% so it's not logged
|
%% so it's not logged
|
||||||
sensitive => true,
|
sensitive => true,
|
||||||
required => true,
|
required => true,
|
||||||
desc => "License string"
|
desc => ?DESC(key_field)
|
||||||
}},
|
}},
|
||||||
{file, #{
|
{file, #{
|
||||||
type => string(),
|
type => string(),
|
||||||
required => false
|
required => false,
|
||||||
|
desc => ?DESC(file_field)
|
||||||
}}
|
}}
|
||||||
| common_fields()
|
| common_fields()
|
||||||
];
|
];
|
||||||
|
@ -60,17 +57,19 @@ fields(file_license) ->
|
||||||
[
|
[
|
||||||
{type, #{
|
{type, #{
|
||||||
type => file,
|
type => file,
|
||||||
required => true
|
required => true,
|
||||||
|
desc => ?DESC(license_type_field)
|
||||||
}},
|
}},
|
||||||
{key, #{
|
{key, #{
|
||||||
type => string(),
|
type => string(),
|
||||||
%% so it's not logged
|
%% so it's not logged
|
||||||
sensitive => true,
|
sensitive => true,
|
||||||
required => false
|
required => false,
|
||||||
|
desc => ?DESC(key_field)
|
||||||
}},
|
}},
|
||||||
{file, #{
|
{file, #{
|
||||||
type => string(),
|
type => string(),
|
||||||
desc => "Path to the license file"
|
desc => ?DESC(file_field)
|
||||||
}}
|
}}
|
||||||
| common_fields()
|
| common_fields()
|
||||||
].
|
].
|
||||||
|
@ -87,12 +86,12 @@ common_fields() ->
|
||||||
{connection_low_watermark, #{
|
{connection_low_watermark, #{
|
||||||
type => emqx_schema:percent(),
|
type => emqx_schema:percent(),
|
||||||
default => "75%",
|
default => "75%",
|
||||||
desc => ""
|
desc => ?DESC(connection_low_watermark_field)
|
||||||
}},
|
}},
|
||||||
{connection_high_watermark, #{
|
{connection_high_watermark, #{
|
||||||
type => emqx_schema:percent(),
|
type => emqx_schema:percent(),
|
||||||
default => "80%",
|
default => "80%",
|
||||||
desc => ""
|
desc => ?DESC(connection_high_watermark_field)
|
||||||
}}
|
}}
|
||||||
].
|
].
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue