Refactor console codes for failure message.
diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md
index 27dc760..d13c112 100644
--- a/RELEASE-NOTES.md
+++ b/RELEASE-NOTES.md
@@ -3,10 +3,12 @@
### 新功能
1. [ISSUE #301](https://github.com/dangdangdotcom/elastic-job/issues/301) Console增加Guest权限配置,guest只允许查看,不允许增加、删除、修改操作
+1. [ISSUE #304](https://github.com/dangdangdotcom/elastic-job/issues/304) Cloud增加角色功能
+1. [ISSUE #312](https://github.com/dangdangdotcom/elastic-job/issues/312) Cloud支持自修复功能
### 功能提升
-1. [ISSUE #293](https://github.com/dangdangdotcom/elastic-job/issues/293) Lite Console中 关于数据源配置的完善
+1. [ISSUE #293](https://github.com/dangdangdotcom/elastic-job/issues/293) Lite Console数据源配置增加连接测试功能
1. [ISSUE #296](https://github.com/dangdangdotcom/elastic-job/issues/296) Elastic-Job-Cloud运维界面重构
1. [ISSUE #302](https://github.com/dangdangdotcom/elastic-job/issues/302) Failover与MonitorExecution分离
1. [ISSUE #316](https://github.com/dangdangdotcom/elastic-job/issues/316) Elastic-Job-Lite中instanceId更改为IP@_@PID
diff --git a/elastic-job-cloud/elastic-job-cloud-scheduler/src/main/resources/console/html/history/job_exec_details.html b/elastic-job-cloud/elastic-job-cloud-scheduler/src/main/resources/console/html/history/job_exec_details.html
index a9e8418..f738e2a 100644
--- a/elastic-job-cloud/elastic-job-cloud-scheduler/src/main/resources/console/html/history/job_exec_details.html
+++ b/elastic-job-cloud/elastic-job-cloud-scheduler/src/main/resources/console/html/history/job_exec_details.html
@@ -32,7 +32,7 @@
<input type="text" class="form-control pull-right custom-datepicker" id="end-time">
</div>
<div class="form-group toolbar">
- <label for="isSuccess">执行结果:</label>
+ <label>执行结果:</label>
<input type="radio" name="isSuccess" value="1">成功
<input type="radio" name="isSuccess" value="0">失败
<input type="radio" name="isSuccess" value="" checked="checked">全部
diff --git a/elastic-job-cloud/elastic-job-cloud-scheduler/src/main/resources/console/js/history/job_exec_status.js b/elastic-job-cloud/elastic-job-cloud-scheduler/src/main/resources/console/js/history/job_exec_status.js
index 9ab265f..bc94cc9 100644
--- a/elastic-job-cloud/elastic-job-cloud-scheduler/src/main/resources/console/js/history/job_exec_status.js
+++ b/elastic-job-cloud/elastic-job-cloud-scheduler/src/main/resources/console/js/history/job_exec_status.js
@@ -24,12 +24,19 @@
};
}
-function splitRemarkFormatter(value) {
+function splitRemarkFormatter(value, row) {
var maxLength = 50;
var replacement = "...";
if(null != value && value.length > maxLength) {
- var vauleDetail = value.substring(0 , maxLength - replacement.length) + replacement;
- return '<a href="javascript: void(0);" style="color:black;" onClick="showHistoryMessage(\'' + value.replace(/\'/g, "\\'") + '\')">' + vauleDetail + '</a>';
+ var valueDetail = value.substring(0 , maxLength - replacement.length) + replacement;
+ value = value.replace(/\n/g,"<br/>").replace(/\'/g, "\\'");
+ var remarkHtml;
+ if ("TASK_FAILED" === row.state || "TASK_ERROR" === row.state) {
+ remarkHtml = '<a href="javascript: void(0);" style="color:#FF0000;" onClick="showHistoryMessage(\'' + value + '\')">' + valueDetail + '</a>';
+ } else {
+ remarkHtml = '<a href="javascript: void(0);" style="color:black;" onClick="showHistoryMessage(\'' + value + '\')">' + valueDetail + '</a>';
+ }
+ return remarkHtml;
}
return value;
}
diff --git a/elastic-job-lite/elastic-job-lite-console/src/main/resources/console/html/history/job_event_trace_history.html b/elastic-job-lite/elastic-job-lite-console/src/main/resources/console/html/history/job_event_trace_history.html
index 9c63623..ae2e13e 100644
--- a/elastic-job-lite/elastic-job-lite-console/src/main/resources/console/html/history/job_event_trace_history.html
+++ b/elastic-job-lite/elastic-job-lite-console/src/main/resources/console/html/history/job_event_trace_history.html
@@ -27,7 +27,7 @@
<input type="text" class="form-control pull-right custom-datepicker" id="end-time">
</div>
<div class="form-group toolbar">
- <label for="isSuccess">执行结果:</label>
+ <label>执行结果:</label>
<input type="radio" name="isSuccess" value="1">成功
<input type="radio" name="isSuccess" value="0">失败
<input type="radio" name="isSuccess" value="" checked="checked">全部
diff --git a/elastic-job-lite/elastic-job-lite-console/src/main/resources/console/js/history/job_status_history.js b/elastic-job-lite/elastic-job-lite-console/src/main/resources/console/js/history/job_status_history.js
index c0b5100..f575c8a 100644
--- a/elastic-job-lite/elastic-job-lite-console/src/main/resources/console/js/history/job_status_history.js
+++ b/elastic-job-lite/elastic-job-lite-console/src/main/resources/console/js/history/job_status_history.js
@@ -21,12 +21,19 @@
};
}
-function splitRemarkFormatter(value) {
+function splitRemarkFormatter(value, row) {
var maxLength = 50;
var replacement = "...";
if(null != value && value.length > maxLength) {
- var vauleDetail = value.substring(0 , maxLength - replacement.length) + replacement;
- return '<a href="javascript: void(0);" style="color:black;" onClick="showHistoryMessage(\'' + value.replace(/\'/g, "\\'") + '\')">' + vauleDetail + '</a>';
+ var valueDetail = value.substring(0 , maxLength - replacement.length) + replacement;
+ value = value.replace(/\n/g,"<br/>").replace(/\'/g, "\\'");
+ var remarkHtml;
+ if ("TASK_FAILED" === row.state || "TASK_ERROR" === row.state) {
+ remarkHtml = '<a href="javascript: void(0);" style="color:#FF0000;" onClick="showHistoryMessage(\'' + value + '\')">' + valueDetail + '</a>';
+ } else {
+ remarkHtml = '<a href="javascript: void(0);" style="color:black;" onClick="showHistoryMessage(\'' + value + '\')">' + valueDetail + '</a>';
+ }
+ return remarkHtml;
}
return value;
}
diff --git a/elastic-job-lite/elastic-job-lite-console/src/main/resources/console/js/util/common.js b/elastic-job-lite/elastic-job-lite-console/src/main/resources/console/js/util/common.js
index 68a2e6a..45ac24c 100644
--- a/elastic-job-lite/elastic-job-lite-console/src/main/resources/console/js/util/common.js
+++ b/elastic-job-lite/elastic-job-lite-console/src/main/resources/console/js/util/common.js
@@ -51,6 +51,6 @@
}
function showUpdateConfirmModal() {
- $("#confirm-info").text("该更新会对运行中的作业造成影响,请慎重操作!");
+ $("#confirm-info").text("更新监控作业执行时状态、支持自动失效转移、支持misfire会对运行中的作业造成影响,请慎重操作!");
$("#confirm-dialog").modal({backdrop: 'static', keyboard: true});
}