chore: mv i18n.conf to emqx_dashboard/priv/
This commit is contained in:
parent
eb6977f23e
commit
9768e302c2
|
@ -44,6 +44,7 @@ _packages
|
||||||
elvis
|
elvis
|
||||||
emqx_dialyzer_*_plt
|
emqx_dialyzer_*_plt
|
||||||
*/emqx_dashboard/priv/www
|
*/emqx_dashboard/priv/www
|
||||||
|
*/emqx_dashboard/priv/i18n.conf
|
||||||
dist.zip
|
dist.zip
|
||||||
scripts/git-token
|
scripts/git-token
|
||||||
apps/*/etc/*.all
|
apps/*/etc/*.all
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -138,7 +138,7 @@ reset(Node, KeyPath, Opts) ->
|
||||||
%% @doc Called from build script.
|
%% @doc Called from build script.
|
||||||
-spec dump_schema(file:name_all()) -> ok.
|
-spec dump_schema(file:name_all()) -> ok.
|
||||||
dump_schema(Dir) ->
|
dump_schema(Dir) ->
|
||||||
I18nFile = emqx:etc_file("i18n.conf"),
|
I18nFile = emqx_dashboard:i18n_file(),
|
||||||
dump_schema(Dir, emqx_conf_schema, I18nFile).
|
dump_schema(Dir, emqx_conf_schema, I18nFile).
|
||||||
|
|
||||||
dump_schema(Dir, SchemaModule, I18nFile) ->
|
dump_schema(Dir, SchemaModule, I18nFile) ->
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
init_i18n/2,
|
init_i18n/2,
|
||||||
init_i18n/0,
|
init_i18n/0,
|
||||||
get_i18n/0,
|
get_i18n/0,
|
||||||
|
i18n_file/0,
|
||||||
clear_i18n/0
|
clear_i18n/0
|
||||||
]).
|
]).
|
||||||
|
|
||||||
|
@ -271,7 +272,7 @@ return_unauthorized(Code, Message) ->
|
||||||
|
|
||||||
i18n_file() ->
|
i18n_file() ->
|
||||||
case application:get_env(emqx_dashboard, i18n_file) of
|
case application:get_env(emqx_dashboard, i18n_file) of
|
||||||
undefined -> emqx:etc_file("i18n.conf");
|
undefined -> filename:join([code:priv_dir(emqx_dashboard), "i18n.conf"]);
|
||||||
{ok, File} -> File
|
{ok, File} -> File
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
|
@ -289,7 +289,7 @@ format(_Node, Info = #{memory_total := Total, memory_used := Used}) ->
|
||||||
LogPath =
|
LogPath =
|
||||||
case log_path() of
|
case log_path() of
|
||||||
undefined ->
|
undefined ->
|
||||||
<<"The log path is not yet set">>;
|
<<"log.file_handler.default.enable is false,only log to console">>;
|
||||||
Path ->
|
Path ->
|
||||||
filename:join(SysPath, Path)
|
filename:join(SysPath, Path)
|
||||||
end,
|
end,
|
||||||
|
|
4
mix.exs
4
mix.exs
|
@ -291,6 +291,8 @@ defmodule EMQXUmbrella.MixProject do
|
||||||
end
|
end
|
||||||
|
|
||||||
defp copy_files(release, release_type, package_type, edition_type) do
|
defp copy_files(release, release_type, package_type, edition_type) do
|
||||||
|
IO.inspect :zhongwen
|
||||||
|
IO.inspect release.applications.emqx_dashboard
|
||||||
overwrite? = Keyword.get(release.options, :overwrite, false)
|
overwrite? = Keyword.get(release.options, :overwrite, false)
|
||||||
|
|
||||||
bin = Path.join(release.path, "bin")
|
bin = Path.join(release.path, "bin")
|
||||||
|
@ -325,7 +327,7 @@ defmodule EMQXUmbrella.MixProject do
|
||||||
# required by emqx_dashboard
|
# required by emqx_dashboard
|
||||||
Mix.Generator.copy_file(
|
Mix.Generator.copy_file(
|
||||||
"apps/emqx_dashboard/etc/i18n.conf.all",
|
"apps/emqx_dashboard/etc/i18n.conf.all",
|
||||||
Path.join(etc, "i18n.conf"),
|
Path.join(release.path, "lib/emqx_dashboard-#{release.applications.emqx_dashboard[:vsn]}/priv/i18n.conf"),
|
||||||
force: overwrite?
|
force: overwrite?
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -425,13 +425,15 @@ emqx_etc_overlay_common() ->
|
||||||
emqx_etc_overlay_per_edition(ce) ->
|
emqx_etc_overlay_per_edition(ce) ->
|
||||||
[
|
[
|
||||||
{"{{base_dir}}/lib/emqx_conf/etc/emqx.conf.all", "etc/emqx.conf"},
|
{"{{base_dir}}/lib/emqx_conf/etc/emqx.conf.all", "etc/emqx.conf"},
|
||||||
{"{{base_dir}}/lib/emqx_dashboard/etc/i18n.conf.all", "etc/i18n.conf"}
|
{"{{base_dir}}/lib/emqx_dashboard/etc/i18n.conf.all",
|
||||||
|
"{{base_dir}}/lib/emqx_dashboard/priv/i18n.conf"}
|
||||||
];
|
];
|
||||||
emqx_etc_overlay_per_edition(ee) ->
|
emqx_etc_overlay_per_edition(ee) ->
|
||||||
[
|
[
|
||||||
{"{{base_dir}}/lib/emqx_conf/etc/emqx_enterprise.conf.all", "etc/emqx_enterprise.conf"},
|
{"{{base_dir}}/lib/emqx_conf/etc/emqx_enterprise.conf.all", "etc/emqx_enterprise.conf"},
|
||||||
{"{{base_dir}}/lib/emqx_conf/etc/emqx.conf.all", "etc/emqx.conf"},
|
{"{{base_dir}}/lib/emqx_conf/etc/emqx.conf.all", "etc/emqx.conf"},
|
||||||
{"{{base_dir}}/lib/emqx_dashboard/etc/i18n.conf.all", "etc/i18n.conf"}
|
{"{{base_dir}}/lib/emqx_dashboard/etc/i18n.conf.all",
|
||||||
|
"{{base_dir}}/lib/emqx_dashboard/priv/i18n.conf"}
|
||||||
].
|
].
|
||||||
|
|
||||||
get_vsn(Profile) ->
|
get_vsn(Profile) ->
|
||||||
|
|
Loading…
Reference in New Issue