diff --git a/apps/iot/src/http_handler/http_host_handler.erl b/apps/iot/src/http_handler/http_host_handler.erl index 3ab3a8a..b6aed73 100644 --- a/apps/iot/src/http_handler/http_host_handler.erl +++ b/apps/iot/src/http_handler/http_host_handler.erl @@ -100,7 +100,7 @@ handle_request("GET", "/host/detail", #{<<"id">> := HostId}, _) -> end end, DeployList), - HostInfo3 = maps:put(<<"deploy_list">>, HostInfo2, DeployList1), + HostInfo3 = maps:put(<<"deploy_list">>, DeployList1, HostInfo2), {ok, 200, iot_util:json_data(HostInfo3)} end; diff --git a/apps/iot/src/iot_mock.erl b/apps/iot/src/iot_mock.erl index f0d7b0d..8b44b75 100644 --- a/apps/iot/src/iot_mock.erl +++ b/apps/iot/src/iot_mock.erl @@ -36,7 +36,8 @@ insert_hosts() -> host_id = integer_to_binary(Id0), name = <<"N1000_0001">>, model = <<"N1000">>, - cell_id = rand:uniform(100) + cell_id = rand:uniform(100), + status = 1 }, host_model:add_host(Host) diff --git a/config/vm.args b/config/vm.args index 3ece3c9..b636b0b 100644 --- a/config/vm.args +++ b/config/vm.args @@ -5,7 +5,7 @@ +K true +A30 --mnesia dir '"/tmp/iot"' +-mnesia dir '"//usr/local/code/data/iot"' -mnesia dump_log_write_threshold 50000 -mnesia dc_dump_limit 40