Browse Source

[Fix-7717] [UI Next] Prettier config name error (#8012)

* code format

* add package.json change

* code prettier
3.0.0/version-upgrade
Devosend 3 years ago committed by GitHub
parent
commit
ff72a36c8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      dolphinscheduler-ui-next/.eslintrc.js
  2. 3
      dolphinscheduler-ui-next/.prettierrc.js
  3. 2
      dolphinscheduler-ui-next/package.json
  4. 8
      dolphinscheduler-ui-next/src/App.tsx
  5. 10
      dolphinscheduler-ui-next/src/components/card/index.tsx
  6. 10
      dolphinscheduler-ui-next/src/components/chart/index.ts
  7. 36
      dolphinscheduler-ui-next/src/components/chart/modules/Bar.tsx
  8. 42
      dolphinscheduler-ui-next/src/components/chart/modules/Gauge.tsx
  9. 26
      dolphinscheduler-ui-next/src/components/chart/modules/Pie.tsx
  10. 18
      dolphinscheduler-ui-next/src/components/modal/index.tsx
  11. 22
      dolphinscheduler-ui-next/src/components/monaco-editor/index.tsx
  12. 6
      dolphinscheduler-ui-next/src/layouts/content/components/locales/index.tsx
  13. 2
      dolphinscheduler-ui-next/src/layouts/content/components/locales/use-dropdown.ts
  14. 4
      dolphinscheduler-ui-next/src/layouts/content/components/logo/index.tsx
  15. 12
      dolphinscheduler-ui-next/src/layouts/content/components/navbar/index.tsx
  16. 2
      dolphinscheduler-ui-next/src/layouts/content/components/navbar/use-menuClick.ts
  17. 9
      dolphinscheduler-ui-next/src/layouts/content/components/sidebar/index.tsx
  18. 2
      dolphinscheduler-ui-next/src/layouts/content/components/sidebar/use-menuClick.ts
  19. 2
      dolphinscheduler-ui-next/src/layouts/content/components/theme/index.tsx
  20. 6
      dolphinscheduler-ui-next/src/layouts/content/components/user/index.tsx
  21. 3
      dolphinscheduler-ui-next/src/layouts/content/components/user/use-dropdown.ts
  22. 8
      dolphinscheduler-ui-next/src/layouts/content/index.tsx
  23. 102
      dolphinscheduler-ui-next/src/layouts/content/use-dataList.ts
  24. 4
      dolphinscheduler-ui-next/src/locales/index.ts
  25. 34
      dolphinscheduler-ui-next/src/locales/modules/en_US.ts
  26. 34
      dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts
  27. 4
      dolphinscheduler-ui-next/src/router/index.ts
  28. 8
      dolphinscheduler-ui-next/src/router/modules/datasource.ts
  29. 20
      dolphinscheduler-ui-next/src/router/modules/monitor.ts
  30. 16
      dolphinscheduler-ui-next/src/router/modules/projects.ts
  31. 28
      dolphinscheduler-ui-next/src/router/modules/resources.ts
  32. 12
      dolphinscheduler-ui-next/src/router/modules/security.ts
  33. 22
      dolphinscheduler-ui-next/src/router/routes.ts
  34. 14
      dolphinscheduler-ui-next/src/service/modules/alert-group/index.ts
  35. 16
      dolphinscheduler-ui-next/src/service/modules/alert-plugin/index.ts
  36. 2
      dolphinscheduler-ui-next/src/service/modules/alert-plugin/types.ts
  37. 26
      dolphinscheduler-ui-next/src/service/modules/data-source/index.ts
  38. 16
      dolphinscheduler-ui-next/src/service/modules/environment/index.ts
  39. 2
      dolphinscheduler-ui-next/src/service/modules/environment/types.ts
  40. 8
      dolphinscheduler-ui-next/src/service/modules/executors/index.ts
  41. 2
      dolphinscheduler-ui-next/src/service/modules/executors/types.ts
  42. 6
      dolphinscheduler-ui-next/src/service/modules/lineages/index.ts
  43. 4
      dolphinscheduler-ui-next/src/service/modules/log/index.ts
  44. 2
      dolphinscheduler-ui-next/src/service/modules/login/index.ts
  45. 2
      dolphinscheduler-ui-next/src/service/modules/logout/index.ts
  46. 6
      dolphinscheduler-ui-next/src/service/modules/monitor/index.ts
  47. 46
      dolphinscheduler-ui-next/src/service/modules/process-definition/index.ts
  48. 2
      dolphinscheduler-ui-next/src/service/modules/process-definition/types.ts
  49. 24
      dolphinscheduler-ui-next/src/service/modules/process-instances/index.ts
  50. 2
      dolphinscheduler-ui-next/src/service/modules/process-instances/types.ts
  51. 18
      dolphinscheduler-ui-next/src/service/modules/process-task-relation/index.ts
  52. 2
      dolphinscheduler-ui-next/src/service/modules/process-task-relation/types.ts
  53. 10
      dolphinscheduler-ui-next/src/service/modules/projects-analysis/index.ts
  54. 2
      dolphinscheduler-ui-next/src/service/modules/projects-analysis/types.ts
  55. 30
      dolphinscheduler-ui-next/src/service/modules/projects/index.ts
  56. 2
      dolphinscheduler-ui-next/src/service/modules/projects/types.ts
  57. 18
      dolphinscheduler-ui-next/src/service/modules/queues/index.ts
  58. 67
      dolphinscheduler-ui-next/src/service/modules/resources/index.ts
  59. 2
      dolphinscheduler-ui-next/src/service/modules/resources/types.ts
  60. 22
      dolphinscheduler-ui-next/src/service/modules/schedules/index.ts
  61. 2
      dolphinscheduler-ui-next/src/service/modules/schedules/types.ts
  62. 23
      dolphinscheduler-ui-next/src/service/modules/task-definition/index.ts
  63. 2
      dolphinscheduler-ui-next/src/service/modules/task-definition/types.ts
  64. 4
      dolphinscheduler-ui-next/src/service/modules/task-instances/index.ts
  65. 12
      dolphinscheduler-ui-next/src/service/modules/tenants/index.ts
  66. 8
      dolphinscheduler-ui-next/src/service/modules/token/index.ts
  67. 4
      dolphinscheduler-ui-next/src/service/modules/ui-plugins/index.ts
  68. 40
      dolphinscheduler-ui-next/src/service/modules/users/index.ts
  69. 2
      dolphinscheduler-ui-next/src/service/modules/users/types.ts
  70. 10
      dolphinscheduler-ui-next/src/service/modules/worker-groups/index.ts
  71. 12
      dolphinscheduler-ui-next/src/service/service.ts
  72. 8
      dolphinscheduler-ui-next/src/store/file/file.ts
  73. 8
      dolphinscheduler-ui-next/src/store/locales/locales.ts
  74. 8
      dolphinscheduler-ui-next/src/store/menu/menu.ts
  75. 8
      dolphinscheduler-ui-next/src/store/theme/theme.ts
  76. 8
      dolphinscheduler-ui-next/src/store/user/user.ts
  77. 2
      dolphinscheduler-ui-next/src/themes/index.ts
  78. 2
      dolphinscheduler-ui-next/src/themes/modules/dark.ts
  79. 4
      dolphinscheduler-ui-next/src/themes/modules/light.ts
  80. 2
      dolphinscheduler-ui-next/src/utils/common.ts
  81. 2
      dolphinscheduler-ui-next/src/utils/index.ts
  82. 2
      dolphinscheduler-ui-next/src/utils/regex.ts
  83. 8
      dolphinscheduler-ui-next/src/views/home/components/definition-card.tsx
  84. 14
      dolphinscheduler-ui-next/src/views/home/components/state-card.tsx
  85. 8
      dolphinscheduler-ui-next/src/views/home/index.tsx
  86. 6
      dolphinscheduler-ui-next/src/views/home/use-process-state.ts
  87. 4
      dolphinscheduler-ui-next/src/views/home/use-table.ts
  88. 6
      dolphinscheduler-ui-next/src/views/home/use-task-state.ts
  89. 4
      dolphinscheduler-ui-next/src/views/login/index.tsx
  90. 12
      dolphinscheduler-ui-next/src/views/login/use-form.ts
  91. 2
      dolphinscheduler-ui-next/src/views/login/use-login.ts
  92. 2
      dolphinscheduler-ui-next/src/views/login/use-translate.ts
  93. 2
      dolphinscheduler-ui-next/src/views/monitor/servers/db/index.tsx
  94. 8
      dolphinscheduler-ui-next/src/views/monitor/servers/master/index.tsx
  95. 8
      dolphinscheduler-ui-next/src/views/monitor/servers/worker/index.tsx
  96. 2
      dolphinscheduler-ui-next/src/views/monitor/statistics/statistics/index.tsx
  97. 4
      dolphinscheduler-ui-next/src/views/monitor/statistics/statistics/use-statistics.ts
  98. 4
      dolphinscheduler-ui-next/src/views/password/index.tsx
  99. 10
      dolphinscheduler-ui-next/src/views/password/use-form.ts
  100. 4
      dolphinscheduler-ui-next/src/views/password/use-update.ts
  101. Some files were not shown because too many files have changed in this diff Show More

6
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'
}
}

