diff --git a/easy-retry-datasource/easy-retry-datasource-template/src/main/java/com/aizuda/easy/retry/template/datasource/persistence/dataobject/DashboardLineResponseDO.java b/easy-retry-datasource/easy-retry-datasource-template/src/main/java/com/aizuda/easy/retry/template/datasource/persistence/dataobject/DashboardLineResponseDO.java
index 0dfd1b2e..31146af3 100644
--- a/easy-retry-datasource/easy-retry-datasource-template/src/main/java/com/aizuda/easy/retry/template/datasource/persistence/dataobject/DashboardLineResponseDO.java
+++ b/easy-retry-datasource/easy-retry-datasource-template/src/main/java/com/aizuda/easy/retry/template/datasource/persistence/dataobject/DashboardLineResponseDO.java
@@ -57,12 +57,12 @@ public class DashboardLineResponseDO {
/**
* 定时-停止数
*/
- private Long stopNum;
+ private Long stop;
/**
* 定时-取消数
*/
- private Long cancelNum;
+ private Long cancel;
/**
* 定时-成功数
diff --git a/easy-retry-datasource/easy-retry-mysql-datasource/src/main/resources/mysql/mapper/JobSummaryMapper.xml b/easy-retry-datasource/easy-retry-mysql-datasource/src/main/resources/mysql/mapper/JobSummaryMapper.xml
index d43b8daf..ebfee3b8 100644
--- a/easy-retry-datasource/easy-retry-mysql-datasource/src/main/resources/mysql/mapper/JobSummaryMapper.xml
+++ b/easy-retry-datasource/easy-retry-mysql-datasource/src/main/resources/mysql/mapper/JobSummaryMapper.xml
@@ -71,8 +71,8 @@
AS createDt,
ifnull(SUM(success_num), 0) AS success,
ifnull(SUM(fail_num), 0) AS failNum,
- ifnull(SUM(stop_num), 0) AS stopNum,
- ifnull(SUM(cancel_num), 0) AS cancelNum,
+ ifnull(SUM(stop_num), 0) AS stop,
+ ifnull(SUM(cancel_num), 0) AS cancel,
ifnull(SUM(fail_num + stop_num + cancel_num), 0) AS fail,
ifnull(SUM(success_num + fail_num + stop_num + cancel_num), 0) AS total
FROM job_summary
@@ -109,6 +109,7 @@
</where>
AND namespace_id = #{namespaceId}
GROUP BY namespace_id, group_name, job_id
+ HAVING total > 0
ORDER BY total DESC LIMIT 10
</select>
diff --git a/easy-retry-datasource/easy-retry-mysql-datasource/src/main/resources/mysql/mapper/RetrySummaryMapper.xml b/easy-retry-datasource/easy-retry-mysql-datasource/src/main/resources/mysql/mapper/RetrySummaryMapper.xml
index 3bb19590..b85f03ad 100644
--- a/easy-retry-datasource/easy-retry-mysql-datasource/src/main/resources/mysql/mapper/RetrySummaryMapper.xml
+++ b/easy-retry-datasource/easy-retry-mysql-datasource/src/main/resources/mysql/mapper/RetrySummaryMapper.xml
@@ -123,6 +123,7 @@
AND trigger_at >= #{startTime} AND trigger_at <= #{endTime}
</where>
GROUP BY namespace_id, group_name, scene_name
+ HAVING total > 0
ORDER BY total DESC LIMIT 10
</select>
diff --git a/easy-retry-server/easy-retry-server-web/src/main/java/com/aizuda/easy/retry/server/web/model/enums/DateTypeEnum.java b/easy-retry-server/easy-retry-server-web/src/main/java/com/aizuda/easy/retry/server/web/model/enums/DateTypeEnum.java
index 82ab0952..a471d772 100644
--- a/easy-retry-server/easy-retry-server-web/src/main/java/com/aizuda/easy/retry/server/web/model/enums/DateTypeEnum.java
+++ b/easy-retry-server/easy-retry-server-web/src/main/java/com/aizuda/easy/retry/server/web/model/enums/DateTypeEnum.java
@@ -39,8 +39,8 @@ public enum DateTypeEnum {
.setSuccess(0L)
.setSuccessNum(0L)
.setSuspendNum(0L)
- .setStopNum(0L)
- .setCancelNum(0L)
+ .setStop(0L)
+ .setCancel(0L)
.setCreateDt(format);
dashboardLineResponseVOList.add(dashboardLineResponseVO);
}
@@ -74,8 +74,8 @@ public enum DateTypeEnum {
.setSuccess(0L)
.setSuccessNum(0L)
.setSuspendNum(0L)
- .setStopNum(0L)
- .setCancelNum(0L)
+ .setStop(0L)
+ .setCancel(0L)
.setCreateDt(format);
dashboardLineResponseVOList.add(dashboardLineResponseVO);
}
@@ -110,8 +110,8 @@ public enum DateTypeEnum {
.setSuccess(0L)
.setSuccessNum(0L)
.setSuspendNum(0L)
- .setStopNum(0L)
- .setCancelNum(0L)
+ .setStop(0L)
+ .setCancel(0L)
.setCreateDt(format);
dashboardLineResponseVOList.add(dashboardLineResponseVO);
}
@@ -146,8 +146,8 @@ public enum DateTypeEnum {
.setSuccess(0L)
.setSuccessNum(0L)
.setSuspendNum(0L)
- .setStopNum(0L)
- .setCancelNum(0L)
+ .setStop(0L)
+ .setCancel(0L)
.setCreateDt(format);
dashboardLineResponseVOList.add(dashboardLineResponseVO);
}
diff --git a/easy-retry-server/easy-retry-server-web/src/main/java/com/aizuda/easy/retry/server/web/model/response/DashboardLineResponseVO.java b/easy-retry-server/easy-retry-server-web/src/main/java/com/aizuda/easy/retry/server/web/model/response/DashboardLineResponseVO.java
index 8f1cbf36..647684b8 100644
--- a/easy-retry-server/easy-retry-server-web/src/main/java/com/aizuda/easy/retry/server/web/model/response/DashboardLineResponseVO.java
+++ b/easy-retry-server/easy-retry-server-web/src/main/java/com/aizuda/easy/retry/server/web/model/response/DashboardLineResponseVO.java
@@ -59,12 +59,12 @@ public class DashboardLineResponseVO {
/**
* 定时-停止数
*/
- private Long stopNum;
+ private Long stop;
/**
* 定时-取消数
*/
- private Long cancelNum;
+ private Long cancel;
/**
* 定时-成功数
diff --git a/frontend/src/components/Charts/JobLine.vue b/frontend/src/components/Charts/JobLine.vue
index 28ff8a0a..920f4a62 100644
--- a/frontend/src/components/Charts/JobLine.vue
+++ b/frontend/src/components/Charts/JobLine.vue
@@ -43,7 +43,7 @@ export default {
var dv = ds.createView().source(viewRecords)
dv.transform({
type: 'fold',
- fields: ['success', 'fail'],
+ fields: ['success', 'fail', 'stop', 'cancel'],
key: 'name',
value: 'viewTotal',
retains: ['total', 'createDt']
diff --git a/frontend/src/views/dashboard/Analysis.vue b/frontend/src/views/dashboard/Analysis.vue
index 5edc9fc2..0f31d126 100644
--- a/frontend/src/views/dashboard/Analysis.vue
+++ b/frontend/src/views/dashboard/Analysis.vue
@@ -89,7 +89,7 @@
<div class="extra-item">
<a-range-picker @change="dateChange" :show-time="{format: 'HH:mm:ss',defaultValue: [moment('00:00:00', 'HH:mm:ss'),moment('23:59:59', 'HH:mm:ss')]}" format="YYYY-MM-DD HH:mm:ss" :placeholder="['开始时间', '结束时间']" />
</div>
- <a-select placeholder="请输入组名称" @change="value => handleChange(value)" :style="{width: '256px'}">
+ <a-select placeholder="请输入组名称" @change="value => handleChange(value)" :style="{width: '256px'}" :allowClear="true">
<a-select-option v-for="item in groupNameList" :value="item" :key="item">{{ item }}</a-select-option>
</a-select>
</div>
diff --git a/frontend/src/views/dashboard/JobAnalysis.vue b/frontend/src/views/dashboard/JobAnalysis.vue
index 0e719fac..13c5ade3 100644
--- a/frontend/src/views/dashboard/JobAnalysis.vue
+++ b/frontend/src/views/dashboard/JobAnalysis.vue
@@ -70,10 +70,10 @@ export default {
groupName: '',
startTime: '',
endTime: '',
- successNum: 0,
- failNum: 0,
- stopNum: 0,
- cancelNum: 0,
+ success: 0,
+ fail: 0,
+ stop: 0,
+ cancel: 0,
total: 0,
groupNameList: [],
pieScale: [{
@@ -111,24 +111,24 @@ export default {
mounted () {
this.$bus.$on('job', (res) => {
this.total = 0
- this.successNum = 0
- this.failNum = 0
- this.stopNum = 0
- this.cancelNum = 0
+ this.success = 0
+ this.fail = 0
+ this.stop = 0
+ this.cancel = 0
this.rankList = res.data.rankList
this.taskList = res.data.taskList
res.data.dashboardLineResponseDOList.forEach(res => {
- this.successNum += res.success
- this.failNum += res.failNum
- this.stopNum += res.stopNum
- this.cancelNum += res.cancelNum
+ this.success += res.success
+ this.fail += res.fail
+ this.stop += res.stop
+ this.cancel += res.cancel
})
- this.total = this.successNum + this.failNum + this.stopNum + this.cancelNum
+ this.total = this.success + this.fail + this.stop + this.cancel
this.pieData = [
- { value: 'SUCCESS', name: this.successNum, percent: this.successNum / this.total },
- { value: 'FAIL', name: this.failNum, percent: this.failNum / this.total },
- { value: 'STOP', name: this.stopNum, percent: this.stopNum / this.total },
- { value: 'CANCEL', name: this.cancelNum, percent: this.cancelNum / this.total }
+ { value: 'SUCCESS', name: this.success, percent: this.success / this.total },
+ { value: 'FAIL', name: this.fail, percent: this.fail / this.total },
+ { value: 'STOP', name: this.stop, percent: this.stop / this.total },
+ { value: 'CANCEL', name: this.cancel, percent: this.cancel / this.total }
]
})
},