Browse Source

Feature/issue 109 (#111)

* feat: add cancel task api

* feat: update frontend resources

* fix: readme img dismiss
master
vran 3 years ago
committed by GitHub
parent
commit
0badba566a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      README.md
  2. 7
      api/src/main/java/com/databasir/api/ProjectController.java
  3. 2
      api/src/main/java/com/databasir/api/Routes.java
  4. 2
      api/src/main/resources/static/css/26.99793389.css
  5. 2
      api/src/main/resources/static/css/698.99793389.css
  6. 2
      api/src/main/resources/static/index.html
  7. 33
      api/src/main/resources/static/js/26.a6bdf741.js
  8. 1
      api/src/main/resources/static/js/26.a6bdf741.js.map
  9. 1
      api/src/main/resources/static/js/317.4a63fcb2.js.map
  10. 33
      api/src/main/resources/static/js/382-legacy.4b48b754.js
  11. 1
      api/src/main/resources/static/js/382-legacy.4b48b754.js.map
  12. 2
      api/src/main/resources/static/js/431-legacy.26ebf7ff.js
  13. 2
      api/src/main/resources/static/js/431-legacy.26ebf7ff.js.map
  14. 2
      api/src/main/resources/static/js/431.76beed91.js
  15. 1
      api/src/main/resources/static/js/431.76beed91.js.map
  16. 2
      api/src/main/resources/static/js/431.9f178ab9.js
  17. 1
      api/src/main/resources/static/js/431.9f178ab9.js.map
  18. 33
      api/src/main/resources/static/js/434.5d6222a1.js
  19. 1
      api/src/main/resources/static/js/434.5d6222a1.js.map
  20. 2
      api/src/main/resources/static/js/559-legacy.ba556ad5.js
  21. 2
      api/src/main/resources/static/js/559-legacy.ba556ad5.js.map
  22. 2
      api/src/main/resources/static/js/559.cadf8e67.js
  23. 1
      api/src/main/resources/static/js/559.cadf8e67.js.map
  24. 2
      api/src/main/resources/static/js/559.dde4a248.js
  25. 1
      api/src/main/resources/static/js/559.dde4a248.js.map
  26. 2
      api/src/main/resources/static/js/668-legacy.03c26a57.js
  27. 1
      api/src/main/resources/static/js/668-legacy.03c26a57.js.map
  28. 33
      api/src/main/resources/static/js/698-legacy.8bbadf41.js
  29. 1
      api/src/main/resources/static/js/698-legacy.8bbadf41.js.map
  30. 2
      api/src/main/resources/static/js/924-legacy.7cf8113f.js
  31. 1
      api/src/main/resources/static/js/924-legacy.7cf8113f.js.map
  32. 2
      api/src/main/resources/static/js/924-legacy.ac2f1802.js
  33. 1
      api/src/main/resources/static/js/924-legacy.ac2f1802.js.map
  34. 4
      api/src/main/resources/static/js/926.361d46e9.js
  35. 1
      api/src/main/resources/static/js/926.361d46e9.js.map
  36. 2
      api/src/main/resources/static/js/933-legacy.bc1bfc26.js
  37. 1
      api/src/main/resources/static/js/933-legacy.bc1bfc26.js.map
  38. 2
      api/src/main/resources/static/js/app-legacy.3f95f6dc.js
  39. 2
      api/src/main/resources/static/js/app-legacy.57eb4513.js
  40. 2
      api/src/main/resources/static/js/app-legacy.57eb4513.js.map
  41. 4
      api/src/main/resources/static/js/app.c9efd150.js
  42. 2
      api/src/main/resources/static/js/app.c9efd150.js.map
  43. 11
      core/src/main/java/com/databasir/core/domain/project/service/ProjectService.java
  44. 2
      dao/src/main/java/com/databasir/dao/enums/ProjectSyncTaskStatus.java

2
README.md

@ -2,7 +2,7 @@
## 简介 ## 简介
![](databasir.png) 是面向团队的**关系型数据库模型文档管理平台**,旨在通过自动化的方式解决模型文档管理过程中维护成本高、内容更新不及时以及团队协作复杂等问题。 ![](docs/databasir.png) 是面向团队的**关系型数据库模型文档管理平台**,旨在通过自动化的方式解决模型文档管理过程中维护成本高、内容更新不及时以及团队协作复杂等问题。
平台文档:https://doc.databasir.com 平台文档:https://doc.databasir.com

7
api/src/main/java/com/databasir/api/ProjectController.java

@ -94,4 +94,11 @@ public class ProjectController {
@RequestBody ProjectTaskListCondition condition) { @RequestBody ProjectTaskListCondition condition) {
return JsonData.ok(projectService.listManualTasks(projectId, condition)); return JsonData.ok(projectService.listManualTasks(projectId, condition));
} }
@PatchMapping(Routes.GroupProject.CANCEL_MANUAL_TASK)
public JsonData<Void> cancelTask(@PathVariable Integer projectId,
@PathVariable Integer taskId) {
projectService.cancelTask(projectId, taskId);
return JsonData.ok();
}
} }

