Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2690 from mdeniz/erb2haml_4
Convert webui/monitor views to HAML. Get rid of unused partials
- Loading branch information
Showing
21 changed files
with
418 additions
and
510 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
- max_clients = @workerstatus['clients'] | ||
- build_count = @workerstatus.elements('building').length | ||
#building_all | ||
%h2 Building | ||
- if build_count > 0 | ||
%p.info Hover the job time field to see the start time. | ||
%p.info | ||
= @configuration['title'] | ||
reports #{build_count} running jobs. | ||
= render partial: 'building_table' | ||
%h3 Legend | ||
%div | ||
%div{ style: "float: left; margin-left: 10px; margin-right: 10px" } | ||
= distance_of_time_in_words(@time_now, @dead_line) | ||
- @max_color.downto(0) do |n| | ||
- color = "rgb(255,#{n},0)" | ||
%div{ style: "background-color: #{color}; margin: 0px; width: 3px ; height: 1em; float: left;" } | ||
%div{ style: "float: left; margin-left: 10px" } | ||
= distance_of_time_in_words(@time_now, @dead_line - (@max_color * @interval_steps * 60)) | ||
.clear | ||
- else | ||
.info | ||
%p | ||
- if max_clients | ||
- if @project_filter | ||
No package of the "#{@project_filter}" project is building. Maybe remove the filter?:) | ||
- else | ||
All #{max_clients} hosts are idle! | ||
- else | ||
Nothing to do here! | ||
.clear |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#building_list | ||
- if @workerstatus.has_key? 'building' | ||
%table#building_table.building | ||
%thead | ||
%tr | ||
%th Project | ||
%th Package | ||
%th Repository - Build Arch | ||
%th Job time | ||
%th Build Host | ||
%th Host Arch | ||
%tbody | ||
- @workerstatus.elements("building").sort {|a,b| b["starttime"] <=> a["starttime"] }.each do |building| | ||
- project = building["project"] | ||
- package = building["package"] | ||
- repository = building["repository"] | ||
- architecture = building["arch"] | ||
%tr | ||
%td.project | ||
- if project.include? "---" | ||
\------- | ||
- else | ||
= link_to project, controller: 'project', action: 'show', project: project | ||
%td.package | ||
- if package.include? "---" | ||
\------- | ||
- else | ||
= link_to package, controller: 'package', action: 'show', project: project, package: package | ||
%td.repository.arch | ||
- if repository.include? "---" | ||
\------- | ||
- else | ||
= link_to repository + ' - ' + architecture, controller: 'package', action: 'live_build_log', | ||
project: project, package: package, repository: repository, arch: architecture | ||
- start_time = Time.at(building["starttime"].to_i) | ||
- warning_style = nil | ||
- if start_time < @dead_line | ||
- n = ((start_time - @dead_line).abs/60/@interval_steps).round | ||
- n = (@max_color < n) ? 0 : @max_color - n | ||
- warning_style = "background-color: rgb(255,#{n},0);" | ||
%td.starttime{ style: warning_style, title: "start time: #{start_time.iso8601}" } | ||
%span.sorttime{ style: "display: none" } | ||
= building[starttime].to_i | ||
= distance_of_time_in_words(@time_now, start_time) | ||
%td.uri= building[workerid] | ||
%td.hostarch= building[hostarch] | ||
|
||
= content_for :ready_function do | ||
:plain | ||
$('#building_table').dataTable({ | ||
'aaSorting': [[3, 'desc']], | ||
'bInfo': false, | ||
'bPaginate': false, | ||
'oSearch': {'sSearch': '#{@project_filter}', 'bRegex': false, 'bSmart': false}, | ||
}); | ||
- else | ||
%p | ||
%i No build jobs |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.