-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathindex.html.haml
More file actions
39 lines (37 loc) · 1.76 KB
/
index.html.haml
File metadata and controls
39 lines (37 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
- page_title << @server.name
- page_title << "Webhooks"
= render 'servers/sidebar', :active_server => @server
= render 'servers/header', :active_nav => :webhooks
= render 'header', :active_nav => :webhooks
.pageContent.pageContent--compact
- if @webhooks.empty?
.noData.noData--clean
%h2.noData__title No webhooks have been configured for this server.
%p.noData__text
You haven't added any webhooks for this server yet. A webhook enables your web
application to be notified when certain events occur in the lifecycle of the mail server.
%p.noData__button= link_to "Add your first webhook", [:new, organization, @server, :webhook], :class => "button button--positive"
- else
%ul.webhookList.u-margin
- for webhook in @webhooks
%li.webhookList__item
.webhookList__top
%p.webhookList__name= link_to webhook.name, [:edit, organization, @server, webhook]
%p.webhookList__labels
- if webhook.enabled?
%span.label.label--green Enabled
- else
%span.label.label--red Disabled
- if webhook.output_style == 'listmonk'
%span.label.label--blue Listmonk
- else
%span.label.label--gray Postal
.webhookList__bottom
%p.webhookList__usageTime
- if webhook.last_used_at
Last sent request #{distance_of_time_in_words_to_now webhook.last_used_at}.
- else
Not used yet.
%ul.webhookList__links
%li.webhookList__link= link_to "Edit Webhook", [:edit, organization, @server, webhook]
%p.u-center= link_to "Add another webhook", [:new, organization, @server, :webhook], :class => 'button button--positive'