-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create index html and json views for job runs
- Loading branch information
Showing
8 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
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
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
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
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,26 @@ | ||
<h2>Job Run History</h2> | ||
|
||
<%= paginate @job_runs %> | ||
|
||
<table class="table"> | ||
<thead> | ||
<tr> | ||
<th scope="col">ID</th> | ||
<th scope="col">Type</th> | ||
<th scope="col">Creator</th> | ||
<th scope="col">Created At</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<% @job_runs.each do |job_run| %> | ||
<tr> | ||
<td><%=link_to job_run.id,job_run%></td> | ||
<td><%=job_run.job_type%></td> | ||
<td><%=job_run.bundle_context.user.sunet_id%></td> | ||
<td><%=job_run.created_at.to_formatted_s(:long)%></td> | ||
</tr> | ||
</tbody> | ||
<% end %> | ||
</table> | ||
|
||
<%= paginate @job_runs %> |
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,4 @@ | ||
json.array! @job_runs do |job_run| | ||
json.merge! job_run.attributes | ||
json.sunet_id job_run.bundle_context.user.sunet_id | ||
end |
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
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,5 @@ | ||
RSpec.describe 'job_runs/index.html.erb', type: :view do | ||
it 'displays a list of job_runs' do | ||
skip 'gimme factories' | ||
end | ||
end |
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,10 @@ | ||
RSpec.describe 'job_runs/index.json.jbuilder' do | ||
it 'renders a list of job_runs' do | ||
render | ||
json = JSON.parse(rendered) | ||
# expect(json).to match a_hash_including( | ||
# 'rows' => Array, | ||
# ) | ||
skip 'gimme factories' | ||
end | ||
end |