DSS-3604, Add link to reference flow page to subflow job

This commit is contained in:
jbai 2016-02-19 15:54:51 -08:00
parent b7423dc9d3
commit 960440cc33
3 changed files with 13 additions and 3 deletions

View File

@ -57,10 +57,12 @@ public class FlowsDAO extends AbstractMySQLOpenSourceDAO
"SELECT count(*) FROM flow_job WHERE app_id = ? and flow_id = ?";
private final static String GET_PAGED_JOBS_BY_APP_ID_AND_FLOW_ID = "select SQL_CALC_FOUND_ROWS " +
"j.job_id, MAX(j.last_source_version), j.job_name, j.job_path, j.job_type, FROM_UNIXTIME(j.created_time) as created_time, " +
"j.job_id, MAX(j.last_source_version), j.job_name, j.job_path, j.job_type, j.ref_flow_id, " +
"FROM_UNIXTIME(j.created_time) as created_time, " +
"FROM_UNIXTIME(j.modified_time) as modified_time, f.flow_name " +
"FROM flow_job j JOIN flow f on j.app_id = f.app_id and j.flow_id = f.flow_id " +
"WHERE j.app_id = ? and j.flow_id = ? GROUP BY j.job_id, j.job_name, j.job_path, j.job_type, " +
"WHERE j.app_id = ? and j.flow_id = ? GROUP BY j.job_id, j.job_name, " +
"j.job_path, j.job_type, j.ref_flow_id, " +
"f.flow_name ORDER BY j.job_id LIMIT ?, ?";
public static Integer getApplicationIDByName(String applicationName)
@ -343,6 +345,7 @@ public class FlowsDAO extends AbstractMySQLOpenSourceDAO
job.path = (String)row.get("job_path");
job.type = (String)row.get("job_type");
Object created = row.get("created_time");
job.refFlowId = (Long)row.get("ref_flow_id");
if (created != null)
{
job.created = created.toString();

View File

@ -20,4 +20,5 @@ public class Job {
public String type;
public String created;
public String modified;
public Long refFlowId;
}

View File

@ -2111,7 +2111,13 @@
{{#each job in model.data.jobs}}
<tr>
<td class="dataset-info wrap-all-word">
{{job.name}}
{{#if job.refFlowId}}
{{#link-to 'pagedflow' job.refFlowId 1}}
{{job.name}}
{{/link-to}}
{{else}}
{{job.name}}
{{/if}}
</td>
<td class="wrap-all-word">{{ job.path }}</td>
<td>{{ job.type }}</td>