Skip to content

Commit

Permalink
vipshop#687 作业列表导出增加是否启用这一列
Browse files Browse the repository at this point in the history
  • Loading branch information
cmzdandan committed Apr 5, 2020
1 parent 14dd324 commit 4175330
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1767,8 +1767,10 @@ protected void setExcelContent(String namespace, WritableSheet sheet1, List<JobC
curatorFrameworkOp.getData(JobNodePath.getConfigNodePath(jobName, CONFIG_ITEM_JOB_MODE))));
sheet1.addCell(new Label(23, i + 1,
curatorFrameworkOp.getData(JobNodePath.getConfigNodePath(jobName, CONFIG_ITEM_DEPENDENCIES))));
sheet1.addCell(new Label(24, i + 1,
curatorFrameworkOp.getData(JobNodePath.getConfigNodePath(jobName, CONFIG_ITEM_GROUPS))));
// sheet1.addCell(new Label(24, i + 1,
// curatorFrameworkOp.getData(JobNodePath.getConfigNodePath(jobName, CONFIG_ITEM_GROUPS))));
// 批量分组后,分组只写到了db并没有写到zk,导出的Excel表格缺失分组名数据,所以这里直接取db的数据
sheet1.addCell(new Label(24, i + 1, unSystemJobs.get(i).getGroups()));
sheet1.addCell(new Label(25, i + 1, curatorFrameworkOp
.getData(JobNodePath.getConfigNodePath(jobName, CONFIG_ITEM_TIMEOUT_4_ALARM_SECONDS))));
sheet1.addCell(new Label(26, i + 1,
Expand All @@ -1781,6 +1783,8 @@ protected void setExcelContent(String namespace, WritableSheet sheet1, List<JobC
curatorFrameworkOp.getData(JobNodePath.getConfigNodePath(jobName, CONFIG_ITEM_UPSTREAM))));
sheet1.addCell(new Label(30, i + 1,
curatorFrameworkOp.getData(JobNodePath.getConfigNodePath(jobName, CONFIG_ITEM_DOWNSTREAM))));
sheet1.addCell(new Label(31, i + 1,
curatorFrameworkOp.getData(JobNodePath.getConfigNodePath(jobName, CONFIG_ITEM_ENABLED))));
}
}
}
Expand Down Expand Up @@ -1844,7 +1848,7 @@ protected void setExcelHeader(WritableSheet sheet1) throws WriteException {
sheet1.addCell(dependenciesLabel);

Label groupsLabel = new Label(24, 0, "所属分组");
setCellComment(groupsLabel, "作业所属分组,一个作业只能属于一个分组,一个分组可以包含多个作业");
setCellComment(groupsLabel, "作业所属分组,一个作业可以属于多个分组,一个分组可以包含多个作业");
sheet1.addCell(groupsLabel);

Label timeout4AlarmSecondsLabel = new Label(25, 0, "超时(告警)时间");
Expand All @@ -1866,6 +1870,8 @@ protected void setExcelHeader(WritableSheet sheet1) throws WriteException {
Label downStream = new Label(30, 0, "下游作业");
setCellComment(downStream, "该作业执行成功后,触发下游作业执行。多个下游作业使用英文逗号隔开。");
sheet1.addCell(downStream);

sheet1.addCell(new Label(31, 0, "是否启用"));
}

protected void setCellComment(WritableCell cell, String comment) {
Expand Down

0 comments on commit 4175330

Please sign in to comment.