- @pagetitle = "Repository State of #{@project.name}"
- @metarobots = 'noindex'
.card
  = render(partial: 'webui/project/tabs', locals: { project: @project })
  .card-body
    %h3
      State of Repository #{@repository} for #{@project}
    %p
      = render DownloadRepositoryLinkComponent.new(project: @project, repository: @repository, configuration: @configuration)
    %h4 Build Dependency Cycles
    - @repository.architectures.each do |arch|
      - cycles = @repository.cycles(arch.name)
      - cycles.each_with_index do |cycle, index|
        - if index.zero?
          %h5
            Cycles for #{arch.name} (##{cycle.length})
        %ul
          %li
            = safe_join(cycle.map { |package| link_to(package, package_show_path(project: @project, package: package)) }, ', ')
      - if cycles.empty?
        %p
          %i
            There are no cycles for #{arch}
      - if User.session
        %p
          Check the rebuild time for
          = link_to arch, project_rebuild_time_path(project_name: @project, arch: arch.name, repository: @repository.name), rel: 'nofollow'
