Skip to content

Commit

Permalink
Fix deleting job properties issue on web UI. (azkaban#1598)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiesjc authored Jan 9, 2018
1 parent 1bb277d commit 351b730
Showing 1 changed file with 7 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1321,17 +1321,12 @@ private void handleJobPage(final HttpServletRequest req, final HttpServletRespon
return;
}

final Props jobProp = this.projectManager
.getProperties(project, flow, jobName, node.getJobSource());
Props overrideProp =
this.projectManager.getJobOverrideProperty(project, flow, jobName, node.getJobSource());
if (overrideProp == null) {
overrideProp = new Props();
}
final Props comboProp = new Props(jobProp);
for (final String key : overrideProp.getKeySet()) {
comboProp.put(key, overrideProp.get(key));
Props jobProp = this.projectManager
.getJobOverrideProperty(project, flow, jobName, node.getJobSource());
if (jobProp == null) {
jobProp = this.projectManager.getProperties(project, flow, jobName, node.getJobSource());
}

page.add("jobid", node.getId());
page.add("jobtype", node.getType());

Expand Down Expand Up @@ -1375,8 +1370,8 @@ private void handleJobPage(final HttpServletRequest req, final HttpServletRespon
final ArrayList<Pair<String, String>> parameters =
new ArrayList<>();
// Parameter
for (final String key : comboProp.getKeySet()) {
final String value = comboProp.get(key);
for (final String key : jobProp.getKeySet()) {
final String value = jobProp.get(key);
parameters.add(new Pair<>(key, value));
}

Expand Down

0 comments on commit 351b730

Please sign in to comment.