Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
show cluster finished state
  • Loading branch information
janl committed Nov 15, 2014
1 parent 14e0374 commit 9c3eb0a1a332195a1e4f8e85a368bbc8a36469eb
Showing 2 changed files with 8 additions and 3 deletions.
@@ -13,7 +13,7 @@
-module(setup).

-export([enable_cluster/1, finish_cluster/0, add_node/1, receive_cookie/1]).
-export([is_cluster_enabled/0]).
-export([is_cluster_enabled/0, has_cluster_system_dbs/0]).

-include_lib("../couch/include/couch_db.hrl").

@@ -51,7 +51,7 @@ has_cluster_system_dbs() ->
case catch {
fabric:get_db_info("_users"),
fabric:get_db_info("_replicator"),
fabric:get_db_info("_cassim")} of
fabric:get_db_info("cassim")} of
{{ok, _}, {ok, _}, {ok, _}} -> ok;
_ -> no
end.
@@ -33,7 +33,12 @@ handle_setup_req(#httpd{method='GET'}=Req) ->
no ->
chttpd:send_json(Req, 201, {[{state, cluster_disabled}]});
ok ->
chttpd:send_json(Req, 201, {[{state, cluster_enabled}]})
case setup:has_cluster_system_dbs() of
no ->
chttpd:send_json(Req, 201, {[{state, cluster_enabled}]});
ok ->
chttpd:send_json(Req, 201, {[{state, cluster_finished}]})
end
end.

get_options(Options, Setup) ->

0 comments on commit 9c3eb0a

Please sign in to comment.