mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 00:12:03 +02:00
Add logging to white ip
This commit is contained in:
parent
8e37355e13
commit
76ea1389e6
7 changed files with 73 additions and 27 deletions
5
app/models/version/white_ip_version.rb
Normal file
5
app/models/version/white_ip_version.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
class WhiteIpVersion < PaperTrail::Version
|
||||
include VersionSession
|
||||
self.table_name = :log_white_ips
|
||||
self.sequence_name = :log_white_ips_id_seq
|
||||
end
|
|
@ -1,4 +1,5 @@
|
|||
class WhiteIp < ActiveRecord::Base
|
||||
include Versions
|
||||
belongs_to :registrar
|
||||
|
||||
# rubocop: disable Metrics/LineLength
|
||||
|
@ -12,5 +13,9 @@ class WhiteIp < ActiveRecord::Base
|
|||
errors.add(:base, I18n.t(:ipv4_or_ipv6_must_be_present))
|
||||
end
|
||||
|
||||
INTERFACES = ['epp', 'repp', 'registrar']
|
||||
INTERFACE_EPP = 'epp'
|
||||
INTERFACE_REPP = 'repp'
|
||||
INTERFACE_REGISTRAR = 'registrar'
|
||||
|
||||
INTERFACES = [INTERFACE_EPP, INTERFACE_REPP, INTERFACE_REGISTRAR]
|
||||
end
|
||||
|
|
|
@ -13,12 +13,12 @@
|
|||
.col-md-4.control-label
|
||||
= f.label :ipv4
|
||||
.col-md-7
|
||||
= f.text_field(:ipv4, class: 'form-control')
|
||||
= f.text_field(:ipv4, class: 'form-control', ipv4: true)
|
||||
.form-group
|
||||
.col-md-4.control-label
|
||||
= f.label :ipv6
|
||||
.col-md-7
|
||||
= f.text_field(:ipv6, class: 'form-control')
|
||||
= f.text_field(:ipv6, class: 'form-control', ipv6: true)
|
||||
.form-group
|
||||
.col-md-4.control-label
|
||||
= f.label :interface
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue