1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2026-01-17 13:39:46 +00:00

admin UI for managing ip pools & ip addresses

هذا الالتزام موجود في:
Adam Cooke
2017-04-21 11:09:31 +01:00
الأصل 6eb425eaed
التزام c09c501ef4
11 ملفات معدلة مع 232 إضافات و0 حذوفات

عرض الملف

@@ -0,0 +1,37 @@
= form_for @ip_pool, :remote => true do |f|
= f.error_messages
%fieldset.fieldSet.u-margin
.fieldSet__field
= f.label :name, :class => 'fieldSet__label'
.fieldSet__input= f.text_field :name, :autofocus => true, :class => 'input input--text'
.fieldSet__field
= f.label :type, :class => 'fieldSet__label'
.fieldSet__input= f.select :type, IPPool::TYPES, {}, :class => 'input input--select'
- if @ip_pool.persisted?
%table.dataTable.u-margin-half
%thead
%tr
%td IPv4
%td IPv6
%td Hostname
%tbody
- if @ip_pool.ip_addresses.empty?
%tr
%td.dataTable__empty{:colspan => 3} There are no IP addresses assigned to this pool yet.
- else
- for ip in @ip_pool.ip_addresses
%tr
%td{:width => "20%"}= link_to ip.ipv4, [:edit, @ip_pool, ip], :class => "u-link"
%td{:width => "40%"}= ip.ipv6
%td{:width => "40%"}= ip.hostname
%p= link_to "Add an IP address to pool", [:new, @ip_pool, :ip_address], :class => "u-link"
.fieldSetSubmit.buttonSet
= f.submit :class => 'button button--positive js-form-submit'
.fieldSetSubmit__delete
- if @ip_pool.persisted?
= link_to "Delete IP pool", [@ip_pool], :class => 'button button--danger', :method => :delete, :remote => true, :data => {:confirm => "Are you sure you wish to remove this IP pool?"}

عرض الملف

@@ -0,0 +1,15 @@
- page_title << "IP Pools"
- page_title << @ip_pool.name
.pageHeader
%h1.pageHeader__title
%span.pageHeader__titlePrevious
= link_to "IP Pools", :ip_pools
&rarr;
= @ip_pool.name
&rarr;
Edit
.pageContent.pageContent--compact
= render 'form'

عرض الملف

@@ -0,0 +1,27 @@
- page_title << "Welcome"
.pageHeader
%h1.pageHeader__title IP Pools
.pageContent.pageContent--compact
- if @ip_pools.empty?
.noData.noData--cat2.noData--clean
%p.noData__title There are no IP pools configured.
%p.noData__text
All messages sent from your mail server can be sent from certain pools of
IP addresses. Each server can be assigned to a pool and rules can be configured
to route certain email through certain pools.
%p.noData__button= link_to "Create the first IP pool", :new_ip_pool, :class => 'button button--positive'
- else
%p.pageContent__intro.u-margin
IP pools are the addresses that your outgoing messages are sent from. You can
create as many pools as you wish.
%ul.largeList.u-margin
- for ip_pool in @ip_pools
%li.largeList__item
= link_to edit_ip_pool_path(ip_pool), :class => 'largeList__link' do
= ip_pool.name
%p.u-center= link_to "Add another IP pool", :new_ip_pool, :class => 'button button--positive'

عرض الملف

@@ -0,0 +1,10 @@
- page_title << "Create a new IP pool"
.pageHeader
%h1.pageHeader__title
%span.pageHeader__titlePrevious
= link_to "IP Pools", :ip_pools
&rarr;
Create a new IP pool
.pageContent.pageContent--compact
= render 'form'