<%= link_to api_applications_path, class: 'grey-text tooltipped', style: 'position: relative; top: 4px;', data: { position: 'bottom', enterDelay: '500', tooltip: "Back to your application list" } do %> arrow_back <% end %> Your applications
live extension <%= @application_integration.name %> (App ID: <%= @application_integration.id %>)

<% [:description].each do |field| %>
<%= field.to_s.humanize %>
<%= simple_format @application_integration.send(field) %>

<% end %>
Organization
<%= link_to @application_integration.organization_name, @application_integration.organization_url %>

<% [:website_url, :privacy_policy_url, :authorization_callback_url, :event_ping_url].each do |field| %>
<%= field.to_s.humanize %>
<%= link_to @application_integration.send(field), @application_integration.send(field) %>

<% end %>
Application Token
<%= @application_integration.application_token || 'No token set' %>
Do NOT share this with others you do not trust or make client-side requests that expose this token. This token may be used to make API calls on your application's behalf and unauthorized use puts you at risk of strangers using up your API quota.
Billing plan
<% if current_user.on_premium_plan? %>
You're on a Premium plan. All endpoints are available.
<% else %>
You are not currently on a Premium plan. API requests that require a Premium plan will succeed for users that have Premium, but fail for other users. <%= link_to 'Upgrade to a Premium plan', '#' %> to ensure your API requests succeed for all users!
<% end %>
API quota
<%= @application_integration.current_quota_usage_percentage %>% used in this billing period

You've used <%= number_with_delimiter @application_integration.api_requests.successful.count %> of your alotted 10,000 calls this month. <%= link_to 'Upgrade to Premium', '#' %> to ensure you don't experience any disruptions when hitting your limit.

Errors
<%= (@application_integration.request_error_rate * 100).round(2) %>% error rate