-
Notifications
You must be signed in to change notification settings - Fork 73
/
show.html.slim
75 lines (64 loc) · 3.13 KB
/
show.html.slim
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
- content_for :sublayout_title, @cinstance.display_name
= render 'menu'
h1
=> @cinstance.display_name
= link_to 'Edit',
edit_admin_buyers_application_path(@cinstance),
class: 'action edit'
div#twoCol.equal-width
div.left
div.wide_dashboard_bubble.round
table.list
tr
th Account
td
- account = @cinstance.buyer_account
= link_to account.name, admin_buyers_account_path(account)
= fields_definitions_rows(@cinstance, %w{name})
- service = @cinstance.service
- unless master_on_premises?
tr
th Service
td
= link_to service.name, admin_services_path(anchor: dom_id(service))
= render '/buyers/applications/state'
- if can?(:see, :end_users) && @cinstance.end_users_allowed?
div.wide_dashboard_bubble.round
h3 EndUsers required?
div#cinstance_end_user_required
- if @cinstance.end_user_required?
strong yes
= action_link_to "don't require",
admin_service_application_path(@cinstance.service, @cinstance, cinstance: { end_user_required: false }),
method: :put,
data: { confirm: "The application will stop rate limiting EndUsers, are you sure you want to do that?" }
- else
strong no
= action_link_to :require,
admin_service_application_path(@cinstance.service, @cinstance, cinstance: { end_user_required: true }),
method: :put,
data: { confirm: "Requiring EndUsers implies changes on the integration with 3scale's backend (adding the user_id parameter), are you sure you want to do it?" }
div.wide_dashboard_bubble.round#application_keys data-object="cinstance" data-url=(admin_service_application_path(@cinstance.service, @cinstance, format: :json))
h3 API Credentials
= render partial: 'provider/admin/keys/widget',
locals: { cinstance: @cinstance }
- if @cinstance.service.referrer_filters_required?
div.wide_dashboard_bubble.round
= render partial: 'provider/admin/referrer_filters/widget',
locals: { cinstance: @cinstance }
div.wide_dashboard_bubble.round
h3 Usage in last 30 Days
- cache [ 'v1', 'cinstance', 'sparklines', @cinstance.service, @cinstance ] do
= render 'stats/sparklines',
cinstance: @cinstance,
metrics: @cinstance.service.metrics.top_level
div.wide_dashboard_bubble.round
h3 Current Utilization
= render partial: 'buyers/applications/utilization',
locals: { utilization: @utilization, cinstance: @cinstance }
- unless master_on_premises?
div.right_narrow
= render partial: '/buyers/applications/plan', locals: { contract: @cinstance }
// HACK: this condition really hurts - more than dancing CanCan
- if can?( :manage, :plans) && @cinstance.available_application_plans.size > 0 && !current_account.master?
= render '/buyers/applications/change_plan'