feat: hide dashboard's default_username/default_password conf

This commit is contained in:
Zhongwen Deng 2023-04-14 21:57:09 +08:00
parent 57e8e2dae2
commit 99d6c5e179
1 changed files with 6 additions and 1 deletions

View File

@ -42,6 +42,7 @@ fields("dashboard") ->
#{
default => <<"10s">>,
desc => ?DESC(sample_interval),
importance => ?IMPORTANCE_HIDDEN,
validator => fun validate_sample_interval/1
}
)},
@ -61,6 +62,7 @@ fields("dashboard") ->
#{
desc => ?DESC(bootstrap_users_file),
required => false,
importance => ?IMPORTANCE_HIDDEN,
default => <<>>
%% deprecated => {since, "5.1.0"}
}
@ -97,7 +99,7 @@ fields("https") ->
bind(18084)
| common_listener_fields() ++
exclude_fields(
["fail_if_no_peer_cert"],
["fail_if_no_peer_cert", "password"],
emqx_schema:server_ssl_opts_schema(#{}, true)
)
].
@ -210,6 +212,7 @@ default_username(default) -> <<"admin">>;
default_username(required) -> true;
default_username(desc) -> ?DESC(default_username);
default_username('readOnly') -> true;
default_username(importance) -> ?IMPORTANCE_HIDDEN;
default_username(_) -> undefined.
default_password(type) -> binary();
@ -219,6 +222,7 @@ default_password('readOnly') -> true;
default_password(sensitive) -> true;
default_password(converter) -> fun emqx_schema:password_converter/2;
default_password(desc) -> ?DESC(default_password);
default_password(importance) -> ?IMPORTANCE_HIDDEN;
default_password(_) -> undefined.
cors(type) -> boolean();
@ -231,6 +235,7 @@ i18n_lang(type) -> ?ENUM([en, zh]);
i18n_lang(default) -> en;
i18n_lang('readOnly') -> true;
i18n_lang(desc) -> ?DESC(i18n_lang);
i18n_lang(importance) -> ?IMPORTANCE_HIDDEN;
i18n_lang(_) -> undefined.
validate_sample_interval(Second) ->