Skip to content
Permalink
Browse files

Merge branch 'test' into dev

  • Loading branch information
Licenser committed Mar 27, 2014
2 parents 9ab3c63 + 26ac62c commit 71e5507a86b177bb22f277e385aaaec750ffc85e
Showing with 23 additions and 23 deletions.
  1. +23 −23 apps/wiggle/src/wiggle_cloud_handler.erl
@@ -43,40 +43,40 @@ read(Req, State = #state{path = [<<"connection">>]}) ->

read(Req, State = #state{path = []}) ->
{Versions1, Metrics1, Warnings1} =
case libsnarl:status() of
{ok, {MetricsSna, WarningsSna}} ->
case libsnarl:version() of
{ok, SnaVer} when is_binary(SnaVer) ->
{[{snarl, SnaVer}], MetricsSna, WarningsSna};
_ ->
{[], MetricsSna, [{<<"snarl">>, <<"down(version)">>} | WarningsSna]}
end;
case {libsnarl:version(), libsnarl:status()} of
{{ok, SnaVer}, {ok, {MetricsSna, WarningsSna}}}
when is_binary(SnaVer) ->
{[{snarl, SnaVer}], MetricsSna, WarningsSna};
_ ->
{[], [], [{<<"snarl">>, <<"down(status)">>}]}
{[], [], [[[{<<"category">>, <<"snarl">>},
{<<"element">>, <<"all">>},
{<<"message">>, <<"The Snarl subsystem could not be reached.">>}
]]]}
end,
{Versions2, Metrics2, Warnings2} =
case libhowl:version() of
{ok, HowlVer} when is_binary(HowlVer) ->
{[{howl, HowlVer} | Versions1], Metrics1, Warnings1};
_ ->
{Versions1, Metrics1, [{<<"howl">>, <<"down">>} | Warnings1]}
{Versions1, Metrics1, [[{<<"category">>, <<"howl">>},
{<<"element">>, <<"all">>},
{<<"message">>, <<"The Howl subsystem could not be reached.">>}
] | Warnings1]}
end,
{Versions3, Metrics3, Warnings3} =
case libsniffle:cloud_status() of
{ok, {MetricsSni, WarningsSni}} ->
case libsniffle:version() of
{ok, SniVer} when is_binary(SniVer) ->
{ok, Vms} = libsniffle:vm_list(),
{[{sniffle, SniVer} | Versions2],
[{<<"vms">>, length(Vms)} | MetricsSni] ++ Metrics2,
WarningsSni ++ Warnings2};
_ ->
{Versions2, MetricsSni ++ Metrics2,
WarningsSni ++ [{<<"sniffle">>, <<"down">>} | Warnings2]}
end;
case {libsniffle:version(), libsniffle:cloud_status()} of
{{ok, SniVer}, {ok, {MetricsSni, WarningsSni}}}
when is_binary(SniVer) ->
{ok, Vms} = libsniffle:vm_list(),
{[{sniffle, SniVer} | Versions2],
[{<<"vms">>, length(Vms)} | MetricsSni] ++ Metrics2,
WarningsSni ++ Warnings2};
_ ->
{Versions2, Metrics2,
[{<<"sniffle">>, <<"down">>} | Warnings2]}
[[{<<"category">>, <<"sniffle">>},
{<<"element">>, <<"all">>},
{<<"message">>, <<"The Sniffle subsystem could not be reached.">>}
] | Warnings2]}
end,
{[{versions, [{wiggle, ?VERSION} | Versions3]},
{metrics, Metrics3},

0 comments on commit 71e5507

Please sign in to comment.
You can’t perform that action at this time.