<% if !@current_license.nil? %>

<%= t_label 'licenses.index.license_code_information'%>

<% exp_date = @current_license.getExpirationDate() if exp_date.nil? && (!License.find(@current_license.getId()).is_valid_license_code? || @current_license.getLicenseType() == 0)%>
<%= t 'licenses.license_code_information.license_code'%> <%= @current_license.getLicenseCode()%>
<%= t 'licenses.license_code_information.license_type'%> Primary <%= @current_license.isSequelBundledLicense()? t('licenses.license_code_information.sequel_bundled_title'): ""%>
<%= t 'licenses.license_code_information.license_key_version'%> <%= @current_license.getLicenseKeyVersion()%>
<%= t 'licenses.license_code_information.license_status'%> <%= t 'common.invalid_license'%>
<% else if exp_date %> <%= t 'licenses.license_code_information.license_status'%> <% if exp_date.getTime() > (Time.now.getutc.to_i*1000) %> Expires <%= format_timestamp @current_license.getExpirationDate().getTime() %> <% else %> <%= t 'common.expired'%> <% end %> <% elsif @current_license.getLicenseType() == 1 || @current_license.getLicenseType() == 2 %> <%= t 'licenses.license_code_information.license_status'%> <%= t 'common.valid'%> <%end%> <% unless (@current_license.getLicenseHash().nil?) || (@current_license.getLicenseHash() == "0000000000") %> <%= t 'licenses.license_code_information.valid_on_system'%> <% if @current_license.isValidOn(@hardware_hash) %> <%= t 'licenses.trial_license_header.valid_on_server_yes'%> <% else %> <%= t 'licenses.trial_license_header.valid_on_server_no'%> <% end %> <% end %>
<%= t_label 'licenses.license_code_information.agent_licenses'%>
<% if @current_license.getLicenseKeyVersion() > 0 %> <% if @agents.length > 0 @tiers = Agent::AGENT_TIERS @tiers.each do |tier| if tier > 0 %> <% end end else %> <% end %>
<%= t 'common.tier' %> <%= t 'common.licenses' %>
<%= @agents[0].agent_tier(tier) %> <% if @current_license.isUnlimitedTier(tier) %><%= t 'common.unlimited'%><% else %><%= @current_license.getTierPoints(tier) %><% end %>
<%= t 'licenses.no_available_agents' %>
<% else %> <% if @agents.length > 0 %> <% else %> <% end %>
<%= t 'common.description' %> <%= t 'common.total' %>
<%= t 'licenses.primary_license_header.total_license_points'%> <% if @current_license.isUnlimitedPoints() %><%= t 'common.unlimited'%><% else %><%= @current_license.getPoints() %><% end %>
<%= t 'licenses.primary_license_header.total_allocated'%> <%= @allocated_points %>
<%= t 'licenses.primary_license_header.total_points_required'%> <%= @total_points_required %>
<%= t 'licenses.no_available_agents' %>
<% end %>
<%= t_label 'licenses.license_code_information.features'%>
<%= t 'common.feature' %> <%= t 'common.licensed' %>
<%= t 'licenses.primary_license_header.sap_enabled' %> <%= @current_license.isSAPEnabled()? t('common.key_yes'): t('common.key_no') %>
<%= t 'licenses.primary_license_header.infa_enabled' %> <%= @current_license.isInformaticaEnabled()? t('common.key_yes'): t('common.key_no') %>
<%= t 'licenses.primary_license_header.oracle_enabled' %> <%= @current_license.isOracleEnabled()? t('common.key_yes'): t('common.key_no') %>
<%= t 'licenses.primary_license_header.robot_enabled' %> <%= @current_license.isRobotScheduleInterfaceEnabled()? t('common.key_yes'): t('common.key_no') %>
<%= t 'licenses.primary_license_header.uc_enabled' %> <%= @current_license.isUniversalConnectorEnabled()? t('common.key_yes'): t('common.key_no') %>
<%= t 'licenses.primary_license_header.sequel_enabled' %> <%= @current_license.isSequelBundledLicense()? t('common.key_yes'): t('common.key_no') %>
<% end %> <% else %>

<%= t 'licenses.license_code_information.no_license'%>

<% end %>