3
dolphinscheduler-ui-next/.prettier.js → dolphinscheduler-ui-next/.prettierrc.js

@ -25,5 +25,6 @@ module.exports = {
"jsxSingleQuote": true,
"arrowParens": "always",
"htmlWhitespaceSensitivity": "strict",
"endOfLine": "lf"
"endOfLine": "lf",
"trailingComma": "none"
};

2
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",

8
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({
</NMessageProvider>
</NConfigProvider>
)
},
}
})
export default App

10
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<string>,
},
type: String as PropType<string>
}
}
const Card = defineComponent({
@ -47,7 +47,7 @@ const Card = defineComponent({
{$slots}
</NCard>
)
},
}
})
export default Card

10
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<Opt extends ECBasicOption>(
init()
},
{
deep: true,
deep: true
}
)

36
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<string | number>,
default: 400,
default: 400
},
width: {
type: [String, Number] as PropType<string | number>,
default: '100%',
default: '100%'
},
xAxisData: {
type: Array as PropType<Array<string>>,
default: () => [],
default: () => []
},
seriesData: {
type: Array as PropType<Array<number>>,
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

42
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<string | number>,
default: 400,
default: 400
},
width: {
type: [String, Number] as PropType<string | number>,
default: 400,
default: 400
},
data: {
type: [String, Number] as PropType<string | number>,
},
type: [String, Number] as PropType<string | number>
}
}
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

