mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 19:48:28 +02:00
Create white ips
This commit is contained in:
parent
254849494f
commit
8e37355e13
15 changed files with 246 additions and 3 deletions
30
app/views/admin/white_ips/_form.haml
Normal file
30
app/views/admin/white_ips/_form.haml
Normal file
|
@ -0,0 +1,30 @@
|
|||
= form_for([:admin, @registrar, @white_ip], html: {class: 'form-horizontal'}) do |f|
|
||||
= render 'shared/full_errors', object: @white_ip
|
||||
|
||||
.row
|
||||
.col-md-8
|
||||
.form-group
|
||||
.col-md-4.control-label
|
||||
= f.label :registrar
|
||||
.col-md-7
|
||||
= f.text_field(:registrar, class: 'form-control', disabled: :disabled)
|
||||
= f.hidden_field(:registrar_id, class: 'js-registrar-id')
|
||||
.form-group
|
||||
.col-md-4.control-label
|
||||
= f.label :ipv4
|
||||
.col-md-7
|
||||
= f.text_field(:ipv4, class: 'form-control')
|
||||
.form-group
|
||||
.col-md-4.control-label
|
||||
= f.label :ipv6
|
||||
.col-md-7
|
||||
= f.text_field(:ipv6, class: 'form-control')
|
||||
.form-group
|
||||
.col-md-4.control-label
|
||||
= f.label :interface
|
||||
.col-md-7
|
||||
= f.select :interface, [[t(:choose), '']] + WhiteIp::INTERFACES.map {|x| [x.upcase, x]}, {}, class: 'form-control selectize', placeholder: t(:choose)
|
||||
%hr
|
||||
.row
|
||||
.col-md-8.text-right
|
||||
= button_tag(t(:save), class: 'btn btn-primary')
|
5
app/views/admin/white_ips/edit.haml
Normal file
5
app/views/admin/white_ips/edit.haml
Normal file
|
@ -0,0 +1,5 @@
|
|||
- content_for :actions do
|
||||
= link_to(t(:back_to_registrar), admin_registrar_path(@registrar), class: 'btn btn-default')
|
||||
|
||||
= render 'shared/title', name: t(:edit_white_ip)
|
||||
= render 'form'
|
5
app/views/admin/white_ips/new.haml
Normal file
5
app/views/admin/white_ips/new.haml
Normal file
|
@ -0,0 +1,5 @@
|
|||
- content_for :actions do
|
||||
= link_to(t(:back_to_registrar), admin_registrar_path(@registrar), class: 'btn btn-default')
|
||||
|
||||
= render 'shared/title', name: t(:create_new_white_ip)
|
||||
= render 'form'
|
24
app/views/admin/white_ips/show.haml
Normal file
24
app/views/admin/white_ips/show.haml
Normal file
|
@ -0,0 +1,24 @@
|
|||
- content_for :actions do
|
||||
= link_to(t(:edit), edit_admin_registrar_white_ip_path(@registrar, @white_ip), class: 'btn btn-primary')
|
||||
= link_to(t(:delete), admin_registrar_white_ip_path(@registrar, @white_ip),
|
||||
method: :delete, data: { confirm: t(:are_you_sure) }, class: 'btn btn-danger')
|
||||
= render 'shared/title', name: t('white_ip')
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h3.panel-title= t(:general)
|
||||
.panel-body
|
||||
%dl.dl-horizontal
|
||||
%dt= t(:registrar)
|
||||
%dd= link_to(@registrar, [:admin, @registrar])
|
||||
|
||||
%dt= t(:ipv4)
|
||||
%dd= @white_ip.ipv4
|
||||
|
||||
%dt= t(:ipv6)
|
||||
%dd= @white_ip.ipv6
|
||||
|
||||
%dt= t(:interface)
|
||||
%dd= @white_ip.interface.upcase
|
Loading…
Add table
Add a link
Reference in a new issue