docs: add missing descriptions for license schema fields
This commit is contained in:
parent
4fa961caeb
commit
900c6ec43e
|
@ -0,0 +1,81 @@
|
||||||
|
emqx_license_schema {
|
||||||
|
license_root {
|
||||||
|
desc {
|
||||||
|
en: """
|
||||||
|
EMQX Enterprise license.
|
||||||
|
A license is either a `key` or a `file`.
|
||||||
|
When `key` and `file` are both configured, `key` is used.
|
||||||
|
|
||||||
|
EMQX by default starts with a trial license. For a different license,
|
||||||
|
visit https://www.emqx.com/apply-licenses/emqx to apply.
|
||||||
|
"""
|
||||||
|
zh: """
|
||||||
|
EMQX企业许可证。
|
||||||
|
许可证是一个`钥匙'或一个`文件'。
|
||||||
|
当 "key "和 "file "都被配置时,使用 "key"。
|
||||||
|
|
||||||
|
EMQX默认以一个试用许可证开始。 对于不同的许可证。
|
||||||
|
请访问https://www.emqx.com/apply-licenses/emqx 来申请。
|
||||||
|
"""
|
||||||
|
}
|
||||||
|
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