Skip to content

Commit

Permalink
Fix API version and polish tx graph
Browse files Browse the repository at this point in the history
  • Loading branch information
gotthardp committed Jul 31, 2017
1 parent 7ff26b1 commit 09850af
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion priv/admin/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ return {
$scope.txChartObject.options = {
"vAxes": {
0: {"title": 'Tx Time [ms]', "minValue": 0, "maxValue": 5000},
1: {"title": 'Tx in Hour [ms]', "minValue": 0, "maxValue": 36000}
1: {"title": 'Tx in Hour [ms]', "minValue": 0, "maxValue": 1}
},
"series": {
0: {"targetAxisIndex": 0},
Expand Down
2 changes: 1 addition & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
]}.

{deps, [
{lorawan_server_api, {git, "https://github.com/gotthardp/lorawan-server-api.git", {branch, "master"}}},
{lorawan_server_api, {git, "https://github.com/gotthardp/lorawan-server-api.git", {tag, "v0.4.8"}}},
{lager, {git, "https://github.com/basho/lager.git", {tag, "3.2.4"}}},
{syn, {git, "https://github.com/ostinelli/syn.git", {tag, "1.6.1"}}},
{worker_pool, {git, "https://github.com/inaka/worker_pool.git", {tag, "3.0.0"}}},
Expand Down
5 changes: 3 additions & 2 deletions src/lorawan_admin_gwgraph.erl
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ get_gateway(Req, #state{format=tgraph}=State) ->
fun ({Date, {_, Duration, Sum}}) ->
{true, [{c, [
[{v, encode_timestamp(Date)}],
[{v, Duration}],
[{v, Sum}]
[{v, round(Duration)}],
[{v, Sum/36000}, {f, <<(integer_to_binary(round(Sum)))/binary,
" (", (float_to_binary(Sum/36000, [{decimals, 3}, compact]))/binary, "%)">>}]
]}]};
(_Else) ->
false
Expand Down

0 comments on commit 09850af

Please sign in to comment.