You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by ga...@apache.org on 2023/06/30 09:58:18 UTC
[seatunnel-web] branch add_canvas_job_define updated: [Feat] Adding the sync task (#63)
This is an automated email from the ASF dual-hosted git repository.
gaojun2048 pushed a commit to branch add_canvas_job_define
in repository https://gitbox.apache.org/repos/asf/seatunnel-web.git
The following commit(s) were added to refs/heads/add_canvas_job_define by this push:
new 9e9f1549 [Feat] Adding the sync task (#63)
9e9f1549 is described below
commit 9e9f1549f56aacc64a61650fd759c69d204f6d0e
Author: chaoling <12...@users.noreply.github.com>
AuthorDate: Fri Jun 30 17:58:12 2023 +0800
[Feat] Adding the sync task (#63)
* add dark light theme
* migrate sync-task file
* add deps
* feat: update datasource
* feat: update virtual-tables
* feat: update data-pipes
* feat: update user-manage
* [feat] Adding the synchronization task module.
---
seatunnel-ui/package.json | 4 +
seatunnel-ui/src/App.tsx | 9 +-
.../index.ts => assets/styles/default.scss} | 21 +-
seatunnel-ui/src/common/column-width-config.ts | 130 +++
seatunnel-ui/src/common/common.ts | 419 +++++++
.../src/{utils/index.ts => common/types.ts} | 40 +-
.../button-link/index.module.scss} | 12 +-
.../menu => components/button-link}/index.tsx | 64 +-
seatunnel-ui/src/components/card/index.tsx | 67 ++
.../checkbox-tree/index.module.scss} | 10 +-
.../src/components/checkbox-tree/index.tsx | 208 ++++
.../log-modal/index.module.scss} | 8 +-
seatunnel-ui/src/components/log-modal/index.tsx | 216 ++++
.../src/components/resource-auth/index.tsx | 163 +++
.../{locales/zh_CN/menu.ts => directives/index.ts} | 20 +-
.../menu/index.tsx => directives/permission.ts} | 57 +-
seatunnel-ui/src/{themes => hooks}/index.ts | 14 +-
seatunnel-ui/src/hooks/use-client-config.ts | 57 +
.../dark.ts => hooks/use-permission-length.ts} | 19 +-
.../use-source.ts => hooks/use-source-type.ts} | 44 +-
seatunnel-ui/src/hooks/use-table-link.ts | 94 ++
seatunnel-ui/src/hooks/use-table-operation.ts | 219 ++++
.../theme/index.ts => hooks/use-text-copy.ts} | 33 +-
.../src/layouts/dashboard/header/index.tsx | 2 +-
.../src/layouts/dashboard/header/menu/index.tsx | 15 +-
.../src/layouts/dashboard/header/menu/use-menu.ts | 4 -
seatunnel-ui/src/layouts/dashboard/index.tsx | 51 +-
.../layouts/dashboard/sidebar/index.module.scss | 67 ++
.../src/layouts/dashboard/sidebar/index.tsx | 137 +++
.../modules/dark.ts => locales/en_US/hook.ts} | 6 +-
seatunnel-ui/src/locales/en_US/index.ts | 8 +-
seatunnel-ui/src/locales/en_US/menu.ts | 4 +-
seatunnel-ui/src/locales/en_US/project.ts | 1176 ++++++++++++++++++++
.../theme/types.ts => locales/en_US/theme.ts} | 8 +-
.../modules/dark.ts => locales/zh_CN/hook.ts} | 6 +-
seatunnel-ui/src/locales/zh_CN/index.ts | 8 +-
seatunnel-ui/src/locales/zh_CN/menu.ts | 4 +-
seatunnel-ui/src/locales/zh_CN/project.ts | 1143 +++++++++++++++++++
.../theme/types.ts => locales/zh_CN/theme.ts} | 8 +-
seatunnel-ui/src/main.ts | 1 +
seatunnel-ui/src/router/data-pipes.ts | 12 +-
seatunnel-ui/src/router/datasource.ts | 9 +-
seatunnel-ui/src/router/jobs.ts | 3 +-
seatunnel-ui/src/router/sync-task.ts | 80 ++
seatunnel-ui/src/router/tasks.ts | 46 +-
seatunnel-ui/src/router/user-manage.ts | 3 +-
seatunnel-ui/src/router/virtual-tables.ts | 21 +-
seatunnel-ui/src/service/data-source/index.ts | 173 +++
.../service/{datasource => data-source}/types.ts | 55 +-
.../src/service/{virtual-tables => log}/index.ts | 24 +-
.../src/{themes/index.ts => service/log/types.ts} | 26 +-
seatunnel-ui/src/service/resources/index.ts | 385 +++++++
seatunnel-ui/src/service/resources/types.ts | 216 ++++
seatunnel-ui/src/service/service.ts | 15 +-
.../src/service/sync-task-definition/index.ts | 317 ++++++
.../{datasource => sync-task-instance}/index.ts | 57 +-
seatunnel-ui/src/service/task-instances/index.ts | 87 ++
seatunnel-ui/src/service/task-instances/types.ts | 127 +++
seatunnel-ui/src/service/virtual-table/index.ts | 84 ++
.../service/{datasource => virtual-table}/types.ts | 54 +-
.../index.ts => datasource/form-structures.ts} | 23 +-
seatunnel-ui/src/store/project/index.ts | 76 ++
seatunnel-ui/src/store/project/task-node.ts | 155 +++
seatunnel-ui/src/store/project/task-type.ts | 178 +++
seatunnel-ui/src/store/project/types.ts | 117 ++
.../{theme => synchronization-definition}/index.ts | 29 +-
.../{theme => synchronization-definition}/types.ts | 8 +-
seatunnel-ui/src/store/theme/index.ts | 31 +-
seatunnel-ui/src/store/theme/types.ts | 9 +-
seatunnel-ui/src/themes/index.ts | 5 +-
.../index.tsx => themes/modules/dark-blue.ts} | 47 +-
seatunnel-ui/src/themes/modules/dark.ts | 30 +-
seatunnel-ui/src/themes/modules/light.ts | 77 +-
.../src/themes/{modules/dark.ts => type.ts} | 4 +-
.../virtual-tables/index.ts => utils/clipboard.ts} | 21 +-
seatunnel-ui/src/utils/index.ts | 4 +-
seatunnel-ui/src/utils/timePickeroption.ts | 56 +
seatunnel-ui/src/views/data-pipes/detail/index.tsx | 9 +-
seatunnel-ui/src/views/data-pipes/edit/index.tsx | 9 +-
.../src/views/data-pipes/list/use-table.ts | 2 +-
.../src/views/datasource/components/use-source.ts | 8 +-
.../src/views/datasource/create/use-detail.ts | 12 +-
.../src/views/datasource/create/use-form.ts | 6 +-
.../index.ts => views/datasource/list/types.ts} | 12 +-
.../src/views/datasource/list/use-columns.ts | 16 +-
.../datasource/{components => list}/use-source.ts | 34 +-
.../src/views/datasource/list/use-table.ts | 14 +-
seatunnel-ui/src/views/jobs/list/use-table.ts | 2 +-
seatunnel-ui/src/views/login/use-form.ts | 2 +-
.../views/projects/components/column-selector.tsx | 143 +++
.../projects/components/index.scss} | 22 +-
.../src/views/projects/components/jumpProject.ts | 0
.../views/projects/components/projectSelector.tsx | 96 ++
.../projects/utils/changeProject.ts} | 14 +-
.../src/views/projects/utils/dealColumns.ts | 123 ++
.../projects/utils/getProjectCodes.ts} | 12 +-
.../projects/utils/storeColums.ts} | 12 +-
seatunnel-ui/src/views/setting/index.tsx | 10 +-
.../setting/theme/index.module.scss} | 4 +
seatunnel-ui/src/views/setting/theme/index.tsx | 64 ++
seatunnel-ui/src/views/setting/theme/use-theme.ts | 50 +
.../views/task/components/node/detail-modal.tsx | 228 ++++
.../src/views/task/components/node/detail.tsx | 123 ++
.../src/views/task/components/node/fields/index.ts | 83 ++
.../task/components/node/fields/use-child-node.ts | 137 +++
.../node/fields/use-chunjun-deploy-mode.ts} | 46 +-
.../task/components/node/fields/use-chunjun.ts | 92 ++
.../task/components/node/fields/use-conditions.ts | 127 +++
.../components/node/fields/use-custom-params.ts | 202 ++++
.../task/components/node/fields/use-datasource.ts | 117 ++
.../views/task/components/node/fields/use-datax.ts | 289 +++++
.../task/components/node/fields/use-delay-time.ts} | 32 +-
.../node/fields/use-dependent-timeout.ts | 101 ++
.../task/components/node/fields/use-dependent.ts | 543 +++++++++
.../task/components/node/fields/use-deploy-mode.ts | 62 ++
.../components/node/fields/use-description.ts} | 30 +-
.../views/task/components/node/fields/use-dinky.ts | 66 ++
.../components/node/fields/use-driver-cores.ts} | 42 +-
.../components/node/fields/use-driver-memory.ts} | 47 +-
.../views/task/components/node/fields/use-dvc.ts | 175 +++
.../node/fields/use-dynamic-datasource.ts | 132 +++
.../task/components/node/fields/use-emr.ts} | 46 +-
.../components/node/fields/use-environment-name.ts | 100 ++
.../components/node/fields/use-executor-cores.ts} | 42 +-
.../components/node/fields/use-executor-memory.ts} | 47 +-
.../components/node/fields/use-executor-number.ts} | 42 +-
.../task/components/node/fields/use-failed.ts} | 39 +-
.../views/task/components/node/fields/use-flink.ts | 229 ++++
.../task/components/node/fields/use-hive-cli.ts | 54 +
.../views/task/components/node/fields/use-http.ts | 238 ++++
.../components/node/fields/use-informatica-item.ts | 90 ++
.../views/task/components/node/fields/use-jar.ts | 159 +++
.../task/components/node/fields/use-jupyter.ts | 127 +++
.../task/components/node/fields/use-main-jar.ts | 77 ++
.../components/node/fields/use-mlflow-models.ts | 80 ++
.../components/node/fields/use-mlflow-projects.ts | 322 ++++++
.../task/components/node/fields/use-mlflow.ts | 69 ++
.../views/task/components/node/fields/use-mr.ts | 107 ++
.../task/components/node/fields/use-name.ts} | 35 +-
.../task/components/node/fields/use-next-loop.ts | 140 +++
.../task/components/node/fields/use-openmldb.ts | 77 ++
.../task/components/node/fields/use-pre-tasks.ts | 48 +
.../components/node/fields/use-process-name.ts | 92 ++
.../task/components/node/fields/use-pytorch.ts | 139 +++
.../node/fields/use-relation-custom-params.ts | 99 ++
.../node/fields/use-remote-connection.ts | 100 ++
.../task/components/node/fields/use-resources.ts | 111 ++
.../views/task/components/node/fields/use-rules.ts | 266 +++++
.../task/components/node/fields/use-run-flag.ts} | 36 +-
.../task/components/node/fields/use-sagemaker.ts} | 16 +-
.../task/components/node/fields/use-sea-tunnel.ts | 90 ++
.../task/components/node/fields/use-shell.ts} | 49 +-
.../views/task/components/node/fields/use-spark.ts | 157 +++
.../task/components/node/fields/use-sql-utils.ts | 148 +++
.../views/task/components/node/fields/use-sql.ts | 81 ++
.../node/fields/use-sqoop-source-type.ts | 291 +++++
.../node/fields/use-sqoop-target-type.ts | 403 +++++++
.../views/task/components/node/fields/use-sqoop.ts | 148 +++
.../task/components/node/fields/use-surveil.ts | 371 ++++++
.../task/components/node/fields/use-switch.ts | 127 +++
.../node/fields/use-target-task-name.ts} | 34 +-
.../task/components/node/fields/use-task-group.ts | 84 ++
.../components/node/fields/use-task-priority.ts | 92 ++
.../task/components/node/fields/use-task-type.ts} | 59 +-
.../components/node/fields/use-timeout-alarm.ts | 88 ++
.../views/task/components/node/fields/use-udfs.ts | 59 +
.../components/node/fields/use-whale-sea-tunnel.ts | 83 ++
.../components/node/fields/use-worker-group.ts | 63 ++
.../task/components/node/fields/use-zeppelin.ts | 85 ++
.../src/views/task/components/node/format-data.ts | 770 +++++++++++++
.../task/components/node/index.module.scss} | 66 +-
.../src/views/task/components/node/tasks/index.ts | 86 ++
.../views/task/components/node/tasks/use-card.ts | 89 ++
.../task/components/node/tasks/use-chunjun.ts | 86 ++
.../task/components/node/tasks/use-conditions.ts | 77 ++
.../task/components/node/tasks/use-data-quality.ts | 130 +++
.../views/task/components/node/tasks/use-datax.ts | 86 ++
.../task/components/node/tasks/use-dependent.ts | 82 ++
.../views/task/components/node/tasks/use-dinky.ts | 81 ++
.../views/task/components/node/tasks/use-dvc.ts | 82 ++
.../views/task/components/node/tasks/use-emr.ts | 82 ++
.../views/task/components/node/tasks/use-flink.ts | 88 ++
.../task/components/node/tasks/use-hive-cli.ts | 80 ++
.../views/task/components/node/tasks/use-http.ts | 87 ++
.../task/components/node/tasks/use-informatica.ts | 85 ++
.../views/task/components/node/tasks/use-jar.ts | 81 ++
.../task/components/node/tasks/use-jupyter.ts | 83 ++
.../views/task/components/node/tasks/use-mlflow.ts | 89 ++
.../src/views/task/components/node/tasks/use-mr.ts | 81 ++
.../task/components/node/tasks/use-openmldb.ts | 85 ++
.../views/task/components/node/tasks/use-pigeon.ts | 80 ++
.../task/components/node/tasks/use-procedure.ts | 89 ++
.../views/task/components/node/tasks/use-python.ts | 83 ++
.../task/components/node/tasks/use-pytorch.ts | 86 ++
.../task/components/node/tasks/use-sagemaker.ts | 81 ++
.../task/components/node/tasks/use-sea-tunnel.ts | 108 ++
.../views/task/components/node/tasks/use-shell.ts | 85 ++
.../views/task/components/node/tasks/use-spark.ts | 90 ++
.../views/task/components/node/tasks/use-sql.ts | 90 ++
.../views/task/components/node/tasks/use-sqoop.ts | 102 ++
.../task/components/node/tasks/use-sub-process.ts | 87 ++
.../task/components/node/tasks/use-surveil.ts | 89 ++
.../views/task/components/node/tasks/use-switch.ts | 79 ++
.../components/node/tasks/use-whale-sea-tunnel.ts | 87 ++
.../task/components/node/tasks/use-zeppelin.ts | 81 ++
.../src/views/task/components/node/types.ts | 490 ++++++++
.../views/task/components/node/use-task-config.ts | 177 +++
.../src/views/task/components/node/use-task.ts | 89 ++
.../task/coronation/components/import-modal.tsx | 268 +++++
.../views/task/coronation/components/use-import.ts | 193 ++++
.../task/coronation/index.module.scss} | 17 +-
seatunnel-ui/src/views/task/coronation/index.tsx | 262 +++++
.../src/views/task/coronation/use-table.ts | 274 +++++
.../task/definition/components/move-modal.tsx | 109 ++
.../views/task/definition/components/use-move.ts | 105 ++
.../task/definition/components/use-version.ts | 212 ++++
.../task/definition/components/version-modal.tsx | 107 ++
.../definition/components/version.module.scss} | 8 +-
.../task/definition/index.module.scss} | 41 +-
seatunnel-ui/src/views/task/definition/index.tsx | 236 ++++
.../index.ts => views/task/definition/types.ts} | 13 +-
.../src/views/task/definition/use-table.ts | 317 ++++++
seatunnel-ui/src/views/task/definition/use-task.ts | 108 ++
.../task/instance/index.module.scss} | 12 +-
seatunnel-ui/src/views/task/instance/index.tsx | 492 ++++++++
.../index.ts => views/task/instance/types.ts} | 23 +-
seatunnel-ui/src/views/task/instance/use-table.ts | 725 ++++++++++++
.../src/views/task/isolation/detail-modal.tsx | 171 +++
.../task/isolation/index.module.scss} | 17 +-
seatunnel-ui/src/views/task/isolation/index.tsx | 208 ++++
.../{virtual-tables => task/isolation}/types.ts | 23 +-
.../src/views/task/isolation/use-columns.ts | 117 ++
.../src/views/task/isolation/use-detail.ts | 112 ++
seatunnel-ui/src/views/task/isolation/use-table.ts | 160 +++
.../dag/canvas/dag-data.ts | 62 ++
.../dag/canvas/dag-setting.ts} | 46 +-
.../dag/canvas/dag-shape.ts | 202 ++++
.../dag/canvas/index.module.scss} | 59 +-
.../dag/canvas/index.tsx | 176 +++
.../synchronization-definition/dag/canvas/node.tsx | 76 ++
.../dag/canvas/use-dag-graph.ts | 79 ++
.../dag/canvas/use-dag-node.ts} | 21 +-
.../dag/canvas/use-dag-resize.ts} | 32 +-
.../task/synchronization-definition/dag/config.ts} | 27 +-
.../dag/configuration-form.tsx | 306 +++++
.../synchronization-definition/dag/images/copy.png | Bin 0 -> 330 bytes
.../dag/images/field-mapper.png | Bin 0 -> 3306 bytes
.../dag/images/filter-event-type.png | Bin 0 -> 1148 bytes
.../dag/images/replace.png | Bin 0 -> 3087 bytes
.../synchronization-definition/dag/images/sink.png | Bin 0 -> 3393 bytes
.../dag/images/source.png | Bin 0 -> 4025 bytes
.../dag/images/spilt.png | Bin 0 -> 337 bytes
.../synchronization-definition/dag/images/sql.png | Bin 0 -> 5193 bytes
.../dag/index.module.scss} | 7 +-
.../task/synchronization-definition/dag/index.tsx | 108 ++
.../dag/node-mode-model.module.scss} | 45 +-
.../synchronization-definition/dag/node-model.tsx | 142 +++
.../dag/node-setting.tsx | 135 +++
.../dag/sidebar/index.module.scss} | 26 +-
.../dag/sidebar/index.tsx | 128 +++
.../dag/sidebar/use-sidebar.ts} | 26 +-
.../synchronization-definition/dag/split-modal.tsx | 76 ++
.../dag/toolbar/index.tsx | 240 ++++
.../dag/toolbar/layout-modal.tsx | 120 ++
.../dag/toolbar/task-setting-modal.tsx | 113 ++
.../dag/toolbar/use-task-setting-modal.ts | 123 ++
.../task/synchronization-definition/dag/types.ts | 61 +
.../dag/use-configuration-form.ts | 394 +++++++
.../dag/use-dag-detail.ts | 166 +++
.../dag/use-model-columns.ts | 567 ++++++++++
.../synchronization-definition/dag/use-model.ts | 339 ++++++
.../dag/use-node-setting.ts | 341 ++++++
.../task/synchronization-definition/index.tsx | 199 ++++
.../task/synchronization-definition/task-modal.tsx | 220 ++++
.../test/definitionNodesAndEdgesData.ts | 44 +
.../task/synchronization-definition/test/index.ts | 1 +
.../task/synchronization-definition/use-table.ts | 167 +++
.../synchronization-definition/use-task-modal.ts | 103 ++
.../detail/dag/dag-setting.ts} | 8 +-
.../detail/dag/index.module.scss} | 26 +-
.../synchronization-instance/detail/dag/node.tsx | 18 +
.../detail/dag/use-dag-add-shape.ts | 157 +++
.../detail/dag/use-dag-edge.ts} | 13 +-
.../detail/dag/use-dag-graph.ts} | 48 +-
.../detail/dag/use-dag-layout.ts | 115 ++
.../detail/dag/use-dag-node-change-position.ts | 93 ++
.../detail/dag/use-dag-node.ts} | 21 +-
.../detail/dag/use-dag-resize.ts} | 32 +-
.../task/synchronization-instance/detail/index.tsx | 93 ++
.../detail/running-instance.tsx} | 55 +-
.../detail/task-definition.module.scss} | 47 +-
.../detail/task-definition.tsx | 141 +++
.../detail/use-running-instance.ts | 95 ++
.../detail/use-task-definition.ts | 99 ++
.../views/task/synchronization-instance/index.tsx | 56 +
.../task/synchronization-instance/sync-task.tsx | 419 +++++++
.../task/synchronization-instance/use-sync-task.ts | 403 +++++++
seatunnel-ui/src/views/tasks/list/use-table.ts | 2 +-
.../src/views/user-manage/list/use-table.ts | 2 +-
seatunnel-ui/src/views/virtual-tables/detail.tsx | 16 +-
.../src/views/virtual-tables/list/index.tsx | 10 +-
.../src/views/virtual-tables/list/use-table.ts | 30 +-
.../src/views/virtual-tables/step-one-form.tsx | 14 +-
.../src/views/virtual-tables/step-two-form.tsx | 76 +-
seatunnel-ui/src/views/virtual-tables/types.ts | 14 +-
.../src/views/virtual-tables/use-detail.ts | 93 +-
306 files changed, 30979 insertions(+), 1202 deletions(-)
diff --git a/seatunnel-ui/package.json b/seatunnel-ui/package.json
index 5535b733..c0ae6853 100644
--- a/seatunnel-ui/package.json
+++ b/seatunnel-ui/package.json
@@ -9,6 +9,9 @@
"prettier": "prettier --write \"src/**/*.{vue,ts,tsx}\""
},
"dependencies": {
+ "@antv/layout": "0.1.31",
+ "@antv/x6": "1.30.1",
+ "@antv/x6-vue-shape": "1.5.3",
"@vueuse/core": "^9.13.0",
"autoprefixer": "^10.4.13",
"axios": "^1.3.4",
@@ -22,6 +25,7 @@
"pinia": "^2.0.32",
"pinia-plugin-persistedstate": "^3.1.0",
"postcss": "^8.4.21",
+ "screenfull": "6.0.1",
"tailwindcss": "^3.2.7",
"vfonts": "^0.0.3",
"vue": "^3.2.47",
diff --git a/seatunnel-ui/src/App.tsx b/seatunnel-ui/src/App.tsx
index 415f1ceb..cd9ecf54 100644
--- a/seatunnel-ui/src/App.tsx
+++ b/seatunnel-ui/src/App.tsx
@@ -39,11 +39,9 @@ const App = defineComponent({
const themeStore = useThemeStore()
const settingStore = useSettingStore()
const currentTheme = computed(() =>
- themeStore.darkTheme ? darkTheme : undefined
- )
- const themeOverrides: Ref<GlobalThemeOverrides> = ref(
- themeList[currentTheme.value ? 'dark' : 'light']
+ themeStore.getDarkTheme ? darkTheme : undefined
)
+ const themeOverrides = computed(() => themeList[currentTheme.value ? 'dark' : 'light'])
const setBorderRadius = (v: number) => {
(themeOverrides.value.common as Partial<ThemeCommonVars & CustomThemeCommonVars>).borderRadius =
v + 'px'
@@ -66,7 +64,8 @@ const App = defineComponent({
return {
settingStore,
currentTheme,
- themeOverrides
+ themeOverrides,
+ themeList
}
},
render() {
diff --git a/seatunnel-ui/src/service/virtual-tables/index.ts b/seatunnel-ui/src/assets/styles/default.scss
similarity index 72%
copy from seatunnel-ui/src/service/virtual-tables/index.ts
copy to seatunnel-ui/src/assets/styles/default.scss
index 1943eab2..374169ed 100644
--- a/seatunnel-ui/src/service/virtual-tables/index.ts
+++ b/seatunnel-ui/src/assets/styles/default.scss
@@ -15,12 +15,19 @@
* limitations under the License.
*/
-import { axios } from '@/service/service'
-export function virtualTableList(params: any): any {
- return axios({
- url: '/virtual_table/list',
- method: 'get',
- params
- })
+.x6-graph-scroller {
+ overflow: hidden !important;
+ &:hover {
+ overflow: scroll !important;
+ }
+}
+.x6-graph-scroller::-webkit-scrollbar {
+ width: 5px;
+ height: 5px;
+}
+.x6-graph-scroller::-webkit-scrollbar-thumb {
+ border-radius: 5px;
+ transition: all 0.2s;
+ background-color: rgba(0, 0, 0, 0.25);
}
diff --git a/seatunnel-ui/src/common/column-width-config.ts b/seatunnel-ui/src/common/column-width-config.ts
new file mode 100644
index 00000000..d980945c
--- /dev/null
+++ b/seatunnel-ui/src/common/column-width-config.ts
@@ -0,0 +1,130 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { isNumber, sumBy } from 'lodash'
+import type {
+ TableColumns,
+ CommonColumnInfo
+} from 'naive-ui/es/data-table/src/interface'
+
+export const COLUMN_WIDTH_CONFIG = {
+ selection: {
+ width: 50
+ },
+ index: {
+ width: 50
+ },
+ name: {
+ width: 180,
+ ellipsis: {
+ tooltip: true
+ }
+ },
+ link_name: {
+ width: 400
+ },
+ state: {
+ width: 120
+ },
+ type: {
+ width: 130
+ },
+ version: {
+ width: 80
+ },
+ time: {
+ width: 180
+ },
+ timeZone: {
+ width: 220
+ },
+ homeColumn: {
+ width: 80
+ },
+ home_project_name: {
+ width: 450
+ },
+ projectName: {
+ minWidth: 100
+ },
+ operation: (number: number): CommonColumnInfo => ({
+ fixed: 'right',
+ width: Math.max(30 * number + 12 * (number - 1) + 24, 100)
+ }),
+ processDefinitionName: {
+ width: 120,
+ ellipsis: {
+ tooltip: true
+ }
+ },
+ userName: {
+ width: 120,
+ ellipsis: {
+ tooltip: true
+ }
+ },
+ ruleType: {
+ width: 120
+ },
+ note: {
+ width: 180,
+ ellipsis: {
+ tooltip: true
+ }
+ },
+ dryRun: {
+ width: 140
+ },
+ times: {
+ width: 120
+ },
+ duration: {
+ width: 120
+ },
+ yesOrNo: {
+ width: 100,
+ ellipsis: {
+ tooltip: true
+ }
+ },
+ size: {
+ width: 100
+ },
+ tag: {
+ width: 160
+ },
+ step: {
+ width: 160
+ },
+ copy: {
+ width: 50
+ },
+ url: {
+ width: 180
+ },
+ description: {
+ width: 180,
+ ellipsis: {
+ tooltip: true
+ }
+ }
+}
+
+export const calculateTableWidth = (columns: TableColumns) =>
+ sumBy(columns, (column) => (isNumber(column.width) ? column.width : 0))
+
+export const DefaultTableWidth = 1800
diff --git a/seatunnel-ui/src/common/common.ts b/seatunnel-ui/src/common/common.ts
new file mode 100644
index 00000000..c26ff6b5
--- /dev/null
+++ b/seatunnel-ui/src/common/common.ts
@@ -0,0 +1,419 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import {
+ SettingFilled,
+ SettingOutlined,
+ CloseCircleOutlined,
+ PauseCircleOutlined,
+ CheckCircleOutlined,
+ EditOutlined,
+ MinusCircleOutlined,
+ CheckCircleFilled,
+ Loading3QuartersOutlined,
+ PauseCircleFilled,
+ ClockCircleOutlined,
+ StopFilled,
+ StopOutlined,
+ GlobalOutlined,
+ IssuesCloseOutlined,
+ SendOutlined,
+ PlayCircleOutlined,
+ DeleteRowOutlined
+} from '@vicons/antd'
+import { format, parseISO } from 'date-fns'
+import _ from 'lodash'
+import { ITaskStateConfig } from './types'
+
+/**
+ * Intelligent display kb m
+ */
+export const bytesToSize = (bytes: number) => {
+ if (bytes === 0) return '0 B'
+ const k = 1024 // or 1024
+ const sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']
+ const i = Math.floor(Math.log(bytes) / Math.log(k))
+
+ return parseFloat((bytes / Math.pow(k, i)).toPrecision(3)) + ' ' + sizes[i]
+}
+
+export const fileTypeArr = [
+ 'txt',
+ 'log',
+ 'sh',
+ 'bat',
+ 'conf',
+ 'cfg',
+ 'py',
+ 'java',
+ 'sql',
+ 'xml',
+ 'hql',
+ 'properties',
+ 'json',
+ 'yml',
+ 'yaml',
+ 'ini',
+ 'js'
+]
+
+/**
+ * Operation type
+ * @desc tooltip
+ * @code identifier
+ */
+export const runningType = (t: any) => [
+ {
+ desc: `${t('project.workflow.start_process')}`,
+ code: 'START_PROCESS'
+ },
+ {
+ desc: `${t('project.workflow.start_from_state_clean_tasks')}`,
+ code: 'START_FROM_STATE_CLEAN_TASKS'
+ },
+ {
+ desc: `${t('project.workflow.execute_from_the_current_node')}`,
+ code: 'START_CURRENT_TASK_PROCESS'
+ },
+ {
+ desc: `${t('project.workflow.recover_tolerance_fault_process')}`,
+ code: 'RECOVER_TOLERANCE_FAULT_PROCESS'
+ },
+ {
+ desc: `${t('project.workflow.resume_the_suspension_process')}`,
+ code: 'RECOVER_SUSPENDED_PROCESS'
+ },
+ {
+ desc: `${t('project.workflow.execute_from_the_failed_nodes')}`,
+ code: 'START_FAILURE_TASK_PROCESS'
+ },
+ {
+ desc: `${t('project.workflow.complement_data')}`,
+ code: 'COMPLEMENT_DATA'
+ },
+ {
+ desc: `${t('project.workflow.scheduling_execution')}`,
+ code: 'SCHEDULER'
+ },
+ {
+ desc: `${t('project.workflow.rerun')}`,
+ code: 'REPEAT_RUNNING'
+ },
+ {
+ desc: `${t('project.workflow.pause')}`,
+ code: 'PAUSE'
+ },
+ {
+ desc: `${t('project.workflow.stop')}`,
+ code: 'STOP'
+ },
+ {
+ desc: `${t('project.workflow.recovery_waiting_thread')}`,
+ code: 'RECOVER_WAITING_THREAD'
+ },
+ {
+ desc: `${t('project.workflow.recover_serial_wait')}`,
+ code: 'RECOVER_SERIAL_WAIT'
+ },
+ {
+ desc: `${t('project.workflow.dependent_chain_rerun')}`,
+ code: 'DEPENDENT_CHAIN_RERUN'
+ },
+ {
+ desc: `${t('project.workflow.dependent_chain_recovery')}`,
+ code: 'DEPENDENT_CHAIN_RECOVERY'
+ }
+]
+
+/**
+ * State code table
+ */
+export const stateType = (t: any) => [
+ {
+ value: '',
+ label: `${t('project.workflow.all_status')}`
+ },
+ ...Object.entries(tasksState(t)).map(([key, item]) => ({
+ value: key,
+ label: item.desc
+ }))
+]
+
+/**
+ * Task status
+ * @id id
+ * @desc tooltip
+ * @color color
+ * @icon icon
+ * @isSpin is loading (Need to execute the code block to write if judgment)
+ */
+export const tasksState = (t: any): ITaskStateConfig => ({
+ SUBMITTED_SUCCESS: {
+ id: 0,
+ desc: `${t('project.workflow.submit_success')}`,
+ color: '#A9A9A9',
+ icon: IssuesCloseOutlined,
+ isSpin: false,
+ classNames: 'submitted_success'
+ },
+ RUNNING_EXECUTION: {
+ id: 1,
+ desc: `${t('project.workflow.executing')}`,
+ color: '#0097e0',
+ icon: SettingFilled,
+ isSpin: true,
+ classNames: 'running_execution'
+ },
+ READY_PAUSE: {
+ id: 2,
+ desc: `${t('project.workflow.ready_to_pause')}`,
+ color: '#07b1a3',
+ icon: SettingOutlined,
+ isSpin: false,
+ classNames: 'ready_pause'
+ },
+ PAUSE: {
+ id: 3,
+ desc: `${t('project.workflow.pause')}`,
+ color: '#057c72',
+ icon: PauseCircleOutlined,
+ isSpin: false,
+ classNames: 'pause'
+ },
+ READY_STOP: {
+ id: 4,
+ desc: `${t('project.workflow.ready_to_stop')}`,
+ color: '#FE0402',
+ icon: StopFilled,
+ isSpin: false,
+ classNames: 'ready_stop'
+ },
+ STOP: {
+ id: 5,
+ desc: `${t('project.workflow.stop')}`,
+ color: '#e90101',
+ icon: StopOutlined,
+ isSpin: false,
+ classNames: 'stop'
+ },
+ FAILURE: {
+ id: 6,
+ desc: `${t('project.workflow.failed')}`,
+ color: '#000000',
+ icon: CloseCircleOutlined,
+ isSpin: false,
+ classNames: 'failed'
+ },
+ SUCCESS: {
+ id: 7,
+ desc: `${t('project.workflow.success')}`,
+ color: '#95DF96',
+ icon: CheckCircleOutlined,
+ isSpin: false,
+ classNames: 'success'
+ },
+ NEED_FAULT_TOLERANCE: {
+ id: 8,
+ desc: `${t('project.workflow.need_fault_tolerance')}`,
+ color: '#FF8C00',
+ icon: EditOutlined,
+ isSpin: false,
+ classNames: 'need_fault_tolerance'
+ },
+ KILL: {
+ id: 9,
+ desc: `${t('project.workflow.kill')}`,
+ color: '#a70202',
+ icon: MinusCircleOutlined,
+ isSpin: false,
+ classNames: 'kill'
+ },
+ WAITING_THREAD: {
+ id: 10,
+ desc: `${t('project.workflow.waiting_for_thread')}`,
+ color: '#912eed',
+ icon: ClockCircleOutlined,
+ isSpin: false,
+ classNames: 'waiting_thread'
+ },
+ WAITING_DEPEND: {
+ id: 11,
+ desc: `${t('project.workflow.waiting_for_dependence')}`,
+ color: '#5101be',
+ icon: GlobalOutlined,
+ isSpin: false,
+ classNames: 'waiting_depend'
+ },
+ DELAY_EXECUTION: {
+ id: 12,
+ desc: `${t('project.workflow.delay_execution')}`,
+ color: '#5102ce',
+ icon: PauseCircleFilled,
+ isSpin: false,
+ classNames: 'delay_execution'
+ },
+ FORCED_SUCCESS: {
+ id: 13,
+ desc: `${t('project.workflow.forced_success')}`,
+ color: '#5102ce',
+ icon: CheckCircleFilled,
+ isSpin: false,
+ classNames: 'forced_success'
+ },
+ SERIAL_WAIT: {
+ id: 14,
+ desc: `${t('project.workflow.serial_wait')}`,
+ color: '#5102ce',
+ icon: Loading3QuartersOutlined,
+ isSpin: true,
+ classNames: 'serial_wait'
+ },
+ DISPATCH: {
+ id: 15,
+ desc: `${t('project.workflow.dispatch')}`,
+ color: '#5101be',
+ icon: SendOutlined,
+ isSpin: false,
+ classNames: 'dispatch'
+ },
+ PAUSE_BY_ISOLATION: {
+ id: 16,
+ desc: `${t('project.overview.pause_by_isolation')}`,
+ color: '#057c72',
+ icon: PlayCircleOutlined,
+ isSpin: false,
+ classNames: 'pause_by_isolation'
+ },
+ KILL_BY_ISOLATION: {
+ id: 17,
+ desc: `${t('project.overview.kill_by_isolation')}`,
+ color: '#a70202',
+ icon: DeleteRowOutlined,
+ isSpin: false,
+ classNames: 'kill_by_isolation'
+ },
+ PAUSE_BY_CORONATION: {
+ id: 18,
+ desc: `${t('project.overview.pause_by_coronation')}`,
+ color: '#07b1a3',
+ icon: PlayCircleOutlined,
+ isSpin: false,
+ classNames: 'pause_by_coronation'
+ },
+ FORBIDDEN_BY_CORONATION: {
+ id: 19,
+ desc: `${t('project.overview.forbidden_by_coronation')}`,
+ color: '#5102ce',
+ icon: CheckCircleOutlined,
+ isSpin: false,
+ classNames: 'forbidden_by_coronation'
+ }
+})
+
+/**
+ * A simple uuid generator, support prefix and template pattern.
+ *
+ * @example
+ *
+ * uuid('v-') // -> v-xxx
+ * uuid('v-ani-%{s}-translate') // -> v-ani-xxx
+ */
+export function uuid(prefix: string) {
+ const id = Math.floor(Math.random() * 10000).toString(36)
+ return prefix
+ ? ~prefix.indexOf('%{s}')
+ ? prefix.replace(/%\{s\}/g, id)
+ : prefix + id
+ : id
+}
+
+export const warningTypeList = [
+ {
+ id: 'NONE',
+ code: 'project.workflow.none_send'
+ },
+ {
+ id: 'SUCCESS',
+ code: 'project.workflow.success_send'
+ },
+ {
+ id: 'FAILURE',
+ code: 'project.workflow.failure_send'
+ },
+ {
+ id: 'ALL',
+ code: 'project.workflow.all_send'
+ }
+]
+
+export const parseTime = (dateTime: string | number) => {
+ if (_.isString(dateTime) === true) {
+ return parseISO(dateTime as string)
+ } else {
+ return new Date(dateTime)
+ }
+}
+
+export const renderTableTime = (dateTime: string | null | undefined) => {
+ if (dateTime) {
+ return format(parseTime(dateTime), 'yyyy-MM-dd HH:mm:ss')
+ } else {
+ return '-'
+ }
+}
+
+// cp Spring2304requirements
+export const taskGroupQueueState = (t: any) => [
+ {
+ label: `${t('resource.task_group_queue.state.all')}`,
+ value: ''
+ },
+ {
+ label: `${t('resource.task_group_queue.state.WAIT_QUEUE')}`,
+ value: '-1'
+ },
+ {
+ label: `${t('resource.task_group_queue.state.ACQUIRE_SUCCESS')}`,
+ value: '1'
+ },
+ {
+ label: `${t('resource.task_group_queue.state.RELEASE')}`,
+ value: '2'
+ }
+]
+export const BaselineStatus = (t: any): { [key: string]: string } => ({
+ SAFE: t('security.baseline.save'),
+ DANGEROUS: t('security.baseline.dangerous'),
+ BREAK_BASELINE: t('security.baseline.break_line')
+})
+
+export function dateType(t: any) {
+ return [
+ {
+ label: t('project.workflow.start_time'),
+ value: 'START_END'
+ },
+ {
+ label: t('project.workflow.scheduling_time'),
+ value: 'SCHEDULE'
+ },
+ {
+ label: t('project.workflow.card_value'),
+ value: 'DATA_CARD'
+ }
+ ]
+}
diff --git a/seatunnel-ui/src/utils/index.ts b/seatunnel-ui/src/common/types.ts
similarity index 57%
copy from seatunnel-ui/src/utils/index.ts
copy to seatunnel-ui/src/common/types.ts
index d806dfb4..fa4da7a6 100644
--- a/seatunnel-ui/src/utils/index.ts
+++ b/seatunnel-ui/src/common/types.ts
@@ -14,15 +14,37 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+import { Component } from 'vue'
-import mapping from './mapping'
-import trim from './trim'
-import log from './log'
+export type ITaskState =
+ | 'SUBMITTED_SUCCESS'
+ | 'RUNNING_EXECUTION'
+ | 'READY_PAUSE'
+ | 'PAUSE'
+ | 'READY_STOP'
+ | 'STOP'
+ | 'FAILURE'
+ | 'SUCCESS'
+ | 'NEED_FAULT_TOLERANCE'
+ | 'KILL'
+ | 'WAITING_THREAD'
+ | 'WAITING_DEPEND'
+ | 'DELAY_EXECUTION'
+ | 'FORCED_SUCCESS'
+ | 'SERIAL_WAIT'
+ | 'DISPATCH'
+ | 'PAUSE_BY_ISOLATION'
+ | 'KILL_BY_ISOLATION'
+ | 'PAUSE_BY_CORONATION'
+ | 'FORBIDDEN_BY_CORONATION'
-const utils = {
- mapping,
- trim,
- log
+export type ITaskStateConfig = {
+ [key in ITaskState]: {
+ id: number
+ desc: string
+ color: string
+ icon: Component
+ isSpin: boolean
+ classNames?: string
+ }
}
-
-export default utils
diff --git a/seatunnel-ui/src/store/theme/types.ts b/seatunnel-ui/src/components/button-link/index.module.scss
similarity index 83%
copy from seatunnel-ui/src/store/theme/types.ts
copy to seatunnel-ui/src/components/button-link/index.module.scss
index fa7e56dd..ebb87a5f 100644
--- a/seatunnel-ui/src/store/theme/types.ts
+++ b/seatunnel-ui/src/components/button-link/index.module.scss
@@ -14,9 +14,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+.button-link {
+ cursor: pointer;
+ color: var(--n-color-target);
+ line-height: normal;
-interface ThemeState {
- darkTheme: boolean
+ &:hover {
+ text-decoration: none;
+ box-shadow: 0 1px;
+ }
}
-
-export { ThemeState }
diff --git a/seatunnel-ui/src/layouts/dashboard/header/menu/index.tsx b/seatunnel-ui/src/components/button-link/index.tsx
similarity index 50%
copy from seatunnel-ui/src/layouts/dashboard/header/menu/index.tsx
copy to seatunnel-ui/src/components/button-link/index.tsx
index 5b30da87..2ac80bad 100644
--- a/seatunnel-ui/src/layouts/dashboard/header/menu/index.tsx
+++ b/seatunnel-ui/src/components/button-link/index.tsx
@@ -14,40 +14,44 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+import { defineComponent, PropType, renderSlot } from 'vue'
+import { NButton } from 'naive-ui'
+import styles from './index.module.scss'
-import { defineComponent, toRefs } from 'vue'
-import { NMenu, NSpace } from 'naive-ui'
-import { useRouter, useRoute } from 'vue-router'
-import { useMenu } from './use-menu'
-
-const Menu = defineComponent({
- setup() {
- const { state } = useMenu()
- const router = useRouter()
- const route = useRoute()
-
- const handleMenuClick = (key: string) => {
- router.push({ path: `/${key}` })
- }
+const props = {
+ disabled: {
+ type: Boolean,
+ default: false
+ },
+ iconPlacement: {
+ type: String as PropType<'left' | 'right'>,
+ default: 'left'
+ }
+}
- return {
- ...toRefs(state),
- handleMenuClick,
- route
+const ButtonLink = defineComponent({
+ name: 'button-link',
+ props,
+ emits: ['click'],
+ setup(props, { slots, emit }) {
+ const onClick = (ev: MouseEvent) => {
+ emit('click', ev)
}
- },
- render() {
- return (
- <NSpace align='center' class='h-16'>
- <NMenu
- value={this.route.path.split('/')[1]}
- mode='horizontal'
- options={this.menuOptions}
- onUpdateValue={this.handleMenuClick}
- />
- </NSpace>
+ return () => (
+ <NButton
+ {...props}
+ onClick={onClick}
+ text
+ class={styles['button-link']}
+ tag='a'
+ >
+ {{
+ default: () => renderSlot(slots, 'default'),
+ icon: () => renderSlot(slots, 'icon')
+ }}
+ </NButton>
)
}
})
-export default Menu
+export default ButtonLink
diff --git a/seatunnel-ui/src/components/card/index.tsx b/seatunnel-ui/src/components/card/index.tsx
new file mode 100644
index 00000000..8418ffc9
--- /dev/null
+++ b/seatunnel-ui/src/components/card/index.tsx
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CSSProperties, defineComponent, PropType } from 'vue'
+import { NCard } from 'naive-ui'
+
+const headerStyle = {
+ borderBottom: '1px solid var(--n-border-color)'
+}
+
+const contentStyle = {
+ padding: '8px 10px'
+}
+
+const headerExtraStyle = {}
+
+const props = {
+ title: {
+ type: String as PropType<string>
+ },
+ headerStyle: {
+ type: String as PropType<string | CSSProperties>
+ },
+ headerExtraStyle: {
+ type: String as PropType<string | CSSProperties>
+ },
+ contentStyle: {
+ type: String as PropType<string | CSSProperties>
+ }
+}
+
+const Card = defineComponent({
+ name: 'Card',
+ props,
+ render() {
+ const { title, $slots } = this
+ return (
+ <NCard
+ title={title}
+ size='small'
+ headerStyle={this.headerStyle ? this.headerStyle : headerStyle}
+ headerExtraStyle={
+ this.headerExtraStyle ? this.headerExtraStyle : headerExtraStyle
+ }
+ contentStyle={this.contentStyle ? this.contentStyle : contentStyle}
+ >
+ {$slots}
+ </NCard>
+ )
+ }
+})
+
+export default Card
diff --git a/seatunnel-ui/src/themes/modules/dark.ts b/seatunnel-ui/src/components/checkbox-tree/index.module.scss
similarity index 90%
copy from seatunnel-ui/src/themes/modules/dark.ts
copy to seatunnel-ui/src/components/checkbox-tree/index.module.scss
index 5473e6f2..b4341403 100644
--- a/seatunnel-ui/src/themes/modules/dark.ts
+++ b/seatunnel-ui/src/components/checkbox-tree/index.module.scss
@@ -15,6 +15,10 @@
* limitations under the License.
*/
-const dark = {}
-
-export default dark
+.tree {
+ :global {
+ .n-tree-node-switcher {
+ display: none;
+ }
+ }
+}
\ No newline at end of file
diff --git a/seatunnel-ui/src/components/checkbox-tree/index.tsx b/seatunnel-ui/src/components/checkbox-tree/index.tsx
new file mode 100644
index 00000000..563ff78e
--- /dev/null
+++ b/seatunnel-ui/src/components/checkbox-tree/index.tsx
@@ -0,0 +1,208 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import {
+ NCard,
+ NSpace,
+ NTree,
+ NButton,
+ NInput,
+ NSwitch,
+ NDivider,
+ NIcon
+} from 'naive-ui'
+import { computed, defineComponent, PropType, ref } from 'vue'
+import { TreeOption } from 'naive-ui'
+import { useI18n } from 'vue-i18n'
+import styles from './index.module.scss'
+import { useUserStore } from '@/store/user'
+import { SearchOutlined } from '@vicons/antd'
+
+const props = {
+ data: {
+ type: Object as PropType<TreeOption[]>,
+ default: []
+ },
+ defaultChecked: {
+ type: Object as PropType<number[]>,
+ default: []
+ },
+ globalResource: {
+ type: Boolean as PropType<boolean>,
+ default: false
+ },
+ showGlobalResource: {
+ type: Boolean as PropType<boolean>,
+ default: true
+ },
+ isResource: {
+ type: Boolean as PropType<boolean>,
+ default: false
+ },
+ row: {
+ type: Object as any,
+ default: {}
+ }
+}
+
+const CheckboxTree = defineComponent({
+ name: 'checkbox-tree',
+ props,
+ emits: ['cancel', 'confirm'],
+ setup(props, ctx) {
+ const { t } = useI18n()
+ const userStore = useUserStore()
+
+ const pattern = ref('')
+ const checkedValue = ref(props.defaultChecked)
+ const globalResource = ref(props.globalResource)
+ const rowData = ref(props.row)
+
+ const isAllSelected = computed(
+ () =>
+ checkedValue.value.length === props.data.length &&
+ checkedValue.value.length
+ )
+
+ const onCancel = () => {
+ ctx.emit('cancel')
+ }
+
+ const onConfirm = () => {
+ ctx.emit(
+ 'confirm',
+ props.showGlobalResource ? globalResource.value : false,
+ globalResource.value ? [] : checkedValue.value
+ )
+ }
+
+ const handleAllSelect = () => {
+ checkedValue.value = props.data.map((option) => option.key as number)
+ }
+
+ const handleCancelSelect = () => (checkedValue.value = [])
+
+ return () => {
+ return (
+ <NCard
+ bordered={false}
+ contentStyle={{ padding: 0 }}
+ footerStyle={{ padding: 0 }}
+ >
+ {{
+ default: () => (
+ <NSpace vertical>
+ {props.isResource ? (
+ <div>
+ {globalResource.value ? (
+ <NSpace
+ justify='space-between'
+ style={{ marginTop: '10px', marginBottom: '10px' }}
+ >
+ {t('resource.auth.public_resource')}
+ </NSpace>
+ ) : (
+ <NSpace
+ justify='space-between'
+ style={{ marginTop: '10px', marginBottom: '10px' }}
+ >
+ {rowData.value.projectName}
+ </NSpace>
+ )}
+ </div>
+ ) : (
+ <div>
+ {props.showGlobalResource && (
+ <NSpace
+ justify='space-between'
+ style={{ marginTop: '10px', marginBottom: '10px' }}
+ >
+ {t('resource.auth.public_resource')}
+ <NSwitch
+ disabled={!userStore.isAdmin}
+ v-model={[globalResource.value, 'value']}
+ />
+ </NSpace>
+ )}
+ </div>
+ )}
+ {!globalResource.value && (
+ <NSpace vertical>
+ {props.showGlobalResource && (
+ <NDivider
+ style={{ marginTop: 0, marginBottom: '10px' }}
+ />
+ )}
+ <NButton
+ tertiary
+ size='tiny'
+ onClick={
+ isAllSelected.value
+ ? handleCancelSelect
+ : handleAllSelect
+ }
+ >
+ {isAllSelected.value
+ ? t('resource.auth.cancel_select')
+ : t('resource.auth.select_all')}
+ </NButton>
+ <NInput
+ size='small'
+ v-model={[pattern.value, 'value']}
+ placeholder={t('resource.auth.search')}
+ >
+ {{
+ suffix: () => (
+ <NIcon>
+ <SearchOutlined />
+ </NIcon>
+ )
+ }}
+ </NInput>
+ <NTree
+ data={props.data}
+ pattern={pattern.value}
+ checkable={true}
+ selectable={false}
+ showIrrelevantNodes={false}
+ class={styles['tree']}
+ v-model={[checkedValue.value, 'checked-keys']}
+ virtualScroll
+ style={{ maxHeight: '220px' }}
+ />
+ </NSpace>
+ )}
+ </NSpace>
+ ),
+ footer: () => (
+ <NSpace justify='end'>
+ <NButton size='tiny' onClick={onCancel}>
+ {t('resource.auth.cancel')}
+ </NButton>
+ <NButton size='tiny' type='primary' onClick={onConfirm}>
+ {t('resource.auth.confirm')}
+ </NButton>
+ </NSpace>
+ )
+ }}
+ </NCard>
+ )
+ }
+ }
+})
+
+export default CheckboxTree
diff --git a/seatunnel-ui/src/themes/modules/dark.ts b/seatunnel-ui/src/components/log-modal/index.module.scss
similarity index 92%
copy from seatunnel-ui/src/themes/modules/dark.ts
copy to seatunnel-ui/src/components/log-modal/index.module.scss
index 5473e6f2..62dced95 100644
--- a/seatunnel-ui/src/themes/modules/dark.ts
+++ b/seatunnel-ui/src/components/log-modal/index.module.scss
@@ -15,6 +15,8 @@
* limitations under the License.
*/
-const dark = {}
-
-export default dark
+.btns {
+ position: absolute;
+ right: 10px;
+ bottom: 120px;
+}
diff --git a/seatunnel-ui/src/components/log-modal/index.tsx b/seatunnel-ui/src/components/log-modal/index.tsx
new file mode 100644
index 00000000..85b28e60
--- /dev/null
+++ b/seatunnel-ui/src/components/log-modal/index.tsx
@@ -0,0 +1,216 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import {
+ defineComponent,
+ PropType,
+ h,
+ ref,
+ reactive,
+ toRefs,
+ onMounted,
+ onUnmounted,
+ watchEffect,
+ nextTick
+} from 'vue'
+import { NIcon, NLog, NSpace, NButton } from 'naive-ui'
+import Modal from '../modal'
+import {
+ DownloadOutlined,
+ FullscreenExitOutlined,
+ FullscreenOutlined,
+ SyncOutlined,
+ VerticalAlignTopOutlined,
+ VerticalAlignBottomOutlined
+} from '@vicons/antd'
+import screenfull from 'screenfull'
+import styles from './index.module.scss'
+import i18n from '@/locales'
+
+const props = {
+ showModalRef: {
+ type: Boolean as PropType<boolean>,
+ default: false
+ },
+ logRef: {
+ type: String as PropType<string>,
+ default: ''
+ },
+ logLoadingRef: {
+ type: Boolean as PropType<boolean>,
+ default: false
+ },
+ row: {
+ type: Object as PropType<any>,
+ default: {}
+ },
+ showDownloadLog: {
+ type: Boolean as PropType<boolean>,
+ default: false
+ }
+}
+
+export default defineComponent({
+ name: 'log-modal',
+ props,
+ emits: ['confirmModal', 'refreshLogs', 'downloadLogs'],
+ setup(props, ctx) {
+ const { t } = i18n.global
+ const logInstRef = ref()
+ const variables = reactive({
+ isFullscreen: false
+ })
+
+ const change = () => {
+ variables.isFullscreen = screenfull.isFullscreen
+ }
+
+ const renderIcon = (icon: any) => {
+ return () => h(NIcon, null, { default: () => h(icon) })
+ }
+
+ const confirmModal = () => {
+ variables.isFullscreen = false
+ ctx.emit('confirmModal', props.showModalRef)
+ }
+
+ const refreshLogs = () => {
+ ctx.emit('refreshLogs', props.row)
+ }
+
+ const handleFullScreen = () => {
+ screenfull.toggle(document.querySelectorAll('.logModalRef')[0])
+ }
+
+ const downloadLogs = () => {
+ ctx.emit('downloadLogs', props.row)
+ }
+
+ const setLogPosition = (position: 'top' | 'bottom') => {
+ logInstRef.value?.scrollTo({ position, slient: false })
+ }
+
+ onMounted(() => {
+ screenfull.on('change', change)
+ watchEffect(() => {
+ if (props.logRef) {
+ nextTick(() => {
+ logInstRef.value?.scrollTo({ position: 'bottom', slient: true })
+ })
+ }
+ })
+ })
+
+ onUnmounted(() => {
+ screenfull.on('change', change)
+ })
+
+ const headerLinks:any = ref([
+ {
+ text: t('project.workflow.download_log'),
+ show: props.showDownloadLog,
+ action: downloadLogs,
+ icon: renderIcon(DownloadOutlined)
+ },
+ {
+ text: t('project.task.refresh'),
+ show: true,
+ action: refreshLogs,
+ icon: renderIcon(SyncOutlined)
+ },
+ {
+ text: variables.isFullscreen
+ ? t('project.task.cancel_full_screen')
+ : t('project.task.enter_full_screen'),
+ show: true,
+ action: handleFullScreen,
+ icon: variables.isFullscreen
+ ? renderIcon(FullscreenExitOutlined)
+ : renderIcon(FullscreenOutlined)
+ }
+ ])
+
+ return {
+ t,
+ renderIcon,
+ confirmModal,
+ refreshLogs,
+ downloadLogs,
+ handleFullScreen,
+ ...toRefs(variables),
+ logInstRef,
+ setLogPosition,
+ headerLinks
+ }
+ },
+ render() {
+ const {
+ t,
+ renderIcon,
+ refreshLogs,
+ downloadLogs,
+ isFullscreen,
+ handleFullScreen,
+ showDownloadLog,
+ setLogPosition
+ } = this
+ return (
+ <Modal
+ class='logModalRef'
+ title={t('project.task.view_log')}
+ show={this.showModalRef}
+ cancelShow={false}
+ onConfirm={this.confirmModal}
+ style={{ width: '60%' }}
+ confirmText={t('modal.close')}
+ headerLinks={this.headerLinks}
+ >
+ <NLog
+ rows={30}
+ log={this.logRef}
+ loading={this.logLoadingRef}
+ style={{ height: isFullscreen ? 'calc(100vh - 140px)' : '525px' }}
+ ref='logInstRef'
+ />
+ <NSpace vertical class={styles['btns']}>
+ <NButton
+ size='small'
+ circle
+ tertiary
+ type='primary'
+ onClick={() => void setLogPosition('top')}
+ >
+ <NIcon size={20}>
+ <VerticalAlignTopOutlined />
+ </NIcon>
+ </NButton>
+ <NButton
+ size='small'
+ circle
+ tertiary
+ type='primary'
+ onClick={() => void setLogPosition('bottom')}
+ >
+ <NIcon size={20}>
+ <VerticalAlignBottomOutlined />
+ </NIcon>
+ </NButton>
+ </NSpace>
+ </Modal>
+ )
+ }
+})
diff --git a/seatunnel-ui/src/components/resource-auth/index.tsx b/seatunnel-ui/src/components/resource-auth/index.tsx
new file mode 100644
index 00000000..a00b63fb
--- /dev/null
+++ b/seatunnel-ui/src/components/resource-auth/index.tsx
@@ -0,0 +1,163 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { NButton, NTooltip, NIcon, NPopover } from 'naive-ui'
+import { useI18n } from 'vue-i18n'
+import { defineComponent, PropType, h, withDirectives, ref } from 'vue'
+import { permission } from '@/directives/permission'
+import { UserOutlined } from '@vicons/antd'
+import { TreeOption } from 'naive-ui'
+import {
+ authResourceProject,
+ getResourceProject
+} from '@/service/resources'
+import { accessTypeKey } from '@/service/resources/types'
+import CheckboxTree from '../checkbox-tree'
+import { useRouter } from 'vue-router'
+
+const props = {
+ row: {
+ type: Object as PropType<any>,
+ required: true
+ },
+ accessType: {
+ type: String as PropType<accessTypeKey>,
+ default: ''
+ },
+ disabled: {
+ type: Boolean as PropType<boolean>,
+ default: false
+ },
+ isResource: {
+ type: Boolean as PropType<boolean>,
+ default: false
+ }
+}
+
+const ResourceAuth = defineComponent({
+ name: 'resource-auth',
+ props,
+ setup(props) {
+ const { t } = useI18n()
+ const router = useRouter()
+ const showPopover = ref(false)
+ const authOptions = ref<TreeOption[]>([])
+ const handleAuth = () => {
+ getResourceProject({
+ accessType: props.accessType,
+ accessCode: props.row.id
+ }).then((res: any) => {
+ if (props.isResource) {
+ authOptions.value = res
+ .filter((option: any) => {
+ return option.owner === false
+ })
+ .map((item: any) => {
+ return {
+ label: item.name,
+ key: item.code,
+ selected: item.selected
+ }
+ })
+ } else {
+ authOptions.value = res.map((option: any) => ({
+ label: option.name,
+ key: option.code,
+ selected: option.selected
+ }))
+ }
+
+ showPopover.value = true
+ })
+ }
+
+ const handleAuthConfirm = (
+ globalResource: boolean,
+ checkedKeys: number[]
+ ) => {
+ if (props.isResource && props.row.globalResource) {
+ showPopover.value = false
+ return
+ }
+ authResourceProject({
+ globalResource,
+ accessType: props.accessType,
+ accessCode: props.row.id,
+ isShare: true,
+ projectCodes: checkedKeys
+ }).then(() => {
+ showPopover.value = false
+ window.$message.success(t('resource.auth.success'))
+ router.go(0)
+ })
+ }
+
+ return () => (
+ <NTooltip>
+ {{
+ trigger: () =>
+ h(
+ NPopover,
+ {
+ show: showPopover.value,
+ placement: 'bottom-end',
+ trigger: 'manual'
+ },
+ {
+ trigger: () =>
+ withDirectives(
+ h(
+ NButton,
+ {
+ disabled: props.disabled,
+ tag: 'div',
+ circle: true,
+ size: 'small',
+ type: 'warning',
+ onClick: handleAuth
+ },
+ {
+ default: () =>
+ h(NIcon, null, { default: () => h(UserOutlined) })
+ }
+ ),
+ [[permission, 'security:resources:auth']]
+ ),
+ default: () =>
+ h(CheckboxTree, {
+ isResource: props.isResource,
+ data: authOptions.value,
+ row: props.row,
+ defaultChecked: authOptions.value
+ .filter((option) => option.selected)
+ .map((option) => option.key as number),
+ globalResource: props.row.globalResource || false,
+ showGlobalResource: props.accessType !== 'TASK_GROUP',
+ onCancel: () => (showPopover.value = false),
+ onConfirm: handleAuthConfirm
+ })
+ }
+ ),
+
+ default: () => t('resource.auth.authorize')
+ }}
+ </NTooltip>
+ )
+ }
+})
+
+export default ResourceAuth
diff --git a/seatunnel-ui/src/locales/zh_CN/menu.ts b/seatunnel-ui/src/directives/index.ts
similarity index 75%
copy from seatunnel-ui/src/locales/zh_CN/menu.ts
copy to seatunnel-ui/src/directives/index.ts
index 1ab59deb..6781e0cf 100644
--- a/seatunnel-ui/src/locales/zh_CN/menu.ts
+++ b/seatunnel-ui/src/directives/index.ts
@@ -14,15 +14,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+import { App, Directive } from 'vue'
+import { permission } from './permission'
+
+const directives = {
+ permission
+} as { [key: string]: Directive }
export default {
- data_pipes: '数据管道',
- jobs: '工作',
- user_manage: '用户管理',
- help: '帮助',
- setting: '设置',
- logout: '登出',
- tasks: '任务',
- datasource: '数据源',
- virtual_tables: '虚拟表'
+ install(app: App) {
+ Object.keys(directives).forEach((key) => {
+ app.directive(key, directives[key])
+ })
+ }
}
diff --git a/seatunnel-ui/src/layouts/dashboard/header/menu/index.tsx b/seatunnel-ui/src/directives/permission.ts
similarity index 50%
copy from seatunnel-ui/src/layouts/dashboard/header/menu/index.tsx
copy to seatunnel-ui/src/directives/permission.ts
index 5b30da87..ea3ed750 100644
--- a/seatunnel-ui/src/layouts/dashboard/header/menu/index.tsx
+++ b/seatunnel-ui/src/directives/permission.ts
@@ -14,40 +14,33 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+// import { IPermissionModule, usePermissionStore } from '@/store/user'
+import type { Directive } from 'vue'
-import { defineComponent, toRefs } from 'vue'
-import { NMenu, NSpace } from 'naive-ui'
-import { useRouter, useRoute } from 'vue-router'
-import { useMenu } from './use-menu'
+export const permission: Directive = {
+ mounted(el, binding) {
+ // const code = binding.value
+ // if (!code) return
+ // let module = 'common' as IPermissionModule
-const Menu = defineComponent({
- setup() {
- const { state } = useMenu()
- const router = useRouter()
- const route = useRoute()
+ // const codeItems = code.split(':')
+ // if (codeItems.length > 2 && codeItems[0] === 'project') {
+ // module = 'project'
+ // }
- const handleMenuClick = (key: string) => {
- router.push({ path: `/${key}` })
- }
+ // const functionPermissions = usePermissionStore().getPermissions(
+ // module,
+ // 'function'
+ // )
- return {
- ...toRefs(state),
- handleMenuClick,
- route
- }
- },
- render() {
- return (
- <NSpace align='center' class='h-16'>
- <NMenu
- value={this.route.path.split('/')[1]}
- mode='horizontal'
- options={this.menuOptions}
- onUpdateValue={this.handleMenuClick}
- />
- </NSpace>
- )
- }
-})
+ // const hasPermission = functionPermissions.has(code)
+
+ // if (hasPermission) return
-export default Menu
+ // if (el.parentElement?.children.length === 1) {
+ // el.parentElement.style = 'display: none'
+ // }
+
+ // el.parentElement.removeChild(el)
+ }
+}
diff --git a/seatunnel-ui/src/themes/index.ts b/seatunnel-ui/src/hooks/index.ts
similarity index 75%
copy from seatunnel-ui/src/themes/index.ts
copy to seatunnel-ui/src/hooks/index.ts
index a5f70cbf..107ac97f 100644
--- a/seatunnel-ui/src/themes/index.ts
+++ b/seatunnel-ui/src/hooks/index.ts
@@ -15,12 +15,8 @@
* limitations under the License.
*/
-import light from './modules/light'
-import dark from './modules/dark'
-
-const themeList = {
- light,
- dark
-}
-
-export default themeList
+// export { usePermissionLength } from './use-permission-length'
+export { useTableOperation } from './use-table-operation'
+export { useTextCopy } from './use-text-copy'
+export { useTableLink } from './use-table-link'
+// export * from './use-client-config'
diff --git a/seatunnel-ui/src/hooks/use-client-config.ts b/seatunnel-ui/src/hooks/use-client-config.ts
new file mode 100644
index 00000000..87c9f065
--- /dev/null
+++ b/seatunnel-ui/src/hooks/use-client-config.ts
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// import {
+// getUauthorizedClientConfig,
+// getAuthorizedClientConfig
+// } from '@/service/client'
+// import { useTaskTypeStore } from '@/store/project/task-type'
+// import { useClientStore } from '@/store/client'
+
+// export const useClientConfig = () => {
+// const taskTypeStore = useTaskTypeStore()
+// const clientStore = useClientStore()
+
+// const getUnauthorizedClientInfo = async () => {
+// if (clientStore.getLoaded) {
+// document.title = clientStore.getTitle
+// return
+// }
+// const result = await getUauthorizedClientConfig()
+
+// clientStore.init({
+// casModel: result['cas.anon.enabled'] === true ? 'cas' : 'common',
+// casLoginUrl: result['cas.anon.login.address'],
+// casLogoutUrl: result['cas.anon.logout.address'],
+// title: result['title.anon.context']
+// })
+
+// if (result['title.anon.context'])
+// document.title = result['title.anon.context']
+// }
+
+// const getAuthorizedClientInfo = async () => {
+// const result = await getAuthorizedClientConfig()
+// if (result.task) {
+// taskTypeStore.setTaskTypes(result.task)
+// }
+// }
+
+// return {
+// getAuthorizedClientInfo,
+// getUnauthorizedClientInfo
+// }
+// }
diff --git a/seatunnel-ui/src/themes/modules/dark.ts b/seatunnel-ui/src/hooks/use-permission-length.ts
similarity index 61%
copy from seatunnel-ui/src/themes/modules/dark.ts
copy to seatunnel-ui/src/hooks/use-permission-length.ts
index 5473e6f2..ec5db7d9 100644
--- a/seatunnel-ui/src/themes/modules/dark.ts
+++ b/seatunnel-ui/src/hooks/use-permission-length.ts
@@ -14,7 +14,22 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+// import { usePermissionStore, IPermissionModule } from '@/store/user'
-const dark = {}
+// export const usePermissionLength = (
+// permissions: string[],
+// module?: IPermissionModule
+// ) => {
+// const functionPermissions = usePermissionStore().getPermissions(
+// module,
+// 'function'
+// )
-export default dark
+// let permissionLength = 0
+// permissions.forEach((permissionKey) => {
+// if (permissionKey && functionPermissions.has(permissionKey)) {
+// permissionLength++
+// }
+// })
+// return permissionLength
+// }
diff --git a/seatunnel-ui/src/views/datasource/components/use-source.ts b/seatunnel-ui/src/hooks/use-source-type.ts
similarity index 69%
copy from seatunnel-ui/src/views/datasource/components/use-source.ts
copy to seatunnel-ui/src/hooks/use-source-type.ts
index 8f85064b..1a1460ca 100644
--- a/seatunnel-ui/src/views/datasource/components/use-source.ts
+++ b/seatunnel-ui/src/hooks/use-source-type.ts
@@ -14,12 +14,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import { onMounted, reactive, watch } from 'vue'
-import { datasourceTypeList } from '@/service/datasource'
+import { onMounted, reactive } from 'vue'
+import { getDatasourceType } from '@/service/modules/data-source'
import { useI18n } from 'vue-i18n'
import type { SelectOption } from 'naive-ui'
-import type { ResponseBasic } from '@/service/types'
-import type { DatasourceTypeList } from '@/service/datasource/types'
type Key = '1' | '2' | '3' | '4' | '5'
type IType = {
@@ -29,7 +27,7 @@ type IType = {
children: SelectOption[]
}
-export const useSource = (showVirtualDataSource = false) => {
+export const useSourceType = (showVirtualDataSource = false) => {
const i18n = useI18n()
const TYPE_MAP = {
1: 'database',
@@ -39,25 +37,28 @@ export const useSource = (showVirtualDataSource = false) => {
5: 'remote_connection'
}
const state = reactive({
+ loading: false,
types: [] as IType[]
})
- const querySource = () => {
- datasourceTypeList({
- showVirtualDataSource,
- source: 'WT'
- }).then((res: ResponseBasic<Array<DatasourceTypeList> | Array<any>>) => {
+ const querySource = async () => {
+ if (state.loading) return
+ state.loading = true
+ try {
+ const res = (await getDatasourceType({ showVirtualDataSource })) as {
+ [key: string]: { code: number; name: string; chineseName: string }[]
+ }
const locales = {
zh_CN: {} as { [key: string]: string },
en_US: {} as { [key: string]: string }
}
-
- state.types = Object.entries(res.data).map(([key, value]) => {
- return {
+ const databaseKey = '1'
+ state.types = [
+ {
type: 'group',
- label: i18n.t(`datasource.${TYPE_MAP[key as Key]}`),
- key: TYPE_MAP[key as Key],
- children: (value as any).map((item: any) => {
+ label: i18n.t(`datasource.${TYPE_MAP[databaseKey]}`),
+ key: TYPE_MAP[databaseKey],
+ children: res[databaseKey].map((item) => {
locales.zh_CN[item.name] = item.chineseName
locales.en_US[item.name] = item.name
return {
@@ -66,20 +67,17 @@ export const useSource = (showVirtualDataSource = false) => {
}
})
}
- })
-
+ ]
i18n.mergeLocaleMessage('zh_CN', locales.zh_CN)
i18n.mergeLocaleMessage('en_US', locales.en_US)
- })
+ } finally {
+ state.loading = false
+ }
}
onMounted(() => {
querySource()
})
- watch(useI18n().locale, () => {
- querySource()
- })
-
return { state }
}
diff --git a/seatunnel-ui/src/hooks/use-table-link.ts b/seatunnel-ui/src/hooks/use-table-link.ts
new file mode 100644
index 00000000..280d3fc7
--- /dev/null
+++ b/seatunnel-ui/src/hooks/use-table-link.ts
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { h } from 'vue'
+import { NEllipsis } from 'naive-ui'
+import ButtonLink from '@/components/button-link'
+// import { IPermissionModule, usePermissionStore } from '@/store/user'
+
+interface ITableLinkParams {
+ title: string
+ key: string
+ width?: number
+ isCopy?: boolean
+ sorter?: string
+ minWidth?: string | number
+ ellipsis?: any
+ textColor?: (rowData: any) => string
+ showEmpty?: boolean
+ button: {
+ permission?: string
+ getHref?: (rowData: any) => string | null
+ showText?: (rowData: any) => boolean
+ onClick?: (rowData: any) => void
+ disabled?: (rowData: any) => boolean
+ }
+}
+
+export const useTableLink = (
+ params: ITableLinkParams,
+ // module?: IPermissionModule
+) => {
+ // const functionPermissions = usePermissionStore().getPermissions(
+ // module || 'common',
+ // 'function'
+ // )
+ // const routerPermissions = usePermissionStore().getPermissions(
+ // module || 'common',
+ // 'router'
+ // )
+
+ const getButtonVnode = (rowData: any) => {
+ const maxWidth = params.width ? params.width - 24 : params.width
+ const textColor = params.textColor ? params.textColor(rowData) || '' : ''
+ return h(
+ ButtonLink,
+ {
+ href: params.button.getHref ? params.button.getHref(rowData) : null,
+ onClick: () =>
+ params.button.onClick && params.button.onClick(rowData),
+ disabled: params.button.disabled && params.button.disabled(rowData)
+ },
+ {
+ default: () =>
+ h(
+ NEllipsis,
+ { style: `max-width: ${maxWidth}px; color: ${textColor}` },
+ () => {
+ if (!params.showEmpty) {
+ return rowData[params.key]
+ } else {
+ return rowData[params.key] || '-'
+ }
+ }
+ )
+ }
+ )
+
+ }
+
+ return {
+ title: params.title,
+ key: params.key,
+ titleColSpan: params.isCopy ? 2 : 1,
+ width: params.width || '',
+ minWidth: params.minWidth || '',
+ sorter: params.sorter,
+ ellipsis: params.ellipsis || {},
+ render: (rowData: any) => getButtonVnode(rowData)
+ }
+}
diff --git a/seatunnel-ui/src/hooks/use-table-operation.ts b/seatunnel-ui/src/hooks/use-table-operation.ts
new file mode 100644
index 00000000..6c2b6f7f
--- /dev/null
+++ b/seatunnel-ui/src/hooks/use-table-operation.ts
@@ -0,0 +1,219 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { h, withDirectives, VNode } from 'vue'
+import {
+ NSpace,
+ NTooltip,
+ NButton,
+ NIcon,
+ NPopconfirm,
+ ButtonProps,
+ NSwitch
+} from 'naive-ui'
+import { DeleteOutlined } from '@vicons/antd'
+import { permission } from '@/directives/permission'
+// import { usePermissionLength } from './use-permission-length'
+import { COLUMN_WIDTH_CONFIG } from '@/common/column-width-config'
+// import { IPermissionModule } from '@/store/user'
+// import { accessTypeKey } from '@/service/resources/types'
+
+export const useTableOperation = (
+ params: {
+ title: string
+ key: string
+ preRender?: (rowData: any, buttonVnodes: VNode[], index: number) => any
+ width?: number
+ noPermission?: boolean
+ itemNum?: number
+ buttons: {
+ isDelete?: boolean
+ isAuth?: boolean
+ isSwitch?: boolean
+ isCustom?: boolean
+ isHidden?: (rowData: any) => boolean
+ negativeText?: string
+ positiveText?: string
+ popTips?: string
+ text: string | ((rowData: any) => string)
+ permission?: string
+ icon?: VNode | ((rowData: any) => VNode)
+ auth?: any
+ // accessType?: accessTypeKey
+ disabled?: boolean | ((rowData: any) => boolean)
+ class?: string
+ value?: string | number | boolean | undefined
+ checkedValue?: string | boolean | number
+ uncheckedValue?: string | boolean | number
+ onPositiveClick?: (rowData: any, index: number) => void
+ onClick?: (rowData: any) => void
+ onUpdateValue?: (value: any, rowData: any) => void
+ customFunc?: (rowData: any) => VNode
+ }[]
+ },
+ // module?: IPermissionModule
+) => {
+ const buttonPermissions = [] as string[]
+ params.buttons.forEach((button) => {
+ button.permission && buttonPermissions.push(button.permission)
+ })
+ let permissionLength
+ if (params.noPermission) {
+ permissionLength = params.buttons.length
+ } else {
+ // permissionLength = usePermissionLength(
+ // buttonPermissions,
+ // module || 'common'
+ // )
+ }
+
+ const wrapDirective = (vNode: VNode, permissionKey?: string) => {
+ return permissionKey
+ ? withDirectives(vNode, [[permission, permissionKey]])
+ : vNode
+ }
+ const getButtonVnodes = (rowData: any, index: number) => {
+ // const showPopover = ref(false)
+ return params.buttons
+ .filter((button) => !(button.isHidden && button.isHidden(rowData)))
+ .map((button) => {
+ const mergedDisabled =
+ typeof button.disabled === 'function'
+ ? button.disabled(rowData) || rowData.isEdit === false
+ : !!button.disabled || rowData.isEdit === false
+
+ const buttonIcon =
+ typeof button.icon === 'function' ? button.icon(rowData) : button.icon
+
+ const buttonText =
+ typeof button.text === 'function' ? button.text(rowData) : button.text
+
+ const commonProps = {
+ disabled: mergedDisabled,
+ tag: 'div',
+ circle: true,
+ size: 'small',
+ class: button.class
+ } as ButtonProps
+ if (button.isDelete) {
+ return h(NTooltip, null, {
+ trigger: () =>
+ h(
+ NPopconfirm,
+ {
+ onPositiveClick: () =>
+ button.onPositiveClick
+ ? void button.onPositiveClick(rowData, index)
+ : () => {},
+ negativeText: button.negativeText,
+ positiveText: button.positiveText
+ },
+ {
+ trigger: () =>
+ wrapDirective(
+ h(
+ NButton,
+ {
+ ...commonProps,
+ type: 'error'
+ },
+ {
+ default: () =>
+ h(NIcon, null, {
+ default: () => button.icon || h(DeleteOutlined)
+ })
+ }
+ ),
+ params.noPermission ? '' : button.permission
+ ),
+ default: () => button.popTips
+ }
+ ),
+ default: () => buttonText
+ })
+ }
+ if (button.isAuth) {
+ return h(button.auth, {
+ ...commonProps,
+ row: rowData,
+ // accessType: button.accessType
+ })
+ }
+ if (button.isSwitch) {
+ return h(NTooltip, null, {
+ trigger: () =>
+ wrapDirective(
+ h(NSwitch, {
+ value: rowData.status,
+ checkedValue: button.checkedValue,
+ uncheckedValue: button.uncheckedValue,
+ onUpdateValue: (value) =>
+ button.onUpdateValue
+ ? void button.onUpdateValue(value, rowData)
+ : () => {}
+ }),
+ params.noPermission ? '' : button.permission
+ ),
+ default: () => buttonText
+ })
+ }
+ if (button.isCustom && button.customFunc) {
+ const { customFunc } = button
+ return wrapDirective(customFunc(rowData), button.permission)
+ }
+ return h(NTooltip, null, {
+ trigger: () =>
+ wrapDirective(
+ h(
+ NButton,
+ {
+ ...commonProps,
+ type: 'info',
+ onClick: () =>
+ button.onClick ? void button.onClick(rowData) : () => {}
+ },
+ {
+ default: () => h(NIcon, null, { default: () => buttonIcon })
+ }
+ ),
+ params.noPermission ? '' : button.permission
+ ),
+ default: () => buttonText
+ })
+ })
+ }
+
+ return {
+ title: params.title,
+ key: params.key,
+ ...COLUMN_WIDTH_CONFIG['operation'](params.itemNum as any),
+ // ...COLUMN_WIDTH_CONFIG['operation'](params.itemNum || permissionLength),
+ render: (rowData: any, index: number) => {
+ const buttonVnodes = getButtonVnodes(rowData, index)
+ const result =
+ params.preRender && params.preRender(rowData, buttonVnodes, index)
+ return result === void 0
+ ? h(NSpace, null, {
+ default: () => buttonVnodes
+ })
+ : result
+ }
+ }
+ // : {
+ // width: 0
+ // }
+}
diff --git a/seatunnel-ui/src/store/theme/index.ts b/seatunnel-ui/src/hooks/use-text-copy.ts
similarity index 67%
copy from seatunnel-ui/src/store/theme/index.ts
copy to seatunnel-ui/src/hooks/use-text-copy.ts
index 91df4f42..f4176abd 100644
--- a/seatunnel-ui/src/store/theme/index.ts
+++ b/seatunnel-ui/src/hooks/use-text-copy.ts
@@ -15,23 +15,22 @@
* limitations under the License.
*/
-import { defineStore } from 'pinia'
-import { ThemeState } from './types'
+import utils from '@/utils'
+import { useMessage } from 'naive-ui'
+import { useI18n } from 'vue-i18n'
-export const useThemeStore = defineStore({
- id: 'theme',
- state: (): ThemeState => ({
- darkTheme: false
- }),
- persist: true,
- getters: {
- getTheme(): boolean {
- return this.darkTheme
- }
- },
- actions: {
- setDarkTheme(): void {
- this.darkTheme = !this.darkTheme
+/**
+ * Text copy with success message
+ */
+export function useTextCopy() {
+ const { t } = useI18n()
+ const message = useMessage()
+ const copy = (text: string, msg: string = t('hook.copy_success')) => {
+ if (utils.clipboard(text)) {
+ message.success(msg)
}
}
-})
+ return {
+ copy
+ }
+}
diff --git a/seatunnel-ui/src/layouts/dashboard/header/index.tsx b/seatunnel-ui/src/layouts/dashboard/header/index.tsx
index 2d326586..f6ac368c 100644
--- a/seatunnel-ui/src/layouts/dashboard/header/index.tsx
+++ b/seatunnel-ui/src/layouts/dashboard/header/index.tsx
@@ -25,7 +25,7 @@ const Header = defineComponent({
setup() {},
render() {
return (
- <NSpace justify='space-between' class='h-16 border-b border-gray-200'>
+ <NSpace justify='space-between' class='h-16 border-gray-200'>
<NSpace>
<Logo />
<Menu />
diff --git a/seatunnel-ui/src/layouts/dashboard/header/menu/index.tsx b/seatunnel-ui/src/layouts/dashboard/header/menu/index.tsx
index 5b30da87..8186e97c 100644
--- a/seatunnel-ui/src/layouts/dashboard/header/menu/index.tsx
+++ b/seatunnel-ui/src/layouts/dashboard/header/menu/index.tsx
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-import { defineComponent, toRefs } from 'vue'
+import { defineComponent, toRefs, ref, watch } from 'vue'
import { NMenu, NSpace } from 'naive-ui'
import { useRouter, useRoute } from 'vue-router'
import { useMenu } from './use-menu'
@@ -30,17 +30,26 @@ const Menu = defineComponent({
router.push({ path: `/${key}` })
}
+ const menuKey = ref(route.meta.activeMenu as string)
+
+ watch(
+ () => route.path,
+ () => {
+ menuKey.value = route.meta.activeMenu as string
+ }
+ )
+
return {
...toRefs(state),
handleMenuClick,
- route
+ menuKey
}
},
render() {
return (
<NSpace align='center' class='h-16'>
<NMenu
- value={this.route.path.split('/')[1]}
+ value={this.menuKey}
mode='horizontal'
options={this.menuOptions}
onUpdateValue={this.handleMenuClick}
diff --git a/seatunnel-ui/src/layouts/dashboard/header/menu/use-menu.ts b/seatunnel-ui/src/layouts/dashboard/header/menu/use-menu.ts
index 509bc8b5..489fb8e5 100644
--- a/seatunnel-ui/src/layouts/dashboard/header/menu/use-menu.ts
+++ b/seatunnel-ui/src/layouts/dashboard/header/menu/use-menu.ts
@@ -27,10 +27,6 @@ export function useMenu() {
label: () => h(NEllipsis, null, { default: () => t('menu.data_pipes') }),
key: 'data-pipes'
},
- {
- label: () => h(NEllipsis, null, { default: () => t('menu.jobs') }),
- key: 'jobs'
- },
{
label: () => h(NEllipsis, null, { default: () => t('menu.tasks') }),
key: 'tasks'
diff --git a/seatunnel-ui/src/layouts/dashboard/index.tsx b/seatunnel-ui/src/layouts/dashboard/index.tsx
index 16050a59..ffa80ea3 100644
--- a/seatunnel-ui/src/layouts/dashboard/index.tsx
+++ b/seatunnel-ui/src/layouts/dashboard/index.tsx
@@ -15,13 +15,41 @@
* limitations under the License.
*/
-import { defineComponent } from 'vue'
-import { NLayout, NLayoutHeader, NLayoutContent, useMessage } from 'naive-ui'
+import { defineComponent, watch, watchEffect, ref, Ref, onMounted } from 'vue'
+import { useRoute, useRouter, RouteLocationMatched } from 'vue-router'
+import {
+ NLayout,
+ NLayoutHeader,
+ NLayoutContent,
+ useMessage,
+ NSpace
+} from 'naive-ui'
import Header from './header'
+import Sidebar from './sidebar'
const Dashboard = defineComponent({
setup() {
window.$message = useMessage()
+ const route = useRoute()
+ let showSide = ref(false)
+
+ const menuKey = ref(route.meta.activeMenu as string)
+
+ watch(
+ () => route,
+ () => {
+ showSide.value = route?.meta?.showSide as boolean
+ menuKey.value = route.meta.activeSide as string
+ },
+ {
+ immediate: true,
+ deep: true
+ }
+ )
+ return {
+ showSide,
+ menuKey
+ }
},
render() {
return (
@@ -30,8 +58,23 @@ const Dashboard = defineComponent({
<Header />
</NLayoutHeader>
<NLayoutContent style={{ height: 'calc(100vh - 65px)' }}>
- <NLayout position='absolute' native-scrollbar={false}>
- <router-view class='px-32 py-12' />
+ <NLayout has-sider position='absolute'>
+ { this.showSide && <Sidebar sideKey={this.menuKey} />}
+ <NLayoutContent
+ native-scrollbar={false}
+ style='padding: 16px 22px 0px 22px'
+ class='p-16-22-0-22'
+ contentStyle={'height: 100%'}
+ >
+ <NSpace
+ vertical
+ justify='space-between'
+ style={'height: 100%'}
+ size='small'
+ >
+ <router-view key={this.$route.fullPath} class={!this.showSide && 'px-32 py-12'} />
+ </NSpace>
+ </NLayoutContent>
</NLayout>
</NLayoutContent>
</NLayout>
diff --git a/seatunnel-ui/src/layouts/dashboard/sidebar/index.module.scss b/seatunnel-ui/src/layouts/dashboard/sidebar/index.module.scss
new file mode 100644
index 00000000..f11738df
--- /dev/null
+++ b/seatunnel-ui/src/layouts/dashboard/sidebar/index.module.scss
@@ -0,0 +1,67 @@
+.btn-box {
+ width: 168px;
+ height: 60px;
+ display: flex;
+ justify-content: space-around;
+ align-items: center;
+ margin: 0 14px;
+ border-radius: 8px;
+ margin-top: 10px;
+ .projectinfo {
+ width: 120px;
+ // background-color: aquamarine;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ }
+ .projectname {
+ margin-left: 15px;
+ display: flex;
+ margin-top: 5px;
+ align-items: center;
+ font-size: 16px;
+ }
+ .name-space {
+ margin-left: 5px;
+ }
+ .workflows {
+ display: flex;
+ align-items: center;
+ margin-left: 30px;
+ color: #6c6c6c;
+ }
+}
+
+.dark {
+ color: #eee;
+}
+
+.dark-blue {
+ color: #eee !important;
+}
+
+.dark-blue-active {
+ background-color: #ffffff10;
+}
+
+.dark-active {
+ background-color: #2c2c2f;
+}
+
+.light-active {
+ background-color: #eeeeee;
+}
+
+.light-none {
+ background-color: transparent;
+}
+
+.collapsed-icon {
+ width: 100%;
+ height: 100%;
+ display: flex;
+ margin-top: 20px;
+ justify-content: center;
+ align-items: center;
+ color: #d6d6d6;
+}
diff --git a/seatunnel-ui/src/layouts/dashboard/sidebar/index.tsx b/seatunnel-ui/src/layouts/dashboard/sidebar/index.tsx
new file mode 100644
index 00000000..c5ef0e10
--- /dev/null
+++ b/seatunnel-ui/src/layouts/dashboard/sidebar/index.tsx
@@ -0,0 +1,137 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { defineComponent, ref, PropType, onMounted, watch, h } from 'vue'
+import { NLayoutSider, NMenu, NIcon, NDropdown, NEllipsis } from 'naive-ui'
+import { useThemeStore } from '@/store/theme'
+// import { DashOutlined } from '@vicons/antd'
+// import { useMenuClick } from './use-menuClick'
+import styles from './index.module.scss'
+import { PartitionOutlined, ProjectOutlined, RightOutlined } from '@vicons/antd'
+import { useRoute, useRouter, RouterLink } from 'vue-router'
+import { MenuOption } from 'naive-ui'
+import { useI18n } from 'vue-i18n'
+
+const toOverview = [
+ 'workflow-definition-detail',
+ 'workflow-instance-detail',
+ 'workflow-instance-gantt',
+ 'synchronization-definition-dag'
+]
+const Sidebar = defineComponent({
+ name: 'Sidebar',
+ props: {
+ sideMenuOptions: {
+ type: Array as PropType<any>,
+ default: []
+ },
+ sideKey: {
+ type: String as PropType<string>,
+ default: ''
+ }
+ },
+ setup() {
+ const router = useRouter()
+ const collapsedRef = ref(false)
+ const defaultExpandedKeys = [
+ 'workflow',
+ 'task',
+ 'udf-manage',
+ 'service-manage',
+ 'statistical-manage',
+ 'task-group-manage',
+ 'file-manage',
+ 'baseline'
+ ]
+ const route = useRoute()
+ const { t } = useI18n()
+ // Determine if it is a project overview
+
+ const showDrop = ref(false)
+ const themeStore = useThemeStore()
+ const menuStyle = ref(themeStore.getTheme as 'dark' | 'dark-blue' | 'light')
+
+ const sideMenuOptions = ref([
+ {
+ label: () =>
+ h(
+ RouterLink,
+ {
+ to: {
+ path: '/task/synchronization-definition'
+ },
+ exact: false
+ },
+ { default: () => t('menu.sync_task_definition') }
+ ),
+ key: 'synchronization-definition'
+ },
+ {
+ label: () =>
+ h(
+ RouterLink,
+ {
+ to: {
+ path: '/task/synchronization-instance'
+ },
+ exact: false
+ },
+ { default: () => t('menu.sync_task_instance') }
+ ),
+ key: 'synchronization-instance'
+ }
+ ])
+
+ onMounted(() => {
+ console.log(route, 'route')
+ })
+
+
+ return {
+ collapsedRef,
+ defaultExpandedKeys,
+ menuStyle,
+ themeStore,
+ showDrop,
+ sideMenuOptions,
+ route
+ }
+ },
+ render() {
+ return (
+ <NLayoutSider
+ bordered
+ nativeScrollbar={false}
+ show-trigger='bar'
+ collapse-mode='width'
+ collapsed={this.collapsedRef}
+ onCollapse={() => (this.collapsedRef = true)}
+ onExpand={() => (this.collapsedRef = false)}
+ width={196}
+ >
+ <NMenu
+ class='tab-vertical'
+ value={this.$props.sideKey}
+ options={this.sideMenuOptions}
+ defaultExpandedKeys={this.defaultExpandedKeys}
+ />
+ </NLayoutSider>
+ )
+ }
+})
+
+export default Sidebar
diff --git a/seatunnel-ui/src/themes/modules/dark.ts b/seatunnel-ui/src/locales/en_US/hook.ts
similarity index 94%
copy from seatunnel-ui/src/themes/modules/dark.ts
copy to seatunnel-ui/src/locales/en_US/hook.ts
index 5473e6f2..f565791a 100644
--- a/seatunnel-ui/src/themes/modules/dark.ts
+++ b/seatunnel-ui/src/locales/en_US/hook.ts
@@ -15,6 +15,6 @@
* limitations under the License.
*/
-const dark = {}
-
-export default dark
+export default {
+ copy_success: 'Copy success'
+}
diff --git a/seatunnel-ui/src/locales/en_US/index.ts b/seatunnel-ui/src/locales/en_US/index.ts
index 6a25d3dc..b48d1948 100644
--- a/seatunnel-ui/src/locales/en_US/index.ts
+++ b/seatunnel-ui/src/locales/en_US/index.ts
@@ -26,6 +26,9 @@ import tasks from '@/locales/en_US/tasks'
import setting from '@/locales/en_US/setting'
import datasource from '@/locales/en_US/datasource'
import virtual_tables from '@/locales/en_US/virtual-tables'
+import theme from '@/locales/en_US/theme'
+import project from '@/locales/en_US/project'
+import hook from '@/locales/en_US/hook'
export default {
login,
@@ -38,5 +41,8 @@ export default {
tasks,
setting,
datasource,
- virtual_tables
+ virtual_tables,
+ theme,
+ project,
+ hook
}
diff --git a/seatunnel-ui/src/locales/en_US/menu.ts b/seatunnel-ui/src/locales/en_US/menu.ts
index f3bd9587..7461dfa3 100644
--- a/seatunnel-ui/src/locales/en_US/menu.ts
+++ b/seatunnel-ui/src/locales/en_US/menu.ts
@@ -24,5 +24,7 @@ export default {
logout: 'Logout',
tasks: 'Tasks',
datasource: 'Datasource',
- virtual_tables: 'Virtual Tables'
+ virtual_tables: 'Virtual Tables',
+ sync_task_definition: 'Syncing Task Definition',
+ sync_task_instance: 'Syncing Task Instance',
}
diff --git a/seatunnel-ui/src/locales/en_US/project.ts b/seatunnel-ui/src/locales/en_US/project.ts
new file mode 100644
index 00000000..08858471
--- /dev/null
+++ b/seatunnel-ui/src/locales/en_US/project.ts
@@ -0,0 +1,1176 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+export default {
+ list: {
+ create_project: 'Create Project',
+ edit_project: 'Edit Project',
+ project_list: 'Project List',
+ project_tips: 'Please enter your project',
+ description_tips: 'Please enter your description',
+ username_tips: 'Please enter your username',
+ project_name: 'Project Name',
+ project_description: 'Project Description',
+ owned_users: 'Owned Users',
+ workflow_define_count: 'Workflow Define Count',
+ process_instance_running_count: 'Process Instance Running Count',
+ description: 'Description',
+ create_time: 'Create Time',
+ update_time: 'Update Time',
+ operation: 'Operation',
+ edit: 'Edit',
+ delete: 'Delete',
+ confirm: 'Confirm',
+ cancel: 'Cancel',
+ delete_confirm: 'Delete?',
+ member_manage: 'Member Manage',
+ data_columns: 'Data columns'
+ },
+ overview: {
+ task_state_statistics: 'Task State Statistics',
+ process_state_statistics: 'Process State Statistics',
+ process_definition_statistics: 'Process Definition Statistics',
+ number: 'Number',
+ state: 'State',
+ submitted_success: 'SUBMITTED_SUCCESS',
+ running_execution: 'RUNNING_EXECUTION',
+ ready_pause: 'READY_PAUSE',
+ pause: 'PAUSE',
+ ready_stop: 'READY_STOP',
+ stop: 'STOP',
+ failure: 'FAILURE',
+ success: 'SUCCESS',
+ need_fault_tolerance: 'NEED_FAULT_TOLERANCE',
+ kill: 'KILL',
+ waiting_thread: 'WAITING_THREAD',
+ waiting_depend: 'WAITING_DEPEND',
+ delay_execution: 'DELAY_EXECUTION',
+ forced_success: 'FORCED_SUCCESS',
+ serial_wait: 'SERIAL_WAIT',
+ dispatch: 'DISPATCH',
+ ready_block: 'READY_BLOCK',
+ block: 'BLOCK',
+ pause_by_isolation: 'PAUSE_BY_ISOLATION',
+ kill_by_isolation: 'KILL_BY_ISOLATION',
+ pause_by_coronation: 'PAUSE_BY_CORONATION',
+ forbidden_by_coronation: 'FORBIDDEN_BY_CORONATION'
+ },
+ workflow: {
+ pause_recovery: 'Pause Recovery',
+ pause_recovery_confirm: 'Pause Recovery?',
+ suspend: 'Suspend',
+ suspend_confirm: 'Suspend?',
+ stop_recovery: 'Stop Recovery',
+ stop_recovery_confirm: 'Stop Recovery?',
+ copy_judge_tips:
+ 'In the current workflow, a node with brand name $value is referenced.',
+ workflow_relation: 'Workflow Relation',
+ create_workflow: 'Create Workflow',
+ select_project: 'Choose a project',
+ choose_project: 'Designated project',
+ import_workflow: 'Import Workflow',
+ export_workflow: 'Export Workflow',
+ workflow_name: 'Workflow Name',
+ workflow_instance_name: 'Workflow Instance Name',
+ current_selection: 'Current Selection',
+ online: 'Online',
+ offline: 'Offline',
+ refresh: 'Refresh',
+ show_hide_label: 'Show / Hide Label',
+ schedule_start_time: 'Schedule Start Time',
+ schedule_end_time: 'Schedule End Time',
+ crontab_expression: 'Crontab',
+ workflow_publish_status: 'Workflow Publish Status',
+ workflow_definition: 'Workflow Definition',
+ workflow_instance: 'Workflow Instance',
+ status: 'Status',
+ create_time: 'Create Time',
+ update_time: 'Update Time',
+ description: 'Description',
+ create_user: 'Create User',
+ modify_user: 'Modify User',
+ operation: 'Operation',
+ edit: 'Edit',
+ start: 'Start',
+ timing: 'Timing',
+ up_line: 'Online',
+ down_line: 'Offline',
+ copy_workflow: 'Copy Workflow',
+ delete: 'Delete',
+ tree_view: 'Tree View',
+ tree_limit: 'Limit Size',
+ export: 'Export',
+ batch_copy: 'Copy',
+ version_info: 'Version Info',
+ version: 'Version',
+ undo: 'Undo',
+ redo: 'Redo',
+ file_upload: 'File Upload',
+ upload_file: 'Upload File',
+ import_type: 'Import Type',
+ export_type: 'Export Type',
+ error_info: 'The template format is wrong, please confirm and upload again',
+ upload: 'Upload',
+ file_name: 'File Name',
+ success: 'Success',
+ parameter_configuration: 'Parameter Configuration',
+ set_parameters_before_timing: 'Set parameters before timing',
+ failure_strategy: 'Failure Strategy',
+ node_execution: 'Node Execution',
+ backward_execution: 'Backward execution',
+ forward_execution: 'Forward execution',
+ current_node_execution: 'Execute only the current node',
+ notification_strategy: 'Notification Strategy',
+ workflow_priority: 'Workflow Priority',
+ worker_group: 'Worker Group',
+ environment_name: 'Environment Name',
+ alarm_group: 'Alarm Group',
+ calendar: 'Calendar',
+ cut_day_time: 'Cut Day Time',
+ card: 'Card',
+ card_value: 'Card Value',
+ complement_data: 'Complement Data',
+ startup_parameter: 'Startup Parameter',
+ whether_dry_run: 'Whether Dry-Run',
+ continue: 'Continue',
+ end: 'End',
+ none_send: 'None',
+ success_send: 'Success',
+ failure_send: 'Failure',
+ all_send: 'All',
+ whether_complement_data: 'Whether it is a complement process?',
+ data_date: 'Data date',
+ select_date: 'Select Date',
+ enter_date: 'Enter Date',
+ data_date_tips:
+ 'The format is yyyy-MM-dd HH:mm:ss with multiple comma splits',
+ data_date_limit: 'Enter more than 100 dates',
+ mode_of_execution: 'Mode of execution',
+ serial_execution: 'Serial execution',
+ parallel_execution: 'Parallel execution',
+ parallelism: 'Parallelism',
+ custom_parallelism: 'Custom Parallelism',
+ please_enter_parallelism: 'Please enter Parallelism',
+ please_choose: 'Please Choose',
+ start_time: 'Start Time',
+ end_time: 'End Time',
+ delete_confirm: 'Delete?',
+ rerun_confirm: 'Rerun?',
+ stop_confirm: 'Stop?',
+ online_confirm: 'Online?',
+ offline_confirm: 'Offline?',
+ enter_name_tips: 'Please enter name',
+ uploaded_file_tips: 'The uploaded file cannot be empty',
+ switch_version: 'Switch To This Version',
+ confirm_switch_version: 'Confirm Switch To This Version?',
+ current_version: 'Current Version',
+ run_type: 'Run Type',
+ scheduling_time: 'Scheduling Time',
+ duration: 'Duration',
+ run_times: 'Run Times',
+ fault_tolerant_sign: 'Fault-tolerant Sign',
+ dry_run_flag: 'Dry-run Flag',
+ executor: 'Executor',
+ host: 'Host',
+ start_process: 'Start Process',
+ start_from_state_clean_tasks: 'Start from state clean tasks',
+ execute_from_the_current_node: 'Execute from the current node',
+ recover_tolerance_fault_process: 'Recover tolerance fault process',
+ resume_the_suspension_process: 'Resume the suspension process',
+ execute_from_the_failed_nodes: 'Execute from the failed nodes',
+ scheduling_execution: 'Scheduling execution',
+ rerun: 'Rerun',
+ stop: 'Stop',
+ pause: 'Pause',
+ recovery_waiting_thread: 'Recovery waiting thread',
+ recover_serial_wait: 'Recover serial wait',
+ recovery_suspend: 'Recovery Suspend',
+ dependent_chain_rerun: 'Dependent Chain Rerun',
+ dependent_chain_recovery: 'Dependent Chain Recovery',
+ failed_to_retry: 'Failed to retry',
+ gantt: 'Gantt',
+ name: 'Name',
+ all_status: 'AllStatus',
+ submit_success: 'Submitted successfully',
+ running: 'Running',
+ ready_to_pause: 'Ready to pause',
+ ready_to_stop: 'Ready to stop',
+ failed: 'Failed',
+ need_fault_tolerance: 'Need fault tolerance',
+ kill: 'Kill',
+ waiting_for_thread: 'Waiting for thread',
+ waiting_for_dependence: 'Waiting for dependence',
+ waiting_for_dependency_to_complete: 'Waiting for dependency to complete',
+ delay_execution: 'Delay execution',
+ forced_success: 'Forced success',
+ serial_wait: 'Serial wait',
+ dispatch: 'Dispatch',
+ executing: 'Executing',
+ startup_type: 'Startup Type',
+ complement_range: 'Complement Range',
+ parameters_variables: 'Parameters variables',
+ global_parameters: 'Global parameters',
+ local_parameters: 'Local parameters',
+ type: 'Type',
+ retry_count: 'Retry Count',
+ submit_time: 'Submit Time',
+ refresh_status_succeeded: 'Refresh status succeeded',
+ view_log: 'View log',
+ update_log_success: 'Update log success',
+ no_more_log: 'No more logs',
+ no_log: 'No log',
+ loading_log: 'Loading Log...',
+ close: 'Close',
+ download_log: 'Download Log',
+ refresh_log: 'Refresh Log',
+ enter_full_screen: 'Enter full screen',
+ cancel_full_screen: 'Cancel full screen',
+ task_state: 'Task status',
+ mode_of_dependent: 'Mode of dependent',
+ open: 'Open',
+ project_name_required: 'Project name is required',
+ related_items: 'Related items',
+ project_name: 'Project Name',
+ project_tips: 'Please select project name',
+ workflow_relation_no_data_result_title:
+ 'Can not find any relations of workflows.',
+ workflow_relation_no_data_result_desc:
+ 'There is not any workflows. Please create a workflow, and then visit this page again.',
+ timing_tips: 'The current workflow lacks timing',
+ label: 'Label',
+ estimated_end_time: 'Estimated End Time',
+ download_template: 'Download Template',
+ export_tips:
+ 'Currently, Shell, SQL, Procedure, Dependent, Trigger and Data Quality tasks can be exported',
+ timing_name: 'Timing Name',
+ next_run: 'Next Running Time',
+ coronation: 'Coronation',
+ cancle_coronation: 'Cancel the coronation',
+ coronation_confirm: 'Confirm coronation?',
+ cancle_coronation_confirm: 'Sure to cancel the coronation?',
+ isolation: 'Isolation',
+ cancle_isolation__confirm: 'Sure to cancel the isolation?',
+ cancle_isolation: 'Cancel the isolation',
+ isolation_confirm: 'Confirm isolation?',
+ debug_tips: 'Save workflow before debug',
+ impact_anaysis: 'Impact analysis',
+ natural: 'Calendar day',
+ scheduler_calendar: 'Scheduling calendars',
+ card_calendar: 'Card calendars',
+ custom_calendar: 'Custom calendars',
+ count: 'count',
+ choose_timing: 'Please select timing',
+ instance: 'Workflow Instance',
+ submitter: 'Submitter',
+ today: 'Today',
+ last_day: 'Yesterday',
+ last_three_day: 'The last 3 days',
+ last_week: 'The last 7 days',
+ last_month: 'The last 30 days',
+ local_import: 'Local Import',
+ workflow_update_list: 'Workflow Update List',
+ update: 'Update',
+ create: 'Create',
+ last_update_user: 'Last Update User',
+ last_update_time: 'Last Update Time',
+ dependent_chain_title:
+ 'The following workflow are about to start dependency chain cleanup and rerun',
+ dependent_chain_condition_title:
+ 'The following workflow do not meet the execution conditions'
+ },
+ task: {
+ cancel_full_screen: 'Cancel full screen',
+ enter_full_screen: 'Enter full screen',
+ current_task_settings: 'Current task settings',
+ online: 'Online',
+ offline: 'Offline',
+ task_name: 'Task Name',
+ task_type: 'Task Type',
+ create_task: 'Create Task',
+ workflow_instance: 'Workflow Instance',
+ workflow_name: 'Workflow Name',
+ workflow_name_tips: 'Please select workflow name',
+ workflow_state: 'Workflow State',
+ version: 'Version',
+ current_version: 'Current Version',
+ switch_version: 'Switch To This Version',
+ confirm_switch_version: 'Confirm Switch To This Version?',
+ description: 'Description',
+ move: 'Move',
+ upstream_tasks: 'Upstream Tasks',
+ executor: 'Executor',
+ node_type: 'Node Type',
+ state: 'State',
+ submit_time: 'Submit Time',
+ start_time: 'Start Time',
+ create_time: 'Create Time',
+ update_time: 'Update Time',
+ end_time: 'End Time',
+ duration: 'Duration',
+ retry_count: 'Retry Count',
+ dry_run_flag: 'Dry Run Flag',
+ host: 'Host',
+ operation: 'Operation',
+ edit: 'Edit',
+ delete: 'Delete',
+ delete_confirm: 'Delete?',
+ clean_state: 'Clear and run again',
+ forced_success: 'Forced Success',
+ view_log: 'View Log',
+ download_log: 'Download Log',
+ refresh: 'Refresh',
+ run_state: 'Run State',
+ workflow_instance_name: 'Workflow Instance Name',
+ cancel_coronation: 'Cancel Coronation',
+ import_coronation_task: 'Import Coronation Task',
+ download_template: 'Download Template',
+ cancel_confirm: 'Cancel?',
+ task_coronation: 'Task Coronation',
+ upload_file: 'Upload File',
+ local_import: 'Local Import',
+ task_coronation_list: 'Task Coronation List',
+ associate_upstream: 'Associate Upstream',
+ next_step: 'Next Step',
+ prev_step: 'Prev Step',
+ confirm: 'Confirm',
+ error_info: 'The template format is wrong, please confirm and upload again',
+ more: 'More',
+ success: 'Success',
+ flag: 'Flag',
+ newest: 'Newest',
+ history: 'History',
+ confirm_operation: 'Confirm',
+ detail: 'Detail',
+ return: 'Return',
+ cancel: 'Cancel',
+ dependent_chain_title:
+ 'The following tasks are about to start dependency chain cleanup and rerun',
+ dependent_chain_condition_title:
+ 'The following tasks do not meet the execution conditions',
+ dependent_chain_condition_tip1:
+ 'An executing workflow instance is not executable',
+ dependent_chain_condition_tip2:
+ 'The task cannot be executed if it does not meet the execution conditions (the predecessor task of the task is suspended or failed)',
+ dependent_chain_condition_tip3:
+ 'Non-executable without operation permission',
+ batch_confirm: 'Batch Confirm'
+ },
+ dag: {
+ create: 'Create Workflow',
+ start: 'Start',
+ search: 'Search',
+ download_png: 'Download PNG',
+ import_task: 'Import task',
+ download_template: 'Download task template',
+ fullscreen_open: 'Open Fullscreen',
+ fullscreen_close: 'Close Fullscreen',
+ save: 'Save',
+ close: 'Close',
+ format: 'Format',
+ refresh_dag_status: 'Refresh DAG status',
+ layout_type: 'Layout Type',
+ grid_layout: 'Grid',
+ dagre_layout: 'Dagre',
+ rows: 'Rows',
+ cols: 'Cols',
+ copy_success: 'Copy Success',
+ workflow_name: 'Workflow Name',
+ description: 'Description',
+ tenant: 'Tenant',
+ timeout_alert: 'Timeout Alert',
+ process_execute_type: 'Process execute type',
+ parallel: 'parallel',
+ serial_wait: 'Serial wait',
+ // serial_discard: 'Serial discard',
+ serial_priority: 'Serial priority',
+ recover_serial_wait: 'Recover serial wait',
+ global_variables: 'Global Variables',
+ basic_info: 'Basic Information',
+ minute: 'Minute',
+ key: 'Key',
+ value: 'Value',
+ success: 'Success',
+ delete_cell: 'Delete selected edges and nodes',
+ online_directly: 'Whether to go online the process definition',
+ update_directly: 'Whether to update the process definition',
+ dag_name_empty: 'Workflow name cannot be empty',
+ project_empty: 'Please select project',
+ positive_integer: 'Please enter a positive integer greater than 0',
+ prop_empty: 'prop is empty',
+ prop_repeat: 'prop is repeat',
+ node_not_created: 'Failed to save node not created',
+ copy_name: 'Copy Name',
+ view_variables: 'View Variables',
+ startup_parameter: 'Startup Parameter',
+ online: 'Online',
+ label: 'Label',
+ label_length_tips: 'The maximum number of labels is 3',
+ unsave_tips:
+ 'Please save the workflow first, and then execute the run operation.',
+ cancel: 'Cancel',
+ force_close: 'Force Close',
+ close_tip: 'Close Tip',
+ close_content_tip:
+ 'The current workflow has been modified and has not been saved. If it is forced to close, the edited content will be lost.',
+ more: 'More',
+ run: 'Run',
+ stop: 'Stop',
+ import: 'Import',
+ code_import: 'File import',
+ resource: 'Resource',
+ debug_tips: 'Getting the log, please wait...',
+ setting: 'Setting',
+ form_tips: 'Error in required information of node',
+ save_and_debug: 'Save Workflow and debug',
+ debug: 'Debug',
+ import_alert:
+ 'When the script content is updated, the referenced file content is also updated.',
+ select_file: 'Select a file'
+ },
+ node: {
+ return_back: 'Return',
+ current_node_settings: 'Current node settings',
+ instructions: 'Instructions',
+ view_history: 'View history',
+ view_log: 'View log',
+ enter_this_child_node: 'Enter this child node',
+ name: 'Node Name',
+ task_name: 'Task Name',
+ task_name_tips: 'Please select a task (required)',
+ name_tips: 'Please enter name (required)',
+ task_type: 'Task Type',
+ task_type_tips: 'Please select a task type (required)',
+ workflow_name: 'Workflow Name',
+ workflow_name_tips: 'Please select a workflow (required)',
+ child_node: 'Child Node',
+ child_node_tips: 'Please select a child node (required)',
+ run_flag: 'Run flag',
+ normal: 'Normal',
+ prohibition_execution: 'Prohibition execution',
+ description: 'Description',
+ description_tips: 'Please enter description',
+ task_priority: 'Task priority',
+ worker_group: 'Worker group',
+ worker_group_tips:
+ 'The Worker group no longer exists, please select the correct Worker group!',
+ environment_name: 'Environment Name',
+ task_group_name: 'Task group name',
+ task_group_queue_priority: 'Priority',
+ number_of_failed_retries: 'Number of failed retries',
+ times: 'Times',
+ failed_retry_interval: 'Failed retry interval',
+ minute: 'Minute',
+ second: 'Second',
+ delay_execution_time: 'Delay execution time',
+ state: 'State',
+ branch_flow: 'Branch flow',
+ cancel: 'Cancel',
+ loading: 'Loading...',
+ confirm: 'Confirm',
+ success: 'Success',
+ failed: 'Failed',
+ backfill_tips:
+ 'The newly created sub-Process has not yet been executed and cannot enter the sub-Process',
+ task_instance_tips:
+ 'The task has not been executed and cannot enter the sub-Process',
+ branch_tips:
+ 'Cannot select the same node for successful branch flow and failed branch flow',
+ timeout_alarm: 'Timeout alarm',
+ timeout_strategy: 'Timeout strategy',
+ timeout_strategy_tips: 'Timeout strategy must be selected',
+ timeout_failure: 'Timeout failure',
+ timeout_period: 'Timeout period',
+ timeout_period_tips: 'Timeout must be a positive integer',
+ script: 'Script',
+ script_tips: 'Please enter script(required)',
+ resources: 'Resources',
+ resources_tips: 'Please select resources',
+ non_resources_tips: 'Please delete all non-existent resources',
+ useless_resources_tips: 'Unauthorized or deleted resources',
+ custom_parameters: 'Custom Parameters',
+ copy_success: 'Copy success',
+ copy_failed: 'The browser does not support automatic copying',
+ prop_tips: 'prop(required)',
+ prop_repeat: 'prop is repeat',
+ value_tips: 'value(optional)',
+ value_required_tips: 'value(required)',
+ pre_tasks: 'Pre tasks',
+ program_type: 'Program Type',
+ main_class: 'Main Class',
+ main_class_tips: 'Please enter main class',
+ main_package: 'Main Package',
+ main_package_tips: 'Please enter main package',
+ deploy_mode: 'Deploy Mode',
+ app_name: 'App Name',
+ app_name_tips: 'Please enter app name(optional)',
+ driver_cores: 'Driver Cores',
+ driver_cores_tips: 'Please enter Driver cores',
+ driver_memory: 'Driver Memory',
+ driver_memory_tips: 'Please enter Driver memory',
+ executor_number: 'Executor Number',
+ executor_number_tips: 'Please enter Executor number',
+ executor_memory: 'Executor Memory',
+ executor_memory_tips: 'Please enter Executor memory',
+ executor_cores: 'Executor Cores',
+ executor_cores_tips: 'Please enter Executor cores',
+ main_arguments: 'Main Arguments',
+ main_arguments_tips: 'Please enter main arguments',
+ option_parameters: 'Option Parameters',
+ option_parameters_tips: 'Please enter option parameters',
+ positive_integer_tips: 'should be a positive integer',
+ flink_version: 'Flink Version',
+ job_manager_memory: 'JobManager Memory',
+ job_manager_memory_tips: 'Please enter JobManager memory',
+ task_manager_memory: 'TaskManager Memory',
+ task_manager_memory_tips: 'Please enter TaskManager memory',
+ slot_number: 'Slot Number',
+ slot_number_tips: 'Please enter Slot number',
+ parallelism: 'Parallelism',
+ custom_parallelism: 'Configure parallelism',
+ parallelism_tips: 'Please enter Parallelism',
+ parallelism_number_tips: 'Parallelism number should be positive integer',
+ parallelism_complement_tips:
+ 'If there are a large number of tasks requiring complement, you can use the custom parallelism to ' +
+ 'set the complement task thread to a reasonable value to avoid too large impact on the server.',
+ task_manager_number: 'TaskManager Number',
+ task_manager_number_tips: 'Please enter TaskManager number',
+ http_url: 'Http Url',
+ http_url_tips: 'Please Enter Http Url',
+ http_url_validator: 'The request address must contain HTTP or HTTPS',
+ http_method: 'Http Method',
+ http_parameters: 'Http Parameters',
+ http_check_condition: 'Http Check Condition',
+ http_condition: 'Http Condition',
+ http_condition_tips: 'Please Enter Http Condition',
+ timeout_settings: 'Timeout Settings',
+ connect_timeout: 'Connect Timeout',
+ ms: 'ms',
+ socket_timeout: 'Socket Timeout',
+ status_code_default: 'Default response code 200',
+ status_code_custom: 'Custom response code',
+ body_contains: 'Content includes',
+ body_not_contains: 'Content does not contain',
+ body_check_custom: 'Content check',
+ http_parameters_position: 'Http Parameters Position',
+ target_task_name: 'Target Task Name',
+ target_task_name_tips: 'Please enter the Pigeon task name(required)',
+ datasource_type: 'Datasource types',
+ datasource_instances: 'Datasource instances',
+ datasource_require_tips: 'Datasource is required',
+ sql_type: 'SQL Type',
+ sql_type_query: 'Query',
+ sql_type_non_query: 'Non Query',
+ sql_statement: 'SQL Statement',
+ pre_sql_statement: 'Pre SQL Statement',
+ post_sql_statement: 'Post SQL Statement',
+ sql_input_placeholder: 'Please enter non-query sql.',
+ sql_empty_tips: 'The sql can not be empty.',
+ procedure_method: 'SQL Statement',
+ procedure_method_tips: 'Please enter the procedure script',
+ procedure_method_snippet:
+ '--Please enter the procedure script \n\n--call procedure:call <procedure-name>[(<arg1>,<arg2>, ...)]\n\n--call function:?= call <procedure-name>[(<arg1>,<arg2>, ...)]',
+ start: 'Start',
+ edit: 'Edit',
+ copy: 'Copy',
+ delete: 'Delete',
+ custom_job: 'Custom Job',
+ custom_script: 'Custom Script',
+ sqoop_job_name: 'Job Name',
+ sqoop_job_name_tips: 'Please enter Job Name(required)',
+ direct: 'Direct',
+ hadoop_custom_params: 'Hadoop Params',
+ sqoop_advanced_parameters: 'Sqoop Advanced Parameters',
+ data_source: 'Data Source',
+ type: 'Type',
+ datasource: 'Datasource',
+ datasource_tips: 'Please select the datasource',
+ model_type: 'ModelType',
+ form: 'Form',
+ table: 'Table',
+ table_tips: 'Please enter Mysql Table(required)',
+ column_type: 'ColumnType',
+ all_columns: 'All Columns',
+ some_columns: 'Some Columns',
+ column: 'Column',
+ column_tips: 'Please enter Columns (Comma separated)',
+ database: 'Database',
+ database_tips: 'Please enter Hive Database(required)',
+ zeppelin_note_id: 'zeppelinNoteId',
+ zeppelin_note_id_tips: 'Please enter the note id of your zeppelin note',
+ zeppelin_paragraph_id: 'zeppelinParagraphId',
+ zeppelin_paragraph_id_tips:
+ 'Please enter the paragraph id of your zeppelin paragraph',
+ zeppelin_parameters: 'parameters',
+ zeppelin_parameters_tips:
+ 'Please enter the parameters for zeppelin dynamic form',
+ zeppelin_rest_endpoint: 'zeppelinRestEndpoint',
+ zeppelin_rest_endpoint_tips:
+ 'Please enter the rest endpoint of your Zeppelin server',
+ zeppelin_production_note_directory:
+ 'Directory for cloned zeppelin note in production mode',
+ zeppelin_production_note_directory_tips:
+ 'Please enter the production note directory to enable production mode',
+ hive_table_tips: 'Please enter Hive Table(required)',
+ hive_partition_keys: 'Hive partition Keys',
+ hive_partition_keys_tips: 'Please enter Hive Partition Keys',
+ hive_partition_values: 'Hive partition Values',
+ hive_partition_values_tips: 'Please enter Hive Partition Values',
+ jupyter_conda_env_name: 'condaEnvName',
+ jupyter_conda_env_name_tips:
+ 'Please enter the conda environment name of papermill',
+ jupyter_input_note_path: 'inputNotePath',
+ jupyter_input_note_path_tips: 'Please enter the input jupyter note path',
+ jupyter_output_note_path: 'outputNotePath',
+ jupyter_output_note_path_tips: 'Please enter the output jupyter note path',
+ jupyter_parameters: 'parameters',
+ jupyter_parameters_tips:
+ 'Please enter the parameters for jupyter parameterization',
+ jupyter_kernel: 'kernel',
+ jupyter_kernel_tips: 'Please enter the jupyter kernel name',
+ jupyter_engine: 'engine',
+ jupyter_engine_tips: 'Please enter the engine name',
+ jupyter_execution_timeout: 'executionTimeout',
+ jupyter_execution_timeout_tips:
+ 'Please enter the execution timeout for each jupyter note cell',
+ jupyter_start_timeout: 'startTimeout',
+ jupyter_start_timeout_tips:
+ 'Please enter the start timeout for jupyter kernel',
+ jupyter_others: 'others',
+ jupyter_others_tips:
+ 'Please enter the other options you need for papermill',
+ mlflow_algorithm: 'Algorithm',
+ mlflow_algorithm_tips: 'svm',
+ mlflow_params: 'Parameters',
+ mlflow_params_tips: ' ',
+ mlflow_searchParams: 'Parameter Search Space',
+ mlflow_searchParams_tips: ' ',
+ mlflow_isSearchParams: 'Search Parameters',
+ mlflow_dataPath: 'Data Path',
+ mlflow_dataPath_tips:
+ ' The absolute path of the file or folder. Ends with .csv for file or contain train.csv and test.csv for folder',
+ mlflow_dataPath_error_tips: ' data data can not be empty ',
+ mlflow_experimentName: 'Experiment Name',
+ mlflow_experimentName_tips: 'experiment_001',
+ mlflow_registerModel: 'Register Model',
+ mlflow_modelName: 'Model Name',
+ mlflow_modelName_tips: 'model_001',
+ mlflow_mlflowTrackingUri: 'MLflow Tracking Server URI',
+ mlflow_mlflowTrackingUri_tips: 'http://127.0.0.1:5000',
+ mlflow_mlflowTrackingUri_error_tips:
+ 'MLflow Tracking Server URI can not be empty',
+ mlflow_jobType: 'Job Type',
+ mlflow_automlTool: 'AutoML Tool',
+ mlflow_taskType: 'MLflow Task Type',
+ mlflow_deployType: 'Deploy Mode',
+ mlflow_deployModelKey: 'Model-URI',
+ mlflow_deployPort: 'Port',
+ mlflowProjectRepository: 'Repository',
+ mlflowProjectRepository_tips: 'git repository or path on worker',
+ mlflowProjectVersion: 'Project Version',
+ mlflowProjectVersion_tips: 'git version',
+ mlflow_cpuLimit: 'Max Cpu Limit',
+ mlflow_memoryLimit: 'Max Memory Limit',
+ openmldb_zk_address: 'zookeeper address',
+ openmldb_zk_address_tips: 'Please enter the zookeeper address',
+ openmldb_zk_path: 'zookeeper path',
+ openmldb_zk_path_tips: 'Please enter the zookeeper path',
+ openmldb_execute_mode: 'Execute Mode',
+ openmldb_execute_mode_tips: 'Please select the execute mode',
+ openmldb_execute_mode_offline: 'offline',
+ openmldb_execute_mode_online: 'online',
+ dvc_task_type: 'DVC Task Type',
+ dvc_repository: 'DVC Repository',
+ dvc_repository_tips: 'please input the url of dvc repository',
+ dvc_version: 'Version',
+ dvc_version_tips: 'data version, will be mark as git tag',
+ dvc_data_location: 'Data Path in DVC Repository',
+ dvc_message: 'Version Message',
+ dvc_load_save_data_path: 'Data Path In Worker',
+ dvc_store_url: 'Store Url',
+ dvc_empty_tips: 'This parameter cannot be empty',
+ dinky_address: 'Dinky address',
+ dinky_address_tips: 'Please enter the url of your dinky',
+ dinky_task_id: 'Dinky task id',
+ dinky_task_id_tips: 'Please enter the task id of your dinky',
+ dinky_online: 'Online task',
+ pytorch_script: 'Python Script',
+ pytorch_script_params: 'Script Input Parameters',
+ pytorch_other_params: 'Show More Configurations',
+ pytorch_python_path: 'Project Path',
+ pytorch_is_create_environment: 'Create An Environment Or Not',
+ pytorch_python_command: 'Python Command Path',
+ pytorch_python_command_tips: 'If empty,will be set $PYTHON_HOME',
+ pytorch_python_env_tool: 'Python Environment Manager Tool',
+ pytorch_requirements: 'Requirement File',
+ pytorch_conda_python_version: 'Python Version',
+ pytorch_conda_python_version_tips:
+ 'Please enter the version number, such as 3.6, 3.7, 3.x',
+ export_dir: 'Export Dir',
+ export_dir_tips: 'Please enter Export Dir(required)',
+ sql_statement_tips: 'SQL Statement(required)',
+ map_column_hive: 'Map Column Hive',
+ map_column_java: 'Map Column Java',
+ data_target: 'Data Target',
+ create_hive_table: 'CreateHiveTable',
+ drop_delimiter: 'DropDelimiter',
+ over_write_src: 'OverWriteSrc',
+ hive_target_dir: 'Hive Target Dir',
+ hive_target_dir_tips: 'Please enter hive target dir',
+ replace_delimiter: 'ReplaceDelimiter',
+ replace_delimiter_tips: 'Please enter Replace Delimiter',
+ target_dir: 'Target Dir',
+ target_dir_tips: 'Please enter Target Dir(required)',
+ delete_target_dir: 'DeleteTargetDir',
+ compression_codec: 'CompressionCodec',
+ file_type: 'FileType',
+ fields_terminated: 'FieldsTerminated',
+ fields_terminated_tips: 'Please enter Fields Terminated',
+ lines_terminated: 'LinesTerminated',
+ lines_terminated_tips: 'Please enter Lines Terminated',
+ is_update: 'IsUpdate',
+ update_key: 'UpdateKey',
+ update_key_tips: 'Please enter Update Key',
+ update_mode: 'UpdateMode',
+ only_update: 'OnlyUpdate',
+ allow_insert: 'AllowInsert',
+ concurrency: 'Concurrency',
+ concurrency_tips: 'Please enter Concurrency',
+ sea_tunnel_master: 'Master',
+ sea_tunnel_master_url: 'Master URL',
+ sea_tunnel_queue: 'Queue',
+ sea_tunnel_master_url_tips:
+ 'Please enter the master url, e.g., 127.0.0.1:7077',
+ switch_condition: 'Condition',
+ switch_branch_flow: 'Branch Flow',
+ switch_branch_flow_tips: 'Please select branch flow',
+ and: 'and',
+ or: 'or',
+ datax_custom_template: 'Custom Template',
+ datax_json_template: 'JSON',
+ datax_target_datasource_type: 'Target Datasource Types',
+ datax_target_database: 'Target Database',
+ datax_target_table: 'Target Table',
+ datax_target_table_tips: 'Please enter the name of the target table',
+ datax_target_database_pre_sql: 'Pre SQL Statement',
+ datax_target_database_post_sql: 'Post SQL Statement',
+ datax_non_query_sql_tips: 'Please enter the non-query sql statement',
+ datax_job_speed_byte: 'Speed(Byte count)',
+ datax_job_speed_byte_info: '(0 means unlimited)',
+ datax_job_speed_record: 'Speed(Record count)',
+ datax_job_speed_record_info: '(0 means unlimited)',
+ datax_job_runtime_memory: 'Runtime Memory Limits',
+ datax_job_runtime_memory_xms: 'Low Limit Value',
+ datax_job_runtime_memory_xmx: 'High Limit Value',
+ datax_job_runtime_memory_unit: 'G',
+ chunjun_json_template: 'JSON script',
+ current_hour: 'CurrentHour',
+ last_1_hour: 'Last1Hour',
+ last_2_hour: 'Last2Hours',
+ last_3_hour: 'Last3Hours',
+ last_24_hour: 'Last24Hours',
+ today: 'today',
+ last_1_days: 'Last1Days',
+ last_2_days: 'Last2Days',
+ last_3_days: 'Last3Days',
+ last_7_days: 'Last7Days',
+ this_week: 'ThisWeek',
+ last_week: 'LastWeek',
+ last_monday: 'LastMonday',
+ last_tuesday: 'LastTuesday',
+ last_wednesday: 'LastWednesday',
+ last_thursday: 'LastThursday',
+ last_friday: 'LastFriday',
+ last_saturday: 'LastSaturday',
+ last_sunday: 'LastSunday',
+ this_month: 'ThisMonth',
+ this_month_begin: 'ThisMonthBegin',
+ last_month: 'LastMonth',
+ last_month_begin: 'LastMonthBegin',
+ last_month_end: 'LastMonthEnd',
+ month: 'month',
+ week: 'week',
+ day: 'day',
+ hour: 'hour',
+ add_dependency: 'Add dependency',
+ waiting_dependent_start: 'Waiting Dependent start',
+ check_interval: 'Check interval',
+ waiting_dependent_complete: 'Waiting Dependent complete',
+ project_name: 'Project Name',
+ project_name_tips: 'Please select a project(required)',
+ process_name: 'Workflow Name',
+ process_name_tips: 'Please select a workflow(required)',
+ cycle_time: 'Cycle Time',
+ cycle_time_tips: 'Please select a cycle time(required)',
+ date_tips: 'Please select a date(required)',
+ rule_name: 'Rule Name',
+ null_check: 'NullCheck',
+ custom_sql: 'CustomSql',
+ multi_table_accuracy: 'MulTableAccuracy',
+ multi_table_value_comparison: 'MulTableCompare',
+ field_length_check: 'FieldLengthCheck',
+ uniqueness_check: 'UniquenessCheck',
+ regexp_check: 'RegexpCheck',
+ timeliness_check: 'TimelinessCheck',
+ enumeration_check: 'EnumerationCheck',
+ table_count_check: 'TableCountCheck',
+ src_connector_type: 'SrcConnType',
+ src_datasource_id: 'SrcSource',
+ src_table: 'SrcTable',
+ src_filter: 'SrcFilter',
+ src_field: 'SrcField',
+ statistics_name: 'ActualValName',
+ check_type: 'CheckType',
+ operator: 'Operator',
+ threshold: 'Threshold',
+ failure_strategy: 'FailureStrategy',
+ target_connector_type: 'TargetConnType',
+ target_datasource_id: 'TargetSourceId',
+ target_table: 'TargetTable',
+ target_filter: 'TargetFilter',
+ mapping_columns: 'OnClause',
+ statistics_execute_sql: 'ActualValExecSql',
+ comparison_name: 'ExceptedValName',
+ comparison_execute_sql: 'ExceptedValExecSql',
+ comparison_type: 'ExceptedValType',
+ writer_connector_type: 'WriterConnType',
+ writer_datasource_id: 'WriterSourceId',
+ target_field: 'TargetField',
+ field_length: 'FieldLength',
+ logic_operator: 'LogicOperator',
+ regexp_pattern: 'RegexpPattern',
+ deadline: 'Deadline',
+ datetime_format: 'DatetimeFormat',
+ enum_list: 'EnumList',
+ begin_time: 'BeginTime',
+ fix_value: 'FixValue',
+ fix_value_tips: 'Please set the FixValue',
+ required: 'required',
+ emr_flow_define_json: 'jobFlowDefineJson',
+ emr_flow_define_json_tips: 'Please enter the definition of the job flow.',
+ emr_steps_define_json: 'stepsDefineJson',
+ emr_steps_define_json_tips: 'Please enter the definition of the emr step.',
+ send_email: 'Send Email',
+ log_display: 'Log display',
+ rows_of_result: 'rows of result',
+ title: 'Title',
+ title_tips: 'Please enter the title of email',
+ alarm_group: 'Alarm group',
+ alarm_group_tips: 'Alarm group required',
+ integer_tips: 'Please enter a positive integer',
+ sql_parameter: 'SQL Parameter',
+ format_tips: 'Please enter format',
+ udf_function: 'UDF Function',
+ unlimited: 'unlimited',
+ please_select_source_connector_type: 'Please select source connector type',
+ please_select_source_datasource_id: 'Please select source datasource id',
+ please_enter_source_table_name: 'Please select source table name',
+ please_enter_filter_expression: 'Please enter filter expression',
+ please_enter_column_only_single_column_is_supported:
+ 'Please select column, only single column is supported',
+ please_enter_threshold_number_is_needed:
+ 'Please enter threshold number is needed',
+ please_enter_comparison_title: 'please select comparison title',
+ please_enter_statistics_execute_sql: 'Please enter statistics execute sql',
+ please_enter_statistics_name_the_alias_in_statistics_execute_sql:
+ 'Please enter statistics name the alias in statistics execute sql',
+ please_select_target_connector_type: 'Please select target connector type',
+ please_select_target_datasource: 'Please select target datasource',
+ please_enter_target_table: 'Please enter target table',
+ please_enter_target_filter_expression:
+ 'Please enter target filter expression',
+ please_enter_comparison_name_the_alias_in_comparison_execute_sql:
+ 'Please enter comparison name the alias in comparison execute sql',
+ please_enter_comparison_execute_sql: 'Please enter comparison execute sql',
+ please_enter_length_limit: 'Please enter length limit',
+ scan_type: 'Scan Type',
+ scan_interval: 'Scan Interval',
+ file_path: 'File Path',
+ file_path_tips: 'File Path(required)',
+ topic_name: 'Topic Name',
+ topic_name_tips: 'Topic Name(required)',
+ offset_time: 'Offset Time',
+ offset_time_required_tips:
+ // eslint-disable-next-line quotes
+ "Offset Time(required) and the format is ${'{'}system.biz.curdate{'}'}, $[yyyyMMdd] or yyyyMMdd",
+ offset_time_incorrect_tips:
+ // eslint-disable-next-line quotes
+ "Please enter the correct offset time format(${'{'}system.biz.curdate{'}'},$[yyyyMMdd],yyyyMMdd).",
+ bootstrap_servers: 'Bootstrap Servers',
+ bootstrap_servers_tips: 'Bootstrap Servers(required)',
+ group_id: 'GroupId',
+ group_id_tips: 'GroupId(required)',
+ key_deserializer: 'Key Deserializer',
+ key_deserializer_tips: 'Key Deserializer(required)',
+ value_deserializer: 'Value Deserializer',
+ value_deserializer_tips: 'Value Deserializer(required)',
+ next_loop_custom_rule: 'Custom Next Loop Rule',
+ script_type: 'Script Type',
+ next_loop_date_tip:
+ 'The script return value is in date format: yyyy-MM-dd HH:mm:ss',
+ next_loop_timezone_tip:
+ 'Note that the return date is consistent with the scheduled time zone.',
+ next_loop_card: 'Card',
+ next_loop_card_tips: 'Card(required)',
+ dependency_strategy: 'Dependency Strategy',
+ failure: 'Failure',
+ continue: 'Continue',
+ wait: 'Wait',
+ failure_continue_tips:
+ 'When a dependency fails, the current node continues execution.',
+ failure_wait_tips:
+ 'When a dependency fails, the current node waits for the dependency to succeed and then continues execution.',
+ hive_cli_task_execution_type: 'Hive Cli task type',
+ hive_sql_script: 'Hive SQL script',
+ hive_cli_options: 'Hive Cli options',
+ hive_cli_options_tips: 'Please input your HIVE CLI options, like --verbose',
+ natural: 'Natural Day',
+ business: 'Business Date',
+ card: 'Card',
+ rename: 'Rename',
+ name_node: 'Name',
+ custom_config: 'Custom Config',
+ engine: 'engine',
+ engine_tips: 'Please select engine',
+ run_mode: 'Run Mode',
+ cart_null_tips: 'The workflow has not set the card value',
+ offline_task: 'Offline Task',
+ stream_task: 'Stream Task',
+ whale_seatunnel_task_tips: 'Please select task',
+ execute_type: 'Execute Type',
+ java_option_tips: 'Please input Java Option',
+ dependent_path: 'Dependent Package Path',
+ dependent_path_tips: 'Please input dependent package path',
+ local_file: 'Local File',
+ git_file: 'Git File',
+ break_continue: 'Break continue',
+ remote_connection: 'Remote Connection',
+ connection_type: 'Connection Type',
+ source_name: 'Source Name',
+ ssh: 'SSH',
+ connection_type_tips: 'Connection type is required',
+ source_name_tips: 'Source name is required',
+ folder_name: 'Folder Name',
+ mapping_name: 'Informatica Workflow Name',
+ target_name: 'Target Name',
+ folder_name_tips: 'Please choose folder name',
+ mapping_name_tips: 'Please choose informatica workflow name',
+ source_type_tips: 'Please choose source type',
+ target_type_tips: 'Please choose target type',
+ source_name_tips_infa: 'Please enter source name',
+ target_name_tips: 'Please enter target name'
+ },
+ isolation: {
+ upload_isolation_tasks: 'Upload Isolation Tasks',
+ download_template: 'Download Template',
+ task_name: 'Task Name',
+ workflow_instance_name: 'Workflow Instance Name',
+ operation_status: 'Operation Status',
+ create_time: 'Create Time',
+ online_isolation: 'Online Isolation',
+ cancel_isolation: 'Cancel Isolation',
+ task_isolation: 'Task Isolation',
+ local_upload: 'Local Upload',
+ isolation_tasks: 'Isolation tasks',
+ show_more: 'Show More',
+ previous: 'Previous',
+ next: 'Next',
+ upload_tips: 'Only supports excel, and only supports one file at a time.',
+ sure: 'Sure',
+ cancel: 'Cancel',
+ operation: 'Operation',
+ online: 'Online',
+ offline: 'Offline',
+ total_items: 'Total {total} items',
+ file_tips: 'Please select an excel file.'
+ },
+ synchronization_definition: {
+ node_prev_check_tips: 'The current node is not connected to the previous node',
+ create_synchronization_task: 'Create Synchronization Task',
+ edit_synchronization_task: 'Edit Synchronization Task',
+ synchronization_task_name: 'Synchronization Task Name',
+ task_describe: 'Task Describe',
+ create_user: 'Create User',
+ create_time: 'Create Time',
+ update_user: 'Update User',
+ update_time: 'Update Time',
+ operation: 'Operation',
+ edit: 'Edit',
+ start: 'start',
+ delete: 'Delete',
+ delete_confirm: 'Delete?',
+ task_name_tips: 'Please entry task name',
+ task_describe_tips: 'Please entry task describe',
+ task_name_validate: 'Task name cannot be empty',
+ copy: 'Copy',
+ open_full_screen: 'Open Full Screen',
+ close_full_screen: 'Close Full Screen',
+ format: 'Format',
+ save: 'Save',
+ close: 'Close',
+ layout_type: 'Layout Type',
+ rows: 'Rows',
+ cols: 'Cols',
+ dagre: 'Dagre',
+ grid: 'Grid',
+ format_canvas: 'Format Canvas',
+ setting: 'Setting',
+ task_name: 'Task Name',
+ description: 'Description',
+ engine: 'Engine',
+ task_name_placeholder: 'Please entry task name',
+ description_placeholder: 'Please entry description',
+ node_name_validate: 'Node name is not empty',
+ node_name: 'Node Name',
+ node_name_placeholder: 'Please entry node name',
+ transforms: 'Transforms',
+ source_and_sink: 'Source / Sink',
+ confirm: 'Confirm',
+ cancel: 'Cancel',
+ configuration: 'Configuration',
+ model: 'Model',
+ business_model: 'Business Model',
+ whole_library_sync: 'Whole Library Synchronization',
+ data_integration: 'Data Integration',
+ source_name: 'Source Name',
+ source_name_validate: 'Source name is not empty',
+ scene_mode: 'Scene Mode',
+ multi_table_sync: 'Multi Table Synchronization',
+ sub_library_and_sub_table: 'Sub-library And Sub-table',
+ single_table_sync: 'Single Table Synchronization',
+ database: 'Database',
+ table_name: 'Table Name',
+ field_name: 'Field Name',
+ field_type: 'Field Type',
+ non_empty: 'Non Empty',
+ field_comment: 'Field Comment',
+ input_table_structure: 'Input Table Structure',
+ output_table_structure: 'Output Table Structure',
+ exclude_kind: 'Exclude Kind',
+ include_kind: 'Include Kind',
+ exclude_kind_validate: 'Exclude kind is not empty',
+ include_kind_validate: 'Include kind is not empty',
+ database_validate: 'Database is not empty',
+ table_name_validate: 'Table name is not empty',
+ primary_key: 'Primary Key',
+ default_value: 'Default Value',
+ scene_mode_validate: 'Scene mode is not empty',
+ kind: 'Kind',
+ delete_empty_tips: 'Please select a node',
+ database_exception_message:
+ 'database exception,has been cleared in the form',
+ table_exception_message: 'table exception,has been cleared in the form',
+ start_node_tips: 'The starting node be source node',
+ end_node_tips: 'The ending node be sink node',
+ save_node_tips: 'Please save the nodes on the canvas first',
+ table_sync: 'Table to be synchronized',
+ selected_table: 'Selected table',
+ original_field: 'Original Field',
+ name_tips: 'Please enter a field name',
+ move_to_top: 'Move to top',
+ move_to_bottom: 'Move to bottom',
+ move_up: 'Move up',
+ move_down: 'Move down',
+ yes: 'Yes',
+ no: 'No',
+ split: 'MultiFieldSplit',
+ split_field: 'Split Field',
+ separator: 'Separator',
+ separator_tips: 'Please enter a separator',
+ segmented_fields: 'Segmented fields',
+ segmented_fields_placeholder: 'If two fields are separated, you can fill in field1, field2',
+ copy_field: 'Copy Field',
+ check_model: 'Please check the model information',
+ sql_content_label: 'sql',
+ sql_content_label_placeholder: 'please input the SQL statement',
+ query_validate: 'please input the SQL statement',
+
+ },
+ synchronization_instance: {
+ pipeline_id: 'Pipeline Id',
+ source: 'Source',
+ sink: 'Sink',
+ run_often: 'Run Often',
+ fail: 'Fail',
+ running: 'Running',
+ pause: 'Pause',
+ success: 'Success',
+ state: 'State',
+ start_time: 'Start Time',
+ end_time: 'End Time',
+ operation: 'Operation',
+ real_time_sync: 'Real Time Sync',
+ offline_sync: 'Offline Sync',
+ sync_task_definition: 'Sync Task Definition',
+ data_pipeline_running_instance: 'Data Pipeline Running Instance',
+ task_name: 'Task Name',
+ workflow_instance: 'Workflow Instance',
+ execute_user: 'Execute User',
+ host: 'Host',
+ amount_of_data_read: 'Amount Of Data Read (Row)',
+ read_rate: 'Read Rate (Row / Second)',
+ processing_rate: 'Processing Rate (Row / Second)',
+ amount_of_data_written: 'Amount Of Data Written (Row)',
+ delay_of_data: 'Delay Of Data (Second)',
+ node_type: 'Node Type',
+ submit_time: 'Submit Time',
+ run_time: 'Run Time',
+ number_of_retries: 'Number Of Retries',
+ rerun_mark: 'Rerun Mark',
+ clean_state: 'Clear and run again',
+ forced_success: 'Forced Success',
+ view_log: 'View Log',
+ download_log: 'Download Log',
+ description: 'Description',
+ engine: 'Engine',
+ write: 'Write',
+ read: 'Read',
+ line: 'lines'
+ },
+ menu: {
+ fav: 'Favorites',
+ universal: 'Universal',
+ cloud: 'Cloud',
+ logic: 'Logic',
+ di: 'Data Integration',
+ dq: 'Data Quality',
+ ml: 'Machine Learning',
+ other: 'Other'
+ },
+ member: {
+ alias: 'Alias',
+ role_name: 'Role Name',
+ member_manage: 'Member Manage',
+ new_member: 'New Member',
+ remove_member: 'Remove Member',
+ confirm: 'Confirm',
+ cancel: 'Cancel',
+ edit: 'Edit',
+ operation: 'Operation'
+ },
+ synchronizing_task_instance: 'Synchronizing task instances',
+ task_instance: 'Task instance',
+ column: 'Column',
+ all_column: 'All',
+ select_workflow_instance: 'Select the workflow instance',
+ select_workflow_definition: 'Select the workflow definition',
+ select_task_instance: 'Select the task instance',
+ can_not_many: 'Cross-project operations are not yet supported',
+ all_project: 'All projects',
+ next_step: 'Next step',
+ pre_step: 'Last step',
+ project_name: 'Project Name'
+}
diff --git a/seatunnel-ui/src/store/theme/types.ts b/seatunnel-ui/src/locales/en_US/theme.ts
similarity index 91%
copy from seatunnel-ui/src/store/theme/types.ts
copy to seatunnel-ui/src/locales/en_US/theme.ts
index fa7e56dd..4d2768b3 100644
--- a/seatunnel-ui/src/store/theme/types.ts
+++ b/seatunnel-ui/src/locales/en_US/theme.ts
@@ -15,8 +15,8 @@
* limitations under the License.
*/
-interface ThemeState {
- darkTheme: boolean
+export default {
+ light: 'Light',
+ dark: 'Dark',
+ dark_blue: 'Dark Blue'
}
-
-export { ThemeState }
diff --git a/seatunnel-ui/src/themes/modules/dark.ts b/seatunnel-ui/src/locales/zh_CN/hook.ts
similarity index 94%
copy from seatunnel-ui/src/themes/modules/dark.ts
copy to seatunnel-ui/src/locales/zh_CN/hook.ts
index 5473e6f2..53acfd6c 100644
--- a/seatunnel-ui/src/themes/modules/dark.ts
+++ b/seatunnel-ui/src/locales/zh_CN/hook.ts
@@ -15,6 +15,6 @@
* limitations under the License.
*/
-const dark = {}
-
-export default dark
+export default {
+ copy_success: '复制成功'
+}
diff --git a/seatunnel-ui/src/locales/zh_CN/index.ts b/seatunnel-ui/src/locales/zh_CN/index.ts
index 8ecf70c4..a7d45434 100644
--- a/seatunnel-ui/src/locales/zh_CN/index.ts
+++ b/seatunnel-ui/src/locales/zh_CN/index.ts
@@ -26,6 +26,9 @@ import tasks from '@/locales/zh_CN/tasks'
import setting from '@/locales/zh_CN/setting'
import datasource from '@/locales/zh_CN/datasource'
import virtual_tables from '@/locales/zh_CN/virtual-tables'
+import theme from '@/locales/zh_CN/theme'
+import project from '@/locales/zh_CN/project'
+import hook from '@/locales/zh_CN/hook'
export default {
login,
@@ -38,5 +41,8 @@ export default {
tasks,
setting,
datasource,
- virtual_tables
+ virtual_tables,
+ theme,
+ project,
+ hook
}
diff --git a/seatunnel-ui/src/locales/zh_CN/menu.ts b/seatunnel-ui/src/locales/zh_CN/menu.ts
index 1ab59deb..2d3acd83 100644
--- a/seatunnel-ui/src/locales/zh_CN/menu.ts
+++ b/seatunnel-ui/src/locales/zh_CN/menu.ts
@@ -24,5 +24,7 @@ export default {
logout: '登出',
tasks: '任务',
datasource: '数据源',
- virtual_tables: '虚拟表'
+ virtual_tables: '虚拟表',
+ sync_task_definition: '同步任务定义',
+ sync_task_instance: '同步任务实例',
}
diff --git a/seatunnel-ui/src/locales/zh_CN/project.ts b/seatunnel-ui/src/locales/zh_CN/project.ts
new file mode 100644
index 00000000..55e2ce1e
--- /dev/null
+++ b/seatunnel-ui/src/locales/zh_CN/project.ts
@@ -0,0 +1,1143 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+export default {
+ list: {
+ create_project: '创建项目',
+ edit_project: '编辑项目',
+ project_list: '项目列表',
+ project_tips: '请输入项目名称',
+ description_tips: '请输入项目描述',
+ username_tips: '请输入所属用户',
+ project_name: '项目名称',
+ project_description: '项目描述',
+ owned_users: '所属用户',
+ workflow_define_count: '工作流定义数',
+ process_instance_running_count: '正在运行的流程数',
+ description: '描述',
+ create_time: '创建时间',
+ update_time: '更新时间',
+ operation: '操作',
+ edit: '编辑',
+ delete: '删除',
+ confirm: '确定',
+ cancel: '取消',
+ delete_confirm: '确定删除吗?',
+ member_manage: '成员管理',
+ data_columns: '列'
+ },
+ overview: {
+ task_state_statistics: '任务状态统计',
+ process_state_statistics: '流程状态统计',
+ process_definition_statistics: '流程定义统计',
+ number: '数量',
+ state: '状态',
+ submitted_success: '提交成功',
+ running_execution: '正在运行',
+ ready_pause: '准备暂停',
+ pause: '暂停',
+ ready_stop: '准备停止',
+ stop: '停止',
+ failure: '失败',
+ success: '成功',
+ need_fault_tolerance: '需要容错',
+ kill: 'KILL',
+ waiting_thread: '等待线程',
+ waiting_depend: '等待依赖完成',
+ delay_execution: '延时执行',
+ forced_success: '强制成功',
+ serial_wait: '串行等待',
+ dispatch: '派发',
+ ready_block: '准备阻断',
+ block: '阻断',
+ pause_by_isolation: '隔离暂停',
+ kill_by_isolation: '隔离KILL',
+ pause_by_coronation: '加冕暂停',
+ forbidden_by_coronation: '加冕禁止执行'
+ },
+ workflow: {
+ copy_judge_tips: '当前工作流中,引用到牌名称为$value的节点。',
+ workflow_relation: '工作流关系',
+ create_workflow: '创建工作流',
+ select_project: '选择项目',
+ choose_project: '指定项目',
+ import_workflow: '导入工作流',
+ export_workflow: '导出工作流',
+ workflow_name: '工作流名称',
+ workflow_instance_name: '工作流实例名称',
+ current_selection: '当前选择',
+ online: '已上线',
+ offline: '已下线',
+ refresh: '刷新',
+ show_hide_label: '显示 / 隐藏标签',
+ schedule_start_time: '定时开始时间',
+ schedule_end_time: '定时结束时间',
+ crontab_expression: 'Crontab',
+ workflow_publish_status: '工作流上线状态',
+ workflow_definition: '工作流定义',
+ workflow_instance: '工作流实例',
+ status: '状态',
+ create_time: '创建时间',
+ update_time: '更新时间',
+ description: '描述',
+ create_user: '创建用户',
+ modify_user: '修改用户',
+ operation: '操作',
+ edit: '编辑',
+ confirm: '确定',
+ cancel: '取消',
+ start: '运行',
+ timing: '定时',
+ up_line: '上线',
+ down_line: '下线',
+ copy_workflow: '复制工作流',
+ delete: '删除',
+ tree_view: '工作流树形图',
+ tree_limit: '限制大小',
+ export: '导出',
+ batch_copy: '复制',
+ version_info: '版本信息',
+ version: '版本',
+ undo: '撤销',
+ redo: '恢复',
+ file_upload: '文件上传',
+ upload_file: '上传文件',
+ import_type: '导入类型',
+ export_type: '导出类型',
+ error_info: '模版格式有误,请确认后再次上传',
+ upload: '上传',
+ file_name: '文件名称',
+ success: '成功',
+ parameter_configuration: '参数配置',
+ set_parameters_before_timing: '定时前请先设置参数',
+ failure_strategy: '失败策略',
+ node_execution: '节点执行',
+ backward_execution: '向后执行',
+ forward_execution: '向前执行',
+ current_node_execution: '仅执行当前节点',
+ notification_strategy: '通知策略',
+ workflow_priority: '流程优先级',
+ worker_group: 'Worker分组',
+ environment_name: '环境名称',
+ alarm_group: '告警组',
+ calendar: '日历',
+ cut_day_time: '日切时间',
+ card: '牌',
+ card_value: '牌值',
+ complement_data: '补数',
+ startup_parameter: '启动参数',
+ whether_dry_run: '是否空跑',
+ continue: '继续',
+ end: '结束',
+ none_send: '都不发',
+ success_send: '成功发',
+ failure_send: '失败发',
+ all_send: '成功或失败都发',
+ whether_complement_data: '是否是补数',
+ data_date: '数据日期',
+ select_date: '日期选择',
+ enter_date: '手动输入',
+ data_date_tips: '格式为yyyy-MM-dd HH:mm:ss,多个逗号分割',
+ data_date_limit: '输入日期不满足<=100条',
+ mode_of_execution: '执行方式',
+ serial_execution: '串行执行',
+ parallel_execution: '并行执行',
+ parallelism: '并行度',
+ custom_parallelism: '自定义并行度',
+ please_enter_parallelism: '请输入并行度',
+ please_choose: '请选择',
+ start_time: '开始时间',
+ end_time: '结束时间',
+ delete_confirm: '确定删除吗?',
+ pause_recovery: '暂停恢复',
+ pause_recovery_confirm: '确定暂停恢复吗?',
+ suspend: '暂停',
+ suspend_confirm: '确定暂停吗?',
+ stop_recovery: '停止恢复',
+ stop_recovery_confirm: '确定停止恢复吗?',
+ rerun_confirm: '确定重跑吗?',
+ stop_confirm: '确定停止吗?',
+ online_confirm: '确定上线吗?',
+ offline_confirm: '确定下线吗?',
+ enter_name_tips: '请输入名称',
+ uploaded_file_tips: '上传文件不能为空',
+ switch_version: '切换到该版本',
+ confirm_switch_version: '确定切换到该版本吗?',
+ current_version: '当前版本',
+ run_type: '运行类型',
+ scheduling_time: '调度时间',
+ duration: '运行时长',
+ run_times: '运行次数',
+ fault_tolerant_sign: '容错标识',
+ dry_run_flag: '空跑标识',
+ executor: '执行用户',
+ host: '主机',
+ start_process: '启动工作流',
+ start_from_state_clean_tasks: '从状态清除任务开始执行',
+ execute_from_the_current_node: '从当前节点开始执行',
+ recover_tolerance_fault_process: '恢复被容错的工作流',
+ resume_the_suspension_process: '恢复运行流程',
+ execute_from_the_failed_nodes: '从失败节点开始执行',
+ scheduling_execution: '调度执行',
+ rerun: '重跑',
+ stop: '停止',
+ pause: '暂停',
+ recovery_waiting_thread: '恢复等待线程',
+ recover_serial_wait: '串行恢复',
+ recovery_suspend: '恢复运行',
+ dependent_chain_rerun: '依赖链重跑',
+ dependent_chain_recovery: '依赖链恢复',
+ failed_to_retry: '重跑失败任务',
+ gantt: '甘特图',
+ name: '名称',
+ all_status: '全部状态',
+ submit_success: '提交成功',
+ running: '正在运行',
+ ready_to_pause: '准备暂停',
+ ready_to_stop: '准备停止',
+ failed: '失败',
+ need_fault_tolerance: '需要容错',
+ kill: 'Kill',
+ waiting_for_thread: '等待线程',
+ waiting_for_dependence: '等待依赖',
+ waiting_for_dependency_to_complete: '等待依赖完成',
+ delay_execution: '延时执行',
+ forced_success: '强制成功',
+ serial_wait: '串行等待',
+ dispatch: '派发',
+ executing: '正在执行',
+ startup_type: '启动类型',
+ complement_range: '补数范围',
+ parameters_variables: '参数变量',
+ global_parameters: '全局参数',
+ local_parameters: '局部参数',
+ type: '类型',
+ retry_count: '重试次数',
+ submit_time: '提交时间',
+ refresh_status_succeeded: '刷新状态成功',
+ view_log: '查看日志',
+ update_log_success: '更新日志成功',
+ no_more_log: '暂无更多日志',
+ no_log: '暂无日志',
+ loading_log: '正在努力请求日志中...',
+ close: '关闭',
+ download_log: '下载日志',
+ refresh_log: '刷新日志',
+ enter_full_screen: '进入全屏',
+ cancel_full_screen: '取消全屏',
+ task_state: '任务状态',
+ mode_of_dependent: '依赖模式',
+ open: '打开',
+ project_name_required: '项目名称必填',
+ related_items: '关联项目',
+ project_name: '项目名称',
+ project_tips: '请选择项目',
+ workflow_relation_no_data_result_title: '工作流关系不存在',
+ workflow_relation_no_data_result_desc:
+ '目前没有任何工作流,请先创建工作流,再访问该页面',
+ timing_tips: '当前工作流缺少定时',
+ label: '标签',
+ estimated_end_time: '预计结束时间点',
+ download_template: '下载模板',
+ export_tips:
+ '目前支持导出shell、sql、Procedure、Dependent、Trigger、Data Quality任务类型',
+ timing_name: '定时名称',
+ next_run: '下次运行时间',
+ coronation: '加冕',
+ cancle_coronation: '取消加冕',
+ coronation_confirm: '确定加冕?',
+ cancle_coronation_confirm: '确定取消加冕?',
+ isolation: '隔离',
+ cancle_isolation__confirm: '确定取消隔离?',
+ cancle_isolation: '取消隔离',
+ isolation_confirm: '确定隔离?',
+ debug_tips: '调试前请先保存工作流',
+ impact_anaysis: '影响分析',
+ natural: '自然日',
+ scheduler_calendar: '调度日历',
+ card_calendar: '牌日历',
+ custom_calendar: '自定义日历',
+ count: '次',
+ choose_timing: '请选择定时',
+ instance: '工作流实例',
+ submitter: '提交人',
+ today: '今天',
+ last_day: '昨天',
+ last_three_day: '过去3天',
+ last_week: '过去7天',
+ last_month: '过去30天',
+ local_import: '本地导入',
+ workflow_update_list: '工作流更新列表',
+ update: '更新',
+ create: '新建',
+ last_update_user: '上次更新用户',
+ last_update_time: '上次修改时间',
+ dependent_chain_title: '以下工作流即将开始依赖链清除并重跑',
+ dependent_chain_condition_title: '以下工作流不满足执行条件'
+ },
+ task: {
+ cancel_full_screen: '取消全屏',
+ enter_full_screen: '全屏',
+ current_task_settings: '当前任务设置',
+ online: '已上线',
+ offline: '已下线',
+ task_name: '任务名称',
+ task_type: '任务类型',
+ create_task: '创建任务',
+ workflow_instance: '工作流实例',
+ workflow_name: '工作流名称',
+ workflow_name_tips: '请选择工作流名称',
+ workflow_state: '工作流状态',
+ version: '版本',
+ current_version: '当前版本',
+ switch_version: '切换到该版本',
+ confirm_switch_version: '确定切换到该版本吗?',
+ description: '描述',
+ move: '移动',
+ upstream_tasks: '上游任务',
+ executor: '执行用户',
+ node_type: '节点类型',
+ state: '状态',
+ submit_time: '提交时间',
+ start_time: '开始时间',
+ create_time: '创建时间',
+ update_time: '更新时间',
+ end_time: '结束时间',
+ duration: '运行时间',
+ retry_count: '重试次数',
+ dry_run_flag: '空跑标识',
+ host: '主机',
+ operation: '操作',
+ edit: '编辑',
+ delete: '删除',
+ delete_confirm: '确定删除吗?',
+ clean_state: '清除并重跑',
+ forced_success: '强制成功',
+ view_log: '查看日志',
+ download_log: '下载日志',
+ refresh: '刷新',
+ run_state: '运行状态',
+ workflow_instance_name: '工作流实例名称',
+ cancel_coronation: '取消加冕',
+ import_coronation_task: '导入加冕任务',
+ download_template: '下载模板',
+ cancel_confirm: '确定取消吗?',
+ task_coronation: '任务加冕',
+ upload_file: '上传文件',
+ local_import: '本地导入',
+ task_coronation_list: '加冕任务列表',
+ associate_upstream: '关联上游',
+ next_step: '下一步',
+ prev_step: '上一步',
+ confirm: '确定',
+ error_info: '模版格式有误,请确认后再次上传',
+ more: '显示更多',
+ success: '成功',
+ only_current: '仅当前',
+ current_downstream: '当前及下游',
+ cascaded_dependency_chain: '级联依赖链',
+ flag: '标记',
+ newest: '最新',
+ history: '历史',
+ confirm_operation: '确认操作',
+ detail: '详情',
+ return: '返回',
+ cancel: '取消',
+ dependent_chain_title: '以下任务即将开始依赖链清除并重跑',
+ dependent_chain_condition_title: '以下任务不满足执行条件',
+ dependent_chain_condition_tip1: '正在执行中的工作流实例不可执行',
+ dependent_chain_condition_tip2:
+ '任务不满足执行条件的不可执行(任务的前置任务为暂停或失败)',
+ dependent_chain_condition_tip3: '无操作权限的不可执行',
+ batch_confirm: '批量确认操作'
+ },
+ dag: {
+ create: '创建工作流',
+ start: '运行',
+ search: '搜索',
+ download_png: '下载工作流图片',
+ import_task: '导入任务',
+ download_template: '下载任务模版',
+ fullscreen_open: '全屏',
+ fullscreen_close: '退出全屏',
+ save: '保存',
+ close: '关闭',
+ format: '格式化',
+ refresh_dag_status: '刷新DAG状态',
+ layout_type: '布局类型',
+ grid_layout: '网格布局',
+ dagre_layout: '层次布局',
+ rows: '行数',
+ cols: '列数',
+ copy_success: '复制成功',
+ workflow_name: '工作流名称',
+ description: '描述',
+ tenant: '租户',
+ timeout_alert: '超时告警',
+ process_execute_type: '执行策略',
+ parallel: '并行',
+ serial_wait: '串行等待',
+ // serial_discard: '串行抛弃',
+ serial_priority: '串行优先',
+ recover_serial_wait: '串行恢复',
+ global_variables: '全局变量',
+ basic_info: '基本信息',
+ minute: '分',
+ key: '键',
+ value: '值',
+ success: '成功',
+ delete_cell: '删除选中的线或节点',
+ online_directly: '是否上线流程定义',
+ update_directly: '是否更新流程定义',
+ dag_name_empty: '工作流名称不能为空',
+ project_empty: '请选择项目',
+ positive_integer: '请输入大于 0 的正整数',
+ prop_empty: '自定义参数prop不能为空',
+ prop_repeat: 'prop中有重复',
+ node_not_created: '未创建节点保存失败',
+ copy_name: '复制名称',
+ view_variables: '查看变量',
+ startup_parameter: '启动参数',
+ online: '已上线',
+ label: '标签',
+ label_length_tips: '标签个数最多为3个',
+ unsave_tips: '请先保存工作流,然后执行运行操作。',
+ cancel: '取消',
+ force_close: '强制关闭',
+ close_tip: '关闭提醒',
+ close_content_tip:
+ '当前工作流已被修改,尚未保存,若强制关闭将丢失已编辑的内容。',
+ more: '更多',
+ run: '运行',
+ stop: '停止',
+ import: '导入',
+ code_import: '文件引入',
+ resource: '资源',
+ debug_tips: '正在获取日志,请等待...',
+ setting: '设置',
+ form_tips: '节点必填信息错误',
+ save_and_debug: '保存工作流并调试',
+ debug: '调试',
+ import_alert: '当脚本内容更新时,会同时更新被引用的文件内容。',
+ select_file: '选择文件'
+ },
+ node: {
+ return_back: '返回上一节点',
+ current_node_settings: '当前节点设置',
+ instructions: '使用说明',
+ view_history: '查看历史',
+ view_log: '查看日志',
+ enter_this_child_node: '进入该子节点',
+ name: '节点名称',
+ task_name: '任务名称',
+ task_name_tips: '任务名称(必填)',
+ name_tips: '请输入名称(必填)',
+ task_type: '任务类型',
+ task_type_tips: '请选择任务类型(必选)',
+ workflow_name: '工作流名称',
+ workflow_name_tips: '请选择工作流(必选)',
+ child_node: '子节点',
+ child_node_tips: '请选择子节点(必选)',
+ run_flag: '运行标志',
+ normal: '正常',
+ prohibition_execution: '禁止执行',
+ description: '描述',
+ description_tips: '请输入描述',
+ task_priority: '任务优先级',
+ worker_group: 'Worker分组',
+ worker_group_tips: '该Worker分组已经不存在,请选择正确的Worker分组!',
+ environment_name: '环境名称',
+ task_group_name: '任务组名称',
+ task_group_queue_priority: '组内优先级',
+ number_of_failed_retries: '失败重试次数',
+ times: '次',
+ failed_retry_interval: '失败重试间隔',
+ minute: '分',
+ second: '秒',
+ delay_execution_time: '延时执行时间',
+ state: '状态',
+ branch_flow: '分支流转',
+ cancel: '取消',
+ loading: '正在努力加载中...',
+ confirm: '确定',
+ success: '成功',
+ failed: '失败',
+ backfill_tips: '新创建子工作流还未执行,不能进入子工作流',
+ task_instance_tips: '该任务还未执行,不能进入子工作流',
+ branch_tips: '成功分支流转和失败分支流转不能选择同一个节点',
+ timeout_alarm: '超时告警',
+ timeout_strategy: '超时策略',
+ timeout_strategy_tips: '超时策略必须选一个',
+ timeout_failure: '超时失败',
+ timeout_period: '超时时长',
+ timeout_period_tips: '超时时长必须为正整数',
+ script: '脚本',
+ script_tips: '请输入脚本(必填)',
+ resources: '资源',
+ resources_tips: '请选择资源',
+ no_resources_tips: '请删除所有未授权或已删除资源',
+ useless_resources_tips: '未授权或已删除资源',
+ custom_parameters: '自定义参数',
+ copy_failed: '该浏览器不支持自动复制',
+ prop_tips: 'prop(必填)',
+ prop_repeat: 'prop中有重复',
+ value_tips: 'value(选填)',
+ value_required_tips: 'value(必填)',
+ pre_tasks: '前置任务',
+ program_type: '程序类型',
+ main_class: '主函数的Class',
+ main_class_tips: '请填写主函数的Class',
+ main_package: '主程序包',
+ main_package_tips: '请选择主程序包',
+ deploy_mode: '部署方式',
+ app_name: '任务名称',
+ app_name_tips: '请输入任务名称(选填)',
+ driver_cores: 'Driver核心数',
+ driver_cores_tips: '请输入Driver核心数',
+ driver_memory: 'Driver内存数',
+ driver_memory_tips: '请输入Driver内存数',
+ executor_number: 'Executor数量',
+ executor_number_tips: '请输入Executor数量',
+ executor_memory: 'Executor内存数',
+ executor_memory_tips: '请输入Executor内存数',
+ executor_cores: 'Executor核心数',
+ executor_cores_tips: '请输入Executor核心数',
+ main_arguments: '主程序参数',
+ main_arguments_tips: '请输入主程序参数',
+ option_parameters: '选项参数',
+ option_parameters_tips: '请输入选项参数',
+ positive_integer_tips: '应为正整数',
+ flink_version: 'Flink版本',
+ job_manager_memory: 'JobManager内存数',
+ job_manager_memory_tips: '请输入JobManager内存数',
+ task_manager_memory: 'TaskManager内存数',
+ task_manager_memory_tips: '请输入TaskManager内存数',
+ slot_number: 'Slot数量',
+ slot_number_tips: '请输入Slot数量',
+ parallelism: '并行度',
+ custom_parallelism: '自定义并行度',
+ parallelism_tips: '请输入并行度',
+ parallelism_number_tips: '并行度必须为正整数',
+ parallelism_complement_tips:
+ '如果存在大量任务需要补数时,可以利用自定义并行度将补数的任务线程设置成合理的数值,避免对服务器造成过大的影响',
+ task_manager_number: 'TaskManager数量',
+ task_manager_number_tips: '请输入TaskManager数量',
+ http_url: '请求地址',
+ http_url_tips: '请填写请求地址(必填)',
+ http_url_validator: '请求地址需包含http或者https',
+ http_method: '请求类型',
+ http_parameters: '请求参数',
+ http_check_condition: '校验条件',
+ http_condition: '校验内容',
+ http_condition_tips: '请填写校验内容',
+ timeout_settings: '超时设置',
+ connect_timeout: '连接超时',
+ ms: '毫秒',
+ socket_timeout: 'Socket超时',
+ status_code_default: '默认响应码200',
+ status_code_custom: '自定义响应码',
+ body_contains: '内容包含',
+ body_not_contains: '内容不包含',
+ body_check_custom: '自定义内容校验',
+ http_parameters_position: '参数位置',
+ target_task_name: '目标任务名',
+ target_task_name_tips: '请输入Pigeon任务名(必填)',
+ datasource_type: '数据源类型',
+ datasource_instances: '数据源实例',
+ datasource_require_tips: '数据源不能为空',
+ sql_type: 'SQL类型',
+ sql_type_query: '查询',
+ sql_type_non_query: '非查询',
+ sql_statement: 'SQL语句',
+ pre_sql_statement: '前置SQL语句',
+ post_sql_statement: '后置SQL语句',
+ sql_input_placeholder: '请输入非查询SQL语句',
+ sql_empty_tips: '语句不能为空',
+ procedure_method: 'SQL语句',
+ procedure_method_tips: '请输入存储脚本',
+ procedure_method_snippet:
+ '--请输入存储脚本 \n\n--调用存储过程: call <procedure-name>[(<arg1>,<arg2>, ...)] \n\n--调用存储函数:?= call <procedure-name>[(<arg1>,<arg2>, ...)]',
+ start: '运行',
+ edit: '编辑',
+ copy: '复制节点',
+ delete: '删除',
+ custom_job: '自定义任务',
+ custom_script: '自定义脚本',
+ sqoop_job_name: '任务名称',
+ sqoop_job_name_tips: '请输入任务名称(必填)',
+ direct: '流向',
+ hadoop_custom_params: 'Hadoop参数',
+ sqoop_advanced_parameters: 'Sqoop参数',
+ data_source: '数据来源',
+ type: '类型',
+ datasource: '数据源',
+ datasource_tips: '请选择数据源',
+ model_type: '模式',
+ form: '表单',
+ table: '表名',
+ table_tips: '请输入Mysql表名(必填)',
+ column_type: '列类型',
+ all_columns: '全表导入',
+ some_columns: '选择列',
+ column: '列',
+ column_tips: '请输入列名,用 , 隔开',
+ database: '数据库',
+ database_tips: '请输入Hive数据库(必填)',
+ zeppelin_note_id: 'zeppelinNoteId',
+ zeppelin_note_id_tips: '请输入zeppelin note id',
+ zeppelin_paragraph_id: 'zeppelinParagraphId',
+ zeppelin_production_note_directory: '生产模式下存放克隆note的目录',
+ zeppelin_production_note_directory_tips:
+ '请输入生产环境note目录以启用生产模式',
+ zeppelin_paragraph_id_tips: '请输入zeppelin paragraph id',
+ zeppelin_parameters: 'parameters',
+ zeppelin_parameters_tips: '请输入zeppelin dynamic form参数',
+ zeppelin_rest_endpoint: 'zeppelinRestEndpoint',
+ zeppelin_rest_endpoint_tips: '请输入zeppelin server的rest endpoint',
+ hive_table_tips: '请输入Hive表名(必填)',
+ hive_partition_keys: 'Hive 分区键',
+ hive_partition_keys_tips: '请输入分区键',
+ hive_partition_values: 'Hive 分区值',
+ hive_partition_values_tips: '请输入分区值',
+ export_dir: '数据源路径',
+ export_dir_tips: '请输入数据源路径(必填)',
+ sql_statement_tips: 'SQL语句(必填)',
+ map_column_hive: 'Hive类型映射',
+ map_column_java: 'Java类型映射',
+ data_target: '数据目的',
+ create_hive_table: '是否创建新表',
+ drop_delimiter: '是否删除分隔符',
+ over_write_src: '是否覆盖数据源',
+ hive_target_dir: 'Hive目标路径',
+ hive_target_dir_tips: '请输入Hive临时目录',
+ replace_delimiter: '替换分隔符',
+ replace_delimiter_tips: '请输入替换分隔符',
+ target_dir: '目标路径',
+ target_dir_tips: '请输入目标路径(必填)',
+ delete_target_dir: '是否删除目录',
+ compression_codec: '压缩类型',
+ file_type: '保存格式',
+ fields_terminated: '列分隔符',
+ fields_terminated_tips: '请输入列分隔符',
+ lines_terminated: '行分隔符',
+ lines_terminated_tips: '请输入行分隔符',
+ is_update: '是否更新',
+ update_key: '更新列',
+ update_key_tips: '请输入更新列',
+ update_mode: '更新类型',
+ only_update: '只更新',
+ allow_insert: '无更新便插入',
+ concurrency: '并发度',
+ concurrency_tips: '请输入并发度',
+ sea_tunnel_master: 'Master',
+ sea_tunnel_master_url: 'Master URL',
+ sea_tunnel_queue: '队列',
+ sea_tunnel_master_url_tips: '请直接填写地址,例如:127.0.0.1:7077',
+ switch_condition: '条件',
+ switch_branch_flow: '分支流转',
+ switch_branch_flow_tips: '请选择流转分支',
+ and: '且',
+ or: '或',
+ datax_custom_template: '自定义模板',
+ datax_json_template: 'JSON',
+ datax_target_datasource_type: '目标源类型',
+ datax_target_database: '目标源实例',
+ datax_target_table: '目标表',
+ datax_target_table_tips: '请输入目标表名',
+ datax_target_database_pre_sql: '目标库前置SQL',
+ datax_target_database_post_sql: '目标库后置SQL',
+ datax_non_query_sql_tips: '请输入非查询SQL语句',
+ datax_job_speed_byte: '限流(字节数)',
+ datax_job_speed_byte_info: '(KB,0代表不限制)',
+ datax_job_speed_record: '限流(记录数)',
+ datax_job_speed_record_info: '(0代表不限制)',
+ datax_job_runtime_memory: '运行内存',
+ datax_job_runtime_memory_xms: '最小内存',
+ datax_job_runtime_memory_xmx: '最大内存',
+ datax_job_runtime_memory_unit: 'G',
+ chunjun_json_template: 'JSON 脚本',
+ current_hour: '当前小时',
+ last_1_hour: '前1小时',
+ last_2_hour: '前2小时',
+ last_3_hour: '前3小时',
+ last_24_hour: '前24小时',
+ today: '今天',
+ last_1_days: '昨天',
+ last_2_days: '前两天',
+ last_3_days: '前三天',
+ last_7_days: '前七天',
+ this_week: '本周',
+ last_week: '上周',
+ last_monday: '上周一',
+ last_tuesday: '上周二',
+ last_wednesday: '上周三',
+ last_thursday: '上周四',
+ last_friday: '上周五',
+ last_saturday: '上周六',
+ last_sunday: '上周日',
+ this_month: '本月',
+ this_month_begin: '本月初',
+ last_month: '上月',
+ last_month_begin: '上月初',
+ last_month_end: '上月末',
+ month: '月',
+ week: '周',
+ day: '日',
+ hour: '时',
+ add_dependency: '添加依赖',
+ waiting_dependent_start: '等待依赖启动',
+ check_interval: '检查间隔',
+ waiting_dependent_complete: '等待依赖完成',
+ project_name: '项目名称',
+ project_name_tips: '项目名称(必填)',
+ process_name: '工作流名称',
+ process_name_tips: '工作流名称(必填)',
+ cycle_time: '时间周期',
+ cycle_time_tips: '时间周期(必填)',
+ date_tips: '日期(必填)',
+ rule_name: '规则名称',
+ null_check: '空值检测',
+ custom_sql: '自定义SQL',
+ multi_table_accuracy: '多表准确性',
+ multi_table_value_comparison: '两表值比对',
+ field_length_check: '字段长度校验',
+ uniqueness_check: '唯一性校验',
+ regexp_check: '正则表达式',
+ timeliness_check: '及时性校验',
+ enumeration_check: '枚举值校验',
+ table_count_check: '表行数校验',
+ src_connector_type: '源数据类型',
+ src_datasource_id: '源数据源',
+ src_table: '源数据表',
+ src_filter: '源表过滤条件',
+ src_field: '源表检测列',
+ statistics_name: '实际值名',
+ check_type: '校验方式',
+ operator: '校验操作符',
+ threshold: '阈值',
+ failure_strategy: '失败策略',
+ target_connector_type: '目标数据类型',
+ target_datasource_id: '目标数据源',
+ target_table: '目标数据表',
+ target_filter: '目标表过滤条件',
+ mapping_columns: 'ON语句',
+ statistics_execute_sql: '实际值计算SQL',
+ comparison_name: '期望值名',
+ comparison_execute_sql: '期望值计算SQL',
+ comparison_type: '期望值类型',
+ writer_connector_type: '输出数据类型',
+ writer_datasource_id: '输出数据源',
+ target_field: '目标表检测列',
+ field_length: '字段长度限制',
+ logic_operator: '逻辑操作符',
+ regexp_pattern: '正则表达式',
+ deadline: '截止时间',
+ datetime_format: '时间格式',
+ enum_list: '枚举值列表',
+ begin_time: '起始时间',
+ fix_value: '固定值',
+ fix_value_tips: '请输入固定值',
+ required: '必填',
+ emr_flow_define_json: 'jobFlowDefineJson',
+ emr_flow_define_json_tips: '请输入工作流定义',
+ emr_steps_define_json: 'stepsDefineJson',
+ emr_steps_define_json_tips: '请输入EMR步骤定义',
+ send_email: '发送邮件',
+ log_display: '日志显示',
+ rows_of_result: '行查询结果',
+ title: '主题',
+ title_tips: '请输入邮件主题',
+ alarm_group: '告警组',
+ alarm_group_tips: '告警组必填',
+ integer_tips: '请输入一个正整数',
+ sql_parameter: 'sql参数',
+ format_tips: '请输入格式为',
+ udf_function: 'UDF函数',
+ unlimited: '不限制',
+ please_select_source_connector_type: '请选择源数据类型',
+ please_select_source_datasource_id: '请选择源数据源',
+ please_enter_source_table_name: '请选择源数据表',
+ please_enter_filter_expression: '请输入源表过滤条件',
+ please_enter_column_only_single_column_is_supported: '请选择源表检测列',
+ please_enter_threshold_number_is_needed: '请输入阈值',
+ please_enter_comparison_title: '请选择期望值类型',
+ please_enter_statistics_execute_sql: '请输入实际值计算SQL',
+ please_enter_statistics_name_the_alias_in_statistics_execute_sql:
+ '请输入实际值名',
+ please_select_target_connector_type: '请选择目标数据类型',
+ please_select_target_datasource: '请选择目标数据源',
+ please_enter_target_table: '请选择目标数据表',
+ please_enter_target_filter_expression: '请输入目标表过滤条件',
+ please_enter_comparison_name_the_alias_in_comparison_execute_sql:
+ '请输入期望值名',
+ please_enter_comparison_execute_sql: '请输入期望值计算SQL',
+ please_enter_length_limit: '请输入长度限制',
+ scan_type: '扫描类型',
+ scan_interval: '扫描间隔',
+ file_path: '文件地址',
+ file_path_tips: '文件地址(必填)',
+ topic_name: 'Topic名称',
+ topic_name_tips: 'Topic名称(必填)',
+ offset_time: 'Offset Time',
+ offset_time_required_tips:
+ // eslint-disable-next-line quotes
+ "Offset Time(必填),格式为${'{'}system.biz.curdate{'}'}、$[yyyyMMdd]或yyyyMMdd",
+ offset_time_incorrect_tips:
+ // eslint-disable-next-line quotes
+ "请输入正确的Offset Time格式(${'{'}system.biz.curdate{'}'}、$[yyyyMMdd]或yyyyMMdd)",
+ bootstrap_servers: 'Bootstrap Servers',
+ bootstrap_servers_tips: 'Bootstrap Servers(必填)',
+ group_id: 'GroupId',
+ group_id_tips: 'GroupId(必填)',
+ key_deserializer: 'Key Deserializer',
+ key_deserializer_tips: 'Key Deserializer(必填)',
+ value_deserializer: 'Value Deserializer',
+ value_deserializer_tips: 'Value Deserializer(必填)',
+ next_loop_custom_rule: '自定义牌规则',
+ script_type: '脚本类型',
+ next_loop_date_tip: '脚本返回值为日期格式: yyyy-MM-dd HH:mm:ss',
+ next_loop_timezone_tip: '注意:返回日期与调度时区保持一致',
+ next_loop_card: '牌(必填)',
+ next_loop_card_tips: '请选择牌',
+ dependency_strategy: '依赖策略',
+ failure: '失败',
+ continue: '继续',
+ wait: '等待',
+ failure_continue_tips: '依赖任务失败时,当前节点继续执行。',
+ failure_wait_tips: '依赖任务失败时,当前节点等待依赖成功,继续执行。',
+ hive_cli_task_execution_type: 'Hive Cli 任务类型',
+ hive_sql_script: 'Hive SQL 脚本',
+ hive_cli_options: 'Hive Cli 选项',
+ hive_cli_options_tips: '请输入您的HIVE CLI选项,如--verbose等',
+ jupyter_conda_env_name: 'condaEnvName',
+ jupyter_conda_env_name_tips: '请输入papermill所在的conda环境名',
+ jupyter_input_note_path: 'inputNotePath',
+ jupyter_input_note_path_tips: '请输入jupyter note的输入路径',
+ jupyter_output_note_path: 'outputNotePath',
+ jupyter_output_note_path_tips: '请输入jupyter note的输出路径',
+ jupyter_parameters: 'parameters',
+ jupyter_parameters_tips: '请输入jupyter parameterization参数',
+ jupyter_kernel: 'kernel',
+ jupyter_kernel_tips: '请输入jupyter kernel名',
+ jupyter_engine: 'engine',
+ jupyter_engine_tips: '请输入引擎名称',
+ jupyter_execution_timeout: 'executionTimeout',
+ jupyter_execution_timeout_tips: '请输入jupyter note cell的执行最长时间',
+ jupyter_start_timeout: 'startTimeout',
+ jupyter_start_timeout_tips: '请输入jupyter kernel的启动最长时间',
+ jupyter_others: 'others',
+ jupyter_others_tips: '请输入papermill的其他参数',
+ mlflow_algorithm: '算法',
+ mlflow_algorithm_tips: 'svm',
+ mlflow_params: '参数',
+ mlflow_params_tips: ' ',
+ mlflow_searchParams: '参数搜索空间',
+ mlflow_searchParams_tips: ' ',
+ mlflow_isSearchParams: '是否搜索参数',
+ mlflow_dataPath: '数据路径',
+ mlflow_dataPath_tips:
+ ' 文件/文件夹的绝对路径, 若文件需以.csv结尾, 文件夹需包含train.csv和test.csv ',
+ mlflow_dataPath_error_tips: ' 数据路径不能为空 ',
+ mlflow_experimentName: '实验名称',
+ mlflow_experimentName_tips: 'experiment_001',
+ mlflow_registerModel: '注册模型',
+ mlflow_modelName: '注册的模型名称',
+ mlflow_modelName_tips: 'model_001',
+ mlflow_mlflowTrackingUri: 'MLflow Tracking Server URI',
+ mlflow_mlflowTrackingUri_tips: 'http://127.0.0.1:5000',
+ mlflow_mlflowTrackingUri_error_tips: ' MLflow Tracking Server URI 不能为空',
+ mlflow_jobType: '任务类型',
+ mlflow_automlTool: 'AutoML工具',
+ mlflow_taskType: 'MLflow 任务类型',
+ mlflow_deployType: '部署类型',
+ mlflow_deployModelKey: '部署的模型URI',
+ mlflow_deployPort: '监听端口',
+ mlflowProjectRepository: '运行仓库',
+ mlflowProjectRepository_tips: '可以为git仓库或worker上的路径',
+ mlflowProjectVersion: '项目版本',
+ mlflowProjectVersion_tips: '项目git版本',
+ mlflow_cpuLimit: '最大cpu限制',
+ mlflow_memoryLimit: '最大内存限制',
+ openmldb_zk_address: 'zookeeper地址',
+ openmldb_zk_address_tips: '请输入zookeeper地址',
+ openmldb_zk_path: 'zookeeper路径',
+ openmldb_zk_path_tips: '请输入zookeeper路径',
+ openmldb_execute_mode: '执行模式',
+ openmldb_execute_mode_tips: '请选择执行模式',
+ openmldb_execute_mode_offline: '离线',
+ openmldb_execute_mode_online: '在线',
+ dvc_task_type: 'DVC任务类型',
+ dvc_repository: 'DVC仓库',
+ dvc_repository_tips: '请输入DVC仓库地址',
+ dvc_version: '数据版本',
+ dvc_version_tips: '数据版本标识,会以git tag的形式标记',
+ dvc_data_location: 'DVC仓库中的数据路径',
+ dvc_message: '提交信息',
+ dvc_load_save_data_path: 'Worker中数据路径',
+ dvc_store_url: '数据存储地址',
+ dvc_empty_tips: '该参数不能为空',
+ dinky_address: 'dinky 地址',
+ dinky_address_tips: '请输入 Dinky 地址',
+ dinky_task_id: 'dinky 作业ID',
+ dinky_task_id_tips: '请输入作业 ID',
+ dinky_online: '是否上线作业',
+ pytorch_script: 'python脚本',
+ pytorch_script_params: '脚本启动参数',
+ pytorch_other_params: '展开更多配置',
+ pytorch_python_path: 'python项目地址',
+ pytorch_is_create_environment: '是否创建新环境',
+ pytorch_python_command: 'python命令路径',
+ pytorch_python_command_tips: '若为空,则使用$PYTHON_HOME',
+ pytorch_python_env_tool: 'python环境管理工具',
+ pytorch_requirements: '依赖文件',
+ pytorch_conda_python_version: 'python版本',
+ pytorch_conda_python_version_tips: '请输入版本号,如 3.6, 3.7, 3.x等',
+ natural: '自然日',
+ business: '业务日期',
+ card: '牌',
+ rename: '重命名',
+ name_node: '命名',
+ custom_config: '自定义配置',
+ engine: '引擎',
+ engine_tips: '请选择引擎',
+ run_mode: '运行模式',
+ cart_null_tips: '工作流未设置牌值',
+ execute_type: '执行类型',
+ java_option_tips: '请输入Java Option',
+ dependent_path: '依赖包路径',
+ dependent_path_tips: '请输入依赖包路径',
+ offline_task: '离线任务',
+ stream_task: '实时任务',
+ local_file: '本地文件',
+ git_file: 'Git文件',
+ whale_seatunnel_task_tips: '请选择任务',
+ break_continue: '断点续传',
+ remote_connection: '远程连接',
+ connection_type: '连接类型',
+ source_name: '源名称',
+ ssh: 'SSH',
+ connection_type_tips: '连接类型不能为空',
+ source_name_tips: '源名称不能为空',
+ folder_name: '文件夹名称',
+ mapping_name: 'informatica工作流名称',
+ target_name: '目标名称',
+ folder_name_tips: '请选择文件夹名称(必填)',
+ mapping_name_tips: '请选择informatica工作流名称(必填)',
+ source_type_tips: '请选择源名称(必填)',
+ target_type_tips: '请选择目标名称(必填)',
+ source_name_tips_infa: '请输入源名称(必填)',
+ target_name_tips: '请输入目标名称(必填)'
+ },
+ isolation: {
+ upload_isolation_tasks: '导入隔离任务',
+ download_template: '下载模板',
+ task_name: '任务名称',
+ workflow_instance_name: '工作流实例名称',
+ operation_status: '运行状态',
+ create_time: '创建时间',
+ online_isolation: '上线隔离',
+ cancel_isolation: '取消隔离',
+ task_isolation: '任务隔离',
+ local_upload: '本地导入',
+ isolation_tasks: '隔离任务列表',
+ show_more: '显示更多',
+ previous: '上一步',
+ next: '下一步',
+ upload_tips: '仅支持上传Excel文件类型,每次只能上传一个Excel文件',
+ sure: '确定',
+ cancel: '取消',
+ operation: '操作',
+ online: '上线',
+ offline: '下线',
+ total_items: '共{total}条',
+ file_tips: '请选择一个excel文件'
+ },
+ synchronization_definition: {
+ node_prev_check_tips: '当前节点尚未连接前置节点',
+ create_synchronization_task: '创建同步任务',
+ edit_synchronization_task: '编辑同步任务',
+ synchronization_task_name: '同步任务名称',
+ task_describe: '任务描述',
+ create_user: '创建用户',
+ create_time: '创建时间',
+ update_user: '更新用户',
+ update_time: '更新时间',
+ operation: '操作',
+ edit: '编辑',
+ start: '运行',
+ delete: '删除',
+ delete_confirm: '确定删除吗?',
+ task_name_tips: '请输入任务名称',
+ task_describe_tips: '请输入任务描述',
+ task_name_validate: '任务名称不能为空',
+ copy: '复制',
+ open_full_screen: '打开全屏',
+ close_full_screen: '关闭全屏',
+ format: '格式化',
+ save: '保存',
+ close: '关闭',
+ layout_type: '布局类型',
+ rows: '行数',
+ cols: '列数',
+ dagre: '层次布局',
+ grid: '网格布局',
+ format_canvas: '格式化画布',
+ setting: '设置',
+ task_name: '任务名称',
+ description: '描述',
+ engine: '引擎',
+ task_name_placeholder: '请输入任务名称',
+ description_placeholder: '请输入描述',
+ node_name_validate: '节点名称不为空',
+ node_name: '节点名称',
+ node_name_placeholder: '请输入节点名称',
+ transforms: '处理与转换',
+ source_and_sink: '来源和目标',
+ confirm: '确定',
+ cancel: '取消',
+ configuration: '配置',
+ model: '模型',
+ business_model: '业务模型',
+ whole_library_sync: '整库同步',
+ data_integration: '数据集成',
+ source_name: '源名称',
+ source_name_validate: '源名称不能为空',
+ scene_mode: '场景模式',
+ multi_table_sync: '多表同步',
+ sub_library_and_sub_table: '分库分表',
+ single_table_sync: '单表同步',
+ database: '数据库',
+ table_name: '表名',
+ field_name: '字段名称',
+ field_type: '字段类型',
+ non_empty: '非空',
+ field_comment: '字段注释',
+ input_table_structure: '输入表结构',
+ output_table_structure: '输出表结构',
+ exclude_kind: '排除种类',
+ include_kind: '包括种类',
+ exclude_kind_validate: '排除种类不能为空',
+ include_kind_validate: '包括种类不能为空',
+ database_validate: '数据库不能为空',
+ table_name_validate: '表名不能为空',
+ primary_key: '主键',
+ default_value: '默认值',
+ scene_mode_validate: '场景模式不能为空',
+ kind: '类型',
+ delete_empty_tips: '请选择一个节点',
+ database_exception_message: '数据库异常,已在表单中被清除',
+ table_exception_message: '表异常,已在表单中被清除',
+ start_node_tips: '起始节点需要是Source节点',
+ end_node_tips: '结束节点需要是Sink节点',
+ save_node_tips: '请先保存画布中的节点',
+ table_sync: '待同步表',
+ selected_table: '已选中表',
+ original_field: '原字段',
+ name_tips: '请输入一个字段名',
+ move_to_top: '移动到顶部',
+ move_to_bottom: '移动到底部',
+ move_up: '向上一级',
+ move_down: '向下一级',
+ yes: '是',
+ no: '否',
+ split: '分割',
+ split_field: '字段拆分',
+ separator: '分割符',
+ separator_tips: '请输入自定义的分割符',
+ segmented_fields: '拆分后的字段',
+ segmented_fields_placeholder: '如分割出来两个字段,可以填写 field1, field2',
+ copy_field: '复制字段',
+ check_model: '请检查模型信息',
+ sql_content_label: 'sql',
+ sql_content_label_placeholder: '请输入sql语句',
+ query_validate: '请输入sql语句'
+ },
+ synchronization_instance: {
+ pipeline_id: 'Pipeline ID',
+ source: 'Source',
+ sink: 'Sink',
+ run_often: '运行时长',
+ fail: '失败',
+ running: '运行中',
+ pause: '暂停',
+ success: '成功',
+ state: '状态',
+ start_time: '开始时间',
+ end_time: '结束时间',
+ operation: '操作',
+ real_time_sync: '实时同步',
+ offline_sync: '离线同步',
+ sync_task_definition: '同步任务定义',
+ data_pipeline_running_instance: '数据管道运行实例',
+ task_name: '任务名称',
+ workflow_instance: '工作流实例',
+ execute_user: '执行用户',
+ host: '主机',
+ amount_of_data_read: '已读取数据量(行)',
+ read_rate: '读取速率(行/秒)',
+ processing_rate: '处理速率(行/秒)',
+ amount_of_data_written: '已写入数据量(行)',
+ delay_of_data: '数据延迟(秒)',
+ node_type: '节点类型',
+ submit_time: '提交时间',
+ run_time: '运行时间',
+ number_of_retries: '重试次数',
+ rerun_mark: '重跑标识',
+ clean_state: '清除并重跑',
+ forced_success: '强制成功',
+ view_log: '查看日志',
+ download_log: '下载日志',
+ description: '描述',
+ engine: '引擎',
+ write: '写',
+ read: '读',
+ line: '行'
+ },
+ menu: {
+ fav: '收藏组件',
+ universal: '通用组件',
+ cloud: '云',
+ logic: '逻辑节点',
+ di: '数据集成',
+ dq: '数据质量',
+ ml: '机器学习',
+ other: '其他'
+ },
+ member: {
+ alias: '用户名称',
+ role_name: '角色名称',
+ member_manage: '成员管理',
+ new_member: '新增成员',
+ remove_member: '移除成员',
+ confirm: '确定',
+ cancel: '取消',
+ edit: '编辑',
+ operation: '操作'
+ },
+ synchronizing_task_instance: '同步任务实例',
+ task_instance: '任务实例',
+ column: ' 列 ',
+ all_column: '全部',
+ select_workflow_instance: '请选择工作流实例',
+ select_workflow_definition: '请选择工作流定义',
+ select_task_instance: '请选择任务实例',
+ can_not_many: '暂不支持跨项目操作',
+ all_project: '全部项目',
+ next_step: '下一步',
+ pre_step: '上一步',
+ project_name: '项目名称'
+}
diff --git a/seatunnel-ui/src/store/theme/types.ts b/seatunnel-ui/src/locales/zh_CN/theme.ts
similarity index 91%
copy from seatunnel-ui/src/store/theme/types.ts
copy to seatunnel-ui/src/locales/zh_CN/theme.ts
index fa7e56dd..0cf3a867 100644
--- a/seatunnel-ui/src/store/theme/types.ts
+++ b/seatunnel-ui/src/locales/zh_CN/theme.ts
@@ -15,8 +15,8 @@
* limitations under the License.
*/
-interface ThemeState {
- darkTheme: boolean
+export default {
+ light: '浅色',
+ dark: '深色',
+ dark_blue: '深蓝色'
}
-
-export { ThemeState }
diff --git a/seatunnel-ui/src/main.ts b/seatunnel-ui/src/main.ts
index c648237c..0189a598 100644
--- a/seatunnel-ui/src/main.ts
+++ b/seatunnel-ui/src/main.ts
@@ -23,6 +23,7 @@ import i18n from '@/locales'
import router from './router'
import utils from '@/utils'
import './index.css'
+import './assets/styles/default.scss'
const meta = document.createElement('meta')
meta.name = 'naive-ui-style'
diff --git a/seatunnel-ui/src/router/data-pipes.ts b/seatunnel-ui/src/router/data-pipes.ts
index 9a06ede6..4065c7a0 100644
--- a/seatunnel-ui/src/router/data-pipes.ts
+++ b/seatunnel-ui/src/router/data-pipes.ts
@@ -35,7 +35,8 @@ export default {
name: 'data-pipes-list',
component: components['data-pipes-list'],
meta: {
- title: 'data-pipes-list'
+ title: 'data-pipes-list',
+ activeMenu: 'data-pipes'
}
},
{
@@ -43,7 +44,8 @@ export default {
name: 'data-pipes-detail',
component: components['data-pipes-detail'],
meta: {
- title: 'data-pipes-detail'
+ title: 'data-pipes-detail',
+ activeMenu: 'data-pipes'
}
},
{
@@ -51,7 +53,8 @@ export default {
name: 'data-pipes-edit',
component: components['data-pipes-edit'],
meta: {
- title: 'data-pipes-edit'
+ title: 'data-pipes-edit',
+ activeMenu: 'data-pipes'
}
},
{
@@ -59,7 +62,8 @@ export default {
name: 'data-pipes-create',
component: components['data-pipes-create'],
meta: {
- title: 'data-pipes-create'
+ title: 'data-pipes-create',
+ activeMenu: 'data-pipes'
}
}
]
diff --git a/seatunnel-ui/src/router/datasource.ts b/seatunnel-ui/src/router/datasource.ts
index 9a8de1cc..ae609ccf 100644
--- a/seatunnel-ui/src/router/datasource.ts
+++ b/seatunnel-ui/src/router/datasource.ts
@@ -35,7 +35,8 @@ export default {
name: 'datasource-list',
component: components['datasource-list'],
meta: {
- title: 'datasource-list'
+ title: 'datasource-list',
+ activeMenu: 'datasource'
}
},
{
@@ -43,7 +44,8 @@ export default {
name: 'datasource-create',
component: components['datasource-create'],
meta: {
- title: 'datasource-create'
+ title: 'datasource-create',
+ activeMenu: 'datasource'
}
},
{
@@ -51,7 +53,8 @@ export default {
name: 'datasource-edit',
component: components['datasource-create'],
meta: {
- title: 'datasource-edit'
+ title: 'datasource-edit',
+ activeMenu: 'datasource'
}
}
]
diff --git a/seatunnel-ui/src/router/jobs.ts b/seatunnel-ui/src/router/jobs.ts
index 24c21cb3..1f210ff3 100644
--- a/seatunnel-ui/src/router/jobs.ts
+++ b/seatunnel-ui/src/router/jobs.ts
@@ -35,7 +35,8 @@ export default {
name: 'jobs-list',
component: components['jobs-list'],
meta: {
- title: 'jobs-list'
+ title: 'jobs-list',
+ activeMenu: 'job'
}
}
]
diff --git a/seatunnel-ui/src/router/sync-task.ts b/seatunnel-ui/src/router/sync-task.ts
new file mode 100644
index 00000000..910e1877
--- /dev/null
+++ b/seatunnel-ui/src/router/sync-task.ts
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import utils from '@/utils'
+import type { Component } from 'vue'
+
+const modules = import.meta.glob('/src/views/**/**.tsx')
+const components: { [key: string]: Component } = utils.mapping(modules)
+
+export default {
+ path: '/tasks',
+ name: 'tasks',
+ meta: {
+ title: 'tasks'
+ },
+ redirect: { name: 'tasks-list' },
+ component: () => import('@/layouts/dashboard'),
+ children: [
+ {
+ path: '/task/synchronization-definition',
+ name: 'synchronization-definition',
+ component: components['projects-task-synchronization-definition'],
+ meta: {
+ title: '同步任务定义',
+ activeMenu: 'projects',
+ showSide: true
+ // auth: 'project:seatunnel-task:view'
+ }
+ },
+ {
+ path: '/task/synchronization-definition/:jobDefinitionCode',
+ name: 'synchronization-definition-dag',
+ component: components['projects-task-synchronization-definition-dag'],
+ meta: {
+ title: '同步任务定义画布',
+ activeMenu: 'projects',
+ activeSide: '/task/synchronization-definition',
+ showSide: true,
+ auth: ['project:seatunnel-task:create', 'project:seatunnel-task:update']
+ }
+ },
+ {
+ path: '/task/synchronization-instance',
+ name: 'synchronization-instance',
+ component: components['projects-task-synchronization-instance'],
+ meta: {
+ title: '同步任务实例',
+ activeMenu: 'projects',
+ showSide: true
+ // auth: 'project:seatunnel-task-instance:view'
+ }
+ },
+ {
+ path: '/task/synchronization-instance/:taskCode',
+ name: 'synchronization-instance-detail',
+ component: components['projects-task-synchronization-instance-detail'],
+ meta: {
+ title: '同步任务实例详情',
+ activeMenu: 'projects',
+ activeSide: '/task/synchronization-instance',
+ showSide: true,
+ auth: 'project:seatunnel-task-instance:details'
+ }
+ }
+ ]
+}
diff --git a/seatunnel-ui/src/router/tasks.ts b/seatunnel-ui/src/router/tasks.ts
index 8e1dd713..08b27fa1 100644
--- a/seatunnel-ui/src/router/tasks.ts
+++ b/seatunnel-ui/src/router/tasks.ts
@@ -27,15 +27,51 @@ export default {
meta: {
title: 'tasks'
},
- redirect: { name: 'tasks-list' },
+ redirect: { name: 'synchronization-definition' },
component: () => import('@/layouts/dashboard'),
children: [
{
- path: '/tasks/list',
- name: 'tasks-list',
- component: components['tasks-list'],
+ path: '/task/synchronization-definition',
+ name: 'synchronization-definition',
+ component: components['task-synchronization-definition'],
meta: {
- title: 'tasks-list'
+ title: '同步任务定义',
+ activeMenu: 'tasks',
+ activeSide: 'synchronization-definition',
+ showSide: true
+ }
+ },
+ {
+ path: '/task/synchronization-definition/:jobDefinitionCode',
+ name: 'synchronization-definition-dag',
+ component: components['task-synchronization-definition-dag'],
+ meta: {
+ title: '同步任务定义画布',
+ activeMenu: 'tasks',
+ activeSide: 'synchronization-definition',
+ showSide: true,
+ }
+ },
+ {
+ path: '/task/synchronization-instance',
+ name: 'synchronization-instance',
+ component: components['task-synchronization-instance'],
+ meta: {
+ title: '同步任务实例',
+ activeMenu: 'tasks',
+ activeSide: 'synchronization-instance',
+ showSide: true
+ }
+ },
+ {
+ path: '/task/synchronization-instance/:taskCode',
+ name: 'synchronization-instance-detail',
+ component: components['task-synchronization-instance-detail'],
+ meta: {
+ title: '同步任务实例详情',
+ activeMenu: 'tasks',
+ activeSide: 'synchronization-instance',
+ showSide: true,
}
}
]
diff --git a/seatunnel-ui/src/router/user-manage.ts b/seatunnel-ui/src/router/user-manage.ts
index be0dcdc5..e1803faa 100644
--- a/seatunnel-ui/src/router/user-manage.ts
+++ b/seatunnel-ui/src/router/user-manage.ts
@@ -35,7 +35,8 @@ export default {
name: 'user-manage-list',
component: components['user-manage-list'],
meta: {
- title: 'user-manage-list'
+ title: 'user-manage-list',
+ activeMenu: 'user-manage',
}
}
]
diff --git a/seatunnel-ui/src/router/virtual-tables.ts b/seatunnel-ui/src/router/virtual-tables.ts
index 9224d206..a097f2c0 100644
--- a/seatunnel-ui/src/router/virtual-tables.ts
+++ b/seatunnel-ui/src/router/virtual-tables.ts
@@ -35,7 +35,26 @@ export default {
name: 'virtual-tables-list',
component: components['virtual-tables-list'],
meta: {
- title: 'virtual-tables-list'
+ title: 'virtual-tables-list',
+ activeMenu: 'virtual-tables',
+ }
+ },
+ {
+ path: '/virtual-tables/creation',
+ name: 'virtual-tables-create',
+ component: components['virtual-tables-detail'],
+ meta: {
+ title: '虚拟表创建',
+ activeMenu: 'virtual-tables',
+ }
+ },
+ {
+ path: '/virtual-tables/:id',
+ name: 'virtual-tables-editor',
+ component: components['virtual-tables-detail'],
+ meta: {
+ title: '虚拟表编辑',
+ activeMenu: 'virtual-tables',
}
}
]
diff --git a/seatunnel-ui/src/service/data-source/index.ts b/seatunnel-ui/src/service/data-source/index.ts
new file mode 100644
index 00000000..58228e46
--- /dev/null
+++ b/seatunnel-ui/src/service/data-source/index.ts
@@ -0,0 +1,173 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { axios } from '@/service/service'
+import {
+ DatasourceListParameters,
+ DataSourceDetail,
+ DatasourceTestConnectParameters
+} from './types'
+
+const DATASOURCE_BASE_URL = '/datasource'
+
+export function createDatasource(data: DataSourceDetail): any {
+ return axios({
+ url: DATASOURCE_BASE_URL + '/create',
+ method: 'post',
+ data
+ })
+}
+
+export function updateDatasource(data: DataSourceDetail, id: string): any {
+ return axios({
+ url: DATASOURCE_BASE_URL + '/' + id,
+ method: 'put',
+ data
+ })
+}
+
+// export function checkConnect(data: any): any {
+// return axios({
+// url: DATASOURCE_BASE_URL + '/check/connect',
+// method: 'post',
+// data,
+// timeout: 0
+// })
+// }
+
+export function deleteDatasource(id: string): any {
+ return axios({
+ url: DATASOURCE_BASE_URL + '/' + id,
+ method: 'delete'
+ })
+}
+
+export function getDatasourceDetail(id: string): any {
+ return axios({
+ url: DATASOURCE_BASE_URL + '/' + id,
+ method: 'get'
+ })
+}
+
+export function getDatasourceList(params: DatasourceListParameters): any {
+ return axios({
+ url: DATASOURCE_BASE_URL + '/list',
+ method: 'get',
+ params
+ })
+}
+
+export function getDatasourceType(params: {
+ showVirtualDataSource: boolean
+ source?: 'WS' | 'WT'
+}): any {
+ return axios({
+ url: DATASOURCE_BASE_URL + '/support-datasources',
+ method: 'get',
+ params
+ })
+}
+
+export function getDynamicFormItems(pluginName: string): any {
+ return axios({
+ url: DATASOURCE_BASE_URL + '/dynamic-form',
+ method: 'get',
+ params: { pluginName }
+ })
+}
+
+export function getDatasourceTablesById(datasourceId: string, database: string): any {
+ return axios({
+ url: `/data-quality/tables/${datasourceId}`,
+ method: 'get',
+ params: {
+ database
+ }
+ })
+}
+
+export function getDatasourceTableColumnsById(
+ datasourceId: string,
+ database: string,
+ tableName: string
+): any {
+ return axios({
+ url: '/ws/data-quality/schema',
+ method: 'get',
+ params: {
+ datasourceId,
+ database,
+ tableName
+ }
+ })
+}
+
+export function datasourceDetail(id: string): any {
+ return axios({
+ url: `${DATASOURCE_BASE_URL}/` + id,
+ method: 'get'
+ })
+}
+
+export function datasourceAdd(data: any): any {
+ return axios({
+ // url: '/datasource/create',
+ url: `${DATASOURCE_BASE_URL}/create`,
+ method: 'post',
+ data
+ })
+}
+
+export function datasourceUpdate(data: any, id: string): any {
+ return axios({
+ url: `${DATASOURCE_BASE_URL}/` + id,
+ method: 'put',
+ data
+ })
+}
+
+export function checkConnect(data: any): any {
+ return axios({
+ // url: '/datasource/check/connect',
+ url: `${DATASOURCE_BASE_URL}/check/connect`,
+ method: 'post',
+ data
+ })
+}
+
+export function dynamicFormItems(pluginName: string): any {
+ return axios({
+ url: `${DATASOURCE_BASE_URL}/dynamic-form`,
+ method: 'get',
+ params: { pluginName }
+ })
+}
+
+export function datasourceList(params: any): any {
+ return axios({
+ url: `${DATASOURCE_BASE_URL}/list`,
+ method: 'get',
+ params
+ })
+}
+
+export function datasourceDelete(id: string): any {
+ return axios({
+ url: `${DATASOURCE_BASE_URL}/` + id,
+ method: 'delete'
+ })
+}
diff --git a/seatunnel-ui/src/service/datasource/types.ts b/seatunnel-ui/src/service/data-source/types.ts
similarity index 62%
copy from seatunnel-ui/src/service/datasource/types.ts
copy to seatunnel-ui/src/service/data-source/types.ts
index a3af0f25..e3e30455 100644
--- a/seatunnel-ui/src/service/datasource/types.ts
+++ b/seatunnel-ui/src/service/data-source/types.ts
@@ -15,9 +15,47 @@
* limitations under the License.
*/
-interface DatasourceConfig {}
+export type DatasourceConfig = { [key: string]: any }
-interface DatasourceList {
+export interface DataSourceDetail {
+ datasourceName: string
+ pluginName: string
+ description?: string
+ datasourceConfig?: string
+}
+
+export interface DatasourceListParameters {
+ searchVal: string
+ pageNo: number
+ pageSize: number
+ pluginName?: string
+}
+
+export interface DatasourceTestConnectParameters {
+ pluginName: string
+ datasourceConfig?: string
+}
+
+
+export interface DatasourceTypeList {
+ name: string
+ icon: string
+ version: string
+ type: number
+ supportVirtualTables: boolean
+}
+export interface DatasourceRecord {
+ id: string
+ datasourceName: string
+ pluginName: string
+ pluginVersion: string
+ description: string
+ createUserName: string
+ createTime: number
+ updateTime: number
+}
+
+export interface DatasourceList {
createUserName: string
createTime: string
updateUserName: string
@@ -31,16 +69,3 @@ interface DatasourceList {
createUserId: number
updateUserId: number
}
-
-interface DatasourceTypeList {
- name: string
- icon: string
- version: string
- type: number
- supportVirtualTables: boolean
-}
-
-export {
- DatasourceList,
- DatasourceTypeList
-}
diff --git a/seatunnel-ui/src/service/virtual-tables/index.ts b/seatunnel-ui/src/service/log/index.ts
similarity index 63%
copy from seatunnel-ui/src/service/virtual-tables/index.ts
copy to seatunnel-ui/src/service/log/index.ts
index 1943eab2..46846171 100644
--- a/seatunnel-ui/src/service/virtual-tables/index.ts
+++ b/seatunnel-ui/src/service/log/index.ts
@@ -16,11 +16,31 @@
*/
import { axios } from '@/service/service'
+import { AxiosRequestConfig } from 'axios'
+import { IdReq, LogReq, TaskLogReq } from './types'
-export function virtualTableList(params: any): any {
+export function queryLog(params: LogReq): any {
return axios({
- url: '/virtual_table/list',
+ url: '/log/detail',
method: 'get',
params
})
}
+
+export function downloadTaskLog(params: IdReq): any {
+ return axios({
+ url: '/log/download-log',
+ method: 'get',
+ params
+ })
+}
+
+export function queryTaskLog(params: TaskLogReq): any {
+ return axios({
+ url: '/ws/studio/taskLog',
+ method: 'get',
+ params,
+ retry: 3,
+ retryDelay: 1000
+ } as AxiosRequestConfig)
+}
diff --git a/seatunnel-ui/src/themes/index.ts b/seatunnel-ui/src/service/log/types.ts
similarity index 69%
copy from seatunnel-ui/src/themes/index.ts
copy to seatunnel-ui/src/service/log/types.ts
index a5f70cbf..70adf06b 100644
--- a/seatunnel-ui/src/themes/index.ts
+++ b/seatunnel-ui/src/service/log/types.ts
@@ -15,12 +15,26 @@
* limitations under the License.
*/
-import light from './modules/light'
-import dark from './modules/dark'
+interface IdReq {
+ taskInstanceId: number
+}
+
+interface LogReq extends IdReq {
+ limit: number
+ skipLineNum: number
+}
+
+interface LogRes {
+ log: string
+ currentLogLineNumber: number
+ hasNext: boolean
+}
-const themeList = {
- light,
- dark
+interface TaskLogReq {
+ taskCode: number
+ commandId: number
+ skipLineNum: number
+ limit: number
}
-export default themeList
+export { IdReq, LogReq, LogRes, TaskLogReq }
diff --git a/seatunnel-ui/src/service/resources/index.ts b/seatunnel-ui/src/service/resources/index.ts
new file mode 100644
index 00000000..e228faee
--- /dev/null
+++ b/seatunnel-ui/src/service/resources/index.ts
@@ -0,0 +1,385 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { axios } from '@/service/service'
+import utils from '@/utils'
+import { ProjectCodeReq } from '../users/types'
+import {
+ ResourceTypeReq,
+ ResourceTypesReq,
+ NameReq,
+ FileNameReq,
+ FullNameReq,
+ IdReq,
+ ContentReq,
+ DescriptionReq,
+ CreateReq,
+ UserIdReq,
+ OnlineCreateReq,
+ ProgramTypeReq,
+ ListReq,
+ ViewResourceReq,
+ ResourceIdReq,
+ UdfFuncReq,
+ FileType,
+ GitReq,
+ ResourceProjectReq,
+ AuthResourceReq,
+ ResourceListReq
+} from './types'
+
+export function queryResourceListPaging(
+ params: ListReq & IdReq & ResourceTypeReq & ProjectCodeReq
+): any {
+ return axios({
+ url: '/resources',
+ method: 'get',
+ params
+ })
+}
+
+export function queryResourceById(
+ params: ResourceTypeReq & FullNameReq & IdReq,
+ id: number
+): any {
+ return axios({
+ url: `/resources/${id}`,
+ method: 'get',
+ params
+ })
+}
+
+export function queryCurrentResourceById(id: number): any {
+ return axios({
+ url: `/resources/${id}/query`,
+ method: 'get'
+ })
+}
+
+export function createResource(
+ data: CreateReq & FileNameReq & NameReq & ResourceTypeReq
+): any {
+ return axios({
+ url: '/resources',
+ method: 'post',
+ data,
+ timeout: 0
+ })
+}
+
+export function resourceBatchUpload(data: {
+ type: FileType
+ files: File[]
+ pid: string
+ currentDir: string
+}): any {
+ return axios({
+ url: '/resources/batch-upload',
+ method: 'post',
+ data,
+ timeout: 0
+ })
+}
+
+export function resourceFolderUpload(data: {
+ type: FileType
+ files: File[]
+ pid: string
+ currentDir: string
+}): any {
+ return axios({
+ url: '/resources/upload-folder',
+ method: 'post',
+ data,
+ timeout: 0
+ })
+}
+
+export function authorizedFile(params: UserIdReq): any {
+ return axios({
+ url: '/resources/authed-file',
+ method: 'get',
+ params
+ })
+}
+
+export function authorizeResourceTree(params: UserIdReq): any {
+ return axios({
+ url: '/resources/authed-resource-tree',
+ method: 'get',
+ params
+ })
+}
+
+export function authUDFFunc(params: UserIdReq): any {
+ return axios({
+ url: '/resources/authed-udf-func',
+ method: 'get',
+ params
+ })
+}
+
+export function createDirectory(
+ data: CreateReq & NameReq & ResourceTypeReq
+): any {
+ return axios({
+ url: '/resources/directory',
+ method: 'post',
+ data
+ })
+}
+
+export function queryResourceList(params: ResourceTypeReq): any {
+ return axios({
+ url: '/resources/list',
+ method: 'get',
+ params
+ })
+}
+
+export function onlineCreateResource(
+ data: OnlineCreateReq & FileNameReq & ResourceTypeReq
+): any {
+ return axios({
+ url: '/resources/online-create',
+ method: 'post',
+ data
+ })
+}
+
+export function queryResourceByProgramType(
+ params: ResourceTypeReq & ProgramTypeReq
+): any {
+ return axios({
+ url: '/resources/query-by-type',
+ method: 'get',
+ params
+ })
+}
+
+export function queryUdfFuncListPaging(params: ListReq & ProjectCodeReq): any {
+ return axios({
+ url: '/resources/udf-func',
+ method: 'get',
+ params
+ })
+}
+
+export function queryUdfFuncList(params: { type: 'HIVE' | 'SPARK' }): any {
+ return axios({
+ url: '/resources/udf-func/list',
+ method: 'get',
+ params
+ })
+}
+
+export function verifyUdfFuncName(params: NameReq): any {
+ return axios({
+ url: '/resources/udf-func/verify-name',
+ method: 'get',
+ params
+ })
+}
+
+export function deleteUdfFunc(id: number): any {
+ return axios({
+ url: `/resources/udf-func/${id}`,
+ method: 'delete'
+ })
+}
+
+export function unAuthUDFFunc(params: UserIdReq): any {
+ return axios({
+ url: '/resources/unauth-udf-func',
+ method: 'get',
+ params
+ })
+}
+
+export function verifyResourceName(params: FullNameReq & ResourceTypeReq): any {
+ return axios({
+ url: '/resources/verify-name',
+ method: 'get',
+ params
+ })
+}
+
+export function queryResource(
+ params: FullNameReq & ResourceTypeReq,
+ id: IdReq
+): any {
+ return axios({
+ url: `/resources/verify-name/${id}`,
+ method: 'get',
+ params
+ })
+}
+
+export function updateResource(
+ data: NameReq & ResourceTypeReq & IdReq & DescriptionReq,
+ id: number
+): any {
+ return axios({
+ url: `/resources/${id}`,
+ method: 'put',
+ data
+ })
+}
+
+export function deleteResource(id: number): any {
+ return axios({
+ url: `/resources/${id}`,
+ method: 'delete'
+ })
+}
+
+export function downloadResource(id: number): void {
+ utils.downloadFile(`resources/${id}/download`)
+}
+
+export function viewUIUdfFunction(id: IdReq): any {
+ return axios({
+ url: `/resources/${id}/udf-func`,
+ method: 'get'
+ })
+}
+
+export function updateResourceContent(data: ContentReq, id: number): any {
+ return axios({
+ url: `/resources/${id}/update-content`,
+ method: 'put',
+ data
+ })
+}
+
+export function viewResource(params: ViewResourceReq, id: number): any {
+ return axios({
+ url: `/resources/${id}/view`,
+ method: 'get',
+ params
+ })
+}
+
+export function createUdfFunc(
+ data: UdfFuncReq,
+ resourceId: ResourceIdReq
+): any {
+ return axios({
+ url: `/resources/${resourceId}/udf-func`,
+ method: 'post',
+ data
+ })
+}
+
+export function updateUdfFunc(
+ data: UdfFuncReq,
+ resourceId: ResourceIdReq,
+ id: number
+): any {
+ return axios({
+ url: `/resources/${resourceId}/udf-func/${id}`,
+ method: 'put',
+ data
+ })
+}
+
+export function queryGitListPaging(params: ListReq & ProjectCodeReq): any {
+ return axios({
+ url: '/git/file',
+ method: 'get',
+ params
+ })
+}
+
+export function getResourceProject(params: ResourceProjectReq): any {
+ return axios({
+ url: '/ws/resources/project',
+ method: 'get',
+ params
+ })
+}
+
+export function createGitFile(data: GitReq): any {
+ return axios({
+ url: '/git/file/create',
+ method: 'post',
+ data,
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8'
+ },
+ transformRequest: (data) => JSON.stringify(data)
+ })
+}
+
+export function authResourceProject(data: AuthResourceReq): any {
+ return axios({
+ url: '/ws/resources/auth',
+ method: 'post',
+ data
+ })
+}
+
+export function updateGitFile(data: GitReq & ProjectCodeReq): any {
+ return axios({
+ url: '/git/file/update',
+ method: 'post',
+ data,
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8'
+ },
+ transformRequest: (data) => JSON.stringify(data)
+ })
+}
+
+export function queryFileAndGitList(params: ResourceTypesReq): any {
+ return axios({
+ url: '/git/file/select',
+ method: 'get',
+ params
+ })
+}
+
+export function getResourceList(params: ResourceListReq): any {
+ return axios({
+ url: '/ws/resources/list',
+ method: 'get',
+ params
+ })
+}
+
+export function queryCurrentGitFileById(id: number): any {
+ return axios({
+ url: `/git/file/${id}/query`,
+ method: 'get'
+ })
+}
+
+export function deleteGitFile(data: IdReq): any {
+ return axios({
+ url: '/git/file/delete',
+ method: 'post',
+ data
+ })
+}
+
+export function refreshGitFile(data: IdReq): any {
+ return axios({
+ url: '/git/file/refresh',
+ method: 'post',
+ data
+ })
+}
diff --git a/seatunnel-ui/src/service/resources/types.ts b/seatunnel-ui/src/service/resources/types.ts
new file mode 100644
index 00000000..6c270fbf
--- /dev/null
+++ b/seatunnel-ui/src/service/resources/types.ts
@@ -0,0 +1,216 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+interface FileReq {
+ file: any
+}
+
+interface ResourceTypeReq {
+ type: 'FILE' | 'UDF' | 'GIT'
+ programType?: string
+}
+
+interface ResourceTypesReq {
+ types: string
+}
+
+interface UdfTypeReq {
+ type: 'HIVE' | 'SPARK'
+}
+
+interface NameReq {
+ name: string
+}
+
+interface FileNameReq {
+ fileName: string
+}
+
+interface FullNameReq {
+ fullName: string
+}
+
+interface IdReq {
+ id: number
+}
+
+interface ContentReq {
+ content: string
+}
+
+interface DescriptionReq {
+ description?: string
+}
+
+interface CreateReq extends ResourceTypeReq, DescriptionReq {
+ currentDir: string
+ pid: number
+}
+
+interface UserIdReq {
+ userId: number
+}
+
+interface OnlineCreateReq extends CreateReq, ContentReq {
+ suffix: string
+}
+
+interface ProgramTypeReq {
+ programType: 'JAVA' | 'SCALA' | 'PYTHON' | 'SQL'
+}
+
+interface ListReq {
+ pageNo: number
+ pageSize: number
+ searchVal?: string | null
+}
+
+interface ViewResourceReq {
+ limit: number
+ skipLineNum: number
+}
+
+interface ResourceIdReq {
+ resourceId: number
+}
+
+interface UdfFuncReq extends UdfTypeReq, DescriptionReq, ResourceIdReq {
+ className: string
+ funcName: string
+ argTypes?: string
+ database?: string
+}
+
+interface ResourceFile {
+ id: number
+ pid: number
+ alias: string
+ userId: number
+ userName: string
+ type: string
+ directory: boolean
+ fileName: string
+ fullName: string
+ description: string
+ size: number
+ updateTime: string
+ path: string
+ isEdit: boolean
+ globalResource: boolean
+ projectCode: number
+ projectName: string
+}
+
+interface ResourceListRes {
+ currentPage: number
+ pageSize: number
+ start: number
+ totalPage: number
+ totalList: ResourceFile[]
+}
+
+interface ResourceViewRes {
+ alias: string
+ content: string
+}
+
+interface GitReq {
+ name?: string
+ gitUrl?: string
+ token?: string
+ description?: string
+ pid?: number
+ id?: number
+ gitProxy?: any
+}
+
+interface GitFile {
+ id: number
+ pid: number
+ name: string
+ path: string
+ type: string
+}
+
+type accessTypeKey =
+ | 'DATASOURCE'
+ | 'WORKER_GROUP'
+ | 'ALERT_GROUP'
+ | 'ALERT_INSTANCE'
+ | 'ENVIRONMENT'
+ | 'TIMING'
+ | 'CALENDAR'
+ | 'DATA_CARD'
+ | 'TENANT'
+ | 'TASK_GROUP'
+ | 'QUEUE'
+ | 'FILE'
+ | 'UDF_FILE'
+ | 'UDF_FUNC'
+ | 'GIT_FILE'
+ | 'GIT_RESOURCE'
+
+interface ResourceProjectReq {
+ accessType: accessTypeKey
+ accessCode: number
+}
+
+interface AuthResourceReq {
+ globalResource: boolean
+ accessType: accessTypeKey
+ accessCode: number
+ projectCodes: number[]
+ isShare: boolean
+}
+
+interface ResourceListReq {
+ accessType: accessTypeKey
+ projectCode?: number
+ resourceType?: string
+}
+
+export type FileType = 'FILE' | 'UDF'
+
+export {
+ FileReq,
+ ResourceTypeReq,
+ ResourceTypesReq,
+ UdfTypeReq,
+ NameReq,
+ FileNameReq,
+ FullNameReq,
+ IdReq,
+ ContentReq,
+ DescriptionReq,
+ CreateReq,
+ UserIdReq,
+ OnlineCreateReq,
+ ProgramTypeReq,
+ ListReq,
+ ViewResourceReq,
+ ResourceIdReq,
+ UdfFuncReq,
+ ResourceListRes,
+ ResourceViewRes,
+ ResourceFile,
+ GitReq,
+ GitFile,
+ ResourceProjectReq,
+ AuthResourceReq,
+ ResourceListReq,
+ accessTypeKey
+}
diff --git a/seatunnel-ui/src/service/service.ts b/seatunnel-ui/src/service/service.ts
index 8f3de6b9..2ca1580b 100644
--- a/seatunnel-ui/src/service/service.ts
+++ b/seatunnel-ui/src/service/service.ts
@@ -67,9 +67,20 @@ service.interceptors.request.use((config: InternalAxiosRequestConfig) => {
}, err)
service.interceptors.response.use((res: AxiosResponse) => {
- if (res.data.success) return res.data
+ if (res.data.code === undefined) {
+ return res.data
+ }
+
+ if (res.data.success) return res.data.data
- handleError(res)
+ switch (res.data.code) {
+ case 0:
+ return res.data.data
+
+ default:
+ handleError(res)
+ throw new Error()
+ }
}, err)
export { service as axios }
diff --git a/seatunnel-ui/src/service/sync-task-definition/index.ts b/seatunnel-ui/src/service/sync-task-definition/index.ts
new file mode 100644
index 00000000..17301af8
--- /dev/null
+++ b/seatunnel-ui/src/service/sync-task-definition/index.ts
@@ -0,0 +1,317 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { axios } from '@/service/service'
+
+export function querySyncTaskDefinitionPaging(params: any): any {
+ return axios({
+ url: '/job/definition',
+ method: 'get',
+ params
+ })
+}
+
+export function createSyncTaskDefinition(data: any): any {
+ return axios({
+ url: '/job/definition',
+ method: 'post',
+ data,
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8'
+ },
+ transformRequest: (params) => JSON.stringify(params)
+ })
+}
+
+export function deleteSyncTaskDefinition(params: any): any {
+ return axios({
+ url: '/job/definition',
+ method: 'delete',
+ params
+ })
+}
+
+export function getDefinitionNodesAndEdges(jobCode: string): any {
+ return axios({
+ url: `/job/${jobCode}`,
+ method: 'get'
+ })
+}
+
+export function getDefinitionDetail(jobCode: string): any {
+ return axios({
+ url: `/job/definition/${jobCode}`,
+ method: 'get'
+ })
+}
+
+export function getDefinitionConfig(jobCode: string): any {
+ return axios({
+ url: `/job/config/${jobCode}`,
+ method: 'get'
+ })
+}
+
+export function updateSyncTaskDefinition(jobCode: string, data: any): any {
+ return axios({
+ url: `/job/config/${jobCode}`,
+ method: 'put',
+ data,
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8'
+ },
+ transformRequest: (params) => JSON.stringify(params)
+ })
+}
+
+export function connectorSourcesTypeList(status = 'DOWNLOADED'): any {
+ return axios({
+ url: '/connector/sources',
+ method: 'get',
+ params: {
+ status
+ }
+ })
+}
+
+export function connectorSinksTypeList(status = 'DOWNLOADED'): any {
+ return axios({
+ url: '/connector/sinks',
+ method: 'get',
+ params: {
+ status
+ }
+ })
+}
+
+export function taskDefinitionForm(): any {
+ return axios({
+ url: '/job/env',
+ method: 'get'
+ })
+}
+
+export function saveTaskDefinitionDag(jobCode: string, data: any): any {
+ return axios({
+ url: `/job/dag/${jobCode}`,
+ method: 'post',
+ data,
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8'
+ },
+ transformRequest: (params) => JSON.stringify(params)
+ })
+}
+
+export function deleteTaskDefinitionDag(
+ jobCode: string,
+ taskCode: string
+): any {
+ return axios({
+ url: `/job/task/${jobCode}?pluginId=${taskCode}`,
+ method: 'delete'
+ })
+}
+
+export function saveTaskDefinitionItem(jobCode: string, data: any): any {
+ return axios({
+ url: `/job/task/${jobCode}`,
+ method: 'post',
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8'
+ },
+ transformRequest: () => JSON.stringify(data)
+ })
+}
+
+export function queryTaskDetail(jobCode: string, taskCode: string): any {
+ return axios({
+ url: `/job/task/${jobCode}?pluginId=${taskCode}`,
+ method: 'get'
+ })
+}
+
+// source类型,获取源名称
+export function listSourceName(
+ jobId: string,
+ sceneMode: string,
+ status: 'DOWNLOADED' | 'NOT_DOWNLOAD' | 'ALL' = 'DOWNLOADED'
+): any {
+ return axios({
+ url: '/datasource/sources',
+ method: 'get',
+ params: {
+ jobId,
+ sceneMode,
+ status
+ }
+ })
+}
+// sink类型,获取源名称
+export function findSink(
+ jobId: string,
+ status: 'DOWNLOADED' | 'NOT_DOWNLOAD' | 'ALL' = 'DOWNLOADED'
+): any {
+ return axios({
+ url: '/datasource/sinks',
+ method: 'get',
+ params: {
+ jobId,
+ status
+ }
+ })
+}
+
+export function getFormStructureByDatasourceInstance(params: {
+ connectorType: string
+ connectorName?: string
+ dataSourceInstanceId?: string
+ jobCode: number
+}): any {
+ return axios({
+ url: '/datasource/form',
+ method: 'get',
+ params
+ })
+}
+
+export function connectorTransformsTypeList(jobId: string): any {
+ return axios({
+ url: '/datasource/transforms',
+ method: 'get',
+ params: {
+ jobId
+ }
+ })
+}
+
+export function listEngine(): any {
+ return axios({
+ url: '/engine/list',
+ method: 'get'
+ })
+}
+
+export function listEngineType(): any {
+ return axios({
+ url: '/engine/type',
+ method: 'get'
+ })
+}
+
+export function getDatabaseByDatasource(datasourceName: string): any {
+ return axios({
+ url: '/datasource/databases',
+ method: 'get',
+ params: {
+ datasourceName
+ }
+ })
+}
+
+export function getTableByDatabase(
+ datasourceName: string,
+ databaseName: string,
+ filterName?: string,
+ size?: number,
+): any {
+ size = size || 100
+ filterName = filterName || ''
+ return axios({
+ url: '/datasource/tables',
+ method: 'get',
+ params: {
+ datasourceName,
+ databaseName,
+ filterName,
+ size
+ }
+ })
+}
+
+export function getInputTableSchema(
+ datasourceId: string,
+ databaseName: string,
+ tableName: string
+): any {
+ return axios({
+ url: '/datasource/schema',
+ method: 'get',
+ params: {
+ datasourceId,
+ databaseName,
+ tableName
+ }
+ })
+}
+
+export function getOutputTableSchema(pluginName: string, data: any): any {
+ return axios({
+ url: `/job/table/schema?pluginName=${pluginName}`,
+ method: 'post',
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8'
+ },
+ transformRequest: () => JSON.stringify(data)
+ })
+}
+
+export function getColumnProjection(pluginName: string): any {
+ return axios({
+ url: '/job/table/column-projection',
+ method: 'get',
+ params: {
+ pluginName
+ }
+ })
+}
+
+export function checkDatabaseAndTable(
+ datasourceId: string,
+ data: { databases: Array<string>; tables: Array<string> }
+): any {
+ return axios({
+ url: `/job/table/check?datasourceId=${datasourceId}`,
+ method: 'post',
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8'
+ },
+ transformRequest: () => JSON.stringify(data)
+ })
+}
+
+export function modelInfo(datasourceId: string, data: any): any {
+ return axios({
+ url: `/datasource/schemas?datasourceId=${datasourceId}`,
+ method: 'post',
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8'
+ },
+ transformRequest: () => JSON.stringify(data)
+ })
+}
+
+export function sqlModelInfo(taskId: string, pluginId: string, data: any): any {
+ return axios({
+ url: `/schema/derivation/sql?jobVersionId=${taskId}&inputPluginId=${pluginId}`,
+ method: 'post',
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8'
+ },
+ transformRequest: () => JSON.stringify(data)
+ })
+}
diff --git a/seatunnel-ui/src/service/datasource/index.ts b/seatunnel-ui/src/service/sync-task-instance/index.ts
similarity index 54%
rename from seatunnel-ui/src/service/datasource/index.ts
rename to seatunnel-ui/src/service/sync-task-instance/index.ts
index 0982eba0..0c00ab43 100644
--- a/seatunnel-ui/src/service/datasource/index.ts
+++ b/seatunnel-ui/src/service/sync-task-instance/index.ts
@@ -17,67 +17,54 @@
import { axios } from '@/service/service'
-export function datasourceList(params: any): any {
+export function queryRunningInstancePaging(params: any): any {
return axios({
- url: '/datasource/list',
+ url: '/job/metrics/detail',
method: 'get',
+ timeout: 60000,
params
})
}
-export function datasourceDelete(id: string): any {
+export function querySyncTaskInstanceDetail(params: any): any {
return axios({
- url: '/datasource/' + id,
- method: 'delete'
+ url: '/job/metrics/summary',
+ method: 'get',
+ timeout: 60000,
+ params
})
}
-export function datasourceTypeList(params: {
- showVirtualDataSource: boolean
- source?: 'WS' | 'WT'
-}): any {
+export function querySyncTaskInstanceDag(params: any): any {
return axios({
- url: '/datasource/support-datasources',
+ url: '/job/metrics/dag',
method: 'get',
+ timeout: 60000,
params
})
}
-export function datasourceDetail(id: string): any {
+export function querySyncTaskInstancePaging(params: any): any {
return axios({
- url: '/datasource/' + id,
- method: 'get'
+ url: '/ws/seaTunnel/syncTaskInstancePaging',
+ method: 'get',
+ params,
+ timeout: 60000
})
}
-export function datasourceAdd(data: any): any {
+export function cleanStateByIds(taskInstanceIds: Array<any>) {
return axios({
- url: '/datasource/create',
+ url: 'ws/seaTunnel/batch-clean-task-instance-state',
method: 'post',
- data
- })
-}
-
-export function datasourceUpdate(data: any, id: string): any {
- return axios({
- url: '/datasource/' + id,
- method: 'put',
- data
+ data: { taskInstanceIds }
})
}
-export function checkConnect(data: any): any {
+export function forcedSuccessByIds(taskInstanceIds: Array<any>) {
return axios({
- url: '/datasource/check/connect',
+ url: 'ws/seaTunnel/batch-force-task-success',
method: 'post',
- data
- })
-}
-
-export function dynamicFormItems(pluginName: string): any {
- return axios({
- url: '/datasource/dynamic-form',
- method: 'get',
- params: { pluginName }
+ data: { taskInstanceIds }
})
}
diff --git a/seatunnel-ui/src/service/task-instances/index.ts b/seatunnel-ui/src/service/task-instances/index.ts
new file mode 100644
index 00000000..6673a1ed
--- /dev/null
+++ b/seatunnel-ui/src/service/task-instances/index.ts
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { axios } from '@/service/service'
+import utils from '@/utils'
+import { ProjectCodeReq, IdReq, TaskListReq } from './types'
+
+export function queryTaskListPaging(params: TaskListReq): any {
+ return axios({
+ url: '/projects/task-instances',
+ method: 'get',
+ params
+ })
+}
+
+export function forceSuccess(taskId: IdReq, projectCode: ProjectCodeReq): any {
+ return axios({
+ url: `/projects//task-instances/${taskId.id}/force-success`,
+ method: 'post'
+ })
+}
+
+export function downloadLog(id: number): void {
+ utils.downloadFile('log/download-log', { taskInstanceId: id })
+}
+
+export function cleanState(
+ projectCode: number,
+ taskInstanceIds: number[],
+ cleanDownstream?: boolean
+): any {
+ return axios({
+ url: '/projects/task-instances/clean-task-instance-state',
+ method: 'post',
+ data: { taskInstanceIds, cleanDownstream },
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8'
+ },
+ transformRequest: (params) => JSON.stringify(params)
+ })
+}
+
+export function checkDependentChain(
+ projectCode: number,
+ taskInstanceIds: number[]
+): any {
+ return axios({
+ url: `/ws/projects/${projectCode}/task-instances/dependent-chain-rerun-precheck`,
+ method: 'post',
+ data: { taskInstanceIds },
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8'
+ },
+ timeout: 60000,
+ transformRequest: (params) => JSON.stringify(params)
+ })
+}
+
+export function dependentChainRerun(
+ projectCode: number,
+ taskInstanceIds: number[]
+): any {
+ return axios({
+ url: `/ws/projects/${projectCode}/task-instances/dependent-chain-rerun`,
+ method: 'post',
+ data: { taskInstanceIds },
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8'
+ },
+ timeout: 60000,
+ transformRequest: (params) => JSON.stringify(params)
+ })
+}
diff --git a/seatunnel-ui/src/service/task-instances/types.ts b/seatunnel-ui/src/service/task-instances/types.ts
new file mode 100644
index 00000000..0328e001
--- /dev/null
+++ b/seatunnel-ui/src/service/task-instances/types.ts
@@ -0,0 +1,127 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+interface ProjectCodeReq {
+ projectCode: number
+}
+
+interface IdReq {
+ id: number
+}
+
+interface TaskListReq {
+ pageNo: number
+ pageSize: number
+ endDate?: string
+ executorName?: string
+ host?: string
+ processInstanceId?: number
+ processInstanceName?: string
+ searchVal?: string
+ startDate?: string
+ flag?: string
+ stateType?: string
+ taskName?: string
+ projectCodes: Array<string | number>
+}
+
+interface Dependency {
+ localParams?: any
+ varPool?: any
+ dependTaskList?: any
+ relation?: any
+ resourceFilesList: any[]
+ varPoolMap?: any
+ localParametersMap?: any
+}
+
+interface SwitchDependency extends Dependency {
+ nextNode?: any
+ resultConditionLocation: number
+ dependTaskList?: any
+}
+
+interface TotalList {
+ taskComplete: boolean
+ firstRun: boolean
+ environmentCode: number
+ processInstance?: any
+ pid: number
+ appLink: string
+ taskCode: any
+ switchTask: boolean
+ host: string
+ id: number
+ state: string
+ workerGroup: string
+ conditionsTask: boolean
+ processInstancePriority?: any
+ processInstanceId: number
+ dependency: Dependency
+ alertFlag: string
+ dependentResult?: any
+ executePath: string
+ switchDependency: SwitchDependency
+ maxRetryTimes: number
+ executorName: string
+ subProcess: boolean
+ submitTime: string
+ taskGroupId: number
+ name: string
+ taskDefinitionVersion: number
+ processInstanceName: string
+ taskGroupPriority: number
+ taskDefine?: any
+ dryRun: number
+ flag: string
+ taskParams: string
+ duration: string
+ processDefine?: any
+ taskType: string
+ taskInstancePriority: string
+ logPath: string
+ startTime: string
+ environmentConfig?: any
+ executorId: number
+ firstSubmitTime: string
+ resources?: any
+ retryTimes: number
+ varPool: string
+ dependTask: boolean
+ delayTime: number
+ retryInterval: number
+ endTime: string
+}
+
+interface TaskInstancesRes {
+ totalList: TotalList[]
+ total: number
+ totalPage: number
+ pageSize: number
+ currentPage: number
+ start: number
+}
+
+export {
+ ProjectCodeReq,
+ IdReq,
+ TaskListReq,
+ Dependency,
+ SwitchDependency,
+ TotalList,
+ TaskInstancesRes
+}
diff --git a/seatunnel-ui/src/service/virtual-table/index.ts b/seatunnel-ui/src/service/virtual-table/index.ts
new file mode 100644
index 00000000..9167080d
--- /dev/null
+++ b/seatunnel-ui/src/service/virtual-table/index.ts
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { axios } from '@/service/service'
+import {
+ VirtualTableDetail,
+ VirtualTableListParameters,
+ DynamicConfigParameters
+} from './types'
+
+const VIRTUAL_TABLE_BASE_URL = '/virtual_table'
+
+export function createVirtualTable(data: VirtualTableDetail): any {
+ return axios({
+ url: VIRTUAL_TABLE_BASE_URL + '/create',
+ method: 'post',
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8'
+ },
+ transformRequest: () => JSON.stringify(data)
+ })
+}
+
+export function updateVirtualTable(data: VirtualTableDetail, id: string): any {
+ return axios({
+ url: VIRTUAL_TABLE_BASE_URL + '/' + id,
+ method: 'put',
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8'
+ },
+ transformRequest: () => JSON.stringify(data)
+ })
+}
+
+export function deleteVirtualTable(id: string): any {
+ return axios({
+ url: VIRTUAL_TABLE_BASE_URL + '/' + id,
+ method: 'delete'
+ })
+}
+
+export function getVirtualTableDetail(id: string): any {
+ return axios({
+ url: VIRTUAL_TABLE_BASE_URL + '/' + id,
+ method: 'get'
+ })
+}
+
+export function getVirtualTableList(params: VirtualTableListParameters): any {
+ return axios({
+ url: VIRTUAL_TABLE_BASE_URL + '/list',
+ method: 'get',
+ params
+ })
+}
+
+export function getDynamicConfig(params: DynamicConfigParameters): any {
+ return axios({
+ url: VIRTUAL_TABLE_BASE_URL + '/dynamic_config',
+ method: 'get',
+ params
+ })
+}
+
+export function getFieldType(): any {
+ return axios({
+ url: '/engine/type',
+ method: 'get'
+ })
+}
diff --git a/seatunnel-ui/src/service/datasource/types.ts b/seatunnel-ui/src/service/virtual-table/types.ts
similarity index 53%
copy from seatunnel-ui/src/service/datasource/types.ts
copy to seatunnel-ui/src/service/virtual-table/types.ts
index a3af0f25..a1cc7dbc 100644
--- a/seatunnel-ui/src/service/datasource/types.ts
+++ b/seatunnel-ui/src/service/virtual-table/types.ts
@@ -14,33 +14,45 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+export interface VirtualTableListParameters {
+ pageNo: number
+ pageSize: number
+ pluginName: string | null
+ datasourceName: string | null
+}
-interface DatasourceConfig {}
+export type IDetailTableRecord = {
+ fieldName?: string
+ fieldType: string
+ nullable: number | boolean
+ primaryKey: number | boolean
+ fieldComment?: string
+ isEdit?: boolean
+ key?: number
+ defaultValue?: string
+}
-interface DatasourceList {
- createUserName: string
- createTime: string
- updateUserName: string
- updateTime: string
- id: string
+export interface VirtualTableDetail {
+ datasourceId: string
datasourceName: string
pluginName: string
- pluginVersion: string
- description: string
- datasourceConfig: DatasourceConfig
- createUserId: number
- updateUserId: number
+ tableName: string
+ tableFields: IDetailTableRecord[]
+ databaseProperties: { [key: string]: string }
+ databaseName?: string
}
-interface DatasourceTypeList {
- name: string
- icon: string
- version: string
- type: number
- supportVirtualTables: boolean
+export interface VirtualTableRecord {
+ tableId: string
+ datasourceName: string
+ databaseName: string
+ tableName: string
+ description: string
+ key: number
+ createTime: string
}
-export {
- DatasourceList,
- DatasourceTypeList
+export interface DynamicConfigParameters {
+ pluginName: string
+ datasourceName: string
}
diff --git a/seatunnel-ui/src/store/theme/index.ts b/seatunnel-ui/src/store/datasource/form-structures.ts
similarity index 65%
copy from seatunnel-ui/src/store/theme/index.ts
copy to seatunnel-ui/src/store/datasource/form-structures.ts
index 91df4f42..70bd5a27 100644
--- a/seatunnel-ui/src/store/theme/index.ts
+++ b/seatunnel-ui/src/store/datasource/form-structures.ts
@@ -16,22 +16,25 @@
*/
import { defineStore } from 'pinia'
-import { ThemeState } from './types'
+import { FormStructuresStore, StructureItem } from './types'
+export type { StructureItem }
-export const useThemeStore = defineStore({
- id: 'theme',
- state: (): ThemeState => ({
- darkTheme: false
+export const useFormStructuresStore = defineStore({
+ id: 'form-structures',
+ state: (): FormStructuresStore => ({
+ items: new Map()
}),
- persist: true,
+ persist: {
+ storage: sessionStorage
+ },
getters: {
- getTheme(): boolean {
- return this.darkTheme
+ getItem(state) {
+ return (key: string): StructureItem[] | undefined => state.items.get(key)
}
},
actions: {
- setDarkTheme(): void {
- this.darkTheme = !this.darkTheme
+ setItem(key: string, item: StructureItem[]): void {
+ this.items.set(key, item)
}
}
})
diff --git a/seatunnel-ui/src/store/project/index.ts b/seatunnel-ui/src/store/project/index.ts
new file mode 100644
index 00000000..f3a9ba88
--- /dev/null
+++ b/seatunnel-ui/src/store/project/index.ts
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+export * from './task-node'
+export * from './task-type'
+
+import { defineStore } from 'pinia'
+import type { ProjectStore } from './types'
+
+export const useProjectStore = defineStore({
+ id: 'project',
+ state: (): ProjectStore => ({
+ currentProject: null,
+ projectList: [],
+ golbalProject: [],
+ globalFlag: false,
+ changeProject: false
+ }),
+ persist: true,
+ getters: {
+ getCurrentProject(): any {
+ if (this.globalFlag) {
+ return this.golbalProject
+ } else {
+ return [this.currentProject]
+ }
+ },
+ getProjects(): any {
+ return this.projectList
+ },
+ getGolbalProject(): Array<number | string> {
+ return this.golbalProject
+ },
+ getGlobalFlag(): boolean {
+ return this.globalFlag
+ },
+ getChangeProject(): boolean {
+ return this.changeProject
+ }
+ },
+ actions: {
+ setCurrentProject(projectCode: number | string): void {
+ this.currentProject = projectCode
+ },
+ setProjectList(projectList: Array<any>): void {
+ this.golbalProject = []
+ projectList.forEach((item: any) => {
+ this.golbalProject.push(item.code)
+ })
+ this.projectList = projectList
+ },
+ setGolbalCode(codeList: Array<any>) {
+ this.golbalProject = codeList
+ },
+ setGlobalFlag(flag: boolean) {
+ this.globalFlag = flag
+ },
+ setChangeProject(flag: boolean) {
+ this.changeProject = flag
+ }
+ }
+})
diff --git a/seatunnel-ui/src/store/project/task-node.ts b/seatunnel-ui/src/store/project/task-node.ts
new file mode 100644
index 00000000..f9c465ee
--- /dev/null
+++ b/seatunnel-ui/src/store/project/task-node.ts
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import { defineStore } from 'pinia'
+import { uniqBy } from 'lodash'
+import type {
+ TaskNodeState,
+ EditWorkflowDefinition,
+ IOption,
+ IResource,
+ ProgramType,
+ IMainJar,
+ DependentResultType,
+ BDependentResultType
+} from './types'
+
+export const useTaskNodeStore = defineStore({
+ id: 'project-task',
+ state: (): TaskNodeState => ({
+ preTaskOptions: [],
+ postTaskOptions: [],
+ preTasks: [],
+ resources: [],
+ mainJars: {},
+ name: '',
+ dependentResult: {}
+ }),
+ persist: true,
+ getters: {
+ getPreTaskOptions(): IOption[] {
+ return this.preTaskOptions
+ },
+ getPostTaskOptions(): IOption[] {
+ return this.postTaskOptions
+ },
+ getPreTasks(): number[] {
+ return this.preTasks
+ },
+ getResources(): IResource[] {
+ return this.resources
+ },
+ getMainJar(state) {
+ return (type: ProgramType): IMainJar[] | undefined => state.mainJars[type]
+ },
+ getName(): string {
+ return this.name
+ },
+ getDependentResult(): DependentResultType {
+ return this.dependentResult
+ }
+ },
+ actions: {
+ updateDefinition(definition?: EditWorkflowDefinition, code?: number) {
+ if (!definition) return
+ const { processTaskRelationList = [], taskDefinitionList = [] } =
+ definition
+ const preTaskOptions: { value: number; label: string; type: string }[] =
+ []
+ const tasks: { [field: number]: { taskType: string; name: string } } = {}
+ taskDefinitionList.forEach(
+ (task: { code: number; taskType: string; name: string }) => {
+ tasks[task.code] = {
+ name: task.name,
+ taskType: task.taskType
+ }
+ if (task.code === code) return
+ if (
+ task.taskType === 'CONDITIONS' &&
+ processTaskRelationList.filter(
+ (relation: { preTaskCode: number }) =>
+ relation.preTaskCode === task.code
+ ).length >= 2
+ ) {
+ return
+ }
+ preTaskOptions.push({
+ value: task.code,
+ label: task.name,
+ type: task.taskType
+ })
+ }
+ )
+
+ this.preTaskOptions = uniqBy(preTaskOptions, 'value')
+ if (!code) return
+ const preTasks: number[] = []
+ const postTaskOptions: { value: number; label: string }[] = []
+ processTaskRelationList.forEach(
+ (relation: { preTaskCode: number; postTaskCode: number }) => {
+ const task = tasks[relation.preTaskCode]
+ const postTask = tasks[relation.postTaskCode]
+ if (relation.preTaskCode === code) {
+ postTaskOptions.push({
+ value: relation.postTaskCode,
+ label: postTask.name
+ })
+ }
+ if (relation.postTaskCode === code && relation.preTaskCode !== 0) {
+ preTasks.push(relation.preTaskCode)
+ if (
+ !this.preTaskOptions.find(
+ (item) => item.value === relation.preTaskCode
+ )
+ ) {
+ this.preTaskOptions.push({
+ value: relation.preTaskCode,
+ label: task?.name,
+ type: task?.taskType
+ })
+ }
+ }
+ }
+ )
+ this.preTasks = preTasks
+ this.postTaskOptions = postTaskOptions
+ },
+ updateResource(resources: IResource[]) {
+ this.resources = resources
+ },
+ updateMainJar(type: ProgramType, mainJar: IMainJar[]) {
+ this.mainJars[type] = mainJar
+ },
+ updateName(name: string) {
+ this.name = name
+ },
+ updateDependentResult(dependentResult: BDependentResultType) {
+ const result = {} as DependentResultType
+ for (const [key, value] of Object.entries(dependentResult)) {
+ result[key] = value === 'FAILED' ? 'FAILURE' : value
+ }
+ this.dependentResult = result
+ },
+ init() {
+ this.preTaskOptions = []
+ this.postTaskOptions = []
+ this.preTasks = []
+ this.resources = []
+ this.mainJars = {}
+ this.name = ''
+ }
+ }
+})
diff --git a/seatunnel-ui/src/store/project/task-type.ts b/seatunnel-ui/src/store/project/task-type.ts
new file mode 100644
index 00000000..05fc6c59
--- /dev/null
+++ b/seatunnel-ui/src/store/project/task-type.ts
@@ -0,0 +1,178 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import { defineStore } from 'pinia'
+import type { TaskTypeState, ITaskType, TaskType, ITaskTypeItem } from './types'
+
+export const TASK_TYPES_MAP = {
+ SHELL: {
+ alias: 'SHELL',
+ helperLinkDisable: true
+ },
+ INFORMATICA: {
+ alias: 'INFORMATICA',
+ helperLinkDisable: true
+ },
+ SUB_PROCESS: {
+ alias: 'SUB_PROCESS',
+ helperLinkDisable: true
+ },
+ PROCEDURE: {
+ alias: 'PROCEDURE',
+ helperLinkDisable: true
+ },
+ SQL: {
+ alias: 'SQL',
+ helperLinkDisable: true
+ },
+ SPARK: {
+ alias: 'SPARK',
+ helperLinkDisable: true
+ },
+ FLINK: {
+ alias: 'FLINK',
+ helperLinkDisable: true
+ },
+ MR: {
+ alias: 'MapReduce',
+ helperLinkDisable: true
+ },
+ PYTHON: {
+ alias: 'PYTHON',
+ helperLinkDisable: true
+ },
+ DEPENDENT: {
+ alias: 'DEPENDENT',
+ helperLinkDisable: true
+ },
+ HTTP: {
+ alias: 'HTTP',
+ helperLinkDisable: true
+ },
+ DATAX: {
+ alias: 'DataX',
+ helperLinkDisable: true
+ },
+ PIGEON: {
+ alias: 'PIGEON',
+ helperLinkDisable: true
+ },
+ SQOOP: {
+ alias: 'SQOOP',
+ helperLinkDisable: true
+ },
+ CONDITIONS: {
+ alias: 'CONDITIONS',
+ taskDefinitionDisable: true,
+ helperLinkDisable: true
+ },
+ DATA_QUALITY: {
+ alias: 'DATA_QUALITY',
+ helperLinkDisable: true
+ },
+ SWITCH: {
+ alias: 'SWITCH',
+ taskDefinitionDisable: true,
+ helperLinkDisable: true
+ },
+ SEATUNNEL: {
+ alias: 'SeaTunnel',
+ helperLinkDisable: true
+ },
+ WHALE_SEATUNNEL: {
+ alias: 'Whale_SeaTunnel'
+ },
+ EMR: {
+ alias: 'AmazonEMR',
+ helperLinkDisable: true
+ },
+ SURVEIL: {
+ alias: 'TRIGGER',
+ helperLinkDisable: true
+ },
+ NEXT_LOOP: {
+ alias: 'NEXT_LOOP',
+ helperLinkDisable: true
+ },
+ HIVECLI: {
+ alias: 'HIVECLI',
+ helperLinkDisable: true
+ },
+ DINKY: {
+ alias: 'DINKY',
+ helperLinkDisable: true
+ },
+ CHUNJUN: {
+ alias: 'CHUNJUN',
+ helperLinkDisable: true
+ },
+ ZEPPELIN: {
+ alias: 'ZEPPELIN',
+ helperLinkDisable: true
+ },
+ JUPYTER: {
+ alias: 'JUPYTER',
+ helperLinkDisable: true
+ },
+ MLFLOW: {
+ alias: 'MLFLOW',
+ helperLinkDisable: true
+ },
+ OPENMLDB: {
+ alias: 'OPENMLDB',
+ helperLinkDisable: true
+ },
+ DVC: {
+ alias: 'DVC',
+ helperLinkDisable: true
+ },
+ SAGEMAKER: {
+ alias: 'SageMaker',
+ helperLinkDisable: true
+ },
+ PYTORCH: {
+ alias: 'PYTORCH',
+ helperLinkDisable: true
+ },
+ JAR: {
+ alias: 'JAR',
+ helperLinkDisable: true
+ }
+} as { [key in TaskType]: ITaskType }
+
+export const useTaskTypeStore = defineStore({
+ id: 'project-task-type',
+ state: (): TaskTypeState => ({
+ types: []
+ }),
+ persist: true,
+ getters: {
+ getTaskType(): ITaskTypeItem[] {
+ return this.types
+ }
+ },
+ actions: {
+ setTaskTypes(types: TaskType[]): void {
+ try {
+ this.types = types
+ .filter((type) => !!TASK_TYPES_MAP[type])
+ .map((type) => ({ ...TASK_TYPES_MAP[type], type }))
+ } catch (err) {
+ this.types = []
+ }
+ }
+ }
+})
diff --git a/seatunnel-ui/src/store/project/types.ts b/seatunnel-ui/src/store/project/types.ts
new file mode 100644
index 00000000..d5f417d9
--- /dev/null
+++ b/seatunnel-ui/src/store/project/types.ts
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import type { EditWorkflowDefinition } from '@/views/projects/workflow/components/dag/types'
+import type { IOption } from '@/components/form/types'
+
+type TaskType =
+ | 'SHELL'
+ | 'SUB_PROCESS'
+ | 'PROCEDURE'
+ | 'SQL'
+ | 'SPARK'
+ | 'FLINK'
+ | 'MR'
+ | 'PYTHON'
+ | 'DEPENDENT'
+ | 'HTTP'
+ | 'DATAX'
+ | 'PIGEON'
+ | 'SQOOP'
+ | 'CONDITIONS'
+ | 'DATA_QUALITY'
+ | 'SWITCH'
+ | 'SEATUNNEL'
+ | 'EMR'
+ | 'SURVEIL'
+ | 'NEXT_LOOP'
+ | 'HIVECLI'
+ | 'DINKY'
+ | 'CHUNJUN'
+ | 'ZEPPELIN'
+ | 'JUPYTER'
+ | 'MLFLOW'
+ | 'OPENMLDB'
+ | 'DVC'
+ | 'WHALE_SEATUNNEL'
+ | 'SAGEMAKER'
+ | 'PYTORCH'
+ | 'JAR'
+ | 'INFORMATICA'
+type ProgramType = 'JAVA' | 'SCALA' | 'PYTHON' | 'SQL'
+type DependentResultType = {
+ [key: string]: 'SUCCESS' | 'WAITING_THREAD' | 'FAILURE'
+}
+type BDependentResultType = {
+ [key: string]: 'SUCCESS' | 'WAITING_THREAD' | 'FAILED'
+}
+
+interface ProjectStore {
+ currentProject: number | null | string
+ projectList: Array<{ label: string; value: number }>
+ golbalProject: Array<number | string>
+ globalFlag: boolean
+ changeProject: boolean
+}
+
+interface IResource {
+ id: number
+ name: string
+ children?: IResource[]
+}
+interface IMainJar {
+ id: number
+ fullName: string
+ children: IMainJar[]
+}
+interface TaskNodeState {
+ postTaskOptions: IOption[]
+ preTaskOptions: IOption[]
+ preTasks: number[]
+ resources: IResource[]
+ mainJars: { [key in ProgramType]?: IMainJar[] }
+ name: string
+ dependentResult: DependentResultType
+}
+
+interface ITaskType {
+ alias: string
+ helperLinkDisable?: boolean
+ taskDefinitionDisable?: boolean
+}
+interface ITaskTypeItem extends ITaskType {
+ type: TaskType
+}
+interface TaskTypeState {
+ types: ITaskTypeItem[]
+}
+
+export {
+ TaskNodeState,
+ EditWorkflowDefinition,
+ IOption,
+ IResource,
+ ProgramType,
+ DependentResultType,
+ BDependentResultType,
+ IMainJar,
+ TaskType,
+ ITaskType,
+ ITaskTypeItem,
+ ProjectStore,
+ TaskTypeState
+}
diff --git a/seatunnel-ui/src/store/theme/index.ts b/seatunnel-ui/src/store/synchronization-definition/index.ts
similarity index 57%
copy from seatunnel-ui/src/store/theme/index.ts
copy to seatunnel-ui/src/store/synchronization-definition/index.ts
index 91df4f42..daba6dfb 100644
--- a/seatunnel-ui/src/store/theme/index.ts
+++ b/seatunnel-ui/src/store/synchronization-definition/index.ts
@@ -16,22 +16,31 @@
*/
import { defineStore } from 'pinia'
-import { ThemeState } from './types'
+import type { SynchronizationDefinitionState, DagInfo } from './types'
-export const useThemeStore = defineStore({
- id: 'theme',
- state: (): ThemeState => ({
- darkTheme: false
+export const useSynchronizationDefinitionStore = defineStore({
+ id: 'synchronization-definitionState',
+ state: (): SynchronizationDefinitionState => ({
+ columnSelectable: {},
+ dagInfo: {}
}),
- persist: true,
+ persist: {
+ storage: sessionStorage
+ },
getters: {
- getTheme(): boolean {
- return this.darkTheme
+ getColumnSelectable(state) {
+ return (type: string) => state.columnSelectable[type]
+ },
+ getDagInfo(): DagInfo {
+ return this.dagInfo
}
},
actions: {
- setDarkTheme(): void {
- this.darkTheme = !this.darkTheme
+ setColumnSelectable(type: string, value: boolean): void {
+ this.columnSelectable[type] = value
+ },
+ setDagInfo(dagInfo: DagInfo) {
+ this.dagInfo = { ...this.dagInfo, ...dagInfo }
}
}
})
diff --git a/seatunnel-ui/src/store/theme/types.ts b/seatunnel-ui/src/store/synchronization-definition/types.ts
similarity index 83%
copy from seatunnel-ui/src/store/theme/types.ts
copy to seatunnel-ui/src/store/synchronization-definition/types.ts
index fa7e56dd..edbdb4d2 100644
--- a/seatunnel-ui/src/store/theme/types.ts
+++ b/seatunnel-ui/src/store/synchronization-definition/types.ts
@@ -14,9 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+export type DagInfo = { [key: string]: any }
-interface ThemeState {
- darkTheme: boolean
+export interface SynchronizationDefinitionState {
+ columnSelectable: { [key: string]: boolean }
+ dagInfo: DagInfo
}
-
-export { ThemeState }
diff --git a/seatunnel-ui/src/store/theme/index.ts b/seatunnel-ui/src/store/theme/index.ts
index 91df4f42..ac686055 100644
--- a/seatunnel-ui/src/store/theme/index.ts
+++ b/seatunnel-ui/src/store/theme/index.ts
@@ -16,22 +16,43 @@
*/
import { defineStore } from 'pinia'
-import { ThemeState } from './types'
+import themeList from '@/themes'
+import type { ThemeState, ITheme } from './types'
export const useThemeStore = defineStore({
id: 'theme',
state: (): ThemeState => ({
- darkTheme: false
+ darkTheme: false,
+ theme: 'light',
+ isNavLogoBlack: false,
+ navTextColor: ''
}),
persist: true,
getters: {
- getTheme(): boolean {
+ getDarkTheme(): boolean {
return this.darkTheme
+ },
+ getTheme(): ITheme {
+ return this.theme
+ },
+ getIsNavLogoBlack(): boolean {
+ return this.isNavLogoBlack
+ },
+ getNavTextColor(): string {
+ return this.navTextColor
}
},
actions: {
- setDarkTheme(): void {
- this.darkTheme = !this.darkTheme
+ setTheme(theme: ITheme): void {
+ this.theme = theme
+ this.darkTheme = theme === 'dark'
+ this.isNavLogoBlack = theme === 'light'
+ const themeConfig = themeList[theme]
+ //@ts-ignore
+ this.navTextColor = themeConfig?.Menu?.itemTextColor || ''
+ },
+ init(theme?: ITheme): void {
+ this.setTheme(theme || this.theme)
}
}
})
diff --git a/seatunnel-ui/src/store/theme/types.ts b/seatunnel-ui/src/store/theme/types.ts
index fa7e56dd..36e55a14 100644
--- a/seatunnel-ui/src/store/theme/types.ts
+++ b/seatunnel-ui/src/store/theme/types.ts
@@ -15,8 +15,11 @@
* limitations under the License.
*/
-interface ThemeState {
+export type ITheme = 'light' | 'dark' | 'dark-blue'
+
+export interface ThemeState {
darkTheme: boolean
+ theme: ITheme
+ isNavLogoBlack: boolean
+ navTextColor: ''
}
-
-export { ThemeState }
diff --git a/seatunnel-ui/src/themes/index.ts b/seatunnel-ui/src/themes/index.ts
index a5f70cbf..f0dd5d99 100644
--- a/seatunnel-ui/src/themes/index.ts
+++ b/seatunnel-ui/src/themes/index.ts
@@ -14,13 +14,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
import light from './modules/light'
import dark from './modules/dark'
+import darkBlue from './modules/dark-blue'
const themeList = {
light,
- dark
+ dark,
+ 'dark-blue': darkBlue
}
export default themeList
diff --git a/seatunnel-ui/src/layouts/dashboard/index.tsx b/seatunnel-ui/src/themes/modules/dark-blue.ts
similarity index 53%
copy from seatunnel-ui/src/layouts/dashboard/index.tsx
copy to seatunnel-ui/src/themes/modules/dark-blue.ts
index 16050a59..33130b32 100644
--- a/seatunnel-ui/src/layouts/dashboard/index.tsx
+++ b/seatunnel-ui/src/themes/modules/dark-blue.ts
@@ -14,29 +14,34 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+import type { GlobalThemeOverrides } from '../type'
-import { defineComponent } from 'vue'
-import { NLayout, NLayoutHeader, NLayoutContent, useMessage } from 'naive-ui'
-import Header from './header'
+const darkBlue = {
+ common: {
+ bodyColor: '#f8f8fc',
-const Dashboard = defineComponent({
- setup() {
- window.$message = useMessage()
+ /**************** Brand color */
+ primaryColor: '#1890ff',
+ primaryColorHover: '#40a9ff',
+ primaryColorPressed: '#096dd9',
+ primaryColorSuppl: '#1890ff',
+
+ /**************** Function of color */
+ infoColor: '#1890ff',
+ successColor: '#52c41a',
+ warningColor: '#faad14',
+ errorColor: '#ff4d4f'
+ },
+ Layout: {
+ headerColor: '#29366c',
+ siderColor: '#29366c'
},
- render() {
- return (
- <NLayout>
- <NLayoutHeader bordered>
- <Header />
- </NLayoutHeader>
- <NLayoutContent style={{ height: 'calc(100vh - 65px)' }}>
- <NLayout position='absolute' native-scrollbar={false}>
- <router-view class='px-32 py-12' />
- </NLayout>
- </NLayoutContent>
- </NLayout>
- )
+ Menu: {
+ itemTextColorHorizontal: '#dbdbdb',
+ itemTextColor: '#dbdbdb',
+ itemIconColor: '#dbdbdb',
+ itemIconColorCollapsed: '#dbdbdb'
}
-})
+} as GlobalThemeOverrides
-export default Dashboard
+export default darkBlue
diff --git a/seatunnel-ui/src/themes/modules/dark.ts b/seatunnel-ui/src/themes/modules/dark.ts
index 5473e6f2..df888996 100644
--- a/seatunnel-ui/src/themes/modules/dark.ts
+++ b/seatunnel-ui/src/themes/modules/dark.ts
@@ -14,7 +14,35 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+import type { GlobalThemeOverrides } from '../type'
-const dark = {}
+const dark = {
+ common: {
+ bodyColor: '#141414',
+ // baseColor: '#f8f8fc',
+
+ /**************** Brand color */
+ primaryColor: '#177ddc',
+ primaryColorHover: '#1765ad',
+ primaryColorPressed: '#3c9ae8',
+ primaryColorSuppl: '#177ddc',
+
+ /**************** Function of color */
+ infoColor: '#177ddc',
+ // successColor: '#49aa19',
+ // warningColor: '#d89614',
+ // errorColor: '#a61d24'
+ },
+ // Layout: {
+ // headerColor: '#141414'
+ // },
+ // DataTable: {
+ // thTextColor: '#fff',
+ // tdColorHover: '#f2f2fa'
+ // },
+ // Space: {
+ // gapLarge: '28px 32px'
+ // }
+} as GlobalThemeOverrides
export default dark
diff --git a/seatunnel-ui/src/themes/modules/light.ts b/seatunnel-ui/src/themes/modules/light.ts
index aa0f52d2..9e963404 100644
--- a/seatunnel-ui/src/themes/modules/light.ts
+++ b/seatunnel-ui/src/themes/modules/light.ts
@@ -19,50 +19,53 @@ import type { GlobalThemeOverrides } from 'naive-ui'
const light: GlobalThemeOverrides = {
common: {
- primaryColor: '#614bdd',
- primaryColorHover: '#7d68de',
- primaryColorSuppl: '#7d68de',
- primaryColorPressed: '#513ac2',
+ bodyColor: '#f7f8fa',
- infoColor: '#614bdd',
- infoColorHover: '#7d68de',
- infoColorSuppl: '#7d68de',
- infoColorPressed: '#513ac2',
+ primaryColor: '#1890ff',
+ primaryColorHover: '#40a9ff',
+ primaryColorPressed: '#096dd9',
+ primaryColorSuppl: '#1890ff',
- errorColor: '#db2777',
- errorColorHover: '#d64687',
- errorColorSuppl: '#d64687',
- errorColorPressed: '#c60165',
+ /**************** Function of color */
+ infoColor: '#1890ff',
+ successColor: '#52c41a',
+ warningColor: '#faad14',
+ errorColor: '#ff4d4f'
- successColor: '#04beca',
- successColorHover: '#69c8d5',
- successColorSuppl: '#69c8d5',
- successColorPressed: '#04a6ae',
+ // errorColor: '#db2777',
+ // errorColorHover: '#d64687',
+ // errorColorSuppl: '#d64687',
+ // errorColorPressed: '#c60165',
- warningColor: '#eab308',
- warningColorHover: '#e5cb41',
- warningColorSuppl: '#e5cb41',
- warningColorPressed: '#b38706',
+ // successColor: '#04beca',
+ // successColorHover: '#69c8d5',
+ // successColorSuppl: '#69c8d5',
+ // successColorPressed: '#04a6ae',
- textColorBase: '#151666',
- textColor1: '#242660',
- textColor2: '#313377',
- textColor3: '#9096b8',
+ // warningColor: '#eab308',
+ // warningColorHover: '#e5cb41',
+ // warningColorSuppl: '#e5cb41',
+ // warningColorPressed: '#b38706',
- bodyColor: '#f7f8fa',
- borderRadius: '15px',
- tableHeaderColor: '#614bdd'
- },
- Layout: {
- headerColor: '#fff'
- },
- DataTable: {
- thTextColor: '#fff',
- tdColorHover: '#f2f2fa'
+ // textColorBase: '#151666',
+ // textColor1: '#242660',
+ // textColor2: '#313377',
+ // textColor3: '#9096b8',
+
+
+ // borderRadius: '15px',
+ // tableHeaderColor: '#614bdd'
},
- Space: {
- gapLarge: '28px 32px'
- }
+ // Layout: {
+ // headerColor: '#fff'
+ // },
+ // DataTable: {
+ // thTextColor: '#fff',
+ // tdColorHover: '#f2f2fa'
+ // },
+ // Space: {
+ // gapLarge: '28px 32px'
+ // }
}
export default light
diff --git a/seatunnel-ui/src/themes/modules/dark.ts b/seatunnel-ui/src/themes/type.ts
similarity index 93%
copy from seatunnel-ui/src/themes/modules/dark.ts
copy to seatunnel-ui/src/themes/type.ts
index 5473e6f2..0ada9892 100644
--- a/seatunnel-ui/src/themes/modules/dark.ts
+++ b/seatunnel-ui/src/themes/type.ts
@@ -15,6 +15,4 @@
* limitations under the License.
*/
-const dark = {}
-
-export default dark
+export type { GlobalThemeOverrides } from 'naive-ui'
diff --git a/seatunnel-ui/src/service/virtual-tables/index.ts b/seatunnel-ui/src/utils/clipboard.ts
similarity index 72%
copy from seatunnel-ui/src/service/virtual-tables/index.ts
copy to seatunnel-ui/src/utils/clipboard.ts
index 1943eab2..22a9f646 100644
--- a/seatunnel-ui/src/service/virtual-tables/index.ts
+++ b/seatunnel-ui/src/utils/clipboard.ts
@@ -15,12 +15,17 @@
* limitations under the License.
*/
-import { axios } from '@/service/service'
-
-export function virtualTableList(params: any): any {
- return axios({
- url: '/virtual_table/list',
- method: 'get',
- params
- })
+const clipboard = (text: string): boolean => {
+ const inp = document.createElement('input')
+ document.body.appendChild(inp)
+ inp.value = text
+ inp.select()
+ let result = false
+ try {
+ result = document.execCommand('copy')
+ } catch (err) {}
+ inp.remove()
+ return result
}
+
+export default clipboard
diff --git a/seatunnel-ui/src/utils/index.ts b/seatunnel-ui/src/utils/index.ts
index d806dfb4..1704a1fd 100644
--- a/seatunnel-ui/src/utils/index.ts
+++ b/seatunnel-ui/src/utils/index.ts
@@ -18,11 +18,13 @@
import mapping from './mapping'
import trim from './trim'
import log from './log'
+import clipboard from './clipboard'
const utils = {
mapping,
trim,
- log
+ log,
+ clipboard
}
export default utils
diff --git a/seatunnel-ui/src/utils/timePickeroption.ts b/seatunnel-ui/src/utils/timePickeroption.ts
new file mode 100644
index 00000000..a78c9418
--- /dev/null
+++ b/seatunnel-ui/src/utils/timePickeroption.ts
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+export const getNowDate = (): any => {
+ return [
+ new Date(new Date().toLocaleDateString()).getTime(),
+ new Date().getTime()
+ ]
+}
+
+function getTimeRange(time: any) {
+ const cur = new Date(new Date().toLocaleDateString()).getTime()
+ return [cur - time * 24 * 60 * 60 * 1000, cur] as const
+}
+
+export const getDataRange = (item: any) => {
+ let data
+ if (item == 0) {
+ data = getNowDate()
+ } else {
+ data = getTimeRange(item)
+ }
+ return data
+}
+
+export function getRangeShortCuts(t: any) {
+ // const { t } = useI18n()
+ const rangeShortCuts = {} as any
+ const rangeMap = {
+ today: 0,
+ last_day: 1,
+ last_three_day: 3,
+ last_week: 7,
+ last_month: 30
+ } as any
+ Object.keys(rangeMap).forEach((item: string) => {
+ rangeShortCuts[`${t(`project.workflow.${item}`)}` as string] = getDataRange(
+ rangeMap[item]
+ )
+ })
+ return rangeShortCuts
+}
diff --git a/seatunnel-ui/src/views/data-pipes/detail/index.tsx b/seatunnel-ui/src/views/data-pipes/detail/index.tsx
index aa34cfdf..64f747f3 100644
--- a/seatunnel-ui/src/views/data-pipes/detail/index.tsx
+++ b/seatunnel-ui/src/views/data-pipes/detail/index.tsx
@@ -22,7 +22,6 @@ import { useRoute, useRouter } from 'vue-router'
import { scriptDetail } from '@/service/script'
import MonacoEditor from '@/components/monaco-editor'
import type { Router, RouteLocationNormalizedLoaded } from 'vue-router'
-import type { ResponseBasic } from '@/service/types'
import type { ScriptDetail } from '@/service/script/types'
const DataPipesDetail = defineComponent({
@@ -42,10 +41,10 @@ const DataPipesDetail = defineComponent({
onMounted(() => {
scriptDetail(Number(route.params.dataPipeId)).then(
- (res: ResponseBasic<ScriptDetail>) => {
- variables.name = res.data.name
- variables.type = res.data.type
- variables.content = res.data.content
+ (res: ScriptDetail) => {
+ variables.name = res.name
+ variables.type = res.type
+ variables.content = res.content
}
)
})
diff --git a/seatunnel-ui/src/views/data-pipes/edit/index.tsx b/seatunnel-ui/src/views/data-pipes/edit/index.tsx
index 7a5564f7..ddc3282c 100644
--- a/seatunnel-ui/src/views/data-pipes/edit/index.tsx
+++ b/seatunnel-ui/src/views/data-pipes/edit/index.tsx
@@ -32,7 +32,6 @@ import { BulbOutlined } from '@vicons/antd'
import { scriptDetail, scriptUpdate } from '@/service/script'
import MonacoEditor from '@/components/monaco-editor'
import type { Router, RouteLocationNormalizedLoaded } from 'vue-router'
-import type { ResponseBasic } from '@/service/types'
import type { ScriptDetail } from '@/service/script/types'
const DataPipesEdit = defineComponent({
@@ -60,10 +59,10 @@ const DataPipesEdit = defineComponent({
onMounted(() => {
scriptDetail(Number(route.params.dataPipeId)).then(
- (res: ResponseBasic<ScriptDetail>) => {
- variables.name = res.data.name
- variables.type = res.data.type
- variables.content = res.data.content
+ (res: ScriptDetail) => {
+ variables.name = res.name
+ variables.type = res.type
+ variables.content = res.content
}
)
})
diff --git a/seatunnel-ui/src/views/data-pipes/list/use-table.ts b/seatunnel-ui/src/views/data-pipes/list/use-table.ts
index 529c7682..69ab9e79 100644
--- a/seatunnel-ui/src/views/data-pipes/list/use-table.ts
+++ b/seatunnel-ui/src/views/data-pipes/list/use-table.ts
@@ -198,7 +198,7 @@ export function useTable() {
if (state.loading) return
state.loading = true
scriptList(params).then((res: ResponseTable<Array<ScriptDetail> | []>) => {
- state.tableData = res.data.data as any
+ state.tableData = res.data as any
state.totalPage = res.data.totalPage
state.loading = false
})
diff --git a/seatunnel-ui/src/views/datasource/components/use-source.ts b/seatunnel-ui/src/views/datasource/components/use-source.ts
index 8f85064b..a775cde6 100644
--- a/seatunnel-ui/src/views/datasource/components/use-source.ts
+++ b/seatunnel-ui/src/views/datasource/components/use-source.ts
@@ -15,11 +15,11 @@
* limitations under the License.
*/
import { onMounted, reactive, watch } from 'vue'
-import { datasourceTypeList } from '@/service/datasource'
+import { getDatasourceType } from '@/service/data-source'
import { useI18n } from 'vue-i18n'
import type { SelectOption } from 'naive-ui'
import type { ResponseBasic } from '@/service/types'
-import type { DatasourceTypeList } from '@/service/datasource/types'
+import type { DatasourceTypeList } from '@/service/data-source/types'
type Key = '1' | '2' | '3' | '4' | '5'
type IType = {
@@ -43,7 +43,7 @@ export const useSource = (showVirtualDataSource = false) => {
})
const querySource = () => {
- datasourceTypeList({
+ getDatasourceType({
showVirtualDataSource,
source: 'WT'
}).then((res: ResponseBasic<Array<DatasourceTypeList> | Array<any>>) => {
@@ -52,7 +52,7 @@ export const useSource = (showVirtualDataSource = false) => {
en_US: {} as { [key: string]: string }
}
- state.types = Object.entries(res.data).map(([key, value]) => {
+ state.types = Object.entries(res).map(([key, value]) => {
return {
type: 'group',
label: i18n.t(`datasource.${TYPE_MAP[key as Key]}`),
diff --git a/seatunnel-ui/src/views/datasource/create/use-detail.ts b/seatunnel-ui/src/views/datasource/create/use-detail.ts
index f18c1e0d..f2c4a775 100644
--- a/seatunnel-ui/src/views/datasource/create/use-detail.ts
+++ b/seatunnel-ui/src/views/datasource/create/use-detail.ts
@@ -21,7 +21,7 @@ import {
datasourceAdd,
datasourceUpdate,
checkConnect
-} from '@/service/datasource'
+} from '@/service/data-source'
import { useI18n } from 'vue-i18n'
import { omit } from 'lodash'
import { useRouter } from 'vue-router'
@@ -56,12 +56,12 @@ export function useDetail(
const queryById = async () => {
try {
const result = await datasourceDetail(id)
- await getFormItems(result.data.pluginName)
+ await getFormItems(result.pluginName)
setFieldsValue({
- datasourceName: result.data.datasourceName,
- pluginName: result.data.pluginName,
- description: result.data.description,
- ...result.data.datasourceConfig
+ datasourceName: result.datasourceName,
+ pluginName: result.pluginName,
+ description: result.description,
+ ...result.datasourceConfig
})
} finally {}
}
diff --git a/seatunnel-ui/src/views/datasource/create/use-form.ts b/seatunnel-ui/src/views/datasource/create/use-form.ts
index 5597800e..23e41f32 100644
--- a/seatunnel-ui/src/views/datasource/create/use-form.ts
+++ b/seatunnel-ui/src/views/datasource/create/use-form.ts
@@ -22,7 +22,7 @@ import {
useFormStructuresStore,
StructureItem
} from '@/store/datasource'
-import { dynamicFormItems } from '@/service/datasource'
+import { dynamicFormItems } from '@/service/data-source'
import { useFormField } from '@/components/dynamic-form/use-form-field'
import { useFormRequest } from '@/components/dynamic-form/use-form-request'
import { useFormValidate } from '@/components/dynamic-form/use-form-validate'
@@ -64,10 +64,10 @@ export function useForm(type: string) {
return
}
- const result: ResponseBasic<string> = await dynamicFormItems(value)
+ const result: any = await dynamicFormItems(value)
try {
- const res = JSON.parse(result.data)
+ const res = JSON.parse(result)
res.forms = res.forms.map((form: any) => ({ ...form, span: 12 }))
Object.assign(state.detailForm, useFormField(res.forms))
Object.assign(
diff --git a/seatunnel-ui/src/service/virtual-tables/index.ts b/seatunnel-ui/src/views/datasource/list/types.ts
similarity index 81%
copy from seatunnel-ui/src/service/virtual-tables/index.ts
copy to seatunnel-ui/src/views/datasource/list/types.ts
index 1943eab2..dcfba7ab 100644
--- a/seatunnel-ui/src/service/virtual-tables/index.ts
+++ b/seatunnel-ui/src/views/datasource/list/types.ts
@@ -15,12 +15,6 @@
* limitations under the License.
*/
-import { axios } from '@/service/service'
-
-export function virtualTableList(params: any): any {
- return axios({
- url: '/virtual_table/list',
- method: 'get',
- params
- })
-}
+export type { TableColumns } from 'naive-ui/es/data-table/src/interface'
+export type { SelectOption } from 'naive-ui'
+export type { DataSourceDetail } from '@/service/data-source/types'
diff --git a/seatunnel-ui/src/views/datasource/list/use-columns.ts b/seatunnel-ui/src/views/datasource/list/use-columns.ts
index 15bae636..c67d0ade 100644
--- a/seatunnel-ui/src/views/datasource/list/use-columns.ts
+++ b/seatunnel-ui/src/views/datasource/list/use-columns.ts
@@ -21,6 +21,10 @@ import { NPopover, NButton, NSpace } from 'naive-ui'
import JsonHighlight from '../components/json-highlight'
import { getTableColumn } from '@/common/table'
+import { useTableOperation } from '@/hooks'
+import { EditOutlined } from '@vicons/antd'
+import ResourceAuth from '@/components/resource-auth'
+
export function useColumns(onCallback: Function) {
const { t } = useI18n()
const getColumns = () => {
@@ -85,11 +89,11 @@ export function useColumns(onCallback: Function) {
default: () => [
h(
NButton,
- {
+ {
text: true,
onClick: () => void onCallback(row.id, 'edit')
- },
- {
+ },
+ {
default: () => t('datasource.edit')
}
),
@@ -98,11 +102,11 @@ export function useColumns(onCallback: Function) {
{
text: true,
onClick: () => void onCallback(row.id, 'delete')
- },
+ },
{ default: () => t('datasource.delete') }
)
- ]
- })
+ ]
+ })
}
]
}
diff --git a/seatunnel-ui/src/views/datasource/components/use-source.ts b/seatunnel-ui/src/views/datasource/list/use-source.ts
similarity index 77%
copy from seatunnel-ui/src/views/datasource/components/use-source.ts
copy to seatunnel-ui/src/views/datasource/list/use-source.ts
index 8f85064b..c0e79cc4 100644
--- a/seatunnel-ui/src/views/datasource/components/use-source.ts
+++ b/seatunnel-ui/src/views/datasource/list/use-source.ts
@@ -15,11 +15,9 @@
* limitations under the License.
*/
import { onMounted, reactive, watch } from 'vue'
-import { datasourceTypeList } from '@/service/datasource'
+import { getDatasourceType } from '@/service/data-source'
import { useI18n } from 'vue-i18n'
-import type { SelectOption } from 'naive-ui'
-import type { ResponseBasic } from '@/service/types'
-import type { DatasourceTypeList } from '@/service/datasource/types'
+import type { SelectOption } from './types'
type Key = '1' | '2' | '3' | '4' | '5'
type IType = {
@@ -39,25 +37,32 @@ export const useSource = (showVirtualDataSource = false) => {
5: 'remote_connection'
}
const state = reactive({
+ loading: false,
types: [] as IType[]
})
- const querySource = () => {
- datasourceTypeList({
- showVirtualDataSource,
- source: 'WT'
- }).then((res: ResponseBasic<Array<DatasourceTypeList> | Array<any>>) => {
+ const querySource = async () => {
+ if (state.loading) return
+ state.loading = true
+ try {
+ const res = (await getDatasourceType({
+ showVirtualDataSource,
+ source: 'WT'
+ })) as {
+ Key: { code: number; name: string; chineseName: string }[]
+ }
+
+ console.log(res, 'ers')
const locales = {
zh_CN: {} as { [key: string]: string },
en_US: {} as { [key: string]: string }
}
-
- state.types = Object.entries(res.data).map(([key, value]) => {
+ state.types = Object.entries(res).map(([key, value]) => {
return {
type: 'group',
label: i18n.t(`datasource.${TYPE_MAP[key as Key]}`),
key: TYPE_MAP[key as Key],
- children: (value as any).map((item: any) => {
+ children: value.map((item) => {
locales.zh_CN[item.name] = item.chineseName
locales.en_US[item.name] = item.name
return {
@@ -67,10 +72,11 @@ export const useSource = (showVirtualDataSource = false) => {
})
}
})
-
i18n.mergeLocaleMessage('zh_CN', locales.zh_CN)
i18n.mergeLocaleMessage('en_US', locales.en_US)
- })
+ } finally {
+ state.loading = false
+ }
}
onMounted(() => {
diff --git a/seatunnel-ui/src/views/datasource/list/use-table.ts b/seatunnel-ui/src/views/datasource/list/use-table.ts
index ba609eb2..914a4a5f 100644
--- a/seatunnel-ui/src/views/datasource/list/use-table.ts
+++ b/seatunnel-ui/src/views/datasource/list/use-table.ts
@@ -19,8 +19,8 @@ import { reactive } from 'vue'
import {
datasourceList,
datasourceDelete
-} from '@/service/datasource'
-import type { DatasourceList } from '@/service/datasource/types'
+} from '@/service/data-source'
+import type { DatasourceList } from '@/service/data-source/types'
import type { ResponseTable } from '@/service/types'
export function useTable() {
@@ -32,15 +32,15 @@ export function useTable() {
list: []
})
- const getList = () => {
+ const getList = (pluginName = '') => {
datasourceList({
pageNo: data.page,
pageSize: data.pageSize,
searchVal: data.searchVal,
- pluginName: ''
- }).then((res: ResponseTable<Array<DatasourceList> | []>) => {
- data.list = res.data.data as any
- data.itemCount = res.data.totalCount
+ pluginName
+ }).then((res: any) => {
+ data.list = res.data
+ data.itemCount = res.totalCount
})
}
diff --git a/seatunnel-ui/src/views/jobs/list/use-table.ts b/seatunnel-ui/src/views/jobs/list/use-table.ts
index e7ac2070..488abbfe 100644
--- a/seatunnel-ui/src/views/jobs/list/use-table.ts
+++ b/seatunnel-ui/src/views/jobs/list/use-table.ts
@@ -89,7 +89,7 @@ export function useTable() {
state.loading = true
taskJobList({ ...params }).then(
(res: ResponseTable<Array<JobDetail> | []>) => {
- state.tableData = res.data.data as any
+ state.tableData = res.data as any
state.totalPage = res.data.totalPage
state.loading = false
}
diff --git a/seatunnel-ui/src/views/login/use-form.ts b/seatunnel-ui/src/views/login/use-form.ts
index 65b4a9ba..b432883c 100644
--- a/seatunnel-ui/src/views/login/use-form.ts
+++ b/seatunnel-ui/src/views/login/use-form.ts
@@ -56,7 +56,7 @@ export function useForm() {
const handleLogin = () => {
userLogin({ ...state.loginForm }).then((res: any) => {
- userStore.setUserInfo(res.data)
+ userStore.setUserInfo(res)
router.push({ path: '/data-pipes' })
})
}
diff --git a/seatunnel-ui/src/views/projects/components/column-selector.tsx b/seatunnel-ui/src/views/projects/components/column-selector.tsx
new file mode 100644
index 00000000..597227fa
--- /dev/null
+++ b/seatunnel-ui/src/views/projects/components/column-selector.tsx
@@ -0,0 +1,143 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { NButton, NCheckboxGroup, NDropdown } from 'naive-ui'
+import { defineComponent, PropType, ref, watch } from 'vue'
+import {
+ filterColumns,
+ getColumnsBytable,
+ getCheckboxList
+} from '../utils/dealColumns'
+import { getColumns, setColumns } from '../utils/storeColums'
+import './index.scss'
+import { useI18n } from 'vue-i18n'
+
+const props = {
+ tableKey: {
+ default: '',
+ type: String
+ },
+ tableColumns: {
+ default: [],
+ type: Array as PropType<Array<any>>
+ }
+}
+export default defineComponent({
+ name: 'columnSelector',
+ props,
+ emits: ['changeOptions'],
+ setup(props, ctx) {
+ const selector = ref([]) as any
+ const ff = ref(null)
+ const { t } = useI18n()
+ const showDropdown = ref(false)
+ const columns = ref<(string | number)[] | null>(null)
+ const localColumn = getColumns(props.tableKey)
+ const storeColumn = ref<(string | number)[] | null>(null)
+ watch(props, () => {
+ selector.value = getColumnsBytable(props.tableColumns, t)
+ if (localColumn && localColumn.length > 0) {
+ columns.value = getCheckboxList(selector.value, localColumn, false)
+ } else {
+ columns.value = getCheckboxList(selector.value, [], true)
+ }
+ storeColumn.value = [...columns.value]
+ const resColumn = filterColumns(columns.value, props.tableColumns)
+ ctx.emit('changeOptions', resColumn)
+ })
+
+ const handleClick = (show: boolean) => {
+ if (!show) {
+ const resColumn = filterColumns(columns.value, props.tableColumns)
+ ctx.emit('changeOptions', resColumn)
+ setColumns(props.tableKey, resColumn)
+ }
+ }
+
+ const handleUpdateValue = (value: Array<string | number>) => {
+ const length = getCheckboxList(selector.value, [], true).length - 1
+ if (value.indexOf('ALL') == -1 && value.length == length) {
+ if (storeColumn.value && storeColumn.value.indexOf('ALL') > -1) {
+ columns.value = []
+ storeColumn.value = []
+ } else {
+ columns.value = getCheckboxList(selector.value, [], true)
+ storeColumn.value = getCheckboxList(selector.value, [], true)
+ }
+ } else if (value.indexOf('ALL') == -1 && value.length < length) {
+ columns.value = value.filter((item) => {
+ return item !== 'ALL'
+ })
+ } else if (value.indexOf('ALL') > -1 && value.length == length + 1) {
+ columns.value = []
+ storeColumn.value = []
+ } else if (value.indexOf('ALL') > -1 && value.length == 1) {
+ columns.value = getCheckboxList(selector.value, [], true)
+ storeColumn.value = getCheckboxList(selector.value, [], true)
+ } else if (value.indexOf('ALL') > -1 && value.length == length) {
+ if (storeColumn.value && storeColumn.value.indexOf('ALL') > -1) {
+ columns.value = value.filter((item) => {
+ return item !== 'ALL'
+ })
+ storeColumn.value = [
+ ...value.filter((item) => {
+ return item !== 'ALL'
+ })
+ ]
+ }
+ } else if (value.indexOf('ALL') > -1 && value.length < length) {
+ columns.value = value.filter((item) => {
+ return item !== 'ALL'
+ })
+ storeColumn.value = [
+ ...value.filter((item) => {
+ return item !== 'ALL'
+ })
+ ]
+ if (storeColumn.value && storeColumn.value.indexOf('ALL') == -1) {
+ columns.value = getCheckboxList(selector.value, [], true)
+ storeColumn.value = getCheckboxList(selector.value, [], true)
+ }
+ }
+ }
+
+ return {
+ selector,
+ ff,
+ showDropdown,
+ handleClick,
+ columns,
+ handleUpdateValue,
+ t
+ }
+ },
+ render() {
+ const { t } = this
+ return (
+ <div>
+ <NCheckboxGroup
+ v-model:value={this.columns}
+ onUpdate:value={this.handleUpdateValue}
+ >
+ <NDropdown options={this.selector} onUpdateShow={this.handleClick}>
+ <NButton class={'column-style'}>{t('project.column')}</NButton>
+ </NDropdown>
+ </NCheckboxGroup>
+ </div>
+ )
+ }
+})
diff --git a/seatunnel-ui/src/utils/index.ts b/seatunnel-ui/src/views/projects/components/index.scss
similarity index 81%
copy from seatunnel-ui/src/utils/index.ts
copy to seatunnel-ui/src/views/projects/components/index.scss
index d806dfb4..48ef2083 100644
--- a/seatunnel-ui/src/utils/index.ts
+++ b/seatunnel-ui/src/views/projects/components/index.scss
@@ -15,14 +15,20 @@
* limitations under the License.
*/
-import mapping from './mapping'
-import trim from './trim'
-import log from './log'
+.checkbox {
+ margin: 5px 5px 5px 15px;
+ width: 200px;
+}
+.project-style {
+ background-color: #eeeeee;
+ color: #000;
+}
+
+.column-style{
+ width: 70px;
+}
-const utils = {
- mapping,
- trim,
- log
+.btnlist-style {
+ width: 70px;
}
-export default utils
diff --git a/seatunnel-ui/src/views/projects/components/jumpProject.ts b/seatunnel-ui/src/views/projects/components/jumpProject.ts
new file mode 100644
index 00000000..e69de29b
diff --git a/seatunnel-ui/src/views/projects/components/projectSelector.tsx b/seatunnel-ui/src/views/projects/components/projectSelector.tsx
new file mode 100644
index 00000000..84331cf0
--- /dev/null
+++ b/seatunnel-ui/src/views/projects/components/projectSelector.tsx
@@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { useProjectStore } from '@/store/project'
+import { NSelect } from 'naive-ui'
+import { defineComponent, ref, VNode, h } from 'vue'
+import { NTooltip, SelectOption } from 'naive-ui'
+import { useI18n } from 'vue-i18n'
+import './index.scss'
+const props = {
+ key: {
+ type: String,
+ default: ''
+ },
+ size: {
+ default: 'medium'
+ },
+ initCode: {
+ default: null
+ }
+}
+
+export default defineComponent({
+ name: 'projectSelector',
+ props,
+ emits: ['getprojectList'],
+ setup(props, ctx) {
+ const { t } = useI18n()
+ const projectItem = Number(props.initCode) || null
+ const projectOption = ref([] as any)
+ const projectStore = useProjectStore()
+ projectOption.value.push(...projectStore.getProjects)
+ const rendedrOption = ({
+ node,
+ option
+ }: {
+ node: VNode
+ option: SelectOption
+ }) => {
+ return h(
+ NTooltip,
+ {
+ width: 100,
+ placement: 'bottom-end',
+ showArrow: false
+ },
+ {
+ trigger: () => node,
+ default: () => option.label
+ }
+ )
+ }
+ const handleSelectproject = (option: any) => {
+ ctx.emit('getprojectList', option)
+ }
+ return {
+ handleSelectproject,
+ projectOption,
+ projectItem,
+ rendedrOption,
+ t
+ }
+ },
+ render() {
+ return (
+ <div style={{ width: '180px' }}>
+ {this.projectOption && (
+ <NSelect
+ size={this.$props.size as any}
+ renderOption={this.rendedrOption}
+ v-model:value={this.projectItem}
+ placeholder={this.t('project.all_project')}
+ options={this.projectOption}
+ clearable
+ filterable
+ onUpdateValue={this.handleSelectproject}
+ />
+ )}
+ </div>
+ )
+ }
+})
diff --git a/seatunnel-ui/src/themes/index.ts b/seatunnel-ui/src/views/projects/utils/changeProject.ts
similarity index 75%
copy from seatunnel-ui/src/themes/index.ts
copy to seatunnel-ui/src/views/projects/utils/changeProject.ts
index a5f70cbf..bd34eb48 100644
--- a/seatunnel-ui/src/themes/index.ts
+++ b/seatunnel-ui/src/views/projects/utils/changeProject.ts
@@ -15,12 +15,12 @@
* limitations under the License.
*/
-import light from './modules/light'
-import dark from './modules/dark'
+import { useProjectStore } from '@/store/project'
-const themeList = {
- light,
- dark
-}
+const projectStore = useProjectStore()
-export default themeList
+export function changeProject(code: string | number) {
+ projectStore.setGlobalFlag(false)
+ projectStore.setCurrentProject(code)
+ projectStore.setChangeProject(true)
+}
diff --git a/seatunnel-ui/src/views/projects/utils/dealColumns.ts b/seatunnel-ui/src/views/projects/utils/dealColumns.ts
new file mode 100644
index 00000000..b1773a0c
--- /dev/null
+++ b/seatunnel-ui/src/views/projects/utils/dealColumns.ts
@@ -0,0 +1,123 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { h } from 'vue'
+import { NCheckbox } from 'naive-ui'
+
+interface columnType {
+ key: string
+ title: string
+ type?: string
+ [key: string]: any
+}
+interface optionType {
+ label: string
+ value: string
+ disabled?: () => boolean
+ [key: string]: any
+}
+const copyKey = ['copy']
+
+function isCopyKyeOrSelection(
+ item: columnType,
+ selectArray: Array<any>
+): boolean {
+ return (
+ (copyKey.indexOf(item.key) > -1 && selectArray.indexOf('name') > -1) ||
+ item.type == 'selection' ||
+ item.key == 'operation'
+ )
+}
+
+export function filterColumns(
+ selectArray: Array<string | number> | null,
+ oriArray: Array<columnType>
+): Array<columnType> {
+ if (!selectArray || selectArray.length == 0) {
+ return []
+ }
+
+ const resArray: Array<columnType> = [] as Array<columnType>
+ oriArray.forEach((item: any) => {
+ if (
+ isCopyKyeOrSelection(item, selectArray) ||
+ selectArray.indexOf(item.key) > -1
+ ) {
+ resArray.push(item)
+ }
+ })
+ return resArray
+}
+
+export function getColumnsBytable(
+ tableColumns: Array<any>,
+ t: any
+): Array<any> {
+ const resArray: Array<optionType> = [
+ {
+ label: t('project.all_column'),
+ value: 'ALL',
+ key: 'ALL',
+ type: 'render',
+ render: () => {
+ return h(NCheckbox, {
+ value: 'ALL',
+ label: t('project.all_column'),
+ class: 'checkbox'
+ })
+ }
+ }
+ ]
+ tableColumns.forEach((item: any) => {
+ if (!isCopyKyeOrSelection(item, ['name'])) {
+ resArray.push({
+ ...item,
+ label: item.title,
+ value: item.key,
+ type: 'render',
+ render: () => {
+ return h(NCheckbox, {
+ value: item.key,
+ label: item.title,
+ class: 'checkbox'
+ })
+ }
+ })
+ }
+ })
+ return resArray
+}
+
+export function getCheckboxList(
+ selectorColumns: Array<columnType>,
+ localColumn: Array<columnType>,
+ ALL_CONF = false
+): Array<string> {
+ const checkboxList: Array<string> = []
+ const localCheckboxList: Array<string> = []
+ localColumn.forEach((el: any) => {
+ if (!isCopyKyeOrSelection(el, ['name'])) localCheckboxList.push(el.key)
+ })
+ if (ALL_CONF || selectorColumns.length == localCheckboxList.length + 1) {
+ selectorColumns.forEach((item: any) => {
+ checkboxList.push(item.key)
+ })
+ } else {
+ checkboxList.push(...localCheckboxList)
+ }
+ return checkboxList
+}
diff --git a/seatunnel-ui/src/service/virtual-tables/index.ts b/seatunnel-ui/src/views/projects/utils/getProjectCodes.ts
similarity index 78%
copy from seatunnel-ui/src/service/virtual-tables/index.ts
copy to seatunnel-ui/src/views/projects/utils/getProjectCodes.ts
index 1943eab2..9cff89eb 100644
--- a/seatunnel-ui/src/service/virtual-tables/index.ts
+++ b/seatunnel-ui/src/views/projects/utils/getProjectCodes.ts
@@ -15,12 +15,10 @@
* limitations under the License.
*/
-import { axios } from '@/service/service'
+import { useProjectStore } from '@/store/project'
-export function virtualTableList(params: any): any {
- return axios({
- url: '/virtual_table/list',
- method: 'get',
- params
- })
+export const getProjectCodes = () => {
+ const projectStore = useProjectStore()
+ const codes = projectStore.getCurrentProject
+ return (codes as Array<string | number>) || []
}
diff --git a/seatunnel-ui/src/service/virtual-tables/index.ts b/seatunnel-ui/src/views/projects/utils/storeColums.ts
similarity index 76%
copy from seatunnel-ui/src/service/virtual-tables/index.ts
copy to seatunnel-ui/src/views/projects/utils/storeColums.ts
index 1943eab2..de563a05 100644
--- a/seatunnel-ui/src/service/virtual-tables/index.ts
+++ b/seatunnel-ui/src/views/projects/utils/storeColums.ts
@@ -15,12 +15,10 @@
* limitations under the License.
*/
-import { axios } from '@/service/service'
+export function setColumns(key: string, value: any) {
+ localStorage.setItem(`col_${key}`, JSON.stringify(value))
+}
-export function virtualTableList(params: any): any {
- return axios({
- url: '/virtual_table/list',
- method: 'get',
- params
- })
+export function getColumns(key: string): Array<any> {
+ return JSON.parse(localStorage.getItem(`col_${key}`) as string) as Array<any>
}
diff --git a/seatunnel-ui/src/views/setting/index.tsx b/seatunnel-ui/src/views/setting/index.tsx
index 04f86c8f..9887923c 100644
--- a/seatunnel-ui/src/views/setting/index.tsx
+++ b/seatunnel-ui/src/views/setting/index.tsx
@@ -19,6 +19,7 @@ import { defineComponent } from 'vue'
import { useI18n } from 'vue-i18n'
import { NSpace, NCard, NSwitch, NList, NListItem, NSelect } from 'naive-ui'
import { useSettingStore } from '@/store/setting'
+import Theme from './theme'
const Setting = defineComponent({
name: 'Setting',
@@ -105,16 +106,17 @@ const Setting = defineComponent({
<NSpace justify='space-between' align='center'>
<span>{t('setting.model')}</span>
<div class='w-56'>
- <NSelect
+ <Theme/>
+ {/* <NSelect
value={'light'}
options={[
{ value: 'light', label: t('setting.light') }
]}
- />
+ /> */}
</div>
</NSpace>
</NListItem>
- <NListItem>
+ {/* <NListItem>
<NSpace justify='space-between' align='center'>
<span>{t('setting.hue')}</span>
<div class='w-56'>
@@ -126,7 +128,7 @@ const Setting = defineComponent({
/>
</div>
</NSpace>
- </NListItem>
+ </NListItem> */}
<NListItem>
<NSpace justify='space-between' align='center'>
<span>{t('setting.fillet')}</span>
diff --git a/seatunnel-ui/src/service/virtual-tables/types.ts b/seatunnel-ui/src/views/setting/theme/index.module.scss
similarity index 96%
rename from seatunnel-ui/src/service/virtual-tables/types.ts
rename to seatunnel-ui/src/views/setting/theme/index.module.scss
index 3e7c6c26..2cf83fab 100644
--- a/seatunnel-ui/src/service/virtual-tables/types.ts
+++ b/seatunnel-ui/src/views/setting/theme/index.module.scss
@@ -14,3 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
+.icon {
+ margin: 0 12px;
+}
diff --git a/seatunnel-ui/src/views/setting/theme/index.tsx b/seatunnel-ui/src/views/setting/theme/index.tsx
new file mode 100644
index 00000000..17717eb8
--- /dev/null
+++ b/seatunnel-ui/src/views/setting/theme/index.tsx
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { defineComponent, computed, ref, watch } from 'vue'
+import { NDropdown, NIcon, NButton, NSelect } from 'naive-ui'
+import { DownOutlined } from '@vicons/antd'
+import { useTheme } from './use-theme'
+import styles from './index.module.scss'
+import { useI18n } from 'vue-i18n'
+import { useThemeStore } from '@/store/theme'
+import { find } from 'lodash'
+import type { ITheme } from '@/store/theme/types'
+
+const Theme = defineComponent({
+ name: 'Theme',
+ setup() {
+ const themeStore = useThemeStore()
+ const { t } = useI18n()
+ const onSelectTheme = (theme: ITheme) => {
+ themeStore.setTheme(theme)
+ }
+
+ console.log(t('theme.light'), 'theme.light')
+ const themeOpts = computed(() =>[
+ // { label: t('theme.dark_blue'), key: 'dark-blue' },
+ { label: t('theme.light'), key: 'light', value: 'light' },
+ { label: t('theme.dark'), key: 'dark', value: 'dark' }
+ ])
+
+ let themeLabel = computed(() => themeStore.theme)
+ return {
+ themeOpts,
+ themeLabel,
+ onSelectTheme
+ }
+ },
+ render() {
+ return (
+ <NSelect
+ options={this.themeOpts}
+ v-model={[this.themeLabel, 'value']}
+ onUpdateValue={(v) => {
+ this.onSelectTheme(v)
+ }}
+ />
+ )
+ }
+})
+
+export default Theme
diff --git a/seatunnel-ui/src/views/setting/theme/use-theme.ts b/seatunnel-ui/src/views/setting/theme/use-theme.ts
new file mode 100644
index 00000000..cf0214ad
--- /dev/null
+++ b/seatunnel-ui/src/views/setting/theme/use-theme.ts
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { computed, ref, watch } from 'vue'
+import { useI18n } from 'vue-i18n'
+import { useThemeStore } from '@/store/theme'
+import { find } from 'lodash'
+import type { ITheme } from '@/store/theme/types'
+
+export function useTheme() {
+ const { t } = useI18n()
+ const themeStore = useThemeStore()
+
+ const getThemes = () => [
+ // { label: t('theme.dark_blue'), key: 'dark-blue' },
+ { label: t('theme.light'), key: 'light', value: 'light' },
+ { label: t('theme.dark'), key: 'dark', value: 'dark' }
+ ]
+
+ let themeLabel = computed(() => themeStore.theme)
+ const themes = ref(getThemes())
+ // const currentThemeLabel = ref(getThemeLabel())
+
+ const onSelectTheme = (theme: ITheme) => {
+ console.log(111)
+ themeStore.setTheme(theme)
+ // currentThemeLabel.value = getThemeLabel()
+ }
+
+ watch(useI18n().locale, () => {
+ themes.value = getThemes()
+ // currentThemeLabel.value = getThemeLabel()
+ })
+
+ return { themes, themeLabel, onSelectTheme }
+}
diff --git a/seatunnel-ui/src/views/task/components/node/detail-modal.tsx b/seatunnel-ui/src/views/task/components/node/detail-modal.tsx
new file mode 100644
index 00000000..e8be45d2
--- /dev/null
+++ b/seatunnel-ui/src/views/task/components/node/detail-modal.tsx
@@ -0,0 +1,228 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { defineComponent, PropType, ref, watch, nextTick, h, Ref } from 'vue'
+import { useI18n } from 'vue-i18n'
+import Modal from '@/components/modal'
+import Detail from './detail'
+import { formatModel } from './format-data'
+import {
+ HistoryOutlined,
+ ProfileOutlined,
+ QuestionCircleTwotone,
+ BranchesOutlined
+} from '@vicons/antd'
+import { NIcon } from 'naive-ui'
+import { Router, useRoute, useRouter } from 'vue-router'
+import { querySubProcessInstanceByTaskCode } from '@/service/modules/process-instances'
+import { useTaskNodeStore, TASK_TYPES_MAP } from '@/store/project'
+import type {
+ ITaskData,
+ ITaskType,
+ EditWorkflowDefinition,
+ IWorkflowTaskInstance,
+ WorkflowInstance
+} from './types'
+
+const props = {
+ show: {
+ type: Boolean as PropType<boolean>,
+ default: false
+ },
+ data: {
+ type: Object as PropType<ITaskData>,
+ default: { code: 0, taskType: 'SHELL', name: '' }
+ },
+ projectCode: {
+ type: Number as PropType<number>,
+ required: true,
+ default: 0
+ },
+ readonly: {
+ type: Boolean as PropType<boolean>,
+ default: false
+ },
+ from: {
+ type: Number as PropType<number>,
+ default: 0
+ },
+ definition: {
+ type: Object as PropType<Ref<EditWorkflowDefinition>>
+ },
+ processInstance: {
+ type: Object as PropType<WorkflowInstance>
+ },
+ taskInstance: {
+ type: Object as PropType<IWorkflowTaskInstance>
+ },
+ saving: {
+ type: Boolean,
+ default: false
+ }
+}
+
+const NodeDetailModal = defineComponent({
+ name: 'NodeDetailModal',
+ props,
+ emits: ['cancel', 'submit', 'viewLog'],
+ setup(props, { emit }) {
+ const { t, locale } = useI18n()
+ const router: Router = useRouter()
+ const route = useRoute()
+ const taskStore = useTaskNodeStore()
+ const renderIcon = (icon: any) => {
+ return () => h(NIcon, null, { default: () => h(icon) })
+ }
+ const detailRef = ref()
+
+ const onConfirm = async () => {
+ await detailRef.value.value.validate()
+ emit('submit', { data: detailRef.value.value.getValues() })
+ }
+ const onCancel = () => {
+ emit('cancel')
+ }
+
+ const headerLinks = ref([] as any)
+
+ const handleViewLog = () => {
+ if (props.taskInstance) {
+ emit('viewLog', props.taskInstance.id, props.taskInstance.taskType)
+ }
+ }
+
+ const initHeaderLinks = (processInstance: any, taskType?: ITaskType) => {
+ headerLinks.value = [
+ {
+ text: t('project.node.instructions'),
+ show: !!(taskType && !TASK_TYPES_MAP[taskType]?.helperLinkDisable),
+ action: () => {
+ let linkedTaskType = taskType?.toLowerCase().replace('_', '-')
+ if (taskType === 'PROCEDURE') linkedTaskType = 'stored-procedure'
+ const helpUrl =
+ 'https://dolphinscheduler.apache.org/' +
+ locale.value.toLowerCase().replace('_', '-') +
+ '/docs/latest/user_doc/guide/task/' +
+ linkedTaskType +
+ '.html'
+ window.open(helpUrl)
+ },
+ icon: renderIcon(QuestionCircleTwotone)
+ },
+ {
+ text: t('project.node.view_history'),
+ show: !!props.taskInstance,
+ action: () => {
+ router.push({
+ name: 'task-instance',
+ params: {
+ processInstanceId: processInstance.id
+ },
+ query: {
+ searchVal: props.data.name
+ }
+ })
+ },
+ icon: renderIcon(HistoryOutlined)
+ },
+ {
+ text: t('project.node.view_log'),
+ show: !!props.taskInstance,
+ action: () => {
+ handleViewLog()
+ },
+ icon: renderIcon(ProfileOutlined)
+ },
+ {
+ text: t('project.node.enter_this_child_node'),
+ show: props.data.taskType === 'SUB_PROCESS',
+ disabled:
+ !props.data.id ||
+ (router.currentRoute.value.name === 'workflow-instance-detail' &&
+ !props.taskInstance),
+ action: () => {
+ if (router.currentRoute.value.name === 'workflow-instance-detail') {
+ querySubProcessInstanceByTaskCode(
+ { taskId: props.taskInstance?.id },
+ { projectCode: props.projectCode }
+ ).then((res: any) => {
+ router.push({
+ name: 'workflow-instance-detail',
+ params: { id: res.subProcessInstanceId },
+ query: { code: props.data.taskParams?.processDefinitionCode }
+ })
+ })
+ } else {
+ router.push({
+ name: 'workflow-definition-detail',
+ params: { code: props.data.taskParams?.processDefinitionCode },
+ query: {...route.query}
+ })
+ }
+ },
+ icon: renderIcon(BranchesOutlined)
+ }
+ ]
+ }
+
+ const onTaskTypeChange = (taskType: ITaskType) => {
+ // eslint-disable-next-line vue/no-mutating-props
+ props.data.taskType = taskType
+ initHeaderLinks(props.processInstance, props.data.taskType)
+ }
+
+ watch(
+ () => [props.show, props.data],
+ async () => {
+ if (!props.show) return
+ initHeaderLinks(props.processInstance, props.data.taskType)
+ taskStore.init()
+ await nextTick()
+ detailRef.value.value.setValues(formatModel(props.data))
+ }
+ )
+
+ return () => (
+ <Modal
+ show={props.show}
+ title={
+ props.from === 1
+ ? `${t('project.task.current_task_settings')}`
+ : `${t('project.node.current_node_settings')}`
+ }
+ onConfirm={onConfirm}
+ confirmLoading={props.saving}
+ confirmDisabled={props.readonly}
+ onCancel={onCancel}
+ headerLinks={headerLinks}
+ >
+ <Detail
+ ref={detailRef}
+ onTaskTypeChange={onTaskTypeChange}
+ key={props.data.taskType}
+ projectCode={props.projectCode}
+ data={props.data}
+ from={props.from}
+ readonly={props.readonly}
+ definitionRef={props.definition}
+ />
+ </Modal>
+ )
+ }
+})
+
+export default NodeDetailModal
diff --git a/seatunnel-ui/src/views/task/components/node/detail.tsx b/seatunnel-ui/src/views/task/components/node/detail.tsx
new file mode 100644
index 00000000..1ddb2ac6
--- /dev/null
+++ b/seatunnel-ui/src/views/task/components/node/detail.tsx
@@ -0,0 +1,123 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import {
+ defineComponent,
+ ref,
+ watch,
+ Ref,
+ unref,
+ PropType,
+ onMounted
+} from 'vue'
+import Form from '@/components/form'
+import { useTask } from './use-task'
+import { useTaskNodeStore } from '@/store/project/task-node'
+import { formatModel } from './format-data'
+import type { ITaskData, EditWorkflowDefinition } from './types'
+
+const props = {
+ projectCode: {
+ type: Number,
+ default: 0
+ },
+ data: {
+ type: Object as PropType<ITaskData>,
+ default: { code: 0, taskType: 'SHELL', name: '' }
+ },
+ readonly: {
+ type: Boolean as PropType<boolean>,
+ default: false
+ },
+ from: {
+ type: Number as PropType<number>,
+ default: 0
+ },
+ definitionRef: {
+ type: Object as PropType<Ref<EditWorkflowDefinition>>
+ },
+ setting: {
+ type: Object as PropType<any>
+ }
+}
+
+const NodeDetail = defineComponent({
+ name: 'NodeDetail',
+ emits: ['taskTypeChange', 'valuesChange'],
+ props,
+ setup(props, { expose, emit }) {
+ const taskStore = useTaskNodeStore()
+
+ const formRef = ref()
+
+ const handleUpdateValue = (value: any, field: string) => {
+ emit('valuesChange', value, field)
+ }
+ const { elementsRef, rulesRef, model } = useTask({
+ data: props.data,
+ projectCode: props.projectCode,
+ from: props.from,
+ readonly: props.readonly,
+ definitionRef: props.definitionRef,
+ setting: props.setting,
+ updateValue: handleUpdateValue
+ })
+ watch(
+ () => model.taskType,
+ async (taskType) => {
+ taskStore.updateName(model.name || '')
+ emit('taskTypeChange', taskType)
+ }
+ )
+
+ expose(formRef)
+
+ watch(
+ () => props.data,
+ () => {
+ if (props.data) {
+ formRef.value.setValues(
+ props.from === 0 ? props.data : formatModel(props.data)
+ )
+ }
+ }
+ )
+
+ onMounted(() => {
+ formRef.value.setValues(
+ props.from === 0 ? props.data : formatModel(props.data)
+ )
+ })
+
+ return () => (
+ <Form
+ ref={formRef}
+ meta={{
+ model,
+ rules: rulesRef.value,
+ elements: elementsRef.value,
+ disabled: unref(props.readonly)
+ }}
+ layout={{
+ xGap: 10
+ }}
+ />
+ )
+ }
+})
+
+export default NodeDetail
diff --git a/seatunnel-ui/src/views/task/components/node/fields/index.ts b/seatunnel-ui/src/views/task/components/node/fields/index.ts
new file mode 100644
index 00000000..c18097ef
--- /dev/null
+++ b/seatunnel-ui/src/views/task/components/node/fields/index.ts
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+export { useName } from './use-name'
+export { useRunFlag } from './use-run-flag'
+export { useDescription } from './use-description'
+export { useTaskPriority } from './use-task-priority'
+export { useWorkerGroup } from './use-worker-group'
+export { useEnvironmentName } from './use-environment-name'
+export { useTaskGroup } from './use-task-group'
+export { useFailed } from './use-failed'
+export { useDelayTime } from './use-delay-time'
+export { useTimeoutAlarm } from './use-timeout-alarm'
+export { usePreTasks } from './use-pre-tasks'
... 25669 lines suppressed ...