2
api/src/main/java/com/databasir/api/Routes.java

@ -72,6 +72,8 @@ public interface Routes {
String TEST_CONNECTION = BASE + "/projects/test_connection"; String TEST_CONNECTION = BASE + "/projects/test_connection";
String LIST_MANUAL_TASKS = BASE + "/projects/{projectId}/list_manual_tasks"; String LIST_MANUAL_TASKS = BASE + "/projects/{projectId}/list_manual_tasks";
String CANCEL_MANUAL_TASK = BASE + "/projects/{projectId}/tasks/{taskId}/cancel";
} }
interface Document { interface Document {

2
api/src/main/resources/static/css/382.742131d4.css → api/src/main/resources/static/css/26.99793389.css

@ -17,4 +17,4 @@
#fcc28c #fcc28c
#ffa #ffa
#fff #fff
*/.hljs{background:#333;color:#fff}.hljs-doctag,.hljs-meta-keyword,.hljs-name,.hljs-strong{font-weight:700}.hljs-code,.hljs-emphasis{font-style:italic}.hljs-section,.hljs-tag{color:#62c8f3}.hljs-selector-class,.hljs-selector-id,.hljs-template-variable,.hljs-variable{color:#ade5fc}.hljs-meta-string,.hljs-string{color:#a2fca2}.hljs-attr,.hljs-quote,.hljs-selector-attr{color:#7bd694}.hljs-tag .hljs-attr{color:inherit}.hljs-attribute,.hljs-title,.hljs-type{color:#ffa}.hljs-number,.hljs-symbol{color:#d36363}.hljs-bullet,.hljs-template-tag{color:#b8d8a2}.hljs-built_in,.hljs-keyword,.hljs-literal,.hljs-selector-tag{color:#fcc28c}.hljs-code,.hljs-comment,.hljs-formula{color:#888}.hljs-link,.hljs-regexp,.hljs-selector-pseudo{color:#c6b4f0}.hljs-meta{color:#fc9b9b}.hljs-deletion{background:#fc9b9b;color:#333}.hljs-addition{background:#a2fca2;color:#333}.hljs-subst{color:#fff}.hljs a{color:inherit}.hljs a:focus,.hljs a:hover{color:inherit;text-decoration:underline}.hljs mark{background:#555;color:inherit}.span-ellipsis{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;flex:1;display:inline-block;align-items:left;justify-content:space-between;font-size:14px;padding:8px}.doc-toc-aside{overflow-wrap:break-word;text-overflow:ellipsis;bottom:0;top:100px;position:fixed;overflow-y:hidden;overflow-x:hidden;max-width:var(--el-aside-width);width:var(--el-aside-width);border-width:0 1px 0 0;border-color:#ddd;border-style:solid}.doc-toc-aside:hover{overflow-y:auto;scrollbar-width:thin}.search-input{border-width:0 0 1px 0;border-style:solid;width:90%;min-height:33px}.search-input::-moz-placeholder{color:hsla(0,0%,71%,.808)}.search-input:-ms-input-placeholder{color:hsla(0,0%,71%,.808)}.search-input::placeholder{color:hsla(0,0%,71%,.808)}.search-input:focus{outline:none;border-color:#000} */.hljs{background:#333;color:#fff}.hljs-doctag,.hljs-meta-keyword,.hljs-name,.hljs-strong{font-weight:700}.hljs-code,.hljs-emphasis{font-style:italic}.hljs-section,.hljs-tag{color:#62c8f3}.hljs-selector-class,.hljs-selector-id,.hljs-template-variable,.hljs-variable{color:#ade5fc}.hljs-meta-string,.hljs-string{color:#a2fca2}.hljs-attr,.hljs-quote,.hljs-selector-attr{color:#7bd694}.hljs-tag .hljs-attr{color:inherit}.hljs-attribute,.hljs-title,.hljs-type{color:#ffa}.hljs-number,.hljs-symbol{color:#d36363}.hljs-bullet,.hljs-template-tag{color:#b8d8a2}.hljs-built_in,.hljs-keyword,.hljs-literal,.hljs-selector-tag{color:#fcc28c}.hljs-code,.hljs-comment,.hljs-formula{color:#888}.hljs-link,.hljs-regexp,.hljs-selector-pseudo{color:#c6b4f0}.hljs-meta{color:#fc9b9b}.hljs-deletion{background:#fc9b9b;color:#333}.hljs-addition{background:#a2fca2;color:#333}.hljs-subst{color:#fff}.hljs a{color:inherit}.hljs a:focus,.hljs a:hover{color:inherit;text-decoration:underline}.hljs mark{background:#555;color:inherit}.span-ellipsis{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;flex:1;display:inline-block;align-items:left;justify-content:space-between;font-size:14px;padding:8px}.doc-toc-aside{overflow-wrap:break-word;text-overflow:ellipsis;bottom:0;top:100px;position:fixed;overflow-y:hidden;overflow-x:hidden;max-width:var(--el-aside-width);width:var(--el-aside-width);border-width:0 1px 0 0;border-color:#ddd;border-style:solid}.doc-toc-aside:hover{overflow-y:auto;scrollbar-width:thin}.search-input{border-width:0 0 1px 0;border-style:solid;width:90%;min-height:33px}.search-input::-moz-placeholder{color:hsla(0,0%,71%,.808)}.search-input:-ms-input-placeholder{color:hsla(0,0%,71%,.808)}.search-input::placeholder{color:hsla(0,0%,71%,.808)}.search-input:focus{outline:none;border-color:#000}.card-header{display:flex;justify-content:space-between;align-items:center}

2
api/src/main/resources/static/css/434.742131d4.css → api/src/main/resources/static/css/698.99793389.css

@ -17,4 +17,4 @@
#fcc28c #fcc28c
#ffa #ffa
#fff #fff
*/.hljs{background:#333;color:#fff}.hljs-doctag,.hljs-meta-keyword,.hljs-name,.hljs-strong{font-weight:700}.hljs-code,.hljs-emphasis{font-style:italic}.hljs-section,.hljs-tag{color:#62c8f3}.hljs-selector-class,.hljs-selector-id,.hljs-template-variable,.hljs-variable{color:#ade5fc}.hljs-meta-string,.hljs-string{color:#a2fca2}.hljs-attr,.hljs-quote,.hljs-selector-attr{color:#7bd694}.hljs-tag .hljs-attr{color:inherit}.hljs-attribute,.hljs-title,.hljs-type{color:#ffa}.hljs-number,.hljs-symbol{color:#d36363}.hljs-bullet,.hljs-template-tag{color:#b8d8a2}.hljs-built_in,.hljs-keyword,.hljs-literal,.hljs-selector-tag{color:#fcc28c}.hljs-code,.hljs-comment,.hljs-formula{color:#888}.hljs-link,.hljs-regexp,.hljs-selector-pseudo{color:#c6b4f0}.hljs-meta{color:#fc9b9b}.hljs-deletion{background:#fc9b9b;color:#333}.hljs-addition{background:#a2fca2;color:#333}.hljs-subst{color:#fff}.hljs a{color:inherit}.hljs a:focus,.hljs a:hover{color:inherit;text-decoration:underline}.hljs mark{background:#555;color:inherit}.span-ellipsis{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;flex:1;display:inline-block;align-items:left;justify-content:space-between;font-size:14px;padding:8px}.doc-toc-aside{overflow-wrap:break-word;text-overflow:ellipsis;bottom:0;top:100px;position:fixed;overflow-y:hidden;overflow-x:hidden;max-width:var(--el-aside-width);width:var(--el-aside-width);border-width:0 1px 0 0;border-color:#ddd;border-style:solid}.doc-toc-aside:hover{overflow-y:auto;scrollbar-width:thin}.search-input{border-width:0 0 1px 0;border-style:solid;width:90%;min-height:33px}.search-input::-moz-placeholder{color:hsla(0,0%,71%,.808)}.search-input:-ms-input-placeholder{color:hsla(0,0%,71%,.808)}.search-input::placeholder{color:hsla(0,0%,71%,.808)}.search-input:focus{outline:none;border-color:#000} */.hljs{background:#333;color:#fff}.hljs-doctag,.hljs-meta-keyword,.hljs-name,.hljs-strong{font-weight:700}.hljs-code,.hljs-emphasis{font-style:italic}.hljs-section,.hljs-tag{color:#62c8f3}.hljs-selector-class,.hljs-selector-id,.hljs-template-variable,.hljs-variable{color:#ade5fc}.hljs-meta-string,.hljs-string{color:#a2fca2}.hljs-attr,.hljs-quote,.hljs-selector-attr{color:#7bd694}.hljs-tag .hljs-attr{color:inherit}.hljs-attribute,.hljs-title,.hljs-type{color:#ffa}.hljs-number,.hljs-symbol{color:#d36363}.hljs-bullet,.hljs-template-tag{color:#b8d8a2}.hljs-built_in,.hljs-keyword,.hljs-literal,.hljs-selector-tag{color:#fcc28c}.hljs-code,.hljs-comment,.hljs-formula{color:#888}.hljs-link,.hljs-regexp,.hljs-selector-pseudo{color:#c6b4f0}.hljs-meta{color:#fc9b9b}.hljs-deletion{background:#fc9b9b;color:#333}.hljs-addition{background:#a2fca2;color:#333}.hljs-subst{color:#fff}.hljs a{color:inherit}.hljs a:focus,.hljs a:hover{color:inherit;text-decoration:underline}.hljs mark{background:#555;color:inherit}.span-ellipsis{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;flex:1;display:inline-block;align-items:left;justify-content:space-between;font-size:14px;padding:8px}.doc-toc-aside{overflow-wrap:break-word;text-overflow:ellipsis;bottom:0;top:100px;position:fixed;overflow-y:hidden;overflow-x:hidden;max-width:var(--el-aside-width);width:var(--el-aside-width);border-width:0 1px 0 0;border-color:#ddd;border-style:solid}.doc-toc-aside:hover{overflow-y:auto;scrollbar-width:thin}.search-input{border-width:0 0 1px 0;border-style:solid;width:90%;min-height:33px}.search-input::-moz-placeholder{color:hsla(0,0%,71%,.808)}.search-input:-ms-input-placeholder{color:hsla(0,0%,71%,.808)}.search-input::placeholder{color:hsla(0,0%,71%,.808)}.search-input:focus{outline:none;border-color:#000}.card-header{display:flex;justify-content:space-between;align-items:center}

2
api/src/main/resources/static/index.html

@ -1 +1 @@
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>databasir</title><script defer="defer" type="module" src="/js/chunk-vendors.787360f3.js"></script><script defer="defer" type="module" src="/js/app.29a225fb.js"></script><link href="/css/chunk-vendors.8e1003a6.css" rel="stylesheet"><link href="/css/app.15b40a89.css" rel="stylesheet"><script defer="defer" src="/js/chunk-vendors-legacy.405c78b5.js" nomodule></script><script defer="defer" src="/js/app-legacy.3f95f6dc.js" nomodule></script></head><body><noscript><strong>We're sorry but databasir doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html> <!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>databasir</title><script defer="defer" type="module" src="/js/chunk-vendors.787360f3.js"></script><script defer="defer" type="module" src="/js/app.c9efd150.js"></script><link href="/css/chunk-vendors.8e1003a6.css" rel="stylesheet"><link href="/css/app.15b40a89.css" rel="stylesheet"><script defer="defer" src="/js/chunk-vendors-legacy.405c78b5.js" nomodule></script><script defer="defer" src="/js/app-legacy.57eb4513.js" nomodule></script></head><body><noscript><strong>We're sorry but databasir doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>

33
api/src/main/resources/static/js/26.a6bdf741.js

File diff suppressed because one or more lines are too long

1
api/src/main/resources/static/js/26.a6bdf741.js.map

File diff suppressed because one or more lines are too long

1
api/src/main/resources/static/js/317.4a63fcb2.js.map

File diff suppressed because one or more lines are too long

33
api/src/main/resources/static/js/382-legacy.4b48b754.js

File diff suppressed because one or more lines are too long

1
api/src/main/resources/static/js/382-legacy.4b48b754.js.map

File diff suppressed because one or more lines are too long

2
api/src/main/resources/static/js/431-legacy.666d965d.js → api/src/main/resources/static/js/431-legacy.26ebf7ff.js

File diff suppressed because one or more lines are too long

2
api/src/main/resources/static/js/431-legacy.666d965d.js.map → api/src/main/resources/static/js/431-legacy.26ebf7ff.js.map

File diff suppressed because one or more lines are too long

2
api/src/main/resources/static/js/431.76beed91.js

File diff suppressed because one or more lines are too long

1
api/src/main/resources/static/js/431.76beed91.js.map

File diff suppressed because one or more lines are too long

2
api/src/main/resources/static/js/431.9f178ab9.js

File diff suppressed because one or more lines are too long

1
api/src/main/resources/static/js/431.9f178ab9.js.map

File diff suppressed because one or more lines are too long

33
api/src/main/resources/static/js/434.5d6222a1.js

File diff suppressed because one or more lines are too long

1
api/src/main/resources/static/js/434.5d6222a1.js.map

File diff suppressed because one or more lines are too long

2
api/src/main/resources/static/js/559-legacy.ae6e4ecb.js → api/src/main/resources/static/js/559-legacy.ba556ad5.js

File diff suppressed because one or more lines are too long

2
api/src/main/resources/static/js/559-legacy.ae6e4ecb.js.map → api/src/main/resources/static/js/559-legacy.ba556ad5.js.map

File diff suppressed because one or more lines are too long

2
api/src/main/resources/static/js/559.cadf8e67.js

File diff suppressed because one or more lines are too long

1
api/src/main/resources/static/js/559.cadf8e67.js.map

File diff suppressed because one or more lines are too long

2
api/src/main/resources/static/js/559.dde4a248.js

File diff suppressed because one or more lines are too long

1
api/src/main/resources/static/js/559.dde4a248.js.map

File diff suppressed because one or more lines are too long

2
api/src/main/resources/static/js/668-legacy.03c26a57.js

File diff suppressed because one or more lines are too long

1
api/src/main/resources/static/js/668-legacy.03c26a57.js.map

File diff suppressed because one or more lines are too long

33
api/src/main/resources/static/js/698-legacy.8bbadf41.js

File diff suppressed because one or more lines are too long

1
api/src/main/resources/static/js/698-legacy.8bbadf41.js.map

File diff suppressed because one or more lines are too long

2
api/src/main/resources/static/js/924-legacy.7cf8113f.js

File diff suppressed because one or more lines are too long

1
api/src/main/resources/static/js/924-legacy.7cf8113f.js.map

File diff suppressed because one or more lines are too long

2
api/src/main/resources/static/js/924-legacy.ac2f1802.js

File diff suppressed because one or more lines are too long

1
api/src/main/resources/static/js/924-legacy.ac2f1802.js.map

File diff suppressed because one or more lines are too long

4
api/src/main/resources/static/js/317.4a63fcb2.js → api/src/main/resources/static/js/926.361d46e9.js

File diff suppressed because one or more lines are too long

1
api/src/main/resources/static/js/926.361d46e9.js.map

File diff suppressed because one or more lines are too long

2
api/src/main/resources/static/js/933-legacy.bc1bfc26.js

File diff suppressed because one or more lines are too long

1
api/src/main/resources/static/js/933-legacy.bc1bfc26.js.map

File diff suppressed because one or more lines are too long

2
api/src/main/resources/static/js/app-legacy.3f95f6dc.js

File diff suppressed because one or more lines are too long

2
api/src/main/resources/static/js/app-legacy.57eb4513.js

File diff suppressed because one or more lines are too long

2
api/src/main/resources/static/js/app-legacy.3f95f6dc.js.map → api/src/main/resources/static/js/app-legacy.57eb4513.js.map

File diff suppressed because one or more lines are too long

4
api/src/main/resources/static/js/app.29a225fb.js → api/src/main/resources/static/js/app.c9efd150.js

File diff suppressed because one or more lines are too long

2
api/src/main/resources/static/js/app.29a225fb.js.map → api/src/main/resources/static/js/app.c9efd150.js.map

File diff suppressed because one or more lines are too long

11
core/src/main/java/com/databasir/core/domain/project/service/ProjectService.java

@ -207,4 +207,15 @@ public class ProjectService {
var tasks = projectSyncTaskDao.selectList(condition.toCondition(projectId)); var tasks = projectSyncTaskDao.selectList(condition.toCondition(projectId));
return projectSimpleTaskResponseConverter.of(tasks); return projectSimpleTaskResponseConverter.of(tasks);
} }
public void cancelTask(Integer projectId, Integer taskId) {
if (!projectDao.existsById(projectId)) {
throw DomainErrors.PROJECT_NOT_FOUND.exception();
}
projectSyncTaskDao.selectOptionalById(taskId).ifPresent(task -> {
if (task.getStatus() == ProjectSyncTaskStatus.NEW || task.getStatus() == ProjectSyncTaskStatus.RUNNING) {
projectSyncTaskDao.updateStatusAndResultById(taskId, ProjectSyncTaskStatus.CANCELED, "主动取消");
}
});
}
} }

2
dao/src/main/java/com/databasir/dao/enums/ProjectSyncTaskStatus.java

@ -5,5 +5,5 @@ public enum ProjectSyncTaskStatus {
RUNNING, RUNNING,
FINISHED, FINISHED,
FAILED, FAILED,
CANCELLED CANCELED
} }

Loading…
Cancel
Save