26
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<string | number>,
default: 590,
default: 590
},
width: {
type: [String, Number] as PropType<string | number>,
default: '100%',
default: '100%'
},
data: {
type: Array as PropType<Array<any>>,
},
type: Array as PropType<Array<any>>
}
}
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

18
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<boolean>,
default: false,
default: false
},
title: {
type: String as PropType<string>,
required: true,
required: true
},
cancelText: {
type: String as PropType<string>,
type: String as PropType<string>
},
cancelShow: {
type: Boolean as PropType<boolean>,
default: true,
default: true
},
confirmText: {
type: String as PropType<string>,
type: String as PropType<string>
},
confirmDisabled: {
type: Boolean as PropType<boolean>,
default: false,
},
default: false
}
}
const Modal = defineComponent({
@ -90,12 +90,12 @@ const Modal = defineComponent({
{this.confirmText || t('modal.confirm')}
</NButton>
</div>
),
)
}}
</NCard>
</NModal>
)
},
}
})
export default Modal

22
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<string>,
default: '',
default: ''
},
language: {
type: String as PropType<string>,
default: 'shell',
default: 'shell'
},
readOnly: {
type: Boolean as PropType<boolean>,
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'
}}
></div>
)
},
}
})

6
dolphinscheduler-ui-next/src/layouts/content/components/locales/index.tsx

