Flip inbound/outbound traffic vertically on device chart
Changed inbound to positive values (top) and outbound to negative values (bottom)
This commit is contained in:
parent
80a688995a
commit
70a4d32a65
1 changed files with 4 additions and 4 deletions
|
|
@ -398,8 +398,8 @@ defmodule ToweropsWeb.DeviceLive.Show do
|
|||
out_data = calculate_bps_data(all_stats, :outbound)
|
||||
|
||||
datasets = [
|
||||
%{label: "Inbound", data: in_data},
|
||||
%{label: "Outbound", data: out_data}
|
||||
%{label: "Outbound", data: out_data},
|
||||
%{label: "Inbound", data: in_data}
|
||||
]
|
||||
|
||||
Jason.encode!(%{datasets: datasets})
|
||||
|
|
@ -414,7 +414,7 @@ defmodule ToweropsWeb.DeviceLive.Show do
|
|||
|
||||
%{
|
||||
x: DateTime.to_unix(t2, :millisecond),
|
||||
y: -bps
|
||||
y: bps
|
||||
}
|
||||
end)
|
||||
end
|
||||
|
|
@ -428,7 +428,7 @@ defmodule ToweropsWeb.DeviceLive.Show do
|
|||
|
||||
%{
|
||||
x: DateTime.to_unix(t2, :millisecond),
|
||||
y: bps
|
||||
y: -bps
|
||||
}
|
||||
end)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue