1
0
mirror of https://github.com/cmur2/openvpn-status-web.git synced 2026-04-03 12:18:34 +02:00

gem: refactor to prepare supporting flexible list headers

This commit is contained in:
cn
2022-01-17 11:37:50 +01:00
committed by Christian Nicolai
parent 406ed867f7
commit 39d2b3ce94
6 changed files with 72 additions and 18 deletions

View File

@@ -26,7 +26,9 @@ module OpenVPNStatusWeb
end
status = Status.new
status.client_list_headers = ['Common Name', 'Real Address', 'Data Received', 'Data Sent', 'Connected Since']
status.client_list = client_list[2..-1].map { |client| parse_client(client) }
status.routing_table_headers = ['Virtual Address', 'Common Name', 'Real Address', 'Last Ref']
status.routing_table = routing_table[1..-1].map { |route| parse_route(route) }
status.global_stats = global_stats.map { |global| parse_global(global) }
status