@ -27,8 +27,8 @@ const Locales = defineComponent({
props: {
localesOptions: {
type: Array as PropType<any>,
default: [],
},
default: []
}
},
setup(props) {
const localesStore = useLocalesStore()
@ -57,7 +57,7 @@ const Locales = defineComponent({
</NButton>
</NDropdown>
)
},
}
})
export default Locales

2
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
}
}

4
dolphinscheduler-ui-next/src/layouts/content/components/logo/index.tsx

@ -31,11 +31,11 @@ const Logo = defineComponent({
<div
class={[
styles.logo,
styles[`logo-${this.themeStore.darkTheme ? 'dark' : 'light'}`],
styles[`logo-${this.themeStore.darkTheme ? 'dark' : 'light'}`]
]}
/>
)
},
}
})
export default Logo

12
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<any>,
default: [],
default: []
},
localesOptions: {
type: Array as PropType<any>,
default: [],
default: []
},
userDropdownOptions: {
type: Array as PropType<any>,
default: [],
},
default: []
}
},
emits: ['handleMenuClick'],
setup(props, ctx) {
const { handleMenuClick } = useMenuClick(ctx)
const menuStore = useMenuStore()
@ -66,7 +66,7 @@ const Navbar = defineComponent({
</div>
</div>
)
},
}
})
export default Navbar

2
dolphinscheduler-ui-next/src/layouts/content/components/navbar/use-menuClick.ts

@ -30,6 +30,6 @@ export function useMenuClick(ctx: SetupContext<'handleMenuClick'[]>) {
}
return {
handleMenuClick,
handleMenuClick
}
}

9
dolphinscheduler-ui-next/src/layouts/content/components/sidebar/index.tsx

@ -24,8 +24,8 @@ const Sidebar = defineComponent({
props: {
sideMenuOptions: {
type: Array as PropType<any>,
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({
/>
</NLayoutSider>
)
},
}
})
export default Sidebar

2
dolphinscheduler-ui-next/src/layouts/content/components/sidebar/use-menuClick.ts

@ -30,6 +30,6 @@ export function useMenuClick() {
}
return {
handleMenuClick,
handleMenuClick
}
}

2
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')}
</NButton>
)
},
}
})
export default Theme

6
dolphinscheduler-ui-next/src/layouts/content/components/user/index.tsx

@ -26,8 +26,8 @@ const User = defineComponent({
props: {
userDropdownOptions: {
type: Array as PropType<any>,
default: [],
},
default: []
}
},
setup() {
const { handleSelect } = useDropDown()
@ -52,7 +52,7 @@ const User = defineComponent({
</NButton>
</NDropdown>
)
},
}
})
export default User

3
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
}
}

8
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({
</NLayout>
</NLayout>
)
},
}
})
export default Content

102
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
}
}

4
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

34
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'
}
}

34
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: '删除'
}
}

4
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
})
/**

8
dolphinscheduler-ui-next/src/router/modules/datasource.ts

@ -34,8 +34,8 @@ export default {
name: 'datasource-list',
component: components['home'],
meta: {
title: '数据源中心',
},
},
],
title: '数据源中心'
}
}
]
}

20
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'
}
}
]
}

16
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: '工作流监控'
}
}
]
}

28
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: '文件创建'
}
}
]
}

12
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: '用户管理'
}
}
]
}

22
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]

14
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'
})
}

16
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'
})
}

2
dolphinscheduler-ui-next/src/service/modules/alert-plugin/types.ts

@ -46,5 +46,5 @@ export {
PluginInstanceReq,
InstanceNameReq,
IdReq,
UpdatePluginInstanceReq,
UpdatePluginInstanceReq
}

26
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'
})
}

16
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
})
}

2
dolphinscheduler-ui-next/src/service/modules/environment/types.ts

@ -45,5 +45,5 @@ export {
EnvironmentCodeReq,
EnvironmentNameReq,
ListReq,
CodeReq,
CodeReq
}

8
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
})
}

2
dolphinscheduler-ui-next/src/service/modules/executors/types.ts

@ -71,5 +71,5 @@ export {
ExecuteReq,
ProjectCodeReq,
ProcessDefinitionCodeReq,
ProcessInstanceReq,
ProcessInstanceReq
}

6
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'
})
}

4
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
})
}

2
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
})
}

2
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'
})
}

6
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'
})
}

46
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
})
}

2
dolphinscheduler-ui-next/src/service/modules/process-definition/types.ts

@ -78,5 +78,5 @@ export {
PageReq,
ListReq,
ProcessDefinitionReq,
TargetCodeReq,
TargetCodeReq
}

24
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'
})
}

2
dolphinscheduler-ui-next/src/service/modules/process-instances/types.ts

@ -90,5 +90,5 @@ export {
TaskReq,
LongestReq,
IdReq,
ProcessInstanceReq,
ProcessInstanceReq
}

18
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
})
}

2
dolphinscheduler-ui-next/src/service/modules/process-task-relation/types.ts

@ -51,5 +51,5 @@ export {
PostTaskCodesReq,
TaskCodeReq,
SaveReq,
MoveReq,
MoveReq
}

10
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
})
}

2
dolphinscheduler-ui-next/src/service/modules/projects-analysis/types.ts

@ -62,5 +62,5 @@ export {
ProcessDefinitionRes,
TaskStateRes,
TaskQueueRes,
CommandStateRes,
CommandStateRes
}

30
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'
})
}

2
dolphinscheduler-ui-next/src/service/modules/projects/types.ts

@ -63,5 +63,5 @@ export {
UserIdReq,
UpdateProjectsReq,
ProjectRes,
ProjectList,
ProjectList
}

18
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
})
}

67
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
})
}

2
dolphinscheduler-ui-next/src/service/modules/resources/types.ts

@ -130,5 +130,5 @@ export {
ViewResourceReq,
ResourceIdReq,
UdfFuncReq,
ResourceListRes,
ResourceListRes
}

22
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'
})
}

2
dolphinscheduler-ui-next/src/service/modules/schedules/types.ts

@ -84,5 +84,5 @@ export {
WorkerGroupIdReq,
ScheduleListReq,
CreateScheduleReq,
DeleteScheduleReq,
DeleteScheduleReq
}

23
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'
})
}

2
dolphinscheduler-ui-next/src/service/modules/task-definition/types.ts

@ -67,5 +67,5 @@ export {
CodeReq,
TaskDefinitionJsonObjReq,
ReleaseStateReq,
VersionReq,
VersionReq
}

4
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'
})
}

12
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'
})
}

8
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
})
}

4
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'
})
}

40
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
})
}

2
dolphinscheduler-ui-next/src/service/modules/users/types.ts

@ -112,5 +112,5 @@ export {
ListAllReq,
ListReq,
RegisterUserReq,
UserInfoRes,
UserInfoRes
}

10
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'
})
}

12
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')

8
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
},
},
}
}
})

8
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
},
},
}
}
})

8
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
},
},
}
}
})

8
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
},
},
}
}
})

8
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
},
},
}
}
})

2
dolphinscheduler-ui-next/src/themes/index.ts

@ -20,7 +20,7 @@ import dark from './modules/dark'
const themeList = {
light,
dark,
dark
}
export default themeList

2
dolphinscheduler-ui-next/src/themes/modules/dark.ts

@ -18,7 +18,7 @@
const dark = {
common: {
// bodyColor: '#28292d',
},
}
}
export default dark

4
dolphinscheduler-ui-next/src/themes/modules/light.ts

@ -16,8 +16,8 @@
*/
const light = {
common: {
bodyColor: '#f8f8fc',
},
bodyColor: '#f8f8fc'
}
}
export default light

2
dolphinscheduler-ui-next/src/utils/common.ts

@ -44,5 +44,5 @@ export const fileTypeArr = [
'yml',
'yaml',
'ini',
'js',
'js'
]

2
dolphinscheduler-ui-next/src/utils/index.ts

@ -20,7 +20,7 @@ import regex from './regex'
const utils = {
mapping,
regex,
regex
}
export default utils

2
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

8
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<string>,
},
type: String as PropType<string>
}
}
const DefinitionCard = defineComponent({
@ -48,11 +48,11 @@ const DefinitionCard = defineComponent({
xAxisData={processDefinition.xAxisData}
seriesData={processDefinition.seriesData}
/>
),
)
}}
</Card>
)
},
}
})
export default DefinitionCard

14
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<string>,
type: String as PropType<string>
},
date: {
type: Array as PropType<Array<any>>,
type: Array as PropType<Array<any>>
},
tableData: {
type: Array as PropType<Array<StateTableData>>,
default: () => [],
default: () => []
},
chartData: {
type: Array as PropType<Array<StateChartData>>,
default: () => [],
},
default: () => []
}
}
const StateCard = defineComponent({
@ -80,11 +80,11 @@ const StateCard = defineComponent({
type='datetimerange'
clearable
/>
),
)
}}
</Card>
)
},
}
})
export default StateCard

8
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({
</NGrid>
</div>
)
},
}
})

6
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
}
})

4
dolphinscheduler-ui-next/src/views/home/use-table.ts

@ -24,10 +24,10 @@ export function useTable() {
const columnsRef: TableColumns<any> = [
{ title: '#', key: 'index' },
{ title: t('home.number'), key: 'number' },
{ title: t('home.state'), key: 'state' },
{ title: t('home.state'), key: 'state' }
]
return {
columnsRef,
columnsRef
}
}

6
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
}
})

4
dolphinscheduler-ui-next/src/views/login/index.tsx

@ -51,7 +51,7 @@ const login = defineComponent({
>
{{
checked: () => 'en_US',
unchecked: () => 'zh_CN',
unchecked: () => 'zh_CN'
}}
</NSwitch>
</div>
@ -104,7 +104,7 @@ const login = defineComponent({
</div>
</div>
)
},
}
})
export default login

12
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
}
}

2
dolphinscheduler-ui-next/src/views/login/use-login.ts

@ -42,6 +42,6 @@ export function useLogin(state: any) {
}
return {
handleLogin,
handleLogin
}
}

2
dolphinscheduler-ui-next/src/views/login/use-translate.ts

@ -27,6 +27,6 @@ export function useTranslate(locale: WritableComputedRef<string>) {
localesStore.setLocales(value)
}
return {
handleChange,
handleChange
}
}

2
dolphinscheduler-ui-next/src/views/monitor/servers/db/index.tsx

@ -94,7 +94,7 @@ const db = defineComponent({
</NGi>
</NGrid>
)
},
}
})
export default db

8
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<Array<MasterRes>> = ref(getMaster())
const columnsRef: TableColumns<any> = [
{ 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'}
/>
),
)
}}
</Modal>
</div>
)
},
}
})
export default master

8
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<Array<WorkerRes>> = ref(getWorker())
const columnsRef: TableColumns<any> = [
{ 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'}
/>
),
)
}}
</Modal>
</div>
)
},
}
})
export default master

2
dolphinscheduler-ui-next/src/views/monitor/statistics/statistics/index.tsx

@ -95,7 +95,7 @@ const statistics = defineComponent({
</NGi>
</NGrid>
)
},
}
})
export default statistics

4
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() {

4
dolphinscheduler-ui-next/src/views/password/index.tsx

@ -69,11 +69,11 @@ const password = defineComponent({
{t('password.submit')}
</NButton>
</div>
),
)
}}
</Card>
)
},
}
})
export default password

10
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 }

4
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
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save