diff --git a/dolphinscheduler-ui-next/.eslintrc.js b/dolphinscheduler-ui-next/.eslintrc.js index eeccacaf5..10cafc563 100644 --- a/dolphinscheduler-ui-next/.eslintrc.js +++ b/dolphinscheduler-ui-next/.eslintrc.js @@ -61,6 +61,10 @@ module.exports = { ], 'space-before-function-paren': 'off', quotes: ['error', 'single'], - 'comma-dangle': ['error', 'never'] + 'comma-dangle': ['error', 'never'], + 'vue/multi-word-component-names': 'off', + 'vue/component-definition-name-casing': 'off', + 'vue/require-valid-default-prop': 'off', + 'no-console': 'error' } } diff --git a/dolphinscheduler-ui-next/.prettier.js b/dolphinscheduler-ui-next/.prettierrc.js similarity index 95% rename from dolphinscheduler-ui-next/.prettier.js rename to dolphinscheduler-ui-next/.prettierrc.js index 075ff8788..7bcb29e16 100644 --- a/dolphinscheduler-ui-next/.prettier.js +++ b/dolphinscheduler-ui-next/.prettierrc.js @@ -25,5 +25,6 @@ module.exports = { "jsxSingleQuote": true, "arrowParens": "always", "htmlWhitespaceSensitivity": "strict", - "endOfLine": "lf" + "endOfLine": "lf", + "trailingComma": "none" }; diff --git a/dolphinscheduler-ui-next/package.json b/dolphinscheduler-ui-next/package.json index 54de5e4c6..ecf2800dd 100644 --- a/dolphinscheduler-ui-next/package.json +++ b/dolphinscheduler-ui-next/package.json @@ -7,7 +7,7 @@ "build:prod": "vue-tsc --noEmit && vite build --mode production", "preview": "vite preview", "lint": "eslint src --fix --ext .ts,.tsx,.vue", - "prettier": "prettier --config .prettier.js --write src/**/*.{vue,ts,tsx}" + "prettier": "prettier --write src/**/*.{vue,ts,tsx}" }, "dependencies": { "@vueuse/core": "^7.5.3", diff --git a/dolphinscheduler-ui-next/src/App.tsx b/dolphinscheduler-ui-next/src/App.tsx index 33476945c..8e700a948 100644 --- a/dolphinscheduler-ui-next/src/App.tsx +++ b/dolphinscheduler-ui-next/src/App.tsx @@ -22,7 +22,7 @@ import { NConfigProvider, darkTheme, GlobalThemeOverrides, - NMessageProvider, + NMessageProvider } from 'naive-ui' import { useThemeStore } from '@/store/theme/theme' import { useLocalesStore } from '@/store/locales/locales' @@ -34,7 +34,7 @@ const App = defineComponent({ const isRouterAlive = ref(true) const themeStore = useThemeStore() const currentTheme = computed(() => - themeStore.darkTheme ? darkTheme : undefined, + themeStore.darkTheme ? darkTheme : undefined ) const localesStore = useLocalesStore() /*refresh page when router params change*/ @@ -51,7 +51,7 @@ const App = defineComponent({ reload, isRouterAlive, currentTheme, - localesStore, + localesStore } }, render() { @@ -70,7 +70,7 @@ const App = defineComponent({ ) - }, + } }) export default App diff --git a/dolphinscheduler-ui-next/src/components/card/index.tsx b/dolphinscheduler-ui-next/src/components/card/index.tsx index 25be283ff..5d152ae96 100644 --- a/dolphinscheduler-ui-next/src/components/card/index.tsx +++ b/dolphinscheduler-ui-next/src/components/card/index.tsx @@ -19,17 +19,17 @@ import { defineComponent, PropType } from 'vue' import { NCard } from 'naive-ui' const headerStyle = { - borderBottom: '1px solid var(--n-border-color)', + borderBottom: '1px solid var(--n-border-color)' } const contentStyle = { - padding: '8px 10px', + padding: '8px 10px' } const props = { title: { - type: String as PropType, - }, + type: String as PropType + } } const Card = defineComponent({ @@ -47,7 +47,7 @@ const Card = defineComponent({ {$slots} ) - }, + } }) export default Card diff --git a/dolphinscheduler-ui-next/src/components/chart/index.ts b/dolphinscheduler-ui-next/src/components/chart/index.ts index 09d037d4c..9edd07553 100644 --- a/dolphinscheduler-ui-next/src/components/chart/index.ts +++ b/dolphinscheduler-ui-next/src/components/chart/index.ts @@ -15,13 +15,7 @@ * limitations under the License. */ -import { - getCurrentInstance, - onMounted, - onBeforeUnmount, - watch, - watchEffect, -} from 'vue' +import { getCurrentInstance, onMounted, onBeforeUnmount, watch } from 'vue' import { useThemeStore } from '@/store/theme/theme' import { throttle } from 'echarts' import { useI18n } from 'vue-i18n' @@ -76,7 +70,7 @@ function initChart( init() }, { - deep: true, + deep: true } ) diff --git a/dolphinscheduler-ui-next/src/components/chart/modules/Bar.tsx b/dolphinscheduler-ui-next/src/components/chart/modules/Bar.tsx index d0c7e0927..8977ca28f 100644 --- a/dolphinscheduler-ui-next/src/components/chart/modules/Bar.tsx +++ b/dolphinscheduler-ui-next/src/components/chart/modules/Bar.tsx @@ -22,20 +22,20 @@ import type { Ref } from 'vue' const props = { height: { type: [String, Number] as PropType, - default: 400, + default: 400 }, width: { type: [String, Number] as PropType, - default: '100%', + default: '100%' }, xAxisData: { type: Array as PropType>, - default: () => [], + default: () => [] }, seriesData: { type: Array as PropType>, - default: () => [], - }, + default: () => [] + } } const BarChart = defineComponent({ @@ -48,37 +48,37 @@ const BarChart = defineComponent({ tooltip: { trigger: 'axis', axisPointer: { - type: 'shadow', + type: 'shadow' }, - backgroundColor: '#fff', + backgroundColor: '#fff' }, grid: { left: '3%', right: '4%', bottom: '3%', - containLabel: true, + containLabel: true }, xAxis: [ { type: 'category', data: props.xAxisData, axisTick: { - alignWithLabel: true, - }, - }, + alignWithLabel: true + } + } ], yAxis: [ { - type: 'value', - }, + type: 'value' + } ], series: [ { type: 'bar', barWidth: '60%', - data: props.seriesData, - }, - ], + data: props.seriesData + } + ] } initChart(barChartRef, option) @@ -92,11 +92,11 @@ const BarChart = defineComponent({ ref='barChartRef' style={{ height: typeof height === 'number' ? height + 'px' : height, - width: typeof width === 'number' ? width + 'px' : width, + width: typeof width === 'number' ? width + 'px' : width }} /> ) - }, + } }) export default BarChart diff --git a/dolphinscheduler-ui-next/src/components/chart/modules/Gauge.tsx b/dolphinscheduler-ui-next/src/components/chart/modules/Gauge.tsx index 4abab3f41..1154dd976 100644 --- a/dolphinscheduler-ui-next/src/components/chart/modules/Gauge.tsx +++ b/dolphinscheduler-ui-next/src/components/chart/modules/Gauge.tsx @@ -22,15 +22,15 @@ import type { Ref } from 'vue' const props = { height: { type: [String, Number] as PropType, - default: 400, + default: 400 }, width: { type: [String, Number] as PropType, - default: 400, + default: 400 }, data: { - type: [String, Number] as PropType, - }, + type: [String, Number] as PropType + } } const GaugeChart = defineComponent({ @@ -45,47 +45,47 @@ const GaugeChart = defineComponent({ type: 'gauge', axisLine: { lineStyle: { - width: 30, - }, + width: 30 + } }, pointer: { itemStyle: { - color: 'auto', - }, + color: 'auto' + } }, axisTick: { distance: -30, length: 8, lineStyle: { color: '#fff', - width: 2, - }, + width: 2 + } }, splitLine: { distance: -30, length: 30, lineStyle: { color: '#fff', - width: 4, - }, + width: 4 + } }, axisLabel: { color: 'auto', distance: 40, - fontSize: 20, + fontSize: 20 }, detail: { valueAnimation: true, formatter: '{value} %', - color: 'auto', + color: 'auto' }, data: [ { - value: props.data, - }, - ], - }, - ], + value: props.data + } + ] + } + ] } initChart(gaugeChartRef, option) @@ -99,11 +99,11 @@ const GaugeChart = defineComponent({ ref='gaugeChartRef' style={{ height: typeof height === 'number' ? height + 'px' : height, - width: typeof width === 'number' ? width + 'px' : width, + width: typeof width === 'number' ? width + 'px' : width }} /> ) - }, + } }) export default GaugeChart diff --git a/dolphinscheduler-ui-next/src/components/chart/modules/Pie.tsx b/dolphinscheduler-ui-next/src/components/chart/modules/Pie.tsx index 02448d613..0f81fc359 100644 --- a/dolphinscheduler-ui-next/src/components/chart/modules/Pie.tsx +++ b/dolphinscheduler-ui-next/src/components/chart/modules/Pie.tsx @@ -22,15 +22,15 @@ import type { Ref } from 'vue' const props = { height: { type: [String, Number] as PropType, - default: 590, + default: 590 }, width: { type: [String, Number] as PropType, - default: '100%', + default: '100%' }, data: { - type: Array as PropType>, - }, + type: Array as PropType> + } } const PieChart = defineComponent({ @@ -42,11 +42,11 @@ const PieChart = defineComponent({ const option = { tooltip: { trigger: 'item', - backgroundColor: '#fff', + backgroundColor: '#fff' }, legend: { bottom: '0%', - left: 'center', + left: 'center' }, series: [ { @@ -56,14 +56,14 @@ const PieChart = defineComponent({ avoidLabelOverlap: false, label: { show: false, - position: 'center', + position: 'center' }, labelLine: { - show: false, + show: false }, - data: props.data, - }, - ], + data: props.data + } + ] } initChart(pieChartRef, option) @@ -77,11 +77,11 @@ const PieChart = defineComponent({ ref='pieChartRef' style={{ height: typeof height === 'number' ? height + 'px' : height, - width: typeof width === 'number' ? width + 'px' : width, + width: typeof width === 'number' ? width + 'px' : width }} /> ) - }, + } }) export default PieChart diff --git a/dolphinscheduler-ui-next/src/components/modal/index.tsx b/dolphinscheduler-ui-next/src/components/modal/index.tsx index 4fc3cdda2..7758ddbc2 100644 --- a/dolphinscheduler-ui-next/src/components/modal/index.tsx +++ b/dolphinscheduler-ui-next/src/components/modal/index.tsx @@ -23,26 +23,26 @@ import styles from './index.module.scss' const props = { show: { type: Boolean as PropType, - default: false, + default: false }, title: { type: String as PropType, - required: true, + required: true }, cancelText: { - type: String as PropType, + type: String as PropType }, cancelShow: { type: Boolean as PropType, - default: true, + default: true }, confirmText: { - type: String as PropType, + type: String as PropType }, confirmDisabled: { type: Boolean as PropType, - default: false, - }, + default: false + } } const Modal = defineComponent({ @@ -90,12 +90,12 @@ const Modal = defineComponent({ {this.confirmText || t('modal.confirm')} - ), + ) }} ) - }, + } }) export default Modal diff --git a/dolphinscheduler-ui-next/src/components/monaco-editor/index.tsx b/dolphinscheduler-ui-next/src/components/monaco-editor/index.tsx index fb7100aa0..1fbbfb5e6 100644 --- a/dolphinscheduler-ui-next/src/components/monaco-editor/index.tsx +++ b/dolphinscheduler-ui-next/src/components/monaco-editor/index.tsx @@ -22,7 +22,7 @@ import { PropType, nextTick, ref, - watch, + watch } from 'vue' import * as monaco from 'monaco-editor' import editorWorker from 'monaco-editor/esm/vs/editor/editor.worker?worker' @@ -34,20 +34,20 @@ import tsWorker from 'monaco-editor/esm/vs/language/typescript/ts.worker?worker' const props = { modelValue: { type: String as PropType, - default: '', + default: '' }, language: { type: String as PropType, - default: 'shell', + default: 'shell' }, readOnly: { type: Boolean as PropType, - default: false, + default: false }, options: { type: Object, - default: () => {}, - }, + default: () => {} + } } // @ts-ignore @@ -66,7 +66,7 @@ window.MonacoEnvironment = { return new tsWorker() } return new editorWorker() - }, + } } export default defineComponent({ @@ -83,7 +83,7 @@ export default defineComponent({ if (val !== getValue()) { editor?.setValue(val) } - }, + } ) onMounted(async () => { @@ -96,7 +96,7 @@ export default defineComponent({ value: props.modelValue, language: props.language, readOnly: props.readOnly, - automaticLayout: true, + automaticLayout: true }) } }) @@ -113,9 +113,9 @@ export default defineComponent({ id='monaco-container' style={{ height: '300px', - border: '1px solid #eee', + border: '1px solid #eee' }} > ) - }, + } }) diff --git a/dolphinscheduler-ui-next/src/layouts/content/components/locales/index.tsx b/dolphinscheduler-ui-next/src/layouts/content/components/locales/index.tsx index c57c14e87..da76eee22 100644 --- a/dolphinscheduler-ui-next/src/layouts/content/components/locales/index.tsx +++ b/dolphinscheduler-ui-next/src/layouts/content/components/locales/index.tsx @@ -27,8 +27,8 @@ const Locales = defineComponent({ props: { localesOptions: { type: Array as PropType, - default: [], - }, + default: [] + } }, setup(props) { const localesStore = useLocalesStore() @@ -57,7 +57,7 @@ const Locales = defineComponent({ ) - }, + } }) export default Locales diff --git a/dolphinscheduler-ui-next/src/layouts/content/components/locales/use-dropdown.ts b/dolphinscheduler-ui-next/src/layouts/content/components/locales/use-dropdown.ts index 20658f128..0df40dee9 100644 --- a/dolphinscheduler-ui-next/src/layouts/content/components/locales/use-dropdown.ts +++ b/dolphinscheduler-ui-next/src/layouts/content/components/locales/use-dropdown.ts @@ -31,6 +31,6 @@ export function useDropDown(chooseVal: any) { localesStore.setLocales(locale.value as Locales) } return { - handleSelect, + handleSelect } } diff --git a/dolphinscheduler-ui-next/src/layouts/content/components/logo/index.tsx b/dolphinscheduler-ui-next/src/layouts/content/components/logo/index.tsx index b7c3de421..bfb7caeef 100644 --- a/dolphinscheduler-ui-next/src/layouts/content/components/logo/index.tsx +++ b/dolphinscheduler-ui-next/src/layouts/content/components/logo/index.tsx @@ -31,11 +31,11 @@ const Logo = defineComponent({
) - }, + } }) export default Logo diff --git a/dolphinscheduler-ui-next/src/layouts/content/components/navbar/index.tsx b/dolphinscheduler-ui-next/src/layouts/content/components/navbar/index.tsx index 60e496b3a..860a13431 100644 --- a/dolphinscheduler-ui-next/src/layouts/content/components/navbar/index.tsx +++ b/dolphinscheduler-ui-next/src/layouts/content/components/navbar/index.tsx @@ -27,21 +27,21 @@ import { useMenuStore } from '@/store/menu/menu' const Navbar = defineComponent({ name: 'Navbar', - emits: ['handleMenuClick'], props: { headerMenuOptions: { type: Array as PropType, - default: [], + default: [] }, localesOptions: { type: Array as PropType, - default: [], + default: [] }, userDropdownOptions: { type: Array as PropType, - default: [], - }, + default: [] + } }, + emits: ['handleMenuClick'], setup(props, ctx) { const { handleMenuClick } = useMenuClick(ctx) const menuStore = useMenuStore() @@ -66,7 +66,7 @@ const Navbar = defineComponent({
) - }, + } }) export default Navbar diff --git a/dolphinscheduler-ui-next/src/layouts/content/components/navbar/use-menuClick.ts b/dolphinscheduler-ui-next/src/layouts/content/components/navbar/use-menuClick.ts index 0f72ae712..7f9adb6b2 100644 --- a/dolphinscheduler-ui-next/src/layouts/content/components/navbar/use-menuClick.ts +++ b/dolphinscheduler-ui-next/src/layouts/content/components/navbar/use-menuClick.ts @@ -30,6 +30,6 @@ export function useMenuClick(ctx: SetupContext<'handleMenuClick'[]>) { } return { - handleMenuClick, + handleMenuClick } } diff --git a/dolphinscheduler-ui-next/src/layouts/content/components/sidebar/index.tsx b/dolphinscheduler-ui-next/src/layouts/content/components/sidebar/index.tsx index e33d67ca9..9d934e31c 100644 --- a/dolphinscheduler-ui-next/src/layouts/content/components/sidebar/index.tsx +++ b/dolphinscheduler-ui-next/src/layouts/content/components/sidebar/index.tsx @@ -24,8 +24,8 @@ const Sidebar = defineComponent({ props: { sideMenuOptions: { type: Array as PropType, - default: [], - }, + default: [] + } }, setup() { const collapsedRef = ref(false) @@ -33,12 +33,11 @@ const Sidebar = defineComponent({ 'workflow', 'udf-manage', 'service-manage', - 'statistical-manage', + 'statistical-manage' ] const { handleMenuClick } = useMenuClick() - return { collapsedRef, defaultExpandedKeys, handleMenuClick } }, render() { @@ -60,7 +59,7 @@ const Sidebar = defineComponent({ /> ) - }, + } }) export default Sidebar diff --git a/dolphinscheduler-ui-next/src/layouts/content/components/sidebar/use-menuClick.ts b/dolphinscheduler-ui-next/src/layouts/content/components/sidebar/use-menuClick.ts index 82eb78a15..a08fccb6c 100644 --- a/dolphinscheduler-ui-next/src/layouts/content/components/sidebar/use-menuClick.ts +++ b/dolphinscheduler-ui-next/src/layouts/content/components/sidebar/use-menuClick.ts @@ -30,6 +30,6 @@ export function useMenuClick() { } return { - handleMenuClick, + handleMenuClick } } diff --git a/dolphinscheduler-ui-next/src/layouts/content/components/theme/index.tsx b/dolphinscheduler-ui-next/src/layouts/content/components/theme/index.tsx index 62ce9fd6a..8490e0ea1 100644 --- a/dolphinscheduler-ui-next/src/layouts/content/components/theme/index.tsx +++ b/dolphinscheduler-ui-next/src/layouts/content/components/theme/index.tsx @@ -39,7 +39,7 @@ const Theme = defineComponent({ {this.t(this.themeStore.darkTheme ? 'theme.light' : 'theme.dark')} ) - }, + } }) export default Theme diff --git a/dolphinscheduler-ui-next/src/layouts/content/components/user/index.tsx b/dolphinscheduler-ui-next/src/layouts/content/components/user/index.tsx index 5a04529e8..4cc2a926c 100644 --- a/dolphinscheduler-ui-next/src/layouts/content/components/user/index.tsx +++ b/dolphinscheduler-ui-next/src/layouts/content/components/user/index.tsx @@ -26,8 +26,8 @@ const User = defineComponent({ props: { userDropdownOptions: { type: Array as PropType, - default: [], - }, + default: [] + } }, setup() { const { handleSelect } = useDropDown() @@ -52,7 +52,7 @@ const User = defineComponent({ ) - }, + } }) export default User diff --git a/dolphinscheduler-ui-next/src/layouts/content/components/user/use-dropdown.ts b/dolphinscheduler-ui-next/src/layouts/content/components/user/use-dropdown.ts index 7591821bd..d5dc39127 100644 --- a/dolphinscheduler-ui-next/src/layouts/content/components/user/use-dropdown.ts +++ b/dolphinscheduler-ui-next/src/layouts/content/components/user/use-dropdown.ts @@ -16,7 +16,6 @@ */ import { useRouter } from 'vue-router' -import { DropdownOption } from 'naive-ui' import { logout } from '@/service/modules/logout' import { useUserStore } from '@/store/user/user' import type { Router } from 'vue-router' @@ -44,6 +43,6 @@ export function useDropDown() { } return { - handleSelect, + handleSelect } } diff --git a/dolphinscheduler-ui-next/src/layouts/content/index.tsx b/dolphinscheduler-ui-next/src/layouts/content/index.tsx index 82da2a9ae..402ce4461 100644 --- a/dolphinscheduler-ui-next/src/layouts/content/index.tsx +++ b/dolphinscheduler-ui-next/src/layouts/content/index.tsx @@ -15,7 +15,7 @@ * limitations under the License. */ -import { defineComponent, onMounted, watch, toRefs, ref } from 'vue' +import { defineComponent, onMounted, watch, toRefs } from 'vue' import { NLayout, NLayoutContent, NLayoutHeader, useMessage } from 'naive-ui' import NavBar from './components/navbar' import SideBar from './components/sidebar' @@ -36,7 +36,7 @@ const Content = defineComponent({ state, changeMenuOption, changeHeaderMenuOptions, - changeUserDropdown, + changeUserDropdown } = useDataList() locale.value = localesStore.getLocales @@ -74,7 +74,7 @@ const Content = defineComponent({ ...toRefs(state), menuStore, changeMenuOption, - getSideMenuOptions, + getSideMenuOptions } }, render() { @@ -98,7 +98,7 @@ const Content = defineComponent({ ) - }, + } }) export default Content diff --git a/dolphinscheduler-ui-next/src/layouts/content/use-dataList.ts b/dolphinscheduler-ui-next/src/layouts/content/use-dataList.ts index 3a37e6dbc..e2b0a9461 100644 --- a/dolphinscheduler-ui-next/src/layouts/content/use-dataList.ts +++ b/dolphinscheduler-ui-next/src/layouts/content/use-dataList.ts @@ -41,7 +41,7 @@ import { SlackOutlined, EnvironmentOutlined, KeyOutlined, - SafetyOutlined, + SafetyOutlined } from '@vicons/antd' export function useDataList() { @@ -54,12 +54,12 @@ export function useDataList() { const localesOptions = [ { label: 'English', - key: 'en_US', + key: 'en_US' }, { label: '中文', - key: 'zh_CN', - }, + key: 'zh_CN' + } ] const state = reactive({ @@ -68,7 +68,7 @@ export function useDataList() { userDropdownOptions: [], menuOptions: [], headerMenuOptions: [], - sideMenuOptions: [], + sideMenuOptions: [] }) const changeMenuOption = (state: any) => { @@ -77,7 +77,7 @@ export function useDataList() { label: t('menu.home'), key: 'home', icon: renderIcon(HomeOutlined), - isShowSide: false, + isShowSide: false }, { label: t('menu.project'), @@ -88,12 +88,12 @@ export function useDataList() { { label: t('menu.workflow_monitoring'), key: 'workflow-monitoring', - icon: renderIcon(FundProjectionScreenOutlined), + icon: renderIcon(FundProjectionScreenOutlined) }, { label: t('menu.workflow_relationships'), key: 'workflow-relationships', - icon: renderIcon(PartitionOutlined), + icon: renderIcon(PartitionOutlined) }, { label: t('menu.workflow'), @@ -102,23 +102,23 @@ export function useDataList() { children: [ { label: t('menu.workflow_definition'), - key: 'workflow-definition', + key: 'workflow-definition' }, { label: t('menu.workflow_instance'), - key: 'workflow-instance', + key: 'workflow-instance' }, { label: t('menu.task_instance'), - key: 'task-instance', + key: 'task-instance' }, { label: t('menu.task_definition'), - key: 'task-definition', - }, - ], - }, - ], + key: 'task-definition' + } + ] + } + ] }, { label: t('menu.resources'), @@ -129,7 +129,7 @@ export function useDataList() { { label: t('menu.file_manage'), key: 'file-manage', - icon: renderIcon(FileSearchOutlined), + icon: renderIcon(FileSearchOutlined) }, { label: t('menu.udf_manage'), @@ -138,22 +138,22 @@ export function useDataList() { children: [ { label: t('menu.resource_manage'), - key: 'resource-manage', + key: 'resource-manage' }, { label: t('menu.function_manage'), - key: 'function-manage', - }, - ], - }, - ], + key: 'function-manage' + } + ] + } + ] }, { label: t('menu.datasource'), key: 'datasource', icon: renderIcon(DatabaseOutlined), isShowSide: false, - children: [], + children: [] }, { label: t('menu.monitor'), @@ -168,17 +168,17 @@ export function useDataList() { children: [ { label: t('menu.master'), - key: 'master', + key: 'master' }, { label: t('menu.worker'), - key: 'worker', + key: 'worker' }, { label: t('menu.db'), - key: 'db', - }, - ], + key: 'db' + } + ] }, { label: t('menu.statistical_manage'), @@ -187,11 +187,11 @@ export function useDataList() { children: [ { label: t('menu.statistics'), - key: 'statistics', - }, - ], - }, - ], + key: 'statistics' + } + ] + } + ] }, { label: t('menu.security'), @@ -202,45 +202,45 @@ export function useDataList() { { label: t('menu.tenant_manage'), key: 'tenant-manage', - icon: renderIcon(UsergroupAddOutlined), + icon: renderIcon(UsergroupAddOutlined) }, { label: t('menu.user_manage'), key: 'user-manage', - icon: renderIcon(UserAddOutlined), + icon: renderIcon(UserAddOutlined) }, { label: t('menu.alarm_group_manage'), key: 'alarm-group-manage', - icon: renderIcon(WarningOutlined), + icon: renderIcon(WarningOutlined) }, { label: t('menu.alarm_instance_manage'), key: 'alarm-instance-manage', - icon: renderIcon(InfoCircleOutlined), + icon: renderIcon(InfoCircleOutlined) }, { label: t('menu.worker_group_manage'), key: 'worker-group-manage', - icon: renderIcon(ControlOutlined), + icon: renderIcon(ControlOutlined) }, { label: t('menu.yarn_queue_manage'), key: 'yarn-queue-manage', - icon: renderIcon(SlackOutlined), + icon: renderIcon(SlackOutlined) }, { label: t('menu.environmental_manage'), key: 'environmental-manage', - icon: renderIcon(EnvironmentOutlined), + icon: renderIcon(EnvironmentOutlined) }, { label: t('menu.token_manage'), key: 'token-manage', - icon: renderIcon(SafetyOutlined), - }, - ], - }, + icon: renderIcon(SafetyOutlined) + } + ] + } ] } @@ -256,7 +256,7 @@ export function useDataList() { label: item.label, key: item.key, icon: item.icon, - isShowSide: item.isShowSide, + isShowSide: item.isShowSide } } ) @@ -267,18 +267,18 @@ export function useDataList() { { label: t('userDropdown.profile'), key: 'profile', - icon: renderIcon(UserOutlined), + icon: renderIcon(UserOutlined) }, { label: t('userDropdown.password'), key: 'password', - icon: renderIcon(KeyOutlined), + icon: renderIcon(KeyOutlined) }, { label: t('userDropdown.logout'), key: 'logout', - icon: renderIcon(LogoutOutlined), - }, + icon: renderIcon(LogoutOutlined) + } ] } @@ -286,6 +286,6 @@ export function useDataList() { state, changeHeaderMenuOptions, changeMenuOption, - changeUserDropdown, + changeUserDropdown } } diff --git a/dolphinscheduler-ui-next/src/locales/index.ts b/dolphinscheduler-ui-next/src/locales/index.ts index bc4d230e9..58bd9dd51 100644 --- a/dolphinscheduler-ui-next/src/locales/index.ts +++ b/dolphinscheduler-ui-next/src/locales/index.ts @@ -24,8 +24,8 @@ const i18n = createI18n({ locale: 'zh_CN', messages: { zh_CN, - en_US, - }, + en_US + } }) export default i18n diff --git a/dolphinscheduler-ui-next/src/locales/modules/en_US.ts b/dolphinscheduler-ui-next/src/locales/modules/en_US.ts index 6cf008828..ed1bab253 100644 --- a/dolphinscheduler-ui-next/src/locales/modules/en_US.ts +++ b/dolphinscheduler-ui-next/src/locales/modules/en_US.ts @@ -21,23 +21,23 @@ const login = { userName_tips: 'Please enter your username', userPassword: 'Password', userPassword_tips: 'Please enter your password', - login: 'Login', + login: 'Login' } const modal = { cancel: 'Cancel', - confirm: 'Confirm', + confirm: 'Confirm' } const theme = { light: 'Light', - dark: 'Dark', + dark: 'Dark' } const userDropdown = { profile: 'Profile', password: 'Password', - logout: 'Logout', + logout: 'Logout' } const menu = { @@ -71,7 +71,7 @@ const menu = { worker_group_manage: 'Worker Group Manage', yarn_queue_manage: 'Yarn Queue Manage', environmental_manage: 'Environmental Manage', - token_manage: 'Token Manage', + token_manage: 'Token Manage' } const home = { @@ -79,7 +79,7 @@ const home = { process_state_statistics: 'Process State Statistics', process_definition_statistics: 'Process Definition Statistics', number: 'Number', - state: 'State', + state: 'State' } const password = { @@ -90,7 +90,7 @@ const password = { confirm_password_tips: 'Please enter your confirm password', two_password_entries_are_inconsistent: 'Two password entries are inconsistent', - submit: 'Submit', + submit: 'Submit' } const profile = { @@ -112,7 +112,7 @@ const profile = { phone_tips: 'Please enter your phone', state_tips: 'Please choose your state', enable: 'Enable', - disable: 'Disable', + disable: 'Disable' } const monitor = { @@ -124,7 +124,7 @@ const monitor = { last_heartbeat_time: 'Last Heartbeat Time', directory_detail: 'Directory Detail', host: 'Host', - directory: 'Directory', + directory: 'Directory' }, worker: { cpu_usage: 'CPU Usage', @@ -134,21 +134,21 @@ const monitor = { last_heartbeat_time: 'Last Heartbeat Time', directory_detail: 'Directory Detail', host: 'Host', - directory: 'Directory', + directory: 'Directory' }, db: { health_state: 'Health State', max_connections: 'Max Connections', threads_connections: 'Threads Connections', - threads_running_connections: 'Threads Running Connections', + threads_running_connections: 'Threads Running Connections' }, statistics: { command_number_of_waiting_for_running: 'Command Number Of Waiting For Running', failure_command_number: 'Failure Command Number', tasks_number_of_waiting_running: 'Tasks Number Of Waiting Running', - task_number_of_ready_to_kill: 'Task Number Of Ready To Kill', - }, + task_number_of_ready_to_kill: 'Task Number Of Ready To Kill' + } } const resource = { @@ -185,7 +185,7 @@ const resource = { success: 'Success', file_details: 'File Details', return: 'Return', - save: 'Save', + save: 'Save' } } @@ -209,8 +209,8 @@ const project = { delete: 'Delete', confirm: 'Confirm', cancel: 'Cancel', - delete_confirm: 'Delete?', - }, + delete_confirm: 'Delete?' + } } const security = { @@ -231,7 +231,7 @@ const security = { description_tips: 'Please enter a description', delete_confirm: 'Delete?', edit: 'Edit', - delete: 'Delete', + delete: 'Delete' } } diff --git a/dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts b/dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts index ac768f64c..a01b709ac 100644 --- a/dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts +++ b/dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts @@ -21,23 +21,23 @@ const login = { userName_tips: '请输入用户名', userPassword: '密码', userPassword_tips: '请输入密码', - login: '登录', + login: '登录' } const modal = { cancel: '取消', - confirm: '确定', + confirm: '确定' } const theme = { light: '浅色', - dark: '深色', + dark: '深色' } const userDropdown = { profile: '用户信息', password: '密码管理', - logout: '退出登录', + logout: '退出登录' } const menu = { @@ -71,7 +71,7 @@ const menu = { worker_group_manage: 'Worker分组管理', yarn_queue_manage: 'Yarn队列管理', environmental_manage: '环境管理', - token_manage: '令牌管理', + token_manage: '令牌管理' } const home = { @@ -79,7 +79,7 @@ const home = { process_state_statistics: '流程状态统计', process_definition_statistics: '流程定义统计', number: '数量', - state: '状态', + state: '状态' } const password = { @@ -89,7 +89,7 @@ const password = { password_tips: '请输入密码', confirm_password_tips: '请输入确认密码', two_password_entries_are_inconsistent: '两次密码输入不一致', - submit: '提交', + submit: '提交' } const profile = { @@ -111,7 +111,7 @@ const profile = { phone_tips: '请输入手机号', state_tips: '请选择状态', enable: '启用', - disable: '禁用', + disable: '禁用' } const monitor = { @@ -123,7 +123,7 @@ const monitor = { last_heartbeat_time: '最后心跳时间', directory_detail: '目录详情', host: '主机', - directory: '注册目录', + directory: '注册目录' }, worker: { cpu_usage: '处理器使用量', @@ -133,20 +133,20 @@ const monitor = { last_heartbeat_time: '最后心跳时间', directory_detail: '目录详情', host: '主机', - directory: '注册目录', + directory: '注册目录' }, db: { health_state: '健康状态', max_connections: '最大连接数', threads_connections: '当前连接数', - threads_running_connections: '数据库当前活跃连接数', + threads_running_connections: '数据库当前活跃连接数' }, statistics: { command_number_of_waiting_for_running: '待执行的命令数', failure_command_number: '执行失败的命令数', tasks_number_of_waiting_running: '待运行任务数', - task_number_of_ready_to_kill: '待杀死任务数', - }, + task_number_of_ready_to_kill: '待杀死任务数' + } } const resource = { @@ -184,7 +184,7 @@ const resource = { success: '成功', file_details: '文件详情', return: '返回', - save: '保存', + save: '保存' } } @@ -208,8 +208,8 @@ const project = { delete: '删除', confirm: '确定', cancel: '取消', - delete_confirm: '确定删除吗?', - }, + delete_confirm: '确定删除吗?' + } } const security = { @@ -230,7 +230,7 @@ const security = { description_tips: '请输入描述', delete_confirm: '确定删除吗?', edit: '编辑', - delete: '删除', + delete: '删除' } } diff --git a/dolphinscheduler-ui-next/src/router/index.ts b/dolphinscheduler-ui-next/src/router/index.ts index ed70ba895..a992d26b2 100644 --- a/dolphinscheduler-ui-next/src/router/index.ts +++ b/dolphinscheduler-ui-next/src/router/index.ts @@ -19,7 +19,7 @@ import { createRouter, createWebHistory, NavigationGuardNext, - RouteLocationNormalized, + RouteLocationNormalized } from 'vue-router' import routes from './routes' @@ -29,7 +29,7 @@ import 'nprogress/nprogress.css' const router = createRouter({ history: createWebHistory(), - routes, + routes }) /** diff --git a/dolphinscheduler-ui-next/src/router/modules/datasource.ts b/dolphinscheduler-ui-next/src/router/modules/datasource.ts index 05631b9f0..1c4e7a98f 100644 --- a/dolphinscheduler-ui-next/src/router/modules/datasource.ts +++ b/dolphinscheduler-ui-next/src/router/modules/datasource.ts @@ -34,8 +34,8 @@ export default { name: 'datasource-list', component: components['home'], meta: { - title: '数据源中心', - }, - }, - ], + title: '数据源中心' + } + } + ] } diff --git a/dolphinscheduler-ui-next/src/router/modules/monitor.ts b/dolphinscheduler-ui-next/src/router/modules/monitor.ts index 2a873ac38..76b0d3b66 100644 --- a/dolphinscheduler-ui-next/src/router/modules/monitor.ts +++ b/dolphinscheduler-ui-next/src/router/modules/monitor.ts @@ -34,32 +34,32 @@ export default { name: 'servers-master', component: components['master'], meta: { - title: '服务管理-Master', - }, + title: '服务管理-Master' + } }, { path: '/monitor/servers/worker', name: 'servers-worker', component: components['worker'], meta: { - title: '服务管理-Worker', - }, + title: '服务管理-Worker' + } }, { path: '/monitor/servers/db', name: 'servers-db', component: components['db'], meta: { - title: '服务管理-DB', - }, + title: '服务管理-DB' + } }, { path: '/monitor/statistics/statistics', name: 'statistics-statistics', component: components['statistics'], meta: { - title: '统计管理-Statistics', - }, - }, - ], + title: '统计管理-Statistics' + } + } + ] } diff --git a/dolphinscheduler-ui-next/src/router/modules/projects.ts b/dolphinscheduler-ui-next/src/router/modules/projects.ts index 72badb85f..1e2155fa8 100644 --- a/dolphinscheduler-ui-next/src/router/modules/projects.ts +++ b/dolphinscheduler-ui-next/src/router/modules/projects.ts @@ -22,10 +22,6 @@ import utils from '@/utils' const modules = import.meta.glob('/src/views/**/**.tsx') const components: { [key: string]: Component } = utils.mapping(modules) -console.log('components', components) - -console.log(components) - export default { path: '/projects', name: 'projects', @@ -38,16 +34,16 @@ export default { name: 'projects-list', component: components['list'], meta: { - title: '项目', - }, + title: '项目' + } }, { path: '/projects/:projectCode/workflow-monitor', name: 'workflow-monitor', component: components['workflow-monitor'], meta: { - title: '工作流监控', - }, - }, - ], + title: '工作流监控' + } + } + ] } diff --git a/dolphinscheduler-ui-next/src/router/modules/resources.ts b/dolphinscheduler-ui-next/src/router/modules/resources.ts index cfa6e14cf..53769a2f4 100644 --- a/dolphinscheduler-ui-next/src/router/modules/resources.ts +++ b/dolphinscheduler-ui-next/src/router/modules/resources.ts @@ -34,48 +34,48 @@ export default { name: 'file-manage', component: components['file'], meta: { - title: '文件管理', - }, + title: '文件管理' + } }, { path: '/resource/file/create', name: 'resource-file-create', component: components['resource-file-create'], meta: { - title: '文件创建', - }, + title: '文件创建' + } }, { path: '/resource/file/edit/:id', name: 'resource-file-edit', component: components['resource-file-edit'], meta: { - title: '文件编辑', - }, + title: '文件编辑' + } }, { path: '/resource/file/subdirectory/:id', name: 'resource-file-subdirectory', component: components['file'], meta: { - title: '文件管理', - }, + title: '文件管理' + } }, { path: '/resource/file/list/:id', name: 'resource-file-list', component: components['resource-file-edit'], meta: { - title: '文件详情', - }, + title: '文件详情' + } }, { path: '/resource/file/create/:id', name: 'resource-subfile-create', component: components['resource-file-create'], meta: { - title: '文件创建', - }, - }, - ], + title: '文件创建' + } + } + ] } diff --git a/dolphinscheduler-ui-next/src/router/modules/security.ts b/dolphinscheduler-ui-next/src/router/modules/security.ts index baac4941d..4b458b35c 100644 --- a/dolphinscheduler-ui-next/src/router/modules/security.ts +++ b/dolphinscheduler-ui-next/src/router/modules/security.ts @@ -34,16 +34,16 @@ export default { name: 'tenant-manage', component: components['tenant-manage'], meta: { - title: '租户管理', - }, + title: '租户管理' + } }, { path: '/security/users', name: 'users-manage', component: components['home'], meta: { - title: '用户管理', - }, - }, - ], + title: '用户管理' + } + } + ] } diff --git a/dolphinscheduler-ui-next/src/router/routes.ts b/dolphinscheduler-ui-next/src/router/routes.ts index 221a3486e..a821f23b4 100644 --- a/dolphinscheduler-ui-next/src/router/routes.ts +++ b/dolphinscheduler-ui-next/src/router/routes.ts @@ -43,32 +43,32 @@ const basePage: RouteRecordRaw[] = [ name: 'home', component: components['home'], meta: { - title: '首页', - }, + title: '首页' + } }, { path: '/password', name: 'password', component: components['password'], meta: { - title: '修改密码', - }, + title: '修改密码' + } }, { path: '/profile', name: 'profile', component: components['profile'], meta: { - title: '用户信息', - }, - }, - ], + title: '用户信息' + } + } + ] }, projectsPage, resourcesPage, datasourcePage, monitorPage, - securityPage, + securityPage ] /** @@ -78,8 +78,8 @@ const loginPage: RouteRecordRaw[] = [ { path: '/login', name: 'login', - component: components['login'], - }, + component: components['login'] + } ] const routes: RouteRecordRaw[] = [...basePage, ...loginPage] diff --git a/dolphinscheduler-ui-next/src/service/modules/alert-group/index.ts b/dolphinscheduler-ui-next/src/service/modules/alert-group/index.ts index 4a4e95c74..437bc28b6 100644 --- a/dolphinscheduler-ui-next/src/service/modules/alert-group/index.ts +++ b/dolphinscheduler-ui-next/src/service/modules/alert-group/index.ts @@ -22,7 +22,7 @@ export function queryAlertGroupListPaging(params: ListReq): any { return axios({ url: '/alert-groups', method: 'get', - params, + params }) } @@ -30,14 +30,14 @@ export function createAlertGroup(data: GroupReq): any { return axios({ url: '/alert-groups', method: 'post', - data, + data }) } export function listAlertGroupById(): any { return axios({ url: '/alert-groups/list', - method: 'get', + method: 'get' }) } @@ -45,7 +45,7 @@ export function queryAlertGroupById(data: IdReq): any { return axios({ url: '/alert-groups/query', method: 'post', - data, + data }) } @@ -53,7 +53,7 @@ export function verifyGroupName(params: GroupNameReq): any { return axios({ url: '/alert-groups/verify-name', method: 'get', - params, + params }) } @@ -61,13 +61,13 @@ export function updateAlertGroup(data: GroupReq, id: IdReq): any { return axios({ url: `/alert-groups/${id}`, method: 'put', - data, + data }) } export function delAlertGroupById(id: IdReq): any { return axios({ url: `/alert-groups/${id}`, - method: 'delete', + method: 'delete' }) } diff --git a/dolphinscheduler-ui-next/src/service/modules/alert-plugin/index.ts b/dolphinscheduler-ui-next/src/service/modules/alert-plugin/index.ts index 0205b2827..68c03f3c7 100644 --- a/dolphinscheduler-ui-next/src/service/modules/alert-plugin/index.ts +++ b/dolphinscheduler-ui-next/src/service/modules/alert-plugin/index.ts @@ -21,14 +21,14 @@ import { PluginInstanceReq, InstanceNameReq, IdReq, - UpdatePluginInstanceReq, + UpdatePluginInstanceReq } from './types' export function queryAlertPluginInstanceListPaging(params: ListReq): any { return axios({ url: '/alert-plugin-instances', method: 'get', - params, + params }) } @@ -36,14 +36,14 @@ export function createAlertPluginInstance(data: PluginInstanceReq): any { return axios({ url: '/alert-plugin-instances', method: 'post', - data, + data }) } export function queryAlertPluginInstanceList(): any { return axios({ url: '/alert-plugin-instances/list', - method: 'get', + method: 'get' }) } @@ -51,14 +51,14 @@ export function verifyAlertInstanceName(params: InstanceNameReq): any { return axios({ url: '/alert-plugin-instances/verify-name', method: 'get', - params, + params }) } export function getAlertPluginInstance(id: IdReq): any { return axios({ url: `/alert-plugin-instances/${id}`, - method: 'get', + method: 'get' }) } @@ -69,13 +69,13 @@ export function updateAlertPluginInstance( return axios({ url: `/alert-plugin-instances/${id}`, method: 'put', - data, + data }) } export function deleteAlertPluginInstance(id: IdReq): any { return axios({ url: `/alert-plugin-instances/${id}`, - method: 'delete', + method: 'delete' }) } diff --git a/dolphinscheduler-ui-next/src/service/modules/alert-plugin/types.ts b/dolphinscheduler-ui-next/src/service/modules/alert-plugin/types.ts index 524cf335d..664ddaa6e 100644 --- a/dolphinscheduler-ui-next/src/service/modules/alert-plugin/types.ts +++ b/dolphinscheduler-ui-next/src/service/modules/alert-plugin/types.ts @@ -46,5 +46,5 @@ export { PluginInstanceReq, InstanceNameReq, IdReq, - UpdatePluginInstanceReq, + UpdatePluginInstanceReq } diff --git a/dolphinscheduler-ui-next/src/service/modules/data-source/index.ts b/dolphinscheduler-ui-next/src/service/modules/data-source/index.ts index b2ebd8681..78eb55669 100644 --- a/dolphinscheduler-ui-next/src/service/modules/data-source/index.ts +++ b/dolphinscheduler-ui-next/src/service/modules/data-source/index.ts @@ -22,14 +22,14 @@ import { UserIdReq, TypeReq, NameReq, - IdReq, + IdReq } from './types' export function queryDataSourceListPaging(params: ListReq): any { return axios({ url: '/datasources', method: 'get', - params, + params }) } @@ -37,7 +37,7 @@ export function createDataSource(data: DataSourceReq): any { return axios({ url: '/datasources', method: 'post', - data, + data }) } @@ -45,7 +45,7 @@ export function authedDatasource(params: UserIdReq): any { return axios({ url: '/datasources/authed-datasource', method: 'get', - params, + params }) } @@ -53,14 +53,14 @@ export function connectDataSource(data: DataSourceReq): any { return axios({ url: '/datasources/connect', method: 'post', - data, + data }) } export function getKerberosStartupState(): any { return axios({ url: '/datasources/kerberos-startup-state', - method: 'get', + method: 'get' }) } @@ -68,7 +68,7 @@ export function queryDataSourceList(params: TypeReq): any { return axios({ url: '/datasources/list', method: 'get', - params, + params }) } @@ -76,7 +76,7 @@ export function unAuthDatasource(params: UserIdReq): any { return axios({ url: '/datasources/unauth-datasource', method: 'get', - params, + params }) } @@ -84,14 +84,14 @@ export function verifyDataSourceName(params: NameReq): any { return axios({ url: '/datasources/verify-name', method: 'get', - params, + params }) } export function queryDataSource(id: IdReq): any { return axios({ url: `/datasources/${id}`, - method: 'get', + method: 'get' }) } @@ -99,20 +99,20 @@ export function updateDataSource(data: DataSourceReq, id: IdReq): any { return axios({ url: `/datasources/${id}`, method: 'put', - data, + data }) } export function deleteDataSource(id: IdReq): any { return axios({ url: `/datasources/${id}`, - method: 'delete', + method: 'delete' }) } export function connectionTest(id: IdReq): any { return axios({ url: `/datasources/${id}/connect-test`, - method: 'get', + method: 'get' }) } diff --git a/dolphinscheduler-ui-next/src/service/modules/environment/index.ts b/dolphinscheduler-ui-next/src/service/modules/environment/index.ts index 1f2a11714..f1f0d2caa 100644 --- a/dolphinscheduler-ui-next/src/service/modules/environment/index.ts +++ b/dolphinscheduler-ui-next/src/service/modules/environment/index.ts @@ -21,14 +21,14 @@ import { EnvironmentCodeReq, EnvironmentNameReq, ListReq, - CodeReq, + CodeReq } from './types' export function createEnvironment(data: EnvironmentReq): any { return axios({ url: '/environment/create', method: 'post', - data, + data }) } @@ -36,7 +36,7 @@ export function deleteEnvironmentByCode(data: EnvironmentCodeReq): any { return axios({ url: '/environment/delete', method: 'post', - data, + data }) } @@ -44,7 +44,7 @@ export function queryEnvironmentListPaging(params: ListReq): any { return axios({ url: '/environment/list-paging', method: 'get', - params, + params }) } @@ -52,14 +52,14 @@ export function queryEnvironmentByCode(params: EnvironmentCodeReq): any { return axios({ url: '/environment/query-by-code', method: 'get', - params, + params }) } export function queryAllEnvironmentList(): any { return axios({ url: '/environment/query-environment-list', - method: 'get', + method: 'get' }) } @@ -67,7 +67,7 @@ export function updateEnvironment(data: EnvironmentReq & CodeReq): any { return axios({ url: '/environment/update', method: 'post', - data, + data }) } @@ -75,6 +75,6 @@ export function verifyEnvironment(data: EnvironmentNameReq): any { return axios({ url: '/environment/verify-environment', method: 'post', - data, + data }) } diff --git a/dolphinscheduler-ui-next/src/service/modules/environment/types.ts b/dolphinscheduler-ui-next/src/service/modules/environment/types.ts index 515cdc163..7bccccbd3 100644 --- a/dolphinscheduler-ui-next/src/service/modules/environment/types.ts +++ b/dolphinscheduler-ui-next/src/service/modules/environment/types.ts @@ -45,5 +45,5 @@ export { EnvironmentCodeReq, EnvironmentNameReq, ListReq, - CodeReq, + CodeReq } diff --git a/dolphinscheduler-ui-next/src/service/modules/executors/index.ts b/dolphinscheduler-ui-next/src/service/modules/executors/index.ts index 96b47048e..6d3dcaacc 100644 --- a/dolphinscheduler-ui-next/src/service/modules/executors/index.ts +++ b/dolphinscheduler-ui-next/src/service/modules/executors/index.ts @@ -20,14 +20,14 @@ import { ExecuteReq, ProjectCodeReq, ProcessDefinitionCodeReq, - ProcessInstanceReq, + ProcessInstanceReq } from './types' export function execute(data: ExecuteReq, code: ProjectCodeReq): any { return axios({ url: `/projects/${code}/executors/execute`, method: 'post', - data, + data }) } @@ -38,7 +38,7 @@ export function startCheckProcessDefinition( return axios({ url: `/projects/${code}/executors/start-check`, method: 'post', - data, + data }) } @@ -49,6 +49,6 @@ export function startProcessInstance( return axios({ url: `/projects/${code}/executors/start-process-instance`, method: 'post', - data, + data }) } diff --git a/dolphinscheduler-ui-next/src/service/modules/executors/types.ts b/dolphinscheduler-ui-next/src/service/modules/executors/types.ts index 812bf72a2..39f17096b 100644 --- a/dolphinscheduler-ui-next/src/service/modules/executors/types.ts +++ b/dolphinscheduler-ui-next/src/service/modules/executors/types.ts @@ -71,5 +71,5 @@ export { ExecuteReq, ProjectCodeReq, ProcessDefinitionCodeReq, - ProcessInstanceReq, + ProcessInstanceReq } diff --git a/dolphinscheduler-ui-next/src/service/modules/lineages/index.ts b/dolphinscheduler-ui-next/src/service/modules/lineages/index.ts index 3b00c7a46..f4eb82574 100644 --- a/dolphinscheduler-ui-next/src/service/modules/lineages/index.ts +++ b/dolphinscheduler-ui-next/src/service/modules/lineages/index.ts @@ -21,7 +21,7 @@ import { ProjectCodeReq, WorkFlowNameReq } from './types' export function queryWorkFlowList(projectCode: ProjectCodeReq): any { return axios({ url: `/projects/${projectCode}/lineages/list`, - method: 'get', + method: 'get' }) } @@ -32,7 +32,7 @@ export function queryLineageByWorkFlowName( return axios({ url: `/projects/${projectCode}/lineages/query-by-name`, method: 'get', - params, + params }) } @@ -42,6 +42,6 @@ export function queryLineageByWorkFlowCode( ): any { return axios({ url: `/projects/${projectCode}/lineages/${workFlowCode}`, - method: 'get', + method: 'get' }) } diff --git a/dolphinscheduler-ui-next/src/service/modules/log/index.ts b/dolphinscheduler-ui-next/src/service/modules/log/index.ts index 51ccf311f..592f78bf7 100644 --- a/dolphinscheduler-ui-next/src/service/modules/log/index.ts +++ b/dolphinscheduler-ui-next/src/service/modules/log/index.ts @@ -22,7 +22,7 @@ export function queryLog(params: LogReq): any { return axios({ url: '/log/detail', method: 'get', - params, + params }) } @@ -30,6 +30,6 @@ export function downloadTaskLog(params: IdReq): any { return axios({ url: '/log/download-log', method: 'get', - params, + params }) } diff --git a/dolphinscheduler-ui-next/src/service/modules/login/index.ts b/dolphinscheduler-ui-next/src/service/modules/login/index.ts index f393bc8d4..b69a132e8 100644 --- a/dolphinscheduler-ui-next/src/service/modules/login/index.ts +++ b/dolphinscheduler-ui-next/src/service/modules/login/index.ts @@ -22,6 +22,6 @@ export function login(data: LoginReq): any { return axios({ url: '/login', method: 'post', - data, + data }) } diff --git a/dolphinscheduler-ui-next/src/service/modules/logout/index.ts b/dolphinscheduler-ui-next/src/service/modules/logout/index.ts index 28e369bd1..2ca9c4a24 100644 --- a/dolphinscheduler-ui-next/src/service/modules/logout/index.ts +++ b/dolphinscheduler-ui-next/src/service/modules/logout/index.ts @@ -20,6 +20,6 @@ import { axios } from '@/service/service' export function logout(): any { return axios({ url: '/signOut', - method: 'post', + method: 'post' }) } diff --git a/dolphinscheduler-ui-next/src/service/modules/monitor/index.ts b/dolphinscheduler-ui-next/src/service/modules/monitor/index.ts index 4defbd0b7..f0d3b50c2 100644 --- a/dolphinscheduler-ui-next/src/service/modules/monitor/index.ts +++ b/dolphinscheduler-ui-next/src/service/modules/monitor/index.ts @@ -20,20 +20,20 @@ import { axios } from '@/service/service' export function queryDatabaseState(): any { return axios({ url: '/monitor/databases', - method: 'get', + method: 'get' }) } export function listMaster(): any { return axios({ url: '/monitor/masters', - method: 'get', + method: 'get' }) } export function listWorker(): any { return axios({ url: '/monitor/workers', - method: 'get', + method: 'get' }) } diff --git a/dolphinscheduler-ui-next/src/service/modules/process-definition/index.ts b/dolphinscheduler-ui-next/src/service/modules/process-definition/index.ts index d6f9a24f9..1bfe0034a 100644 --- a/dolphinscheduler-ui-next/src/service/modules/process-definition/index.ts +++ b/dolphinscheduler-ui-next/src/service/modules/process-definition/index.ts @@ -27,14 +27,14 @@ import { PageReq, ListReq, ProcessDefinitionReq, - TargetCodeReq, + TargetCodeReq } from './types' export function queryListPaging(params: PageReq & ListReq, code: CodeReq): any { return axios({ url: `/projects/${code}/process-definition`, method: 'get', - params, + params }) } @@ -45,14 +45,14 @@ export function createProcessDefinition( return axios({ url: `/projects/${code}/process-definition`, method: 'post', - data, + data }) } export function queryAllByProjectCode(code: CodeReq): any { return axios({ url: `/projects/${code}/process-definition/all`, - method: 'post', + method: 'post' }) } @@ -63,7 +63,7 @@ export function batchCopyByCodes( return axios({ url: `/projects/${code}/process-definition/batch-copy`, method: 'post', - data, + data }) } @@ -71,7 +71,7 @@ export function batchDeleteByCodes(data: CodesReq, code: CodeReq): any { return axios({ url: `/projects/${code}/process-definition/batch-delete`, method: 'post', - data, + data }) } @@ -79,7 +79,7 @@ export function batchExportByCodes(data: CodesReq, code: CodeReq): any { return axios({ url: `/projects/${code}/process-definition/batch-export`, method: 'post', - data, + data }) } @@ -90,7 +90,7 @@ export function batchMoveByCodes( return axios({ url: `/projects/${code}/process-definition/batch-move`, method: 'post', - data, + data }) } @@ -101,7 +101,7 @@ export function getTaskListByDefinitionCodes( return axios({ url: `/projects/${code}/process-definition/batch-query-tasks`, method: 'get', - params, + params }) } @@ -109,14 +109,14 @@ export function importProcessDefinition(data: FileReq, code: CodeReq): any { return axios({ url: `/projects/${code}/process-definition/import`, method: 'post', - data, + data }) } export function queryList(code: CodeReq): any { return axios({ url: `/projects/${code}/process-definition/list`, - method: 'get', + method: 'get' }) } @@ -127,14 +127,14 @@ export function queryProcessDefinitionByName( return axios({ url: `/projects/${code}/process-definition/query-by-name`, method: 'get', - params, + params }) } export function querySimpleList(code: CodeReq): any { return axios({ url: `/projects/${code}/process-definition/simple-list`, - method: 'get', + method: 'get' }) } @@ -142,7 +142,7 @@ export function verifyName(params: NameReq, code: CodeReq): any { return axios({ url: `/projects/${code}/process-definition/verify-name`, method: 'get', - params, + params }) } @@ -152,7 +152,7 @@ export function queryProcessDefinitionByCode( ): any { return axios({ url: `/projects/${code}/process-definition/${processCode}`, - method: 'get', + method: 'get' }) } @@ -164,14 +164,14 @@ export function update( return axios({ url: `/projects/${code}/process-definition/${processCode}`, method: 'put', - data, + data }) } export function deleteByCode(code: CodeReq, processCode: CodeReq): any { return axios({ url: `/projects/${code}/process-definition/${processCode}`, - method: 'delete', + method: 'delete' }) } @@ -183,7 +183,7 @@ export function release( return axios({ url: `/projects/${code}/process-definition/${processCode}/release`, method: 'post', - data, + data }) } @@ -193,7 +193,7 @@ export function getTasksByDefinitionCode( ): any { return axios({ url: `/projects/${code}/process-definition/${processCode}/tasks`, - method: 'get', + method: 'get' }) } @@ -205,7 +205,7 @@ export function queryVersions( return axios({ url: `/projects/${code}/process-definition/${processCode}/versions`, method: 'get', - params, + params }) } @@ -216,7 +216,7 @@ export function switchVersion( ): any { return axios({ url: `/projects/${code}/process-definition/${processCode}/versions/${version}`, - method: 'get', + method: 'get' }) } @@ -227,7 +227,7 @@ export function deleteVersion( ): any { return axios({ url: `/projects/${code}/process-definition/${processCode}/versions/${version}`, - method: 'delete', + method: 'delete' }) } @@ -239,6 +239,6 @@ export function viewTree( return axios({ url: `/projects/${code}/process-definition/${processCode}/view-tree`, method: 'get', - params, + params }) } diff --git a/dolphinscheduler-ui-next/src/service/modules/process-definition/types.ts b/dolphinscheduler-ui-next/src/service/modules/process-definition/types.ts index 3a5ac248d..97a5ea0a4 100644 --- a/dolphinscheduler-ui-next/src/service/modules/process-definition/types.ts +++ b/dolphinscheduler-ui-next/src/service/modules/process-definition/types.ts @@ -78,5 +78,5 @@ export { PageReq, ListReq, ProcessDefinitionReq, - TargetCodeReq, + TargetCodeReq } diff --git a/dolphinscheduler-ui-next/src/service/modules/process-instances/index.ts b/dolphinscheduler-ui-next/src/service/modules/process-instances/index.ts index 2371f4ad1..3cfff4c5e 100644 --- a/dolphinscheduler-ui-next/src/service/modules/process-instances/index.ts +++ b/dolphinscheduler-ui-next/src/service/modules/process-instances/index.ts @@ -24,7 +24,7 @@ import { TaskReq, LongestReq, IdReq, - ProcessInstanceReq, + ProcessInstanceReq } from './types' export function queryProcessInstanceListPaging( @@ -34,7 +34,7 @@ export function queryProcessInstanceListPaging( return axios({ url: `/projects/${code}/process-instances`, method: 'get', - params, + params }) } @@ -45,7 +45,7 @@ export function batchDeleteProcessInstanceByIds( return axios({ url: `/projects/${code}/process-instances/batch-delete`, method: 'post', - data, + data }) } @@ -56,7 +56,7 @@ export function queryParentInstanceBySubId( return axios({ url: `/projects/${code}/process-instances/query-parent-by-sub`, method: 'get', - params, + params }) } @@ -67,7 +67,7 @@ export function querySubProcessInstanceByTaskCode( return axios({ url: `/projects/${code}/process-instances/query-sub-by-parent`, method: 'get', - params, + params }) } @@ -78,14 +78,14 @@ export function queryTopNLongestRunningProcessInstance( return axios({ url: `/projects/${code}/process-instances/top-n`, method: 'get', - params, + params }) } export function queryProcessInstanceById(id: IdReq, code: CodeReq): any { return axios({ url: `/projects/${code}/process-instances/${id}`, - method: 'get', + method: 'get' }) } @@ -97,34 +97,34 @@ export function updateProcessInstance( return axios({ url: `/projects/${code}/process-instances/${id}`, method: 'put', - data, + data }) } export function deleteProcessInstanceById(id: IdReq, code: CodeReq): any { return axios({ url: `/projects/${code}/process-instances/${id}`, - method: 'delete', + method: 'delete' }) } export function queryTaskListByProcessId(id: IdReq, code: CodeReq): any { return axios({ url: `/projects/${code}/process-instances/${id}/tasks`, - method: 'get', + method: 'get' }) } export function vieGanttTree(id: IdReq, code: CodeReq): any { return axios({ url: `/projects/${code}/process-instances/${id}/view-gantt`, - method: 'get', + method: 'get' }) } export function viewVariables(id: IdReq, code: CodeReq): any { return axios({ url: `/projects/${code}/process-instances/${id}/view-variables`, - method: 'get', + method: 'get' }) } diff --git a/dolphinscheduler-ui-next/src/service/modules/process-instances/types.ts b/dolphinscheduler-ui-next/src/service/modules/process-instances/types.ts index bd1b6f736..488a142b8 100644 --- a/dolphinscheduler-ui-next/src/service/modules/process-instances/types.ts +++ b/dolphinscheduler-ui-next/src/service/modules/process-instances/types.ts @@ -90,5 +90,5 @@ export { TaskReq, LongestReq, IdReq, - ProcessInstanceReq, + ProcessInstanceReq } diff --git a/dolphinscheduler-ui-next/src/service/modules/process-task-relation/index.ts b/dolphinscheduler-ui-next/src/service/modules/process-task-relation/index.ts index 047f7e81b..e40b03fc7 100644 --- a/dolphinscheduler-ui-next/src/service/modules/process-task-relation/index.ts +++ b/dolphinscheduler-ui-next/src/service/modules/process-task-relation/index.ts @@ -22,7 +22,7 @@ import { PostTaskCodesReq, TaskCodeReq, SaveReq, - MoveReq, + MoveReq } from './types' import { axios } from '@/service/service' @@ -30,7 +30,7 @@ export function save(data: SaveReq, projectCode: ProjectCodeReq): any { return axios({ url: `/projects/${projectCode}/process-task-relation`, method: 'post', - data, + data }) } @@ -38,14 +38,14 @@ export function moveRelation(data: MoveReq, projectCode: ProjectCodeReq): any { return axios({ url: `/projects/${projectCode}/process-task-relation/move`, method: 'post', - data, + data }) } export function deleteEdge(data: SaveReq): any { return axios({ url: `/projects/${data.projectCode}/process-task-relation/${data.processDefinitionCode}/${data.preTaskCode}/${data.postTaskCode}`, - method: 'delete', + method: 'delete' }) } @@ -57,7 +57,7 @@ export function deleteRelation( return axios({ url: `/projects/${projectCode}/process-task-relation/${taskCode}`, method: 'delete', - data, + data }) } @@ -67,7 +67,7 @@ export function queryDownstreamRelation( ): any { return axios({ url: `/projects/${projectCode}/process-task-relation/${taskCode}/downstream`, - method: 'get', + method: 'get' }) } @@ -79,7 +79,7 @@ export function deleteDownstreamRelation( return axios({ url: `/projects/${projectCode}/process-task-relation/${taskCode}/downstream`, method: 'delete', - data, + data }) } @@ -89,7 +89,7 @@ export function queryUpstreamRelation( ): any { return axios({ url: `/projects/${projectCode}/process-task-relation/${taskCode}/upstream`, - method: 'get', + method: 'get' }) } @@ -101,6 +101,6 @@ export function deleteUpstreamRelation( return axios({ url: `/projects/${projectCode}/process-task-relation/${taskCode}/upstream`, method: 'delete', - data, + data }) } diff --git a/dolphinscheduler-ui-next/src/service/modules/process-task-relation/types.ts b/dolphinscheduler-ui-next/src/service/modules/process-task-relation/types.ts index ad00bf30f..0bde3160f 100644 --- a/dolphinscheduler-ui-next/src/service/modules/process-task-relation/types.ts +++ b/dolphinscheduler-ui-next/src/service/modules/process-task-relation/types.ts @@ -51,5 +51,5 @@ export { PostTaskCodesReq, TaskCodeReq, SaveReq, - MoveReq, + MoveReq } diff --git a/dolphinscheduler-ui-next/src/service/modules/projects-analysis/index.ts b/dolphinscheduler-ui-next/src/service/modules/projects-analysis/index.ts index b914d1f2e..9f4b275c2 100644 --- a/dolphinscheduler-ui-next/src/service/modules/projects-analysis/index.ts +++ b/dolphinscheduler-ui-next/src/service/modules/projects-analysis/index.ts @@ -21,7 +21,7 @@ import { CodeReq, StateReq } from './types' export function countCommandState(): any { return axios({ url: '/projects/analysis/command-state-count', - method: 'get', + method: 'get' }) } @@ -29,7 +29,7 @@ export function countDefinitionByUser(params: CodeReq): any { return axios({ url: '/projects/analysis/define-user-count', method: 'get', - params, + params }) } @@ -37,14 +37,14 @@ export function countProcessInstanceState(params: StateReq): any { return axios({ url: '/projects/analysis/process-state-count', method: 'get', - params, + params }) } export function countQueueState(): any { return axios({ url: '/projects/analysis/queue-count', - method: 'get', + method: 'get' }) } @@ -52,6 +52,6 @@ export function countTaskState(params: StateReq): any { return axios({ url: '/projects/analysis/task-state-count', method: 'get', - params, + params }) } diff --git a/dolphinscheduler-ui-next/src/service/modules/projects-analysis/types.ts b/dolphinscheduler-ui-next/src/service/modules/projects-analysis/types.ts index 124675874..ab7aa0497 100644 --- a/dolphinscheduler-ui-next/src/service/modules/projects-analysis/types.ts +++ b/dolphinscheduler-ui-next/src/service/modules/projects-analysis/types.ts @@ -62,5 +62,5 @@ export { ProcessDefinitionRes, TaskStateRes, TaskQueueRes, - CommandStateRes, + CommandStateRes } diff --git a/dolphinscheduler-ui-next/src/service/modules/projects/index.ts b/dolphinscheduler-ui-next/src/service/modules/projects/index.ts index 184041e54..555fec1ab 100644 --- a/dolphinscheduler-ui-next/src/service/modules/projects/index.ts +++ b/dolphinscheduler-ui-next/src/service/modules/projects/index.ts @@ -20,54 +20,54 @@ import { ListReq, ProjectsReq, UserIdReq, UpdateProjectsReq } from './types' export function queryProjectListPaging(params: ListReq): any { return axios({ - url: `/projects`, + url: '/projects', method: 'get', - params, + params }) } export function createProject(data: ProjectsReq): any { return axios({ - url: `/projects`, + url: '/projects', method: 'post', - data, + data }) } export function queryAuthorizedProject(params: UserIdReq): any { return axios({ - url: `/projects/authed-project`, + url: '/projects/authed-project', method: 'get', - params, + params }) } export function queryProjectCreatedAndAuthorizedByUser(): any { return axios({ - url: `/projects/created-and-authed`, - method: 'get', + url: '/projects/created-and-authed', + method: 'get' }) } export function queryAllProjectList(): any { return axios({ - url: `/projects/list`, - method: 'get', + url: '/projects/list', + method: 'get' }) } export function queryUnauthorizedProject(params: UserIdReq): any { return axios({ - url: `/projects/unauth-project`, + url: '/projects/unauth-project', method: 'get', - params, + params }) } export function queryProjectByCode(code: number): any { return axios({ url: `/projects/${code}`, - method: 'get', + method: 'get' }) } @@ -75,13 +75,13 @@ export function updateProject(data: UpdateProjectsReq, code: number): any { return axios({ url: `/projects/${code}`, method: 'put', - data, + data }) } export function deleteProject(code: number): any { return axios({ url: `/projects/${code}`, - method: 'delete', + method: 'delete' }) } diff --git a/dolphinscheduler-ui-next/src/service/modules/projects/types.ts b/dolphinscheduler-ui-next/src/service/modules/projects/types.ts index 10b015c0d..6b02d52ba 100644 --- a/dolphinscheduler-ui-next/src/service/modules/projects/types.ts +++ b/dolphinscheduler-ui-next/src/service/modules/projects/types.ts @@ -63,5 +63,5 @@ export { UserIdReq, UpdateProjectsReq, ProjectRes, - ProjectList, + ProjectList } diff --git a/dolphinscheduler-ui-next/src/service/modules/queues/index.ts b/dolphinscheduler-ui-next/src/service/modules/queues/index.ts index a7bf8663f..68ce04fe3 100644 --- a/dolphinscheduler-ui-next/src/service/modules/queues/index.ts +++ b/dolphinscheduler-ui-next/src/service/modules/queues/index.ts @@ -20,32 +20,32 @@ import { ListReq, QueueReq, IdReq } from './types' export function queryQueueListPaging(params: ListReq): any { return axios({ - url: `/queues`, + url: '/queues', method: 'get', - params, + params }) } export function createQueue(data: QueueReq): any { return axios({ - url: `/queues`, + url: '/queues', method: 'post', - data, + data }) } export function queryList(): any { return axios({ - url: `/queues/list`, - method: 'get', + url: '/queues/list', + method: 'get' }) } export function verifyQueue(data: QueueReq): any { return axios({ - url: `/queues/verify`, + url: '/queues/verify', method: 'post', - data, + data }) } @@ -53,6 +53,6 @@ export function updateQueue(data: QueueReq, id: IdReq): any { return axios({ url: `/queues/${id}`, method: 'put', - data, + data }) } diff --git a/dolphinscheduler-ui-next/src/service/modules/resources/index.ts b/dolphinscheduler-ui-next/src/service/modules/resources/index.ts index b1e1ce391..c3f915f3d 100644 --- a/dolphinscheduler-ui-next/src/service/modules/resources/index.ts +++ b/dolphinscheduler-ui-next/src/service/modules/resources/index.ts @@ -17,7 +17,6 @@ import { axios, downloadFile } from '@/service/service' import { - FileReq, ResourceTypeReq, UdfTypeReq, NameReq, @@ -33,26 +32,26 @@ import { ListReq, ViewResourceReq, ResourceIdReq, - UdfFuncReq, + UdfFuncReq } from './types' export function queryResourceListPaging( - params: ListReq & IdReq & ResourceTypeReq, + params: ListReq & IdReq & ResourceTypeReq ): any { return axios({ url: '/resources', method: 'get', - params, + params }) } export function createResource( - data: CreateReq & FileNameReq & NameReq & ResourceTypeReq, + data: CreateReq & FileNameReq & NameReq & ResourceTypeReq ): any { return axios({ url: '/resources', method: 'post', - data, + data }) } @@ -60,7 +59,7 @@ export function authorizedFile(params: UserIdReq): any { return axios({ url: '/resources/authed-file', method: 'get', - params, + params }) } @@ -68,7 +67,7 @@ export function authorizeResourceTree(params: UserIdReq): any { return axios({ url: '/resources/authed-resource-tree', method: 'get', - params, + params }) } @@ -76,17 +75,17 @@ export function authUDFFunc(params: UserIdReq): any { return axios({ url: '/resources/authed-udf-func', method: 'get', - params, + params }) } export function createDirectory( - data: CreateReq & NameReq & ResourceTypeReq, + data: CreateReq & NameReq & ResourceTypeReq ): any { return axios({ url: '/resources/directory', method: 'post', - data, + data }) } @@ -94,27 +93,27 @@ export function queryResourceList(params: ResourceTypeReq): any { return axios({ url: '/resources/list', method: 'get', - params, + params }) } export function onlineCreateResource( - data: OnlineCreateReq & FileNameReq & ResourceTypeReq, + data: OnlineCreateReq & FileNameReq & ResourceTypeReq ): any { return axios({ url: '/resources/online-create', method: 'post', - data, + data }) } export function queryResourceByProgramType( - params: ResourceTypeReq & ProgramTypeReq, + params: ResourceTypeReq & ProgramTypeReq ): any { return axios({ url: '/resources/query-by-type', method: 'get', - params, + params }) } @@ -122,7 +121,7 @@ export function queryUdfFuncListPaging(params: ListReq): any { return axios({ url: '/resources/udf-func', method: 'get', - params, + params }) } @@ -130,7 +129,7 @@ export function queryUdfFuncList(params: UdfTypeReq): any { return axios({ url: '/resources/udf-func/list', method: 'get', - params, + params }) } @@ -138,14 +137,14 @@ export function verifyUdfFuncName(params: NameReq): any { return axios({ url: '/resources/udf-func/verify-name', method: 'get', - params, + params }) } export function deleteUdfFunc(id: IdReq): any { return axios({ url: `/resources/udf-func/${id}`, - method: 'delete', + method: 'delete' }) } @@ -153,7 +152,7 @@ export function unAuthUDFFunc(params: UserIdReq): any { return axios({ url: '/resources/unauth-udf-func', method: 'get', - params, + params }) } @@ -161,36 +160,36 @@ export function verifyResourceName(params: FullNameReq & ResourceTypeReq): any { return axios({ url: '/resources/verify-name', method: 'get', - params, + params }) } export function queryResource( params: FullNameReq & ResourceTypeReq, - id: IdReq, + id: IdReq ): any { return axios({ url: `/resources/verify-name/${id}`, method: 'get', - params, + params }) } export function updateResource( data: NameReq & ResourceTypeReq & IdReq & DescriptionReq, - id: number, + id: number ): any { return axios({ url: `/resources/${id}`, method: 'put', - data, + data }) } export function deleteResource(id: number): any { return axios({ url: `/resources/${id}`, - method: 'delete', + method: 'delete' }) } @@ -201,7 +200,7 @@ export function downloadResource(id: number): void { export function viewUIUdfFunction(id: IdReq): any { return axios({ url: `/resources/${id}/udf-func`, - method: 'get', + method: 'get' }) } @@ -209,7 +208,7 @@ export function updateResourceContent(data: ContentReq, id: number): any { return axios({ url: `/resources/${id}/update-content`, method: 'put', - data, + data }) } @@ -217,29 +216,29 @@ export function viewResource(params: ViewResourceReq, id: number): any { return axios({ url: `/resources/${id}/view`, method: 'get', - params, + params }) } export function createUdfFunc( data: UdfFuncReq, - resourceId: ResourceIdReq, + resourceId: ResourceIdReq ): any { return axios({ url: `/resources/${resourceId}/udf-func`, method: 'post', - data, + data }) } export function updateUdfFunc( data: UdfFuncReq, resourceId: ResourceIdReq, - id: IdReq, + id: IdReq ): any { return axios({ url: `/resources/${resourceId}/udf-func/${id}`, method: 'put', - data, + data }) } diff --git a/dolphinscheduler-ui-next/src/service/modules/resources/types.ts b/dolphinscheduler-ui-next/src/service/modules/resources/types.ts index 2102ba651..c38e1e3c2 100644 --- a/dolphinscheduler-ui-next/src/service/modules/resources/types.ts +++ b/dolphinscheduler-ui-next/src/service/modules/resources/types.ts @@ -130,5 +130,5 @@ export { ViewResourceReq, ResourceIdReq, UdfFuncReq, - ResourceListRes, + ResourceListRes } diff --git a/dolphinscheduler-ui-next/src/service/modules/schedules/index.ts b/dolphinscheduler-ui-next/src/service/modules/schedules/index.ts index 6b6aaca43..534f243b5 100644 --- a/dolphinscheduler-ui-next/src/service/modules/schedules/index.ts +++ b/dolphinscheduler-ui-next/src/service/modules/schedules/index.ts @@ -20,13 +20,11 @@ import { ProjectCodeReq, IdReq, CodeReq, - ListReq, - ProcessDefinitionCodeReq, ScheduleReq, WorkerGroupIdReq, ScheduleListReq, CreateScheduleReq, - DeleteScheduleReq, + DeleteScheduleReq } from './types' export function queryScheduleListPaging( @@ -36,7 +34,7 @@ export function queryScheduleListPaging( return axios({ url: `/projects/${projectCode}/schedules`, method: 'get', - params, + params }) } @@ -47,14 +45,14 @@ export function createSchedule( return axios({ url: `/projects/${projectCode}/schedules`, method: 'post', - data, + data }) } export function queryScheduleList(projectCode: ProjectCodeReq): any { return axios({ url: `/projects/${projectCode}/schedules/list`, - method: 'post', + method: 'post' }) } @@ -65,7 +63,7 @@ export function previewSchedule( return axios({ url: `/projects/${projectCode}/schedules/preview`, method: 'post', - data, + data }) } @@ -77,7 +75,7 @@ export function updateScheduleByProcessDefinitionCode( return axios({ url: `/projects/${projectCode}/schedules/update/${code}`, method: 'put', - data, + data }) } @@ -89,7 +87,7 @@ export function updateSchedule( return axios({ url: `/projects/${projectCode}/schedules/${id}`, method: 'put', - data, + data }) } @@ -100,20 +98,20 @@ export function deleteScheduleById( return axios({ url: `/projects/${projectCode}/schedules/${data.id}`, method: 'delete', - data, + data }) } export function offline(projectCode: ProjectCodeReq, id: IdReq): any { return axios({ url: `/projects/${projectCode}/schedules/${id}/offline`, - method: 'post', + method: 'post' }) } export function online(projectCode: ProjectCodeReq, id: IdReq): any { return axios({ url: `/projects/${projectCode}/schedules/${id}/online`, - method: 'post', + method: 'post' }) } diff --git a/dolphinscheduler-ui-next/src/service/modules/schedules/types.ts b/dolphinscheduler-ui-next/src/service/modules/schedules/types.ts index 722018fa2..e6ac46a00 100644 --- a/dolphinscheduler-ui-next/src/service/modules/schedules/types.ts +++ b/dolphinscheduler-ui-next/src/service/modules/schedules/types.ts @@ -84,5 +84,5 @@ export { WorkerGroupIdReq, ScheduleListReq, CreateScheduleReq, - DeleteScheduleReq, + DeleteScheduleReq } diff --git a/dolphinscheduler-ui-next/src/service/modules/task-definition/index.ts b/dolphinscheduler-ui-next/src/service/modules/task-definition/index.ts index 102c2070b..c2c00204c 100644 --- a/dolphinscheduler-ui-next/src/service/modules/task-definition/index.ts +++ b/dolphinscheduler-ui-next/src/service/modules/task-definition/index.ts @@ -18,7 +18,6 @@ import { axios } from '@/service/service' import { PageReq, - ListReq, ProjectCodeReq, TaskDefinitionListReq, TaskDefinitionJsonReq, @@ -26,7 +25,7 @@ import { CodeReq, TaskDefinitionJsonObjReq, ReleaseStateReq, - VersionReq, + VersionReq } from './types' export function queryTaskDefinitionListPaging( @@ -36,7 +35,7 @@ export function queryTaskDefinitionListPaging( return axios({ url: `/projects/${projectCode}/task-definition`, method: 'get', - params, + params }) } @@ -47,7 +46,7 @@ export function save( return axios({ url: `/projects/${projectCode}/task-definition`, method: 'post', - data, + data }) } @@ -58,7 +57,7 @@ export function genTaskCodeList( return axios({ url: `/projects/${projectCode}/task-definition/gen-task-codes`, method: 'get', - params, + params }) } @@ -68,7 +67,7 @@ export function queryTaskDefinitionByCode( ): any { return axios({ url: `/projects/${projectCode}/task-definition/${code}`, - method: 'get', + method: 'get' }) } @@ -80,7 +79,7 @@ export function update( return axios({ url: `/projects/${projectCode}/task-definition/${code}`, method: 'put', - data, + data }) } @@ -92,7 +91,7 @@ export function deleteTaskDefinition( return axios({ url: `/projects/${projectCode}/task-definition/${code}`, method: 'put', - data, + data }) } @@ -104,7 +103,7 @@ export function releaseTaskDefinition( return axios({ url: `/projects/${projectCode}/task-definition/${code}/release`, method: 'post', - data, + data }) } @@ -116,7 +115,7 @@ export function queryVersions( return axios({ url: `/projects/${projectCode}/task-definition/${code}/versions`, method: 'get', - params, + params }) } @@ -127,7 +126,7 @@ export function switchVersion( ): any { return axios({ url: `/projects/${projectCode}/task-definition/${code}/versions/${version}`, - method: 'get', + method: 'get' }) } @@ -138,6 +137,6 @@ export function deleteVersion( ): any { return axios({ url: `/projects/${projectCode}/task-definition/${code}/versions/${version}`, - method: 'delete', + method: 'delete' }) } diff --git a/dolphinscheduler-ui-next/src/service/modules/task-definition/types.ts b/dolphinscheduler-ui-next/src/service/modules/task-definition/types.ts index 972650008..e0d75f296 100644 --- a/dolphinscheduler-ui-next/src/service/modules/task-definition/types.ts +++ b/dolphinscheduler-ui-next/src/service/modules/task-definition/types.ts @@ -67,5 +67,5 @@ export { CodeReq, TaskDefinitionJsonObjReq, ReleaseStateReq, - VersionReq, + VersionReq } diff --git a/dolphinscheduler-ui-next/src/service/modules/task-instances/index.ts b/dolphinscheduler-ui-next/src/service/modules/task-instances/index.ts index 24609f495..c160a0378 100644 --- a/dolphinscheduler-ui-next/src/service/modules/task-instances/index.ts +++ b/dolphinscheduler-ui-next/src/service/modules/task-instances/index.ts @@ -25,13 +25,13 @@ export function queryTaskListPaging( return axios({ url: `/projects/${projectCode}/task-instances`, method: 'get', - params, + params }) } export function forceSuccess(id: IdReq, projectCode: ProjectCodeReq): any { return axios({ url: `/projects/${projectCode}/task-instances/${id}/force-success`, - method: 'post', + method: 'post' }) } diff --git a/dolphinscheduler-ui-next/src/service/modules/tenants/index.ts b/dolphinscheduler-ui-next/src/service/modules/tenants/index.ts index f864bee9c..07a25e2cc 100644 --- a/dolphinscheduler-ui-next/src/service/modules/tenants/index.ts +++ b/dolphinscheduler-ui-next/src/service/modules/tenants/index.ts @@ -22,7 +22,7 @@ export function queryTenantListPaging(params: ListReq): any { return axios({ url: '/tenants', method: 'get', - params, + params }) } @@ -30,14 +30,14 @@ export function createTenant(data: TenantReq): any { return axios({ url: '/tenants', method: 'post', - data, + data }) } export function queryTenantList(): any { return axios({ url: '/tenants/list', - method: 'get', + method: 'get' }) } @@ -45,7 +45,7 @@ export function verifyTenantCode(params: TenantCodeReq): any { return axios({ url: '/tenants/verify-code', method: 'get', - params, + params }) } @@ -53,13 +53,13 @@ export function updateTenant(data: TenantCodeReq, idReq: IdReq): any { return axios({ url: `/tenants/${idReq.id}`, method: 'put', - data, + data }) } export function deleteTenantById(id: number): any { return axios({ url: `/tenants/${id}`, - method: 'delete', + method: 'delete' }) } diff --git a/dolphinscheduler-ui-next/src/service/modules/token/index.ts b/dolphinscheduler-ui-next/src/service/modules/token/index.ts index 0b5ab5afe..e7b94379a 100644 --- a/dolphinscheduler-ui-next/src/service/modules/token/index.ts +++ b/dolphinscheduler-ui-next/src/service/modules/token/index.ts @@ -22,7 +22,7 @@ export function queryAccessTokenList(params: ListReq): any { return axios({ url: '/access-tokens', method: 'get', - params, + params }) } @@ -30,7 +30,7 @@ export function createToken(data: TokenReq): any { return axios({ url: '/access-tokens', method: 'post', - data, + data }) } @@ -38,7 +38,7 @@ export function queryAccessTokenByUser(params: UserReq): any { return axios({ url: '/access-tokens', method: 'get', - params, + params }) } @@ -46,6 +46,6 @@ export function updateToken(data: UpdateTokenReq): any { return axios({ url: '/access-tokens', method: 'put', - data, + data }) } diff --git a/dolphinscheduler-ui-next/src/service/modules/ui-plugins/index.ts b/dolphinscheduler-ui-next/src/service/modules/ui-plugins/index.ts index 9b55be3f2..553cc486e 100644 --- a/dolphinscheduler-ui-next/src/service/modules/ui-plugins/index.ts +++ b/dolphinscheduler-ui-next/src/service/modules/ui-plugins/index.ts @@ -22,13 +22,13 @@ export function queryUiPluginsByType(params: PluginTypeReq): any { return axios({ url: '/ui-plugins/query-by-type', method: 'get', - params, + params }) } export function queryUiPluginDetailById(id: IdReq): any { return axios({ url: `/ui-plugins/${id}`, - method: 'get', + method: 'get' }) } diff --git a/dolphinscheduler-ui-next/src/service/modules/users/index.ts b/dolphinscheduler-ui-next/src/service/modules/users/index.ts index 8f4e0ff3b..2b52b1971 100644 --- a/dolphinscheduler-ui-next/src/service/modules/users/index.ts +++ b/dolphinscheduler-ui-next/src/service/modules/users/index.ts @@ -30,14 +30,14 @@ import { GrantUDFReq, ListAllReq, ListReq, - RegisterUserReq, + RegisterUserReq } from './types' export function activateUser(data: UserNameReq): any { return axios({ url: '/users/activate', method: 'post', - data, + data }) } @@ -45,7 +45,7 @@ export function authorizedUser(params: AlertGroupIdReq): any { return axios({ url: '/users/authed-user', method: 'get', - params, + params }) } @@ -53,7 +53,7 @@ export function batchActivateUser(data: UserNamesReq): any { return axios({ url: '/users/batch/activate', method: 'post', - data, + data }) } @@ -61,7 +61,7 @@ export function createUser(data: UserReq): any { return axios({ url: '/users/create', method: 'post', - data, + data }) } @@ -69,14 +69,14 @@ export function delUserById(data: IdReq): any { return axios({ url: '/users/delete', method: 'post', - data, + data }) } export function getUserInfo(): any { return axios({ url: '/users/get-user-info', - method: 'get', + method: 'get' }) } @@ -84,7 +84,7 @@ export function grantDataSource(data: GrantDataSourceReq): any { return axios({ url: '/users/grant-datasource', method: 'post', - data, + data }) } @@ -92,7 +92,7 @@ export function grantResource(data: GrantResourceReq): any { return axios({ url: '/users/grant-file', method: 'post', - data, + data }) } @@ -100,7 +100,7 @@ export function grantProject(data: GrantProject): any { return axios({ url: '/users/grant-project', method: 'post', - data, + data }) } @@ -108,7 +108,7 @@ export function grantProjectByCode(data: ProjectCodeReq & UserIdReq): any { return axios({ url: '/users/grant-project-by-code', method: 'post', - data, + data }) } @@ -116,14 +116,14 @@ export function grantUDFFunc(data: GrantUDFReq & UserIdReq): any { return axios({ url: '/users/grant-udf-func', method: 'post', - data, + data }) } export function listUser(): any { return axios({ url: '/users/list', - method: 'get', + method: 'get' }) } @@ -131,7 +131,7 @@ export function listAll(params: ListAllReq): any { return axios({ url: '/users/list-all', method: 'get', - params, + params }) } @@ -139,7 +139,7 @@ export function queryUserList(params: ListReq): any { return axios({ url: '/users/list-paging', method: 'get', - params, + params }) } @@ -147,7 +147,7 @@ export function registerUser(data: RegisterUserReq): any { return axios({ url: '/users/register', method: 'post', - data, + data }) } @@ -155,7 +155,7 @@ export function revokeProject(data: ProjectCodeReq & UserIdReq): any { return axios({ url: '/users/revoke-project', method: 'post', - data, + data }) } @@ -163,7 +163,7 @@ export function unauthorizedUser(params: AlertGroupIdReq): any { return axios({ url: '/users/unauth-user', method: 'get', - params, + params }) } @@ -171,7 +171,7 @@ export function updateUser(data: IdReq & UserReq): any { return axios({ url: '/users/update', method: 'post', - data, + data }) } @@ -179,6 +179,6 @@ export function verifyUserName(params: UserNameReq): any { return axios({ url: '/users/verify-user-name', method: 'get', - params, + params }) } diff --git a/dolphinscheduler-ui-next/src/service/modules/users/types.ts b/dolphinscheduler-ui-next/src/service/modules/users/types.ts index 46ae36a52..eef7b59a4 100644 --- a/dolphinscheduler-ui-next/src/service/modules/users/types.ts +++ b/dolphinscheduler-ui-next/src/service/modules/users/types.ts @@ -112,5 +112,5 @@ export { ListAllReq, ListReq, RegisterUserReq, - UserInfoRes, + UserInfoRes } diff --git a/dolphinscheduler-ui-next/src/service/modules/worker-groups/index.ts b/dolphinscheduler-ui-next/src/service/modules/worker-groups/index.ts index ff11f1410..0cedd071e 100644 --- a/dolphinscheduler-ui-next/src/service/modules/worker-groups/index.ts +++ b/dolphinscheduler-ui-next/src/service/modules/worker-groups/index.ts @@ -22,7 +22,7 @@ export function queryAllWorkerGroupsPaging(params: ListReq): any { return axios({ url: '/worker-groups', method: 'get', - params, + params }) } @@ -30,27 +30,27 @@ export function saveWorkerGroup(data: WorkerGroupReq): any { return axios({ url: '/worker-groups', method: 'post', - data, + data }) } export function queryAllWorkerGroups(): any { return axios({ url: '/worker-groups/all', - method: 'get', + method: 'get' }) } export function queryWorkerAddressList(): any { return axios({ url: '/worker-groups/worker-address-list', - method: 'get', + method: 'get' }) } export function deleteById(id: IdReq): any { return axios({ url: `/worker-groups/${id}`, - method: 'delete', + method: 'delete' }) } diff --git a/dolphinscheduler-ui-next/src/service/service.ts b/dolphinscheduler-ui-next/src/service/service.ts index d357d9df4..a854f709c 100644 --- a/dolphinscheduler-ui-next/src/service/service.ts +++ b/dolphinscheduler-ui-next/src/service/service.ts @@ -15,12 +15,7 @@ * limitations under the License. */ -import axios, { - AxiosRequestConfig, - AxiosResponse, - AxiosError, - AxiosRequestHeaders, -} from 'axios' +import axios, { AxiosRequestConfig, AxiosResponse, AxiosError } from 'axios' import qs from 'qs' import _ from 'lodash' import { useUserStore } from '@/store/user/user' @@ -32,7 +27,6 @@ const baseRequestConfig: AxiosRequestConfig = { timeout: 10000, transformRequest: (params) => { if (_.isPlainObject(params)) { - console.log(params) return qs.stringify(params, { arrayFormat: 'repeat' }) } else { return params @@ -40,7 +34,7 @@ const baseRequestConfig: AxiosRequestConfig = { }, paramsSerializer: (params) => { return qs.stringify(params, { arrayFormat: 'repeat' }) - }, + } } const service = axios.create(baseRequestConfig) @@ -92,7 +86,7 @@ const resolveURL = (url: string) => { const downloadFile = (url: string, obj?: any) => { const param: any = { url: resolveURL(url), - obj: obj || {}, + obj: obj || {} } const form = document.createElement('form') diff --git a/dolphinscheduler-ui-next/src/store/file/file.ts b/dolphinscheduler-ui-next/src/store/file/file.ts index 96fb868b3..db8d3a1c9 100644 --- a/dolphinscheduler-ui-next/src/store/file/file.ts +++ b/dolphinscheduler-ui-next/src/store/file/file.ts @@ -22,7 +22,7 @@ export const useFileStore = defineStore({ id: 'file', state: (): FileState => ({ file: '', - currentDir: '/', + currentDir: '/' }), persist: true, getters: { @@ -31,7 +31,7 @@ export const useFileStore = defineStore({ }, getCurrentDir(): string { return this.currentDir - }, + } }, actions: { setFileInfo(file: string): void { @@ -39,6 +39,6 @@ export const useFileStore = defineStore({ }, setCurrentDir(currentDir: string): void { this.currentDir = currentDir - }, - }, + } + } }) diff --git a/dolphinscheduler-ui-next/src/store/locales/locales.ts b/dolphinscheduler-ui-next/src/store/locales/locales.ts index 203f95b37..da5ea260e 100644 --- a/dolphinscheduler-ui-next/src/store/locales/locales.ts +++ b/dolphinscheduler-ui-next/src/store/locales/locales.ts @@ -21,17 +21,17 @@ import { LocalesStore, Locales } from './types' export const useLocalesStore = defineStore({ id: 'locales', state: (): LocalesStore => ({ - locales: 'zh_CN', + locales: 'zh_CN' }), persist: true, getters: { getLocales(): Locales { return this.locales - }, + } }, actions: { setLocales(lang: Locales): void { this.locales = lang - }, - }, + } + } }) diff --git a/dolphinscheduler-ui-next/src/store/menu/menu.ts b/dolphinscheduler-ui-next/src/store/menu/menu.ts index b4c5c09ae..3f5e4ccfe 100644 --- a/dolphinscheduler-ui-next/src/store/menu/menu.ts +++ b/dolphinscheduler-ui-next/src/store/menu/menu.ts @@ -21,17 +21,17 @@ import MenuState from './types' export const useMenuStore = defineStore({ id: 'menu', state: (): MenuState => ({ - menuKey: 'home', + menuKey: 'home' }), persist: true, getters: { getMenuKey(): string { return this.menuKey || 'home' - }, + } }, actions: { setMenuKey(menuKey: string): void { this.menuKey = menuKey - }, - }, + } + } }) diff --git a/dolphinscheduler-ui-next/src/store/theme/theme.ts b/dolphinscheduler-ui-next/src/store/theme/theme.ts index 8d5facd86..0fe8052dd 100644 --- a/dolphinscheduler-ui-next/src/store/theme/theme.ts +++ b/dolphinscheduler-ui-next/src/store/theme/theme.ts @@ -21,17 +21,17 @@ import ThemeState from './types' export const useThemeStore = defineStore({ id: 'theme', state: (): ThemeState => ({ - darkTheme: false, + darkTheme: false }), persist: true, getters: { getTheme(): boolean { return this.darkTheme - }, + } }, actions: { setDarkTheme(): void { this.darkTheme = !this.darkTheme - }, - }, + } + } }) diff --git a/dolphinscheduler-ui-next/src/store/user/user.ts b/dolphinscheduler-ui-next/src/store/user/user.ts index ed933e9eb..92feec46f 100644 --- a/dolphinscheduler-ui-next/src/store/user/user.ts +++ b/dolphinscheduler-ui-next/src/store/user/user.ts @@ -23,7 +23,7 @@ export const useUserStore = defineStore({ id: 'user', state: (): UserState => ({ sessionId: '', - userInfo: {}, + userInfo: {} }), persist: true, getters: { @@ -32,7 +32,7 @@ export const useUserStore = defineStore({ }, getUserInfo(): UserInfoRes | {} { return this.userInfo - }, + } }, actions: { setSessionId(sessionId: string): void { @@ -40,6 +40,6 @@ export const useUserStore = defineStore({ }, setUserInfo(userInfo: UserInfoRes | {}): void { this.userInfo = userInfo - }, - }, + } + } }) diff --git a/dolphinscheduler-ui-next/src/themes/index.ts b/dolphinscheduler-ui-next/src/themes/index.ts index f42e0b8f3..a5f70cbf1 100644 --- a/dolphinscheduler-ui-next/src/themes/index.ts +++ b/dolphinscheduler-ui-next/src/themes/index.ts @@ -20,7 +20,7 @@ import dark from './modules/dark' const themeList = { light, - dark, + dark } export default themeList diff --git a/dolphinscheduler-ui-next/src/themes/modules/dark.ts b/dolphinscheduler-ui-next/src/themes/modules/dark.ts index 90b7bc9d5..bf0ad510c 100644 --- a/dolphinscheduler-ui-next/src/themes/modules/dark.ts +++ b/dolphinscheduler-ui-next/src/themes/modules/dark.ts @@ -18,7 +18,7 @@ const dark = { common: { // bodyColor: '#28292d', - }, + } } export default dark diff --git a/dolphinscheduler-ui-next/src/themes/modules/light.ts b/dolphinscheduler-ui-next/src/themes/modules/light.ts index 2f1481598..d9b8834b6 100644 --- a/dolphinscheduler-ui-next/src/themes/modules/light.ts +++ b/dolphinscheduler-ui-next/src/themes/modules/light.ts @@ -16,8 +16,8 @@ */ const light = { common: { - bodyColor: '#f8f8fc', - }, + bodyColor: '#f8f8fc' + } } export default light diff --git a/dolphinscheduler-ui-next/src/utils/common.ts b/dolphinscheduler-ui-next/src/utils/common.ts index 15e7ca0b8..6b8d1ef68 100644 --- a/dolphinscheduler-ui-next/src/utils/common.ts +++ b/dolphinscheduler-ui-next/src/utils/common.ts @@ -44,5 +44,5 @@ export const fileTypeArr = [ 'yml', 'yaml', 'ini', - 'js', + 'js' ] diff --git a/dolphinscheduler-ui-next/src/utils/index.ts b/dolphinscheduler-ui-next/src/utils/index.ts index bc5c104e8..efca1e89c 100644 --- a/dolphinscheduler-ui-next/src/utils/index.ts +++ b/dolphinscheduler-ui-next/src/utils/index.ts @@ -20,7 +20,7 @@ import regex from './regex' const utils = { mapping, - regex, + regex } export default utils diff --git a/dolphinscheduler-ui-next/src/utils/regex.ts b/dolphinscheduler-ui-next/src/utils/regex.ts index 8df3ba80f..c660e8d12 100644 --- a/dolphinscheduler-ui-next/src/utils/regex.ts +++ b/dolphinscheduler-ui-next/src/utils/regex.ts @@ -16,7 +16,7 @@ */ const regex = { - email: /^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/, // support Chinese mailbox + email: /^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/ // support Chinese mailbox } export default regex diff --git a/dolphinscheduler-ui-next/src/views/home/components/definition-card.tsx b/dolphinscheduler-ui-next/src/views/home/components/definition-card.tsx index eb209c18a..fb73f5be8 100644 --- a/dolphinscheduler-ui-next/src/views/home/components/definition-card.tsx +++ b/dolphinscheduler-ui-next/src/views/home/components/definition-card.tsx @@ -22,8 +22,8 @@ import Card from '@/components/card' const props = { title: { - type: String as PropType, - }, + type: String as PropType + } } const DefinitionCard = defineComponent({ @@ -48,11 +48,11 @@ const DefinitionCard = defineComponent({ xAxisData={processDefinition.xAxisData} seriesData={processDefinition.seriesData} /> - ), + ) }} ) - }, + } }) export default DefinitionCard diff --git a/dolphinscheduler-ui-next/src/views/home/components/state-card.tsx b/dolphinscheduler-ui-next/src/views/home/components/state-card.tsx index 3a398b1e5..87a902e00 100644 --- a/dolphinscheduler-ui-next/src/views/home/components/state-card.tsx +++ b/dolphinscheduler-ui-next/src/views/home/components/state-card.tsx @@ -24,19 +24,19 @@ import type { StateTableData, StateChartData } from '../types' const props = { title: { - type: String as PropType, + type: String as PropType }, date: { - type: Array as PropType>, + type: Array as PropType> }, tableData: { type: Array as PropType>, - default: () => [], + default: () => [] }, chartData: { type: Array as PropType>, - default: () => [], - }, + default: () => [] + } } const StateCard = defineComponent({ @@ -80,11 +80,11 @@ const StateCard = defineComponent({ type='datetimerange' clearable /> - ), + ) }} ) - }, + } }) export default StateCard diff --git a/dolphinscheduler-ui-next/src/views/home/index.tsx b/dolphinscheduler-ui-next/src/views/home/index.tsx index e37fdb43d..7a149b2fe 100644 --- a/dolphinscheduler-ui-next/src/views/home/index.tsx +++ b/dolphinscheduler-ui-next/src/views/home/index.tsx @@ -31,8 +31,8 @@ export default defineComponent({ const dateRef = ref([getTime(startOfToday()), Date.now()]) const { getTaskState } = useTaskState() const { getProcessState } = useProcessState() - let taskStateRef = ref() - let processStateRef = ref() + const taskStateRef = ref() + const processStateRef = ref() onMounted(() => { taskStateRef.value = getTaskState(dateRef.value) @@ -53,7 +53,7 @@ export default defineComponent({ handleTaskDate, handleProcessDate, taskStateRef, - processStateRef, + processStateRef } }, render() { @@ -88,5 +88,5 @@ export default defineComponent({ ) - }, + } }) diff --git a/dolphinscheduler-ui-next/src/views/home/use-process-state.ts b/dolphinscheduler-ui-next/src/views/home/use-process-state.ts index 04707e9d0..b8adc6810 100644 --- a/dolphinscheduler-ui-next/src/views/home/use-process-state.ts +++ b/dolphinscheduler-ui-next/src/views/home/use-process-state.ts @@ -27,20 +27,20 @@ export function useProcessState() { countProcessInstanceState({ startDate: format(date[0], 'yyyy-MM-dd HH:mm:ss'), endDate: format(date[1], 'yyyy-MM-dd HH:mm:ss'), - projectCode: 0, + projectCode: 0 }).then((res: TaskStateRes): StateData => { const table = res.taskCountDtos.map((item, index) => { return { index: index + 1, state: item.taskStateType, - number: item.count, + number: item.count } }) const chart = res.taskCountDtos.map((item) => { return { value: item.count, - name: item.taskStateType, + name: item.taskStateType } }) diff --git a/dolphinscheduler-ui-next/src/views/home/use-table.ts b/dolphinscheduler-ui-next/src/views/home/use-table.ts index 3833e9ef4..1c16f4aab 100644 --- a/dolphinscheduler-ui-next/src/views/home/use-table.ts +++ b/dolphinscheduler-ui-next/src/views/home/use-table.ts @@ -24,10 +24,10 @@ export function useTable() { const columnsRef: TableColumns = [ { title: '#', key: 'index' }, { title: t('home.number'), key: 'number' }, - { title: t('home.state'), key: 'state' }, + { title: t('home.state'), key: 'state' } ] return { - columnsRef, + columnsRef } } diff --git a/dolphinscheduler-ui-next/src/views/home/use-task-state.ts b/dolphinscheduler-ui-next/src/views/home/use-task-state.ts index b4b00a22d..d9ce19083 100644 --- a/dolphinscheduler-ui-next/src/views/home/use-task-state.ts +++ b/dolphinscheduler-ui-next/src/views/home/use-task-state.ts @@ -27,20 +27,20 @@ export function useTaskState() { countTaskState({ startDate: format(date[0], 'yyyy-MM-dd HH:mm:ss'), endDate: format(date[1], 'yyyy-MM-dd HH:mm:ss'), - projectCode: 0, + projectCode: 0 }).then((res: TaskStateRes): StateData => { const table = res.taskCountDtos.map((item, index) => { return { index: index + 1, state: item.taskStateType, - number: item.count, + number: item.count } }) const chart = res.taskCountDtos.map((item) => { return { value: item.count, - name: item.taskStateType, + name: item.taskStateType } }) diff --git a/dolphinscheduler-ui-next/src/views/login/index.tsx b/dolphinscheduler-ui-next/src/views/login/index.tsx index 6e9e3edfc..48ad64c62 100644 --- a/dolphinscheduler-ui-next/src/views/login/index.tsx +++ b/dolphinscheduler-ui-next/src/views/login/index.tsx @@ -51,7 +51,7 @@ const login = defineComponent({ > {{ checked: () => 'en_US', - unchecked: () => 'zh_CN', + unchecked: () => 'zh_CN' }} @@ -104,7 +104,7 @@ const login = defineComponent({ ) - }, + } }) export default login diff --git a/dolphinscheduler-ui-next/src/views/login/use-form.ts b/dolphinscheduler-ui-next/src/views/login/use-form.ts index 2f47d7e13..9aef8ec0f 100644 --- a/dolphinscheduler-ui-next/src/views/login/use-form.ts +++ b/dolphinscheduler-ui-next/src/views/login/use-form.ts @@ -26,7 +26,7 @@ export function useForm() { loginFormRef: ref(), loginForm: { userName: '', - userPassword: '', + userPassword: '' }, rules: { userName: { @@ -35,7 +35,7 @@ export function useForm() { if (state.loginForm.userName === '') { return new Error(t('login.userName_tips')) } - }, + } }, userPassword: { trigger: ['input', 'blur'], @@ -43,14 +43,14 @@ export function useForm() { if (state.loginForm.userPassword === '') { return new Error(t('login.userPassword_tips')) } - }, - }, - } as FormRules, + } + } + } as FormRules }) return { state, t, - locale, + locale } } diff --git a/dolphinscheduler-ui-next/src/views/login/use-login.ts b/dolphinscheduler-ui-next/src/views/login/use-login.ts index e9fd243d8..e560e3dee 100644 --- a/dolphinscheduler-ui-next/src/views/login/use-login.ts +++ b/dolphinscheduler-ui-next/src/views/login/use-login.ts @@ -42,6 +42,6 @@ export function useLogin(state: any) { } return { - handleLogin, + handleLogin } } diff --git a/dolphinscheduler-ui-next/src/views/login/use-translate.ts b/dolphinscheduler-ui-next/src/views/login/use-translate.ts index b2f13680c..868e700a0 100644 --- a/dolphinscheduler-ui-next/src/views/login/use-translate.ts +++ b/dolphinscheduler-ui-next/src/views/login/use-translate.ts @@ -27,6 +27,6 @@ export function useTranslate(locale: WritableComputedRef) { localesStore.setLocales(value) } return { - handleChange, + handleChange } } diff --git a/dolphinscheduler-ui-next/src/views/monitor/servers/db/index.tsx b/dolphinscheduler-ui-next/src/views/monitor/servers/db/index.tsx index fc4bc3715..ed20f667b 100644 --- a/dolphinscheduler-ui-next/src/views/monitor/servers/db/index.tsx +++ b/dolphinscheduler-ui-next/src/views/monitor/servers/db/index.tsx @@ -94,7 +94,7 @@ const db = defineComponent({ ) - }, + } }) export default db diff --git a/dolphinscheduler-ui-next/src/views/monitor/servers/master/index.tsx b/dolphinscheduler-ui-next/src/views/monitor/servers/master/index.tsx index 58241db6b..2d5f11607 100644 --- a/dolphinscheduler-ui-next/src/views/monitor/servers/master/index.tsx +++ b/dolphinscheduler-ui-next/src/views/monitor/servers/master/index.tsx @@ -30,13 +30,13 @@ import type { TableColumns } from 'naive-ui/es/data-table/src/interface' const master = defineComponent({ name: 'master', setup() { - let showModalRef = ref(false) + const showModalRef = ref(false) const { t } = useI18n() const { getMaster } = useMaster() const masterRef: Ref> = ref(getMaster()) const columnsRef: TableColumns = [ { title: '#', key: 'index' }, - { title: t('monitor.master.directory'), key: 'directory' }, + { title: t('monitor.master.directory'), key: 'directory' } ] return { t, masterRef, showModalRef, columnsRef } @@ -125,12 +125,12 @@ const master = defineComponent({ striped size={'small'} /> - ), + ) }} ) - }, + } }) export default master diff --git a/dolphinscheduler-ui-next/src/views/monitor/servers/worker/index.tsx b/dolphinscheduler-ui-next/src/views/monitor/servers/worker/index.tsx index 4e798717a..8e82b8afc 100644 --- a/dolphinscheduler-ui-next/src/views/monitor/servers/worker/index.tsx +++ b/dolphinscheduler-ui-next/src/views/monitor/servers/worker/index.tsx @@ -30,13 +30,13 @@ import type { TableColumns } from 'naive-ui/es/data-table/src/interface' const master = defineComponent({ name: 'master', setup() { - let showModalRef = ref(false) + const showModalRef = ref(false) const { t } = useI18n() const { getWorker } = useWorker() const workerRef: Ref> = ref(getWorker()) const columnsRef: TableColumns = [ { title: '#', key: 'index' }, - { title: t('monitor.worker.directory'), key: 'directory' }, + { title: t('monitor.worker.directory'), key: 'directory' } ] return { t, workerRef, showModalRef, columnsRef } @@ -127,12 +127,12 @@ const master = defineComponent({ striped size={'small'} /> - ), + ) }} ) - }, + } }) export default master diff --git a/dolphinscheduler-ui-next/src/views/monitor/statistics/statistics/index.tsx b/dolphinscheduler-ui-next/src/views/monitor/statistics/statistics/index.tsx index 7e63a5c89..53963032a 100644 --- a/dolphinscheduler-ui-next/src/views/monitor/statistics/statistics/index.tsx +++ b/dolphinscheduler-ui-next/src/views/monitor/statistics/statistics/index.tsx @@ -95,7 +95,7 @@ const statistics = defineComponent({ ) - }, + } }) export default statistics diff --git a/dolphinscheduler-ui-next/src/views/monitor/statistics/statistics/use-statistics.ts b/dolphinscheduler-ui-next/src/views/monitor/statistics/statistics/use-statistics.ts index 8742e43eb..b02c09c86 100644 --- a/dolphinscheduler-ui-next/src/views/monitor/statistics/statistics/use-statistics.ts +++ b/dolphinscheduler-ui-next/src/views/monitor/statistics/statistics/use-statistics.ts @@ -17,13 +17,13 @@ import { countQueueState, - countCommandState, + countCommandState } from '@/service/modules/projects-analysis' import { useAsyncState } from '@vueuse/core' import type { Ref } from 'vue' import type { TaskQueueRes, - CommandStateRes, + CommandStateRes } from '@/service/modules/projects-analysis/types' export function useStatistics() { diff --git a/dolphinscheduler-ui-next/src/views/password/index.tsx b/dolphinscheduler-ui-next/src/views/password/index.tsx index 80fa6c4ef..a2eaf8fb5 100644 --- a/dolphinscheduler-ui-next/src/views/password/index.tsx +++ b/dolphinscheduler-ui-next/src/views/password/index.tsx @@ -69,11 +69,11 @@ const password = defineComponent({ {t('password.submit')} - ), + ) }} ) - }, + } }) export default password diff --git a/dolphinscheduler-ui-next/src/views/password/use-form.ts b/dolphinscheduler-ui-next/src/views/password/use-form.ts index 7edad7b7f..78d8a486d 100644 --- a/dolphinscheduler-ui-next/src/views/password/use-form.ts +++ b/dolphinscheduler-ui-next/src/views/password/use-form.ts @@ -26,7 +26,7 @@ export function useForm() { passwordFormRef: ref(), passwordForm: { password: '', - confirmPassword: '', + confirmPassword: '' }, rules: { password: { @@ -35,7 +35,7 @@ export function useForm() { if (state.passwordForm.password === '') { return new Error(t('password.password_tips')) } - }, + } }, confirmPassword: { trigger: ['input', 'blur'], @@ -43,9 +43,9 @@ export function useForm() { if (state.passwordForm.confirmPassword === '') { return new Error(t('password.confirm_password_tips')) } - }, - }, - } as FormRules, + } + } + } as FormRules }) return { state, t } diff --git a/dolphinscheduler-ui-next/src/views/password/use-update.ts b/dolphinscheduler-ui-next/src/views/password/use-update.ts index 558246320..3d70b2c9f 100644 --- a/dolphinscheduler-ui-next/src/views/password/use-update.ts +++ b/dolphinscheduler-ui-next/src/views/password/use-update.ts @@ -36,7 +36,7 @@ export function useUpdate(state: any) { tenantId: userInfo.tenantId, email: userInfo.email, phone: userInfo.phone, - state: userInfo.state, + state: userInfo.state }) await userStore.setSessionId('') @@ -47,6 +47,6 @@ export function useUpdate(state: any) { } return { - handleUpdate, + handleUpdate } } diff --git a/dolphinscheduler-ui-next/src/views/profile/components/info.tsx b/dolphinscheduler-ui-next/src/views/profile/components/info.tsx index de5b3810b..35ddd091c 100644 --- a/dolphinscheduler-ui-next/src/views/profile/components/info.tsx +++ b/dolphinscheduler-ui-next/src/views/profile/components/info.tsx @@ -36,7 +36,7 @@ const Info = defineComponent({ })} ) - }, + } }) export default Info diff --git a/dolphinscheduler-ui-next/src/views/profile/index.tsx b/dolphinscheduler-ui-next/src/views/profile/index.tsx index 96756db02..668bc944f 100644 --- a/dolphinscheduler-ui-next/src/views/profile/index.tsx +++ b/dolphinscheduler-ui-next/src/views/profile/index.tsx @@ -17,14 +17,7 @@ import { defineComponent, onMounted, ref, toRefs } from 'vue' import { useForm } from './use-form' -import { - NButton, - NForm, - NFormItem, - NInput, - NRadioGroup, - NRadio, -} from 'naive-ui' +import { NButton, NForm, NFormItem, NInput } from 'naive-ui' import { useUserinfo } from './use-userinfo' import { useUpdate } from './use-update' import Card from '@/components/card' @@ -35,7 +28,7 @@ import utils from '@/utils' const profile = defineComponent({ name: 'profile', setup() { - let showModalRef = ref(false) + const showModalRef = ref(false) const { state, t } = useForm() const { handleUpdate } = useUpdate(state) const { getUserInfo } = useUserinfo() @@ -72,7 +65,7 @@ const profile = defineComponent({ > {t('profile.edit')} - ), + ) }} - ), + ) }} ) - }, + } }) export default profile diff --git a/dolphinscheduler-ui-next/src/views/profile/use-form.ts b/dolphinscheduler-ui-next/src/views/profile/use-form.ts index 7c7ac3c74..18013d2e8 100644 --- a/dolphinscheduler-ui-next/src/views/profile/use-form.ts +++ b/dolphinscheduler-ui-next/src/views/profile/use-form.ts @@ -31,7 +31,7 @@ export function useForm() { profileForm: { username: userInfo.userName, email: userInfo.email, - phone: userInfo.phone, + phone: userInfo.phone }, rules: { username: { @@ -41,7 +41,7 @@ export function useForm() { if (state.profileForm.username === '') { return new Error(t('profile.username_tips')) } - }, + } }, email: { trigger: ['input', 'blur'], @@ -52,22 +52,22 @@ export function useForm() { } else if (!utils.regex.email.test(state.profileForm.email)) { return new Error(t('profile.email_correct_tips')) } - }, - }, - } as FormRules, + } + } + } as FormRules }) watch(userInfo, () => { state.profileForm = { username: userInfo.userName, email: userInfo.email, - phone: userInfo.phone, + phone: userInfo.phone } }) return { state, t, - locale, + locale } } diff --git a/dolphinscheduler-ui-next/src/views/profile/use-profile.ts b/dolphinscheduler-ui-next/src/views/profile/use-profile.ts index a5309d205..f10b8f12e 100644 --- a/dolphinscheduler-ui-next/src/views/profile/use-profile.ts +++ b/dolphinscheduler-ui-next/src/views/profile/use-profile.ts @@ -30,7 +30,7 @@ export function useProfile() { infoOptions.value.push({ key: t('profile.username'), - value: userInfo.userName, + value: userInfo.userName }) infoOptions.value.push({ key: t('profile.email'), value: userInfo.email }) infoOptions.value.push({ key: t('profile.phone'), value: userInfo.phone }) @@ -39,18 +39,18 @@ export function useProfile() { value: userInfo.userType === 'ADMIN_USER' ? t('profile.administrator') - : t('profile.ordinary_user'), + : t('profile.ordinary_user') }) infoOptions.value.push({ key: t('profile.create_time'), - value: userInfo.createTime, + value: userInfo.createTime }) infoOptions.value.push({ key: t('profile.update_time'), - value: userInfo.updateTime, + value: userInfo.updateTime }) return { - infoOptions, + infoOptions } } diff --git a/dolphinscheduler-ui-next/src/views/profile/use-update.ts b/dolphinscheduler-ui-next/src/views/profile/use-update.ts index 59fb1a0eb..198bd6903 100644 --- a/dolphinscheduler-ui-next/src/views/profile/use-update.ts +++ b/dolphinscheduler-ui-next/src/views/profile/use-update.ts @@ -34,13 +34,13 @@ export function useUpdate(state: any) { email: state.profileForm.email, phone: state.profileForm.phone, state: userInfo.state, - queue: userInfo.queue, + queue: userInfo.queue }) } }) } return { - handleUpdate, + handleUpdate } } diff --git a/dolphinscheduler-ui-next/src/views/project/list/components/project-modal.tsx b/dolphinscheduler-ui-next/src/views/project/list/components/project-modal.tsx index 73a1821d3..7a9b54a55 100644 --- a/dolphinscheduler-ui-next/src/views/project/list/components/project-modal.tsx +++ b/dolphinscheduler-ui-next/src/views/project/list/components/project-modal.tsx @@ -24,15 +24,15 @@ import { createProject, updateProject } from '@/service/modules/projects' const props = { show: { type: Boolean as PropType, - default: false, + default: false }, data: { - type: Object as PropType, + type: Object as PropType }, status: { type: Number as PropType, - default: 0, - }, + default: 0 + } } const ProjectModal = defineComponent({ @@ -105,7 +105,7 @@ const ProjectModal = defineComponent({ ) - }, + } }) export default ProjectModal diff --git a/dolphinscheduler-ui-next/src/views/project/list/components/table-action.tsx b/dolphinscheduler-ui-next/src/views/project/list/components/table-action.tsx index e2cd06e20..b66382f68 100644 --- a/dolphinscheduler-ui-next/src/views/project/list/components/table-action.tsx +++ b/dolphinscheduler-ui-next/src/views/project/list/components/table-action.tsx @@ -29,8 +29,8 @@ interface ProjectRow extends ProjectList { const props = { row: { type: Object as PropType, - default: {}, - }, + default: {} + } } const TableAction = defineComponent({ @@ -82,7 +82,7 @@ const TableAction = defineComponent({ - ), + ) }} @@ -106,16 +106,16 @@ const TableAction = defineComponent({ - ), + ) }} - ), + ) }} ) - }, + } }) export default TableAction diff --git a/dolphinscheduler-ui-next/src/views/project/list/index.tsx b/dolphinscheduler-ui-next/src/views/project/list/index.tsx index 41fde7e19..f767cdb47 100644 --- a/dolphinscheduler-ui-next/src/views/project/list/index.tsx +++ b/dolphinscheduler-ui-next/src/views/project/list/index.tsx @@ -22,7 +22,7 @@ import { NInput, NIcon, NDataTable, - NPagination, + NPagination } from 'naive-ui' import { SearchOutlined } from '@vicons/antd' import { useI18n } from 'vue-i18n' @@ -41,14 +41,14 @@ const list = defineComponent({ let updateProjectData = reactive({ code: 0, projectName: '', - description: '', + description: '' }) const requestData = () => { getTableData({ pageSize: variables.pageSize, pageNo: variables.page, - searchVal: variables.searchVal, + searchVal: variables.searchVal }) } @@ -61,7 +61,7 @@ const list = defineComponent({ updateProjectData = { code: 0, projectName: '', - description: '', + description: '' } resetTableData() } @@ -75,7 +75,7 @@ const list = defineComponent({ getTableData({ pageSize: variables.pageSize, pageNo: variables.page, - searchVal: variables.searchVal, + searchVal: variables.searchVal }) } @@ -111,7 +111,7 @@ const list = defineComponent({ resetTableData, onUpdatePageSize, updateProjectData, - modelStatusRef, + modelStatusRef } }, render() { @@ -125,7 +125,7 @@ const list = defineComponent({ resetTableData, onUpdatePageSize, updateProjectData, - modelStatusRef, + modelStatusRef } = this const { columns } = useTable(updateProjectItem, resetTableData) @@ -150,7 +150,7 @@ const list = defineComponent({ - ), + ) }} @@ -190,7 +190,7 @@ const list = defineComponent({ )} ) - }, + } }) export default list diff --git a/dolphinscheduler-ui-next/src/views/project/list/use-form.ts b/dolphinscheduler-ui-next/src/views/project/list/use-form.ts index fb28879a8..cf8d03d77 100644 --- a/dolphinscheduler-ui-next/src/views/project/list/use-form.ts +++ b/dolphinscheduler-ui-next/src/views/project/list/use-form.ts @@ -30,7 +30,7 @@ export function useForm() { projectForm: { projectName: '', description: '', - userName: (userStore.getUserInfo as UserInfoRes).userName, + userName: (userStore.getUserInfo as UserInfoRes).userName }, rules: { projectName: { @@ -40,7 +40,7 @@ export function useForm() { if (state.projectForm.projectName === '') { return new Error(t('project.list.project_tips')) } - }, + } }, userName: { required: true, @@ -49,9 +49,9 @@ export function useForm() { if (state.projectForm.userName === '') { return new Error(t('project.list.username_tips')) } - }, - }, - } as FormRules, + } + } + } as FormRules }) return { state, t } diff --git a/dolphinscheduler-ui-next/src/views/project/list/use-table.ts b/dolphinscheduler-ui-next/src/views/project/list/use-table.ts index b205111a6..cd786794f 100644 --- a/dolphinscheduler-ui-next/src/views/project/list/use-table.ts +++ b/dolphinscheduler-ui-next/src/views/project/list/use-table.ts @@ -49,20 +49,20 @@ export function useTable( { class: styles.links, onClick: () => - router.push({ path: `/projects/${row.code}/workflow-monitor` }), + router.push({ path: `/projects/${row.code}/workflow-monitor` }) }, { default: () => { return row.name - }, + } } - ), + ) }, { title: t('project.list.owned_users'), key: 'userName' }, { title: t('project.list.workflow_define_count'), key: 'defCount' }, { title: t('project.list.process_instance_running_count'), - key: 'instRunningCount', + key: 'instRunningCount' }, { title: t('project.list.description'), key: 'description' }, { title: t('project.list.create_time'), key: 'createTime' }, @@ -75,9 +75,9 @@ export function useTable( row, onResetTableData: () => resetTableData(), onUpdateProjectItem: (code, name, description) => - updateProjectItem(code, name, description), - }), - }, + updateProjectItem(code, name, description) + }) + } ] const variables = reactive({ @@ -85,7 +85,7 @@ export function useTable( page: ref(1), pageSize: ref(10), searchVal: ref(null), - totalPage: ref(1), + totalPage: ref(1) }) const getTableData = (params: any) => { @@ -103,7 +103,7 @@ export function useTable( ) return { index: index + 1, - ...item, + ...item } }) as any }), diff --git a/dolphinscheduler-ui-next/src/views/project/workflow-monitor/components/definition-card.tsx b/dolphinscheduler-ui-next/src/views/project/workflow-monitor/components/definition-card.tsx index c55d66f4f..b9199504b 100644 --- a/dolphinscheduler-ui-next/src/views/project/workflow-monitor/components/definition-card.tsx +++ b/dolphinscheduler-ui-next/src/views/project/workflow-monitor/components/definition-card.tsx @@ -22,8 +22,8 @@ import Card from '@/components/card' const props = { title: { - type: String as PropType, - }, + type: String as PropType + } } const DefinitionCard = defineComponent({ @@ -48,12 +48,12 @@ const DefinitionCard = defineComponent({ xAxisData={processDefinition.xAxisData} seriesData={processDefinition.seriesData} /> - ), + ) }} ) ) - }, + } }) export default DefinitionCard diff --git a/dolphinscheduler-ui-next/src/views/project/workflow-monitor/components/state-card.tsx b/dolphinscheduler-ui-next/src/views/project/workflow-monitor/components/state-card.tsx index 3a398b1e5..87a902e00 100644 --- a/dolphinscheduler-ui-next/src/views/project/workflow-monitor/components/state-card.tsx +++ b/dolphinscheduler-ui-next/src/views/project/workflow-monitor/components/state-card.tsx @@ -24,19 +24,19 @@ import type { StateTableData, StateChartData } from '../types' const props = { title: { - type: String as PropType, + type: String as PropType }, date: { - type: Array as PropType>, + type: Array as PropType> }, tableData: { type: Array as PropType>, - default: () => [], + default: () => [] }, chartData: { type: Array as PropType>, - default: () => [], - }, + default: () => [] + } } const StateCard = defineComponent({ @@ -80,11 +80,11 @@ const StateCard = defineComponent({ type='datetimerange' clearable /> - ), + ) }} ) - }, + } }) export default StateCard diff --git a/dolphinscheduler-ui-next/src/views/project/workflow-monitor/index.tsx b/dolphinscheduler-ui-next/src/views/project/workflow-monitor/index.tsx index cbfd92e21..0aa900c69 100644 --- a/dolphinscheduler-ui-next/src/views/project/workflow-monitor/index.tsx +++ b/dolphinscheduler-ui-next/src/views/project/workflow-monitor/index.tsx @@ -31,8 +31,8 @@ const workflowMonitor = defineComponent({ const dateRef = ref([getTime(startOfToday()), Date.now()]) const { getTaskState } = useTaskState() const { getProcessState } = useProcessState() - let taskStateRef = ref() - let processStateRef = ref() + const taskStateRef = ref() + const processStateRef = ref() onMounted(() => { taskStateRef.value = getTaskState(dateRef.value) @@ -53,7 +53,7 @@ const workflowMonitor = defineComponent({ handleTaskDate, handleProcessDate, taskStateRef, - processStateRef, + processStateRef } }, render() { @@ -88,7 +88,7 @@ const workflowMonitor = defineComponent({ ) - }, + } }) export default workflowMonitor diff --git a/dolphinscheduler-ui-next/src/views/project/workflow-monitor/use-process-definition.ts b/dolphinscheduler-ui-next/src/views/project/workflow-monitor/use-process-definition.ts index 3ab045182..ebe9a5f02 100644 --- a/dolphinscheduler-ui-next/src/views/project/workflow-monitor/use-process-definition.ts +++ b/dolphinscheduler-ui-next/src/views/project/workflow-monitor/use-process-definition.ts @@ -27,7 +27,7 @@ export function useProcessDefinition() { const getProcessDefinition = () => { const { state } = useAsyncState( countDefinitionByUser({ - projectCode: Number(route.params.projectCode), + projectCode: Number(route.params.projectCode) }).then((res: ProcessDefinitionRes): DefinitionChartData => { const xAxisData = res.userList.map((item) => item.userName) const seriesData = res.userList.map((item) => item.count) diff --git a/dolphinscheduler-ui-next/src/views/project/workflow-monitor/use-process-state.ts b/dolphinscheduler-ui-next/src/views/project/workflow-monitor/use-process-state.ts index d5d5c8a2f..82f001987 100644 --- a/dolphinscheduler-ui-next/src/views/project/workflow-monitor/use-process-state.ts +++ b/dolphinscheduler-ui-next/src/views/project/workflow-monitor/use-process-state.ts @@ -30,20 +30,20 @@ export function useProcessState() { countProcessInstanceState({ startDate: format(date[0], 'yyyy-MM-dd HH:mm:ss'), endDate: format(date[1], 'yyyy-MM-dd HH:mm:ss'), - projectCode: Number(route.params.projectCode), + projectCode: Number(route.params.projectCode) }).then((res: TaskStateRes): StateData => { const table = res.taskCountDtos.map((item, index) => { return { index: index + 1, state: item.taskStateType, - number: item.count, + number: item.count } }) const chart = res.taskCountDtos.map((item) => { return { value: item.count, - name: item.taskStateType, + name: item.taskStateType } }) diff --git a/dolphinscheduler-ui-next/src/views/project/workflow-monitor/use-table.ts b/dolphinscheduler-ui-next/src/views/project/workflow-monitor/use-table.ts index 3833e9ef4..1c16f4aab 100644 --- a/dolphinscheduler-ui-next/src/views/project/workflow-monitor/use-table.ts +++ b/dolphinscheduler-ui-next/src/views/project/workflow-monitor/use-table.ts @@ -24,10 +24,10 @@ export function useTable() { const columnsRef: TableColumns = [ { title: '#', key: 'index' }, { title: t('home.number'), key: 'number' }, - { title: t('home.state'), key: 'state' }, + { title: t('home.state'), key: 'state' } ] return { - columnsRef, + columnsRef } } diff --git a/dolphinscheduler-ui-next/src/views/project/workflow-monitor/use-task-state.ts b/dolphinscheduler-ui-next/src/views/project/workflow-monitor/use-task-state.ts index 74fa45a61..a95b397f3 100644 --- a/dolphinscheduler-ui-next/src/views/project/workflow-monitor/use-task-state.ts +++ b/dolphinscheduler-ui-next/src/views/project/workflow-monitor/use-task-state.ts @@ -30,20 +30,20 @@ export function useTaskState() { countTaskState({ startDate: format(date[0], 'yyyy-MM-dd HH:mm:ss'), endDate: format(date[1], 'yyyy-MM-dd HH:mm:ss'), - projectCode: Number(route.params.projectCode), + projectCode: Number(route.params.projectCode) }).then((res: TaskStateRes): StateData => { const table = res.taskCountDtos.map((item, index) => { return { index: index + 1, state: item.taskStateType, - number: item.count, + number: item.count } }) const chart = res.taskCountDtos.map((item) => { return { value: item.count, - name: item.taskStateType, + name: item.taskStateType } }) diff --git a/dolphinscheduler-ui-next/src/views/resource/file/create/resource-file-create.tsx b/dolphinscheduler-ui-next/src/views/resource/file/create/resource-file-create.tsx index ccebfdc61..711e5f261 100644 --- a/dolphinscheduler-ui-next/src/views/resource/file/create/resource-file-create.tsx +++ b/dolphinscheduler-ui-next/src/views/resource/file/create/resource-file-create.tsx @@ -42,7 +42,7 @@ export default defineComponent({ const fileSuffixOptions = fileTypeArr.map((suffix) => ({ key: suffix, label: suffix, - value: suffix, + value: suffix })) const handleFile = () => { @@ -61,7 +61,7 @@ export default defineComponent({ fileSuffixOptions, handleFile, handleReturn, - ...toRefs(state), + ...toRefs(state) } }, render() { @@ -102,7 +102,7 @@ export default defineComponent({
@@ -127,5 +127,5 @@ export default defineComponent({ ) - }, + } }) diff --git a/dolphinscheduler-ui-next/src/views/resource/file/create/use-create.ts b/dolphinscheduler-ui-next/src/views/resource/file/create/use-create.ts index dc03a3d36..c05d2c0f0 100644 --- a/dolphinscheduler-ui-next/src/views/resource/file/create/use-create.ts +++ b/dolphinscheduler-ui-next/src/views/resource/file/create/use-create.ts @@ -34,7 +34,7 @@ export function useCreate(state: any) { try { await onlineCreateResource({ ...state.fileForm, - ...{ pid, currentDir }, + ...{ pid, currentDir } }) window.$message.success(t('resource.file.success')) @@ -48,6 +48,6 @@ export function useCreate(state: any) { } return { - handleCreateFile, + handleCreateFile } } diff --git a/dolphinscheduler-ui-next/src/views/resource/file/create/use-form.ts b/dolphinscheduler-ui-next/src/views/resource/file/create/use-form.ts index b0e7573d7..fa132ac5a 100644 --- a/dolphinscheduler-ui-next/src/views/resource/file/create/use-form.ts +++ b/dolphinscheduler-ui-next/src/views/resource/file/create/use-form.ts @@ -26,7 +26,7 @@ const defaultValue = () => ({ fileName: '', description: '', content: '', - currentDir: '/', + currentDir: '/' }) export function useForm() { @@ -47,7 +47,7 @@ export function useForm() { if (state.fileForm.fileName === '') { return new Error(t('resource.file.enter_name_tips')) } - }, + } }, suffix: { required: true, @@ -56,7 +56,7 @@ export function useForm() { if (state.fileForm.suffix === '') { return new Error(t('resource.file.enter_suffix_tips')) } - }, + } }, content: { required: true, @@ -65,13 +65,13 @@ export function useForm() { if (state.fileForm.content === '') { return new Error(t('resource.file.enter_content_tips')) } - }, - }, - } as FormRules, + } + } + } as FormRules }) return { state, - resetForm, + resetForm } } diff --git a/dolphinscheduler-ui-next/src/views/resource/file/edit/resource-file-edit.tsx b/dolphinscheduler-ui-next/src/views/resource/file/edit/resource-file-edit.tsx index 2cadb9302..c76076685 100644 --- a/dolphinscheduler-ui-next/src/views/resource/file/edit/resource-file-edit.tsx +++ b/dolphinscheduler-ui-next/src/views/resource/file/edit/resource-file-edit.tsx @@ -60,7 +60,7 @@ export default defineComponent({ resourceViewRef, handleReturn, handleFileContent, - ...toRefs(state), + ...toRefs(state) } }, render() { @@ -80,7 +80,7 @@ export default defineComponent({
) - }, + } }) diff --git a/dolphinscheduler-ui-next/src/views/resource/file/edit/use-edit.ts b/dolphinscheduler-ui-next/src/views/resource/file/edit/use-edit.ts index f4cea46da..f48a7c790 100644 --- a/dolphinscheduler-ui-next/src/views/resource/file/edit/use-edit.ts +++ b/dolphinscheduler-ui-next/src/views/resource/file/edit/use-edit.ts @@ -21,7 +21,7 @@ import type { Router } from 'vue-router' import { useAsyncState } from '@vueuse/core' import { viewResource, - updateResourceContent, + updateResourceContent } from '@/service/modules/resources' export function useEdit(state: any) { @@ -31,7 +31,7 @@ export function useEdit(state: any) { const getResourceView = (id: number) => { const params = { skipLineNum: 0, - limit: 3000, + limit: 3000 } const { state } = useAsyncState(viewResource(params, id), {}) return state @@ -43,9 +43,9 @@ export function useEdit(state: any) { try { await updateResourceContent( { - ...state.fileForm, + ...state.fileForm }, - id, + id ) window.$message.success(t('resource.file.success')) @@ -59,6 +59,6 @@ export function useEdit(state: any) { return { getResourceView, - handleUpdateContent, + handleUpdateContent } } diff --git a/dolphinscheduler-ui-next/src/views/resource/file/edit/use-form.ts b/dolphinscheduler-ui-next/src/views/resource/file/edit/use-form.ts index 68dbf653d..a6ddecd35 100644 --- a/dolphinscheduler-ui-next/src/views/resource/file/edit/use-form.ts +++ b/dolphinscheduler-ui-next/src/views/resource/file/edit/use-form.ts @@ -20,7 +20,7 @@ import { useI18n } from 'vue-i18n' import type { FormRules } from 'naive-ui' const defaultValue = () => ({ - content: '', + content: '' }) export function useForm() { @@ -41,13 +41,13 @@ export function useForm() { if (state.fileForm.content === '') { return new Error(t('resource.file.enter_content_tips')) } - }, - }, - } as FormRules, + } + } + } as FormRules }) return { state, - resetForm, + resetForm } } diff --git a/dolphinscheduler-ui-next/src/views/resource/file/folder/index.tsx b/dolphinscheduler-ui-next/src/views/resource/file/folder/index.tsx index bc2618a0b..ff1834f2e 100644 --- a/dolphinscheduler-ui-next/src/views/resource/file/folder/index.tsx +++ b/dolphinscheduler-ui-next/src/views/resource/file/folder/index.tsx @@ -25,8 +25,8 @@ import { useFolder } from './use-folder' const props = { show: { type: Boolean as PropType, - default: false, - }, + default: false + } } export default defineComponent({ @@ -48,7 +48,7 @@ export default defineComponent({ return { hideModal, handleFolder, - ...toRefs(state), + ...toRefs(state) } }, render() { @@ -82,5 +82,5 @@ export default defineComponent({ ) - }, + } }) diff --git a/dolphinscheduler-ui-next/src/views/resource/file/folder/use-folder.ts b/dolphinscheduler-ui-next/src/views/resource/file/folder/use-folder.ts index 0b4599c04..919e839a2 100644 --- a/dolphinscheduler-ui-next/src/views/resource/file/folder/use-folder.ts +++ b/dolphinscheduler-ui-next/src/views/resource/file/folder/use-folder.ts @@ -30,7 +30,7 @@ export function useFolder(state: any) { const handleCreateFolder = ( emit: IEmit, hideModal: () => void, - resetForm: () => void, + resetForm: () => void ) => { const pid = router.currentRoute.value.params.id || -1 const currentDir = fileStore.getCurrentDir || '/' @@ -39,7 +39,7 @@ export function useFolder(state: any) { try { await createDirectory({ ...state.folderForm, - ...{ pid, currentDir }, + ...{ pid, currentDir } }) window.$message.success(t('resource.file.success')) @@ -54,6 +54,6 @@ export function useFolder(state: any) { } return { - handleCreateFolder, + handleCreateFolder } } diff --git a/dolphinscheduler-ui-next/src/views/resource/file/folder/use-form.ts b/dolphinscheduler-ui-next/src/views/resource/file/folder/use-form.ts index be8e279a5..2576d9a20 100644 --- a/dolphinscheduler-ui-next/src/views/resource/file/folder/use-form.ts +++ b/dolphinscheduler-ui-next/src/views/resource/file/folder/use-form.ts @@ -24,7 +24,7 @@ const defaultValue = () => ({ type: 'FILE', name: '', description: '', - currentDir: '/', + currentDir: '/' }) export function useForm() { @@ -45,13 +45,13 @@ export function useForm() { if (state.folderForm.name === '') { return new Error(t('resource.file.enter_name_tips')) } - }, - }, - } as FormRules, + } + } + } as FormRules }) return { state, - resetForm, + resetForm } } diff --git a/dolphinscheduler-ui-next/src/views/resource/file/index.tsx b/dolphinscheduler-ui-next/src/views/resource/file/index.tsx index 1c803f069..414ea7f8f 100644 --- a/dolphinscheduler-ui-next/src/views/resource/file/index.tsx +++ b/dolphinscheduler-ui-next/src/views/resource/file/index.tsx @@ -23,7 +23,7 @@ import { reactive, Ref, watch, - inject, + inject } from 'vue' import { NIcon, @@ -32,7 +32,7 @@ import { NButtonGroup, NButton, NPagination, - NInput, + NInput } from 'naive-ui' import { useI18n } from 'vue-i18n' import { SearchOutlined } from '@vicons/antd' @@ -63,14 +63,14 @@ export default defineComponent({ const renameInfo = reactive({ id: -1, name: '', - description: '', + description: '' }) const paginationReactive = reactive({ page: 1, pageSize: 10, itemCount: 0, - pageSizes: [10, 30, 50], + pageSizes: [10, 30, 50] }) const handleUpdatePage = (page: number) => { @@ -79,7 +79,7 @@ export default defineComponent({ fileId.value, serachRef.value, paginationReactive.page, - paginationReactive.pageSize, + paginationReactive.pageSize ) } @@ -90,7 +90,7 @@ export default defineComponent({ fileId.value, serachRef.value, paginationReactive.page, - paginationReactive.pageSize, + paginationReactive.pageSize ) } @@ -107,7 +107,7 @@ export default defineComponent({ const handleConditions = () => { resourceListRef.value = getResourceListState( fileId.value, - serachRef.value, + serachRef.value ) } @@ -121,7 +121,7 @@ export default defineComponent({ : 'resource-file-create' router.push({ name, - params: { id: fileId.value }, + params: { id: fileId.value } }) } @@ -139,7 +139,7 @@ export default defineComponent({ const updateList = () => { resourceListRef.value = getResourceListState( fileId.value, - serachRef.value, + serachRef.value ) } @@ -149,7 +149,7 @@ export default defineComponent({ watch( () => router.currentRoute.value.params.id, - () => reload(), + () => reload() ) return { @@ -169,7 +169,7 @@ export default defineComponent({ handleUpdatePage, handleUpdatePageSize, pagination: paginationReactive, - renameInfo, + renameInfo } }, render() { @@ -179,7 +179,7 @@ export default defineComponent({ handleConditions, handleCreateFolder, handleCreateFile, - handleUploadFile, + handleUploadFile } = this return (
@@ -256,5 +256,5 @@ export default defineComponent({
) - }, + } }) diff --git a/dolphinscheduler-ui-next/src/views/resource/file/rename/index.tsx b/dolphinscheduler-ui-next/src/views/resource/file/rename/index.tsx index aaf04433c..44c38a5b5 100644 --- a/dolphinscheduler-ui-next/src/views/resource/file/rename/index.tsx +++ b/dolphinscheduler-ui-next/src/views/resource/file/rename/index.tsx @@ -24,20 +24,20 @@ import { useRename } from './use-rename' const props = { show: { type: Boolean as PropType, - default: false, + default: false }, id: { type: Number as PropType, - default: -1, + default: -1 }, name: { type: String as PropType, - default: '', + default: '' }, description: { type: String as PropType, - default: '', - }, + default: '' + } } export default defineComponent({ @@ -62,7 +62,7 @@ export default defineComponent({ state.renameForm.id = props.id state.renameForm.name = props.name state.renameForm.description = props.description - }, + } ) return { hideModal, handleFile, ...toRefs(state) } @@ -98,5 +98,5 @@ export default defineComponent({ ) - }, + } }) diff --git a/dolphinscheduler-ui-next/src/views/resource/file/rename/use-form.ts b/dolphinscheduler-ui-next/src/views/resource/file/rename/use-form.ts index 0ff73809e..4295ad3ea 100644 --- a/dolphinscheduler-ui-next/src/views/resource/file/rename/use-form.ts +++ b/dolphinscheduler-ui-next/src/views/resource/file/rename/use-form.ts @@ -23,7 +23,7 @@ const defaultValue = (name = '', description = '') => ({ id: -1, name, type: 'FILE', - description, + description }) export function useForm(name: string, description: string) { @@ -44,13 +44,13 @@ export function useForm(name: string, description: string) { if (state.renameForm.name === '') { return new Error(t('resource.file.enter_name_tips')) } - }, - }, - } as FormRules, + } + } + } as FormRules }) return { state, - resetForm, + resetForm } } diff --git a/dolphinscheduler-ui-next/src/views/resource/file/rename/use-rename.ts b/dolphinscheduler-ui-next/src/views/resource/file/rename/use-rename.ts index 7006178f3..f004b66a1 100644 --- a/dolphinscheduler-ui-next/src/views/resource/file/rename/use-rename.ts +++ b/dolphinscheduler-ui-next/src/views/resource/file/rename/use-rename.ts @@ -25,16 +25,16 @@ export function useRename(state: any) { const handleRenameFile = ( emit: IEmit, hideModal: () => void, - resetForm: () => void, + resetForm: () => void ) => { state.renameFormRef.validate(async (valid: any) => { if (!valid) { try { await updateResource( { - ...state.renameForm, + ...state.renameForm }, - state.renameForm.id, + state.renameForm.id ) window.$message.success(t('resource.file.success')) emit('updateList') @@ -49,6 +49,6 @@ export function useRename(state: any) { } return { - handleRenameFile, + handleRenameFile } } diff --git a/dolphinscheduler-ui-next/src/views/resource/file/table/table-action.tsx b/dolphinscheduler-ui-next/src/views/resource/file/table/table-action.tsx index 164c35b53..ea5ef89fd 100644 --- a/dolphinscheduler-ui-next/src/views/resource/file/table/table-action.tsx +++ b/dolphinscheduler-ui-next/src/views/resource/file/table/table-action.tsx @@ -23,7 +23,7 @@ import { DownloadOutlined, FormOutlined, EditOutlined, - InfoCircleFilled, + InfoCircleFilled } from '@vicons/antd' import _ from 'lodash' import { useI18n } from 'vue-i18n' @@ -36,16 +36,16 @@ import type { Router } from 'vue-router' const props = { show: { type: Boolean as PropType, - default: false, + default: false }, row: { type: Object as PropType, default: { id: -1, name: '', - description: '', - }, - }, + description: '' + } + } } export default defineComponent({ @@ -81,7 +81,7 @@ export default defineComponent({ handleEditFile, handleDeleteFile, handleRenameFile, - ...props, + ...props } }, render() { @@ -107,7 +107,7 @@ export default defineComponent({ - ), + ) }} @@ -121,7 +121,7 @@ export default defineComponent({ this.handleRenameFile( this.row.id, this.row.name, - this.row.description, + this.row.description ) } style={{ marginRight: '-5px' }} @@ -131,7 +131,7 @@ export default defineComponent({ - ), + ) }} @@ -151,7 +151,7 @@ export default defineComponent({ - ), + ) }} @@ -177,14 +177,14 @@ export default defineComponent({ - ), + ) }} - ), + ) }} ) - }, + } }) diff --git a/dolphinscheduler-ui-next/src/views/resource/file/table/use-table.ts b/dolphinscheduler-ui-next/src/views/resource/file/table/use-table.ts index 4df55f334..9ef5c59f9 100644 --- a/dolphinscheduler-ui-next/src/views/resource/file/table/use-table.ts +++ b/dolphinscheduler-ui-next/src/views/resource/file/table/use-table.ts @@ -47,7 +47,7 @@ export function useTable(renameResource: IRenameFile, updateList: () => void) { title: t('resource.file.id'), key: 'id', width: 50, - render: (_row, index) => index + 1, + render: (_row, index) => index + 1 }, { title: t('resource.file.name'), @@ -59,14 +59,14 @@ export function useTable(renameResource: IRenameFile, updateList: () => void) { { href: 'javascript:', class: styles.links, - onClick: () => goSubFolder(router, row), + onClick: () => goSubFolder(router, row) }, { default: () => { return row.name - }, - }, - ), + } + } + ) }, { title: t('resource.file.user_name'), width: 100, key: 'user_name' }, { @@ -74,14 +74,14 @@ export function useTable(renameResource: IRenameFile, updateList: () => void) { key: 'whether_directory', width: 100, render: (row) => - row.directory ? t('resource.file.yes') : t('resource.file.no'), + row.directory ? t('resource.file.yes') : t('resource.file.no') }, { title: t('resource.file.file_name'), key: 'file_name' }, { title: t('resource.file.description'), width: 150, key: 'description' }, { title: t('resource.file.size'), key: 'size', - render: (row) => bytesToSize(row.size), + render: (row) => bytesToSize(row.size) }, { title: t('resource.file.update_time'), width: 150, key: 'update_time' }, { @@ -93,12 +93,12 @@ export function useTable(renameResource: IRenameFile, updateList: () => void) { row, onRenameResource: (id, name, description) => renameResource(id, name, description), - onUpdateList: () => updateList(), - }), - }, + onUpdateList: () => updateList() + }) + } ] return { - columnsRef, + columnsRef } } diff --git a/dolphinscheduler-ui-next/src/views/resource/file/upload/index.tsx b/dolphinscheduler-ui-next/src/views/resource/file/upload/index.tsx index b7f69eb58..f64c1f2ac 100644 --- a/dolphinscheduler-ui-next/src/views/resource/file/upload/index.tsx +++ b/dolphinscheduler-ui-next/src/views/resource/file/upload/index.tsx @@ -25,8 +25,8 @@ import { useUpload } from './use-upload' const props = { show: { type: Boolean as PropType, - default: false, - }, + default: false + } } export default defineComponent({ @@ -54,7 +54,7 @@ export default defineComponent({ hideModal, customRequest, handleFile, - ...toRefs(state), + ...toRefs(state) } }, render() { @@ -96,5 +96,5 @@ export default defineComponent({ ) - }, + } }) diff --git a/dolphinscheduler-ui-next/src/views/resource/file/upload/use-form.ts b/dolphinscheduler-ui-next/src/views/resource/file/upload/use-form.ts index 08de62d72..c29fb79d5 100644 --- a/dolphinscheduler-ui-next/src/views/resource/file/upload/use-form.ts +++ b/dolphinscheduler-ui-next/src/views/resource/file/upload/use-form.ts @@ -24,7 +24,7 @@ const defaultValue = () => ({ file: '', description: '', pid: -1, - currentDir: '/', + currentDir: '/' }) export function useForm() { @@ -45,7 +45,7 @@ export function useForm() { if (state.uploadForm.name === '') { return new Error(t('resource.file.enter_name_tips')) } - }, + } }, file: { required: true, @@ -54,13 +54,13 @@ export function useForm() { if (state.uploadForm.file === '') { return new Error(t('resource.file.enter_content_tips')) } - }, - }, - } as FormRules, + } + } + } as FormRules }) return { state, - resetForm, + resetForm } } diff --git a/dolphinscheduler-ui-next/src/views/resource/file/upload/use-upload.ts b/dolphinscheduler-ui-next/src/views/resource/file/upload/use-upload.ts index a5d7aab13..110df6913 100644 --- a/dolphinscheduler-ui-next/src/views/resource/file/upload/use-upload.ts +++ b/dolphinscheduler-ui-next/src/views/resource/file/upload/use-upload.ts @@ -30,7 +30,7 @@ export function useUpload(state: any) { const handleUploadFile = ( emit: IEmit, hideModal: () => void, - resetForm: () => void, + resetForm: () => void ) => { state.uploadFormRef.validate(async (valid: any) => { const pid = router.currentRoute.value.params.id || -1 @@ -59,6 +59,6 @@ export function useUpload(state: any) { } return { - handleUploadFile, + handleUploadFile } } diff --git a/dolphinscheduler-ui-next/src/views/resource/file/use-file.ts b/dolphinscheduler-ui-next/src/views/resource/file/use-file.ts index 3e7c7a020..e2727bfeb 100644 --- a/dolphinscheduler-ui-next/src/views/resource/file/use-file.ts +++ b/dolphinscheduler-ui-next/src/views/resource/file/use-file.ts @@ -18,19 +18,19 @@ import { useAsyncState } from '@vueuse/core' import { queryResourceListPaging, - viewResource, + viewResource } from '@/service/modules/resources' import type { ResourceListRes } from '@/service/modules/resources/types' import { IResourceListState, ISetPagination } from './types' export function useFileState( - setPagination: ISetPagination = {} as ISetPagination, + setPagination: ISetPagination = {} as ISetPagination ) { const getResourceListState: IResourceListState = ( id = -1, searchVal = '', pageNo = 1, - pageSize = 10, + pageSize = 10 ) => { const { state } = useAsyncState( queryResourceListPaging({ @@ -38,7 +38,7 @@ export function useFileState( type: 'FILE', searchVal, pageNo, - pageSize, + pageSize }).then((res: ResourceListRes): any => { const { total } = res setPagination(total) @@ -53,13 +53,13 @@ export function useFileState( file_name: item.fileName, description: item.description, size: item.size, - update_time: item.updateTime, + update_time: item.updateTime } }) return { total, table } }), - { total: 0, table: [] }, + { total: 0, table: [] } ) return state @@ -68,7 +68,7 @@ export function useFileState( const getResourceView = (id: number) => { const params = { skipLineNum: 0, - limit: 3000, + limit: 3000 } const { state } = useAsyncState(viewResource(params, id), {}) return state diff --git a/dolphinscheduler-ui-next/src/views/security/tenant-manage/components/tenant-modal.tsx b/dolphinscheduler-ui-next/src/views/security/tenant-manage/components/tenant-modal.tsx index 8eb2920a6..5a7aac56b 100644 --- a/dolphinscheduler-ui-next/src/views/security/tenant-manage/components/tenant-modal.tsx +++ b/dolphinscheduler-ui-next/src/views/security/tenant-manage/components/tenant-modal.tsx @@ -23,9 +23,23 @@ import { useI18n } from 'vue-i18n' const TenantModal = defineComponent({ name: 'tenant-modal', + props: { + showModalRef: { + type: Boolean as PropType, + default: false + }, + statusRef: { + type: Number as PropType, + default: 0 + }, + row: { + type: Object as PropType, + default: {} + } + }, emits: ['cancelModal', 'confirmModal'], setup(props, ctx) { - const { variables, getListData, handleValidate} = useModalData(props, ctx) + const { variables, getListData, handleValidate } = useModalData(props, ctx) const { t } = useI18n() const cancelModal = () => { @@ -40,51 +54,50 @@ const TenantModal = defineComponent({ handleValidate(props.statusRef) } - watch(() => props.showModalRef, () => { - props.showModalRef && getListData() - }) - - watch(() => props.statusRef, () => { - if (props.statusRef === 0) { - variables.model.tenantCode = '' - variables.model.description = '' - } else { + watch( + () => props.showModalRef, + () => { + props.showModalRef && getListData() + } + ) + + watch( + () => props.statusRef, + () => { + if (props.statusRef === 0) { + variables.model.tenantCode = '' + variables.model.description = '' + } else { + variables.model.id = props.row.id + variables.model.tenantCode = props.row.tenantCode + variables.model.queueId = props.row.queueId + variables.model.description = props.row.description + } + } + ) + + watch( + () => props.row, + () => { variables.model.id = props.row.id variables.model.tenantCode = props.row.tenantCode variables.model.queueId = props.row.queueId variables.model.description = props.row.description } - }) - - watch(() => props.row, () => { - variables.model.id = props.row.id - variables.model.tenantCode = props.row.tenantCode - variables.model.queueId = props.row.queueId - variables.model.description = props.row.description - }) + ) return { t, ...toRefs(variables), cancelModal, confirmModal } }, - props: { - showModalRef: { - type: Boolean as PropType, - default: false, - }, - statusRef: { - type: Number as PropType, - default: 0, - }, - row: { - type: Object as PropType, - default: {}, - } - }, render() { const { t } = this return (
- - + + - + - + - ), + ) }}
) - }, + } }) export default TenantModal diff --git a/dolphinscheduler-ui-next/src/views/security/tenant-manage/components/use-modalData.ts b/dolphinscheduler-ui-next/src/views/security/tenant-manage/components/use-modalData.ts index 2caa47c83..0f1979ea7 100644 --- a/dolphinscheduler-ui-next/src/views/security/tenant-manage/components/use-modalData.ts +++ b/dolphinscheduler-ui-next/src/views/security/tenant-manage/components/use-modalData.ts @@ -16,14 +16,18 @@ */ import { reactive, ref, SetupContext } from 'vue' -import { useI18n } from 'vue-i18n' import { useAsyncState } from '@vueuse/core' import { queryList } from '@/service/modules/queues' -import { verifyTenantCode, createTenant, updateTenant } from '@/service/modules/tenants' - -export function useModalData(props: any, ctx: SetupContext<("cancelModal" | "confirmModal")[]>) { - const { t } = useI18n() +import { + verifyTenantCode, + createTenant, + updateTenant +} from '@/service/modules/tenants' +export function useModalData( + props: any, + ctx: SetupContext<('cancelModal' | 'confirmModal')[]> +) { const variables = reactive({ tenantFormRef: ref(), model: { @@ -63,32 +67,33 @@ export function useModalData(props: any, ctx: SetupContext<("cancelModal" | "con const handleValidate = (statusRef: number) => { variables.tenantFormRef.validate((errors: any) => { if (!errors) { - console.log('验证成功') - - console.log('statusRef', statusRef) statusRef === 0 ? submitTenantModal() : updateTenantModal() } else { - console.log(errors, '验证失败') return } }) } const submitTenantModal = () => { - verifyTenantCode({tenantCode: variables.model.tenantCode}).then((res: any) => { - const data = { - tenantCode: variables.model.tenantCode, - queueId: variables.model.queueId, - description: variables.model.description + verifyTenantCode({ tenantCode: variables.model.tenantCode }).then( + (res: any) => { + const data = { + tenantCode: variables.model.tenantCode, + queueId: variables.model.queueId, + description: variables.model.description + } + createTenant(data).then( + (res: any) => { + variables.model.tenantCode = '' + variables.model.description = '' + ctx.emit('confirmModal', props.showModalRef) + }, + (err: any) => { + return + } + ) } - createTenant(data).then((res: any) => { - variables.model.tenantCode = '' - variables.model.description = '' - ctx.emit('confirmModal', props.showModalRef) - }, (err: any) => { - console.log('err', err) - }) - }) + ) } const updateTenantModal = () => { @@ -98,7 +103,7 @@ export function useModalData(props: any, ctx: SetupContext<("cancelModal" | "con description: variables.model.description, id: variables.model.id } - updateTenant(data, {id: variables.model.id}).then((res: any) => { + updateTenant(data, { id: variables.model.id }).then((res: any) => { ctx.emit('confirmModal', props.showModalRef) }) } diff --git a/dolphinscheduler-ui-next/src/views/security/tenant-manage/index.tsx b/dolphinscheduler-ui-next/src/views/security/tenant-manage/index.tsx index eac154ba1..7b80ca534 100644 --- a/dolphinscheduler-ui-next/src/views/security/tenant-manage/index.tsx +++ b/dolphinscheduler-ui-next/src/views/security/tenant-manage/index.tsx @@ -22,7 +22,7 @@ import { NIcon, NDataTable, NPagination, - NCard, + NCard } from 'naive-ui' import styles from './index.module.scss' import { useTable } from './use-table' @@ -41,7 +41,7 @@ const tenementManage = defineComponent({ getTableData({ pageSize: variables.pageSize, pageNo: variables.page, - searchVal: variables.searchVal, + searchVal: variables.searchVal }) } @@ -133,10 +133,16 @@ const tenementManage = defineComponent({ />
- +
) - }, + } }) export default tenementManage diff --git a/dolphinscheduler-ui-next/src/views/security/tenant-manage/use-table.ts b/dolphinscheduler-ui-next/src/views/security/tenant-manage/use-table.ts index 7526ed837..feec7e18e 100644 --- a/dolphinscheduler-ui-next/src/views/security/tenant-manage/use-table.ts +++ b/dolphinscheduler-ui-next/src/views/security/tenant-manage/use-table.ts @@ -16,7 +16,10 @@ */ import { useAsyncState } from '@vueuse/core' -import { queryTenantListPaging, deleteTenantById } from '@/service/modules/tenants' +import { + queryTenantListPaging, + deleteTenantById +} from '@/service/modules/tenants' import { reactive, h, ref } from 'vue' import { NButton, NPopconfirm, NSpace, NTooltip } from 'naive-ui' import { useI18n } from 'vue-i18n' @@ -25,7 +28,7 @@ import { DeleteOutlined, EditOutlined } from '@vicons/antd' export function useTable() { const { t } = useI18n() - const handleEdit= (row: any) => { + const handleEdit = (row: any) => { variables.showModalRef = true variables.statusRef = 1 variables.row = row @@ -35,7 +38,10 @@ export function useTable() { deleteTenantById(row.id).then(() => { getTableData({ pageSize: variables.pageSize, - pageNo: (variables.tableData.length === 1 && variables.page > 1) ? variables.page - 1 : variables.page, + pageNo: + variables.tableData.length === 1 && variables.page > 1 + ? variables.page - 1 + : variables.page, searchVal: variables.searchVal }) }) @@ -45,27 +51,27 @@ export function useTable() { variables.columns = [ { title: t('security.tenant.num'), - key: 'num', + key: 'num' }, { title: t('security.tenant.tenant_code'), - key: 'tenantCode', + key: 'tenantCode' }, { title: t('security.tenant.description'), - key: 'description', + key: 'description' }, { title: t('security.tenant.queue_name'), - key: 'queueName', + key: 'queueName' }, { title: t('security.tenant.create_time'), - key: 'createTime', + key: 'createTime' }, { title: t('security.tenant.update_time'), - key: 'updateTime', + key: 'updateTime' }, { title: t('security.tenant.actions'), @@ -74,44 +80,55 @@ export function useTable() { return h(NSpace, null, { default: () => [ h( - NTooltip, {}, { - trigger: () => h(NButton, - { - circle: true, - type: 'info', - size: 'small', - onClick: () => { - handleEdit(row) + NTooltip, + {}, + { + trigger: () => + h( + NButton, + { + circle: true, + type: 'info', + size: 'small', + onClick: () => { + handleEdit(row) + } + }, + { + icon: () => h(EditOutlined) } - }, - { - icon: () => h(EditOutlined) - } - ), + ), default: () => t('security.tenant.edit') } ), h( NPopconfirm, { - onPositiveClick: () => { handleDelete(row) } + onPositiveClick: () => { + handleDelete(row) + } }, { - trigger: () => h( - NTooltip, {}, { - trigger: () => h(NButton, - { - circle: true, - type: 'error', - size: 'small', - }, - { - icon: () => h(DeleteOutlined) - } - ), - default: () => t('security.tenant.delete') - } - ), + trigger: () => + h( + NTooltip, + {}, + { + trigger: () => + h( + NButton, + { + circle: true, + type: 'error', + size: 'small' + }, + { + icon: () => h(DeleteOutlined) + } + ), + default: () => t('security.tenant.delete') + } + ), default: () => t('security.tenant.delete_confirm') } ) @@ -140,7 +157,7 @@ export function useTable() { variables.tableData = res.totalList.map((item: any, index: number) => { return { num: index + 1, - ...item, + ...item } }) variables.totalPage = res.totalPage