mirror of
https://github.com/internetee/registry.git
synced 2025-08-06 01:35:10 +02:00
Restructure white ip interfaces #2713
This commit is contained in:
parent
cc32312328
commit
c6073c7e87
9 changed files with 32 additions and 23 deletions
|
@ -92,10 +92,10 @@
|
|||
%tr
|
||||
%th{class: 'col-xs-4'}= t(:ipv4)
|
||||
%th{class: 'col-xs-6'}= t(:ipv6)
|
||||
%th{class: 'col-xs-2'}= t(:interface)
|
||||
%th{class: 'col-xs-2'}= t(:interfaces)
|
||||
%tbody
|
||||
- @registrar.white_ips.order(:interface).each do |x|
|
||||
- @registrar.white_ips.each do |x|
|
||||
%tr
|
||||
%td= link_to(x.ipv4, [:admin, @registrar, x])
|
||||
%td= link_to(x.ipv6, [:admin, @registrar, x])
|
||||
%td= x.interface.upcase
|
||||
%td= x.interfaces.join(', ').upcase
|
||||
|
|
|
@ -19,11 +19,13 @@
|
|||
= f.label :ipv6
|
||||
.col-md-7
|
||||
= f.text_field(:ipv6, class: 'form-control', ipv6: true, autocomplete: 'off')
|
||||
.form-group
|
||||
.col-md-4.control-label
|
||||
= f.label :interface
|
||||
.col-md-7
|
||||
= f.select :interface, WhiteIp::INTERFACES.map {|x| [x.upcase, x]}, {}, class: 'form-control selectize'
|
||||
- WhiteIp::INTERFACES.each do |x|
|
||||
.form-group
|
||||
.col-md-4.control-label
|
||||
= f.label x
|
||||
.col-md-7
|
||||
= f.check_box :interfaces, { multiple: true }, x, nil
|
||||
= hidden_field_tag "white_ip[interfaces][]", nil
|
||||
%hr
|
||||
.row
|
||||
.col-md-8.text-right
|
||||
|
|
|
@ -20,5 +20,5 @@
|
|||
%dt= t(:ipv6)
|
||||
%dd= @white_ip.ipv6
|
||||
|
||||
%dt= t(:interface)
|
||||
%dd= @white_ip.interface.upcase
|
||||
%dt= t(:interfaces)
|
||||
%dd= @white_ip.interfaces.join(', ').upcase
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue