mirror of
https://github.com/internetee/registry.git
synced 2025-07-30 14:36:22 +02:00
Added csv export to registrar api_users and white_ips
This commit is contained in:
parent
316f00cadc
commit
0f16ec77f5
11 changed files with 104 additions and 6 deletions
|
@ -72,5 +72,19 @@ class WhiteIp < ApplicationRecord
|
|||
rescue StandardError => _e
|
||||
nil
|
||||
end
|
||||
|
||||
def csv_header
|
||||
%w[IPv4 IPv6 Interfaces Created Updated]
|
||||
end
|
||||
end
|
||||
|
||||
def as_csv_row
|
||||
[
|
||||
ipv4,
|
||||
ipv6,
|
||||
interfaces.join(', ').upcase,
|
||||
created_at,
|
||||
updated_at
|
||||
]
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue