Skip to content

Commit

Permalink
restructure a little to get a better layout (#3793)
Browse files Browse the repository at this point in the history
  • Loading branch information
johrstrom authored Sep 23, 2024
1 parent 93c5c9c commit 972a03b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions apps/dashboard/app/javascript/projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ function moveCompletedPanel(id, newHTML) {

const div = document.createElement('div');
div.id = id;
div.classList.add('col-md-4');

const row = document.getElementById('completed_jobs');
row.appendChild(div);
Expand Down
3 changes: 2 additions & 1 deletion apps/dashboard/app/views/projects/_job_details.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<div id="<%= id %>" data-job-poller="true"
data-job-cluster="<%= job.cluster %>"
data-job-id="<%= job.id %>"
data-job-status="<%= job.status.to_s %>">
data-job-status="<%= job.status.to_s %>"
class="col-md-4">

<div class="d-flex justify-content-center">
<div class="spinner-border" role="status">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<%= job.id %> <%= status_text(job.status.to_s) %>
</span>
</button>
<div class="collapse col-md-4" id="<%= id %>_data">
<div class="collapse" id="<%= id %>_data">
<div class="card card-body">
<table class="table table-bordered table-sm m-0 mb-2">
<% job.to_human_display.each do |name, value| %>
Expand Down
8 changes: 6 additions & 2 deletions apps/dashboard/app/views/projects/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,12 @@

<div class="row">
<h2 class="h3 d-flex justify-content-center">Completed Jobs</h2>
<div id="completed_jobs">
<%= render(partial: 'job_details_content', collection: @project.completed_jobs, as: :job) %>
<div id="completed_jobs" class="row">
<%- @project.completed_jobs.each do |job| -%>
<div class="col-md-4" id="<%= "job_#{job.cluster}_#{job.id}" %>">
<%= render(partial: 'job_details_content', locals: { job: job }) %>
</div>
<%- end -%>
</div>
</div>
</div>
Expand Down

0 comments on commit 972a03b

Please sign in to comment.