<commit_before>=render partial: 'header'

- if !current_user.is_allowed?('resource_management:project_resource_new_request')
  .bs-callout.bs-callout-info.bs-callout-emphasize
    We have recently implemented a more fine-grained permission system for resource management. From now on you need the
    %code resource_admin
    role to request more quota.

=render partial: 'tabs', locals: { scope: 'resources', tab: 'overview' }
=render partial: 'offer_package_request'

.row.quota-row
  .col-md-9
    -if @critical_resources.blank? and @nearly_full_resources.blank?
      .bs-callout.bs-callout-info
        No signs of critical resource usage found.

    - @critical_resources.sort_by { |r| [ r.name, r.service_type ] }.each do |res|
      = render partial: 'bar', locals: { resource: res, overview: true }
    - unless @nearly_full_resources.empty?
      %h3 Current quota nearly used up
      - @nearly_full_resources.sort_by { |r| [ r.name, r.service_type ] }.each do |res|
        = render partial: 'bar', locals: { resource: res, overview: true }

    - if current_user.is_allowed?('resource_management:project_resource_sync_now') and @view_services.map(&:updated_at).min < 1.minute.ago
      = render layout: 'data_age' do
        = render partial: 'sync_now_button'
    - else
      = render partial: 'data_age'
  .col-md-3
    = render partial: 'good_to_know'
<commit_msg>Prevent exception in view if service updated_at is nil when rendering sync now button<commit_after>=render partial: 'header'

- if !current_user.is_allowed?('resource_management:project_resource_new_request')
  .bs-callout.bs-callout-info.bs-callout-emphasize
    We have recently implemented a more fine-grained permission system for resource management. From now on you need the
    %code resource_admin
    role to request more quota.

=render partial: 'tabs', locals: { scope: 'resources', tab: 'overview' }
=render partial: 'offer_package_request'

.row.quota-row
  .col-md-9
    -if @critical_resources.blank? and @nearly_full_resources.blank?
      .bs-callout.bs-callout-info
        No signs of critical resource usage found.

    - @critical_resources.sort_by { |r| [ r.name, r.service_type ] }.each do |res|
      = render partial: 'bar', locals: { resource: res, overview: true }
    - unless @nearly_full_resources.empty?
      %h3 Current quota nearly used up
      - @nearly_full_resources.sort_by { |r| [ r.name, r.service_type ] }.each do |res|
        = render partial: 'bar', locals: { resource: res, overview: true }

    - if current_user.is_allowed?('resource_management:project_resource_sync_now') && @view_services && @view_services.map(&:updated_at).select{|timestamp| !timestamp.blank?}.min < 1.minute.ago
      = render layout: 'data_age' do
        = render partial: 'sync_now_button'
    - else
      = render partial: 'data_age'
  .col-md-3
    = render partial: 'good_to_know'

{'fraction_non_alphanumeric': 0.115957078573901, 'fraction_numerical': 0.0027691242644513675, 'mean_word_length': 3.729950900163666, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '987721', 'n_tokens_mistral': 931, 'n_tokens_neox': 911, 'n_words': 242}