Skip to content

Commit

Permalink
[ci] Fix Haml Lint offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
David Kang committed Jun 21, 2018
1 parent 5c27618 commit 96337b5
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 70 deletions.
38 changes: 19 additions & 19 deletions src/api/app/views/webui/obs_factory/distributions/show.html.haml
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
- project_bread_crumb 'Dashboard'

%div{class: "grid_16 alpha"}
%div{class: "box box-shadow"}
.grid_16.alpha
.box.box-shadow
%h2
%i{class: "fa fa-2 fa-tasks"}
= link_to "Staging Projects", staging_projects_path(project: @distribution.name)
%ul{id: 'main-dashboard'}
%i.fa.fa-2.fa-tasks
= link_to 'Staging Projects', staging_projects_path(project: @distribution.name)
%ul#main-dashboard
- @staging_projects.each do |project|
- next if project.overall_state == :empty
%li
= render partial: 'webui/obs_factory/staging_projects/overall_state', locals: { project: project }

%p{class: 'clear'}
%p.clear

%h2
%i{class: "fa fa-2 fa-circle-o"}
= link_to "Ring Projects", main_app.project_subprojects_path(project: @distribution.rings_project_name)
%ul{id: 'ring-projects', class: 'project-results'}
%i.fa.fa-2.fa-circle-o
= link_to 'Ring Projects', main_app.project_subprojects_path(project: @distribution.rings_project_name)
%ul.project-results#ring-projects
- @ring_prjs.each do |rp|
%li{class: "project-result-#{rp.summary[0]}"}
= link_to rp.summary[1], main_app.project_monitor_path(rp.build_and_failed_params)

%p{class: 'clear'}
%p.clear

%h2
%i{class: "fa fa-2 fa-building"}
%i.fa.fa-2.fa-building
= link_to "Repositories of #{@distribution.name}", main_app.project_show_path(project: "#{@distribution.name}")

%ul{id: 'factory-build-Status', class: 'project-results'}
%ul.project-results#factory-build-status
%li{class: "project-result-#{@standard.summary[0]} "}
= link_to @standard.summary[1], main_app.project_monitor_path(@standard.build_and_failed_params)
- if @live
Expand All @@ -37,11 +37,11 @@
= link_to @images.summary[1], main_app.project_monitor_path(@images.build_and_failed_params)


%p{class: 'clear'}
%p.clear

%h2
%i{class: "fa fa-2 fa-check"}
= link_to "Open Reviews", "/project/requests/#{@distribution.root_project_name}"
%i.fa.fa-2.fa-check
= link_to 'Open Reviews', "/project/requests/#{@distribution.root_project_name}"

%ul
- if @reviews[:legal_auto] > 0
Expand All @@ -66,8 +66,8 @@
Legal Team:
= @reviews[:legal_team]
%h2
%i{class: "fa fa-2 fa-tag"}
= link_to "Versions", "http://download.opensuse.org/#{@distribution.url_suffix}"
%i.fa.fa-2.fa-tag
= link_to 'Versions', "http://download.opensuse.org/#{@distribution.url_suffix}"

%ul
- if @versions[:source]
Expand All @@ -86,13 +86,13 @@
= link_to @versions[:published], "http://download.opensuse.org/#{@distribution.url_suffix}"

%h2
%i{class: "fa fa-2 fa-wrench"}
%i.fa.fa-2.fa-wrench
= link_to "openQA results for #{@versions[:totest]}", "#{openqa_links_helper}/tests/overview?distri=opensuse&version=#{@distribution.openqa_version}&build=#{@versions[:totest]}&group=#{@distribution.openqa_group}"

%p
- unless @openqa_jobs.empty?
- @openqa_jobs.group_by(&:result_or_state).each do |label, jobs|
%b= "#{label}:"
%b #{label}:
= jobs.size
- else
OpenQA currently not reachable or failure in GET request
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%div{class: "box box-shadow"}
%h2{class: "box-header"} Infos
.box.box-shadow
%h2.box-header Infos

%p Empty Projects:
- empties = @staging_projects.select { |p| p.overall_state == :empty && p.name =~ /Staging:[A-Z]?$/ }
Expand All @@ -11,25 +11,25 @@
- else
= empties.sort.join(' – ').html_safe

%p= link_to "Backlog:", main_app.group_show_path(title: @distribution.staging_manager)
%p= link_to 'Backlog:', main_app.group_show_path(title: @distribution.staging_manager)
- if @backlog_requests.empty?
%p
%i Empty
- else
%ul{class: "staging_backlog"}
%ul.staging_backlog
- @backlog_requests.each_with_index do |req,counter|
%li
= link_to elide(req.package, length = 19), main_app.request_show_path(req.number)
- if counter > 5 && @backlog_requests.size > counter + 1
%li ... #{@backlog_requests.size - counter} more
- break

%p= link_to "Ready:", "/project/requests/#{@distribution.project}?state=new"
%p= link_to 'Ready:', "/project/requests/#{@distribution.project}?state=new"
- if @requests_state_new.empty?
%p
%i Empty
- else
%ul{class: "staging_backlog"}
%ul.staging_backlog
- @requests_state_new.each_with_index do |req,counter|
%li
= link_to elide(req.package, length = 19), main_app.request_show_path(req.number)
Expand All @@ -38,8 +38,8 @@
- break

- if @backlog_requests_ignored.present?
%p= link_to "Ignored:", "/package/view_file/#{@distribution.project}:Staging/dashboard/ignored_requests?expand=1"
%ul{class: "staging_backlog_ignored"}
%p= link_to 'Ignored:', "/package/view_file/#{@distribution.project}:Staging/dashboard/ignored_requests?expand=1"
%ul.staging_backlog_ignored
- @backlog_requests_ignored.each_with_index do |req,counter|
%li
= link_to elide(req.package, length = 19), main_app.request_show_path(req.number), title: @ignored_requests[req.number]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
%div{class: "box box-shadow", id: "legends"}
%h2{class: "box-header"} Legend
.box.box-shadow#legends
%h2.box-header Legend

%p Requests
%ul{class: "color-legend"}
%ul.color-legend
%li
%span{class: "ok"}
%span.ok
Ready
%li
%span{class: "review"}
%span.review
In review
%li
%span{class: "obsolete"}
%span.obsolete
Obsolete
%li
%span{class: "untracked"}
%span.untracked
Untracked
%li{class: "delete"}
%span{class: "delete"}
%li.delete
%span.delete
Delete

%p Projects
%ul{class: "color-legend"}
%ul.color-legend
%li
%span{class: "staging-project state-building"}
%span.staging-project.state-building
Building
%li
%span{class: "staging-project state-testing"}
%span.staging-project.state-testing
Testing
%li
%span{class: "staging-project state-review"}
%span.staging-project.state-review
Review
%li
%span{class: "staging-project state-acceptable"}
%span.staging-project.state-acceptable
Acceptable
%li
%span{class: "staging-project state-unacceptable"}
%span.staging-project.state-unacceptable
Unacceptable
%li
%span{class: "staging-project state-failed"}
%span.staging-project.state-failed
Failed

%p Reviews
%ul{class: "color-legend"}
%ul.color-legend
%li
%i{class: "fa fa-#{ObsFactory::StagingProjectPresenter.review_icon('opensuse-review-team')}"}
= link_to 'Source Review', main_app.group_show_path('opensuse-review-team')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
%div{class: "overall-state staging-project state-#{project.overall_state}"}
%div{class: 'letter'}
.letter
= link_to project.letter, staging_project_path(project: @distribution.name, project_name: project.id)
%div{class: 'state'}
.state
= link_to project.overall_state, main_app.project_show_path(project.name)
%div{class: 'progress'}
.progress
- if project.overall_state == :building
- progress = project.build_progress
= link_to main_app.project_monitor_url(progress[:subproject]) do
= "#{progress[:percentage]}%"
#{progress[:percentage]}%
- elsif project.overall_state == :review
= "#{project.review_percentage}%"
#{project.review_percentage}%
- elsif project.overall_state == :testing
= link_to "#{openqa_links_helper}/tests?hoursfresh=24&#{@distribution.openqa_filter(project)}" do
= "#{project.testing_percentage}%"
#{project.testing_percentage}%
- if project.meta['splitter_info']
%div{class: 'splitter-info', title: 'strategy information (name, group)'}
.splitter-info{ title: 'strategy information (name, group)'}
- splitter_info = project.meta['splitter_info']
%div{class: 'splitter-info-strategy'}
= "#{splitter_info['strategy']['name']}"
%div{class: 'splitter-info-group'}
= "#{splitter_info['group']}"
.splitter-info-strategy
#{splitter_info['strategy']['name']}
.splitter-info-group
#{splitter_info['group']}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%ul{class: "packages-list"}
%ul.packages-list
- max = 15
- count = project.classified_requests.count
- if count <= max+1 # Prevent the "1 more" link
- if count <= max + 1 # Prevent the "1 more" link
= render partial: "request", collection: project.classified_requests
- else
= render partial: "request", collection: project.classified_requests[0,max]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
- content_for :ready_function do
= render partial: 'expand_collapse.js.erb'

%div{class: "grid_13 alpha"}
%div{class: "nav"}
%input#letterbox{:checked => "checked", :name => "navbar", :type => "radio"}
.grid_13.alpha
.nav
%input#letterbox{checked: 'checked', name: 'navbar', type: 'radio'}
%section
%h2
%label{:for => "letterbox"} Letter
%div{class: "box box-shadow"}
%table{class: "dashboard", id: "staging-dashboard"}
%label{for: 'letterbox'} Letter
.box.box-shadow
%table#staging-dashboard.dashboard
%thead
%tr
%th Project
Expand All @@ -25,15 +25,15 @@
= render partial: 'overall_state', locals: { project: project }
%td
= render partial: 'packages_list', locals: { project: project }
%td{class: "broken-packages"}
%td.broken-packages
= render partial: 'problems', locals: { project: project }

%input#adibox{:name => "navbar", :type => "radio"}
%input#adibox{name: 'navbar', type: 'radio'}
%section
%h2
%label{:for => "adibox"} ADI
%div{class: "box box-shadow"}
%table{class: "dashboard", id: "staging-dashboard"}
%label{for: 'adibox'} ADI
.box.box-shadow
%table#staging-dashboard.dashboard
%thead
%tr
%th Project
Expand All @@ -48,10 +48,10 @@
= render partial: 'overall_state', locals: { project: project }
%td
= render partial: 'packages_list', locals: { project: project }
%td{class: "broken-packages"}
%td.broken-packages
= render partial: 'problems', locals: { project: project }

%div{class: "grid_3 omega"}
.grid_3.omega
= render 'legend'
= render 'infos'

0 comments on commit 96337b5

Please sign in to comment.