Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

[RJA-2010] [feature] - UI Tabelize scheduled jobs dashboard #896

Merged
merged 1 commit into from

2 participants

@rsvato
Collaborator

No description provided.

@ddurnev ddurnev merged commit 9541a4f into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
8 ui/src/main/resources/genesis/app/modules/dashboard/jobs.coffee
@@ -39,6 +39,9 @@ define [
@url = options.urlLink
class JobView extends Backbone.View
+ events:
+ "click .job-details": "toggleDetails"
+
template: "app/templates/dashboard/project_jobs.html"
initialize: (options) ->
jobs = options.jobs
@@ -53,6 +56,11 @@ define [
memo), {}).
value()
+ toggleDetails: (e) ->
+ id = $(e.currentTarget).attr("rel");
+ $(e.currentTarget).toggleClass("expanded");
+ this.$(id).slideToggle("fast");
+
render: ->
$.when(genesis.fetchTemplate(@template)).done (tmpl) =>
@$el.html(tmpl(
View
61 ui/src/main/resources/genesis/app/templates/dashboard/project_jobs.html
@@ -1,17 +1,58 @@
<% _.forEach(_.keys(jobs), function(envId){ %>
<div class="instance">
- <span>Instance <a href="#project/<%= projectId %>/inst/<%= envId %>" style="text-decoration: underline; font-weight: bold">'<%- envs.get(envId).get('name') %>'</a></span>
+ <span class="instance-label">Instance <a href="#project/<%= projectId %>/inst/<%= envId %>" style="text-decoration: underline; font-weight: bold">'<%- envs.get(envId).get('name') %>'</a></span>
</div>
+<table class="main-table intab plain-table ">
+ <thead>
+ <tr>
+ <th style="width: 20%">Job name</th>
+ <th>Execution date</th>
+ <th>Scheduled by</th>
+ <th style="width: 15%; ">Status</th>
+ </tr>
+ </thead>
+ <tbody>
<% for(var i = 0, count = jobs[envId].length; i < count; i++) { var job = jobs[envId][i] %>
- <div class="task <%= job.status === 'Failed' ? 'failed': 'requested' %>">
- <div class="desc">
- <div class="title">Workflow <strong class="capitalize" >'<%- job.workflow %>'</strong> &nbsp;&nbsp;&nbsp;&nbsp; <em> by <%= job.scheduledBy %> </em></div>
+ <tr>
+ <td class="first">
+ <a href="javascript: void(0)" class="job-details toggle"
+ data-job-id="<%- job.id %>" rel="#variables-<%- job.id %>">
+ <%- job.workflow %>
+ </a>
+ </td>
+ <td class="first"><%= moment(job.date).format('lll') %> (<%= moment(job.date).fromNow() %>)</td>
+ <td class="first"><%- job.scheduledBy %></td>
+ <td class="first task <%= job.status === 'Failed' ? 'failed': 'requested' %>"><%- job.status %></td>
+ </tr>
+ <tr class="no-hover">
+ <td colspan="4">
+ <div class="workflow-variables compact" id="variables-<%- job.id %>" style="background-color: #FFF3F3;display: none">
+ <% if (job.failureDescription) { %>
+ <dl style="color: #B94A48">
+ <dt>Error</dt>
+ <dd class="multiline-description" ><%= job.failureDescription %></dd>
+ </dl>
+ <% } %>
+ <dl>
+ <dt>Parameters</dt>
+ <dd>
+ <% if (job.variables && _.keys(job.variables).length > 0) { %>
+ <% _.chain(job.variables).keys().sortBy(function(o) {return o;} ).each(function(key) { %>
+ <dl>
+ <dt><%= key %></dt>
+ <dd><%= job.variables[key] %></dd>
+ </dl>
+ <% }) %>
+ <% } else { %>
+ <strong>No variables required</strong>
+ <% } %>
+
+ </dd>
+ </dl>
</div>
- <div class="time">
- <div class="date"> <%= moment(job.date).format('lll') %> </div>
- <div> <%= moment(job.date).fromNow() %> </div>
- </div>
- <div style="clear:both"/>
- </div>
+ </td>
+ </tr>
<% } %>
+ </tbody>
+</table>
<% }) %>
View
6 ui/src/main/resources/genesis/app/templates/env_details/scheduled_executions.html
@@ -45,7 +45,7 @@
<% } %>
</td>
</tr>
- <tr class="no-hover-white" style="background-color: #FFF3F3">
+ <tr class="no-hover" style="background-color: #FFF3F3">
<td colspan="4" >
<div class="workflow-variables compact" id="variables-<%- job.id %>" style="background-color: #FFF3F3;display: none">
<% if (job.failureDescription) { %>
@@ -58,14 +58,14 @@
<dt>Parameters</dt>
<dd>
<% if (job.variables && _.keys(job.variables).length > 0) { %>
- <% _.chain(job.variables).keys().each(function(key) { %>
+ <% _.chain(job.variables).keys().sortBy(function(o) {return o;} ).each(function(key) { %>
<dl>
<dt><%= key %></dt>
<dd><%= job.variables[key] %></dd>
</dl>
<% }) %>
<% } else { %>
- <strong>No variables requred</strong>
+ <strong>No variables required</strong>
<% } %>
</dd>
View
13 ui/src/main/resources/genesis/assets/css/style.css
@@ -881,15 +881,16 @@ img.toggle {
font-size: 13px;
}
.tasks .instance {
- background: rgb(245, 245, 245);
+ background: #f8f8f8;
margin-bottom: 1px;
+ padding-top: 12px;
+ padding-bottom: 12px;
}
-.tasks .instance span {
- background: #E8E8E8;
+.tasks .instance .instance-label {
padding: 2px 10px;
display: inline-block;
font-size: 12px;
- border-top: 1px solid #f9f9f9;
+ font-weight: bold;
}
.task.requested {
border-left: 2px solid #E8E8E8;
@@ -1372,8 +1373,8 @@ table.main-table tr:hover, table.intab tr:hover{
background-color: #f5f5ff;
}
-table.intab tr.no-hover-white {
- background-color: white !important;
+table.intab tr.no-hover {
+ background-color: #f8f8f8 !important;
}
#panel table.main-table span{
font-weight:bold;
Something went wrong with that request. Please try again.