diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 64bcb2f7b0..3bba0b87cd 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -23,15 +23,15 @@ on: - dev paths: - '.github/workflows/frontend.yml' - - 'dolphinscheduler-ui/**' + - 'dolphinscheduler-ui-next/**' pull_request: paths: - '.github/workflows/frontend.yml' - - 'dolphinscheduler-ui/**' + - 'dolphinscheduler-ui-next/**' defaults: run: - working-directory: dolphinscheduler-ui + working-directory: dolphinscheduler-ui-next concurrency: group: frontend-${{ github.event.pull_request.number || github.ref }} @@ -54,9 +54,9 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v2 with: - node-version: 8 + node-version: 16 - name: Compile and Build run: | npm install npm run lint - npm run build + npm run build:prod diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 87a0b8692f..338bcc7000 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -23,6 +23,7 @@ on: paths-ignore: - '**/*.md' - 'dolphinscheduler-ui' + - 'dolphinscheduler-ui-next' - 'dolphinscheduler-python/pydolphinscheduler' branches: - dev @@ -76,7 +77,7 @@ jobs: -Dsonar.core.codeCoveragePlugin=jacoco -Dsonar.projectKey=apache-dolphinscheduler -Dsonar.login=e4058004bc6be89decf558ac819aa1ecbee57682 - -Dsonar.exclusions=dolphinscheduler-ui/src/**/i18n/locale/*.js,dolphinscheduler-microbench/src/**/* + -Dsonar.exclusions=dolphinscheduler-ui/src/**/i18n/locale/*.js,dolphinscheduler-ui-next/src/**/i18n/locale/*.js,dolphinscheduler-microbench/src/**/* -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/dolphinscheduler-api/src/main/assembly/dolphinscheduler-api-server.xml b/dolphinscheduler-api/src/main/assembly/dolphinscheduler-api-server.xml index 792f92179f..edc99e8f1c 100644 --- a/dolphinscheduler-api/src/main/assembly/dolphinscheduler-api-server.xml +++ b/dolphinscheduler-api/src/main/assembly/dolphinscheduler-api-server.xml @@ -56,7 +56,7 @@ conf - ${basedir}/../dolphinscheduler-ui/dist + ${basedir}/../dolphinscheduler-ui-next/dist ./ui diff --git a/dolphinscheduler-dist/src/main/assembly/dolphinscheduler-bin.xml b/dolphinscheduler-dist/src/main/assembly/dolphinscheduler-bin.xml index 769393db7e..5116857a3d 100644 --- a/dolphinscheduler-dist/src/main/assembly/dolphinscheduler-bin.xml +++ b/dolphinscheduler-dist/src/main/assembly/dolphinscheduler-bin.xml @@ -71,7 +71,7 @@ - ${basedir}/../dolphinscheduler-ui/dist + ${basedir}/../dolphinscheduler-ui-next/dist ./ui diff --git a/dolphinscheduler-dist/src/main/assembly/dolphinscheduler-src.xml b/dolphinscheduler-dist/src/main/assembly/dolphinscheduler-src.xml index 05d54871c7..c33d2569e8 100644 --- a/dolphinscheduler-dist/src/main/assembly/dolphinscheduler-src.xml +++ b/dolphinscheduler-dist/src/main/assembly/dolphinscheduler-src.xml @@ -56,6 +56,9 @@ **/dolphinscheduler-ui/dist/** **/dolphinscheduler-ui/node/** **/dolphinscheduler-ui/node_modules/** + **/dolphinscheduler-ui-next/dist/** + **/dolphinscheduler-ui-next/node/** + **/dolphinscheduler-ui-next/node_modules/** **/dolphinscheduler-python/pydolphinscheduler/.pytest_cache/** diff --git a/dolphinscheduler-ui-next/src/components/chart/modules/Tree.tsx b/dolphinscheduler-ui-next/src/components/chart/modules/Tree.tsx index 8e26270ec2..10948eb201 100644 --- a/dolphinscheduler-ui-next/src/components/chart/modules/Tree.tsx +++ b/dolphinscheduler-ui-next/src/components/chart/modules/Tree.tsx @@ -15,7 +15,7 @@ * limitations under the License. */ -import { defineComponent, onMounted, PropType, ref, watch, reactive } from 'vue' +import { defineComponent, PropType, ref, watch, reactive } from 'vue' import initChart from '@/components/chart' import type { Ref } from 'vue' import { IChartDataItem } from '@/components/chart/modules/types' 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 f31f99d612..5dec929b38 100644 --- a/dolphinscheduler-ui-next/src/layouts/content/components/sidebar/index.tsx +++ b/dolphinscheduler-ui-next/src/layouts/content/components/sidebar/index.tsx @@ -60,7 +60,7 @@ const Sidebar = defineComponent({ onExpand={() => (this.collapsedRef = false)} > { if (key === 'logout') { diff --git a/dolphinscheduler-ui-next/src/layouts/content/index.tsx b/dolphinscheduler-ui-next/src/layouts/content/index.tsx index b8ae1ba17d..c531e6759f 100644 --- a/dolphinscheduler-ui-next/src/layouts/content/index.tsx +++ b/dolphinscheduler-ui-next/src/layouts/content/index.tsx @@ -103,7 +103,7 @@ const Content = defineComponent({ {}, - error: (info: any) => {} + capsule: (unusedTitle: string, unusedText: string, unusedType?: string) => {}, + error: (unusedInfo: any) => {} } /** @@ -51,7 +51,8 @@ const typeColor = (type = 'primary') => { * @param {String} text info text * @param {String} type style */ -log.capsule = (title: string, text: string, type: string = 'primary') => { +log.capsule = (title: string, text: string, type = 'primary') => { + // eslint-disable-next-line no-console console.log( `%c ${title} %c ${text} %c`, 'background:#35495E; padding: 2px ; border-radius: 3px 0 0 3px; color: #fff;', @@ -66,9 +67,13 @@ log.capsule = (title: string, text: string, type: string = 'primary') => { * @description Prints text in error style */ log.error = function (info) { + // eslint-disable-next-line no-console console.group('error info') + // eslint-disable-next-line no-console console.log('responseURL: ', `${info.config.baseURL}${info.config.url}`) + // eslint-disable-next-line no-console console.log('msg: ', info.data.msg) + // eslint-disable-next-line no-console console.groupEnd() } diff --git a/dolphinscheduler-ui-next/src/views/login/index.tsx b/dolphinscheduler-ui-next/src/views/login/index.tsx index 30e84bb148..6328a6a4e7 100644 --- a/dolphinscheduler-ui-next/src/views/login/index.tsx +++ b/dolphinscheduler-ui-next/src/views/login/index.tsx @@ -17,7 +17,14 @@ import { defineComponent, toRefs, withKeys } from 'vue' import styles from './index.module.scss' -import { NInput, NButton, NSwitch, NForm, NFormItem, useMessage } from 'naive-ui' +import { + NInput, + NButton, + NSwitch, + NForm, + NFormItem, + useMessage +} from 'naive-ui' import { useForm } from './use-form' import { useTranslate } from './use-translate' import { useLogin } from './use-login' diff --git a/dolphinscheduler-ui-next/src/views/projects/list/components/project-modal.tsx b/dolphinscheduler-ui-next/src/views/projects/list/components/project-modal.tsx index 68001f7633..38b0830cca 100644 --- a/dolphinscheduler-ui-next/src/views/projects/list/components/project-modal.tsx +++ b/dolphinscheduler-ui-next/src/views/projects/list/components/project-modal.tsx @@ -15,7 +15,7 @@ * limitations under the License. */ -import { defineComponent, PropType, toRefs, onMounted, watch } from 'vue' +import { defineComponent, PropType, toRefs, watch } from 'vue' import { NForm, NFormItem, NInput } from 'naive-ui' import { useForm } from './use-form' import Modal from '@/components/modal' @@ -65,7 +65,9 @@ const ProjectModal = defineComponent({ () => { if (props.statusRef === 0) { variables.model.projectName = '' - variables.model.userName = (userStore.getUserInfo as UserInfoRes).userName + variables.model.userName = ( + userStore.getUserInfo as UserInfoRes + ).userName variables.model.description = '' } else { variables.model.projectName = props.row.name diff --git a/dolphinscheduler-ui-next/src/views/projects/list/index.tsx b/dolphinscheduler-ui-next/src/views/projects/list/index.tsx index 054978d984..45103d8a12 100644 --- a/dolphinscheduler-ui-next/src/views/projects/list/index.tsx +++ b/dolphinscheduler-ui-next/src/views/projects/list/index.tsx @@ -26,7 +26,7 @@ import { NPagination, NSpace } from 'naive-ui' -import { defineComponent, onMounted, ref, toRefs, reactive, watch } from 'vue' +import { defineComponent, onMounted, toRefs, watch } from 'vue' import { useI18n } from 'vue-i18n' import ProjectModal from './components/project-modal' import styles from './index.module.scss' diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/detail-modal.tsx b/dolphinscheduler-ui-next/src/views/projects/task/components/node/detail-modal.tsx index 10f8a11ec3..785f8a64c8 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/detail-modal.tsx +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/detail-modal.tsx @@ -19,7 +19,6 @@ import { defineComponent, PropType, ref, - reactive, watch, nextTick, provide, @@ -139,6 +138,7 @@ const NodeDetailModal = defineComponent({ } const onTaskTypeChange = (taskType: ITaskType) => { + // eslint-disable-next-line vue/no-mutating-props props.data.taskType = taskType } diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-dependent.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-dependent.ts index 1ff22cb723..f11c910d94 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-dependent.ts +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-dependent.ts @@ -158,12 +158,10 @@ export function useDependent(model: { [field: string]: any }): IJsonItem[] { const getProjectList = async () => { const result = await queryProjectCreatedAndAuthorizedByUser() - projectList.value = result.map( - (item: { code: number; name: string }) => ({ - value: item.code, - label: item.name - }) - ) + projectList.value = result.map((item: { code: number; name: string }) => ({ + value: item.code, + label: item.name + })) return projectList } const getProcessList = async (code: number) => { diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-rules.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-rules.ts index b7bb88faf6..409cab4d0e 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-rules.ts +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-rules.ts @@ -82,7 +82,7 @@ export function useRules( validate: responseItem.validate, props: responseItem.props } - let name = responseItem.name?.replace('$t(', '').replace(')', '') + const name = responseItem.name?.replace('$t(', '').replace(')', '') item.name = name ? t(`project.node.${name}`) : '' if (responseItem.type !== 'group') { diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-sqoop-datasource.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-sqoop-datasource.ts index 613a6b6155..9832b73e45 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-sqoop-datasource.ts +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-sqoop-datasource.ts @@ -34,12 +34,10 @@ export function useDatasource( if (loading.value) return loading.value = true const result = await queryDataSourceList({ type }) - dataSourceList.value = result.map( - (item: { name: string; id: number }) => ({ - label: item.name, - value: item.id - }) - ) + dataSourceList.value = result.map((item: { name: string; id: number }) => ({ + label: item.name, + value: item.id + })) loading.value = false } onMounted(() => { diff --git a/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-save-modal.tsx b/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-save-modal.tsx index fc5640f659..974e2e5b0e 100644 --- a/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-save-modal.tsx +++ b/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-save-modal.tsx @@ -131,8 +131,9 @@ export default defineComponent({ if ( props.definition?.processDefinition.name !== formValue.value.name ) { - verifyName(params, projectCode) - .then(() => context.emit('save', formValue.value)) + verifyName(params, projectCode).then(() => + context.emit('save', formValue.value) + ) } else { context.emit('save', formValue.value) } @@ -175,11 +176,7 @@ export default defineComponent({ onCancel={onCancel} autoFocus={false} > - + @@ -206,7 +203,8 @@ export default defineComponent({ min={0} v-slots={{ suffix: () => '分' - }} /> + }} + /> )} { - queryProcessDefinitionByCode(code, variables.projectCode) - .then((res: any) => { + queryProcessDefinitionByCode(code, variables.projectCode).then( + (res: any) => { variables.startParamsList = res.processDefinition.globalParamList - }) + } + ) } const getPreviewSchedule = () => { @@ -219,10 +220,9 @@ export function useModal( endTime: end, crontab: state.timingForm.crontab }) - previewSchedule({ schedule }, projectCode) - .then((res: any) => { - variables.schedulePreviewList = res - }) + previewSchedule({ schedule }, projectCode).then((res: any) => { + variables.schedulePreviewList = res + }) } }) } diff --git a/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/use-table.ts b/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/use-table.ts index 027c911ef1..145188b2ff 100644 --- a/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/use-table.ts +++ b/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/use-table.ts @@ -172,21 +172,23 @@ export function useTable( } const handleSwitchVersion = (version: number) => { - switchVersion(variables.projectCode, variables.row.code, version) - .then(() => { + switchVersion(variables.projectCode, variables.row.code, version).then( + () => { window.$message.success(t('project.workflow.success')) ctx.emit('updateList') getTableData(variables.row) - }) + } + ) } const handleDeleteVersion = (version: number) => { - deleteVersion(variables.projectCode, variables.row.code, version) - .then(() => { + deleteVersion(variables.projectCode, variables.row.code, version).then( + () => { window.$message.success(t('project.workflow.success')) ctx.emit('updateList') getTableData(variables.row) - }) + } + ) } return { diff --git a/dolphinscheduler-ui-next/src/views/projects/workflow/definition/create/index.tsx b/dolphinscheduler-ui-next/src/views/projects/workflow/definition/create/index.tsx index 43846062ea..6474bf74ef 100644 --- a/dolphinscheduler-ui-next/src/views/projects/workflow/definition/create/index.tsx +++ b/dolphinscheduler-ui-next/src/views/projects/workflow/definition/create/index.tsx @@ -75,11 +75,10 @@ export default defineComponent({ timeout: saveForm.timeoutFlag ? saveForm.timeout : 0 }, projectCode - ) - .then((ignored: any) => { - message.success(t('project.dag.success')) - router.push({ path: `/projects/${projectCode}/workflow-definition` }) - }) + ).then((ignored: any) => { + message.success(t('project.dag.success')) + router.push({ path: `/projects/${projectCode}/workflow-definition` }) + }) } return () => ( diff --git a/dolphinscheduler-ui-next/src/views/projects/workflow/definition/detail/index.tsx b/dolphinscheduler-ui-next/src/views/projects/workflow/definition/detail/index.tsx index 2e19ead249..c5547df57b 100644 --- a/dolphinscheduler-ui-next/src/views/projects/workflow/definition/detail/index.tsx +++ b/dolphinscheduler-ui-next/src/views/projects/workflow/definition/detail/index.tsx @@ -94,11 +94,10 @@ export default defineComponent({ }, code, projectCode - ) - .then((ignored: any) => { - message.success(t('project.dag.success')) - router.push({ path: `/projects/${projectCode}/workflow-definition` }) - }) + ).then((ignored: any) => { + message.success(t('project.dag.success')) + router.push({ path: `/projects/${projectCode}/workflow-definition` }) + }) } onMounted(() => { diff --git a/dolphinscheduler-ui-next/src/views/projects/workflow/definition/timing/use-table.ts b/dolphinscheduler-ui-next/src/views/projects/workflow/definition/timing/use-table.ts index 4c4b2d01a9..cac46285ee 100644 --- a/dolphinscheduler-ui-next/src/views/projects/workflow/definition/timing/use-table.ts +++ b/dolphinscheduler-ui-next/src/views/projects/workflow/definition/timing/use-table.ts @@ -18,14 +18,7 @@ import { h, ref, reactive } from 'vue' import { useI18n } from 'vue-i18n' import { useRouter } from 'vue-router' -import { - NSpace, - NTooltip, - NButton, - NPopconfirm, - NEllipsis, - NIcon -} from 'naive-ui' +import { NSpace, NTooltip, NButton, NPopconfirm, NEllipsis } from 'naive-ui' import { deleteScheduleById, offline, @@ -39,7 +32,6 @@ import { EditOutlined } from '@vicons/antd' import type { Router } from 'vue-router' -import type { TableColumns } from 'naive-ui/es/data-table/src/interface' import { ISearchParam } from './types' import styles from '../index.module.scss' @@ -253,15 +245,14 @@ export function useTable() { if (variables.tableData.length === 1 && variables.page > 1) { variables.page -= 1 } - deleteScheduleById(id, variables.projectCode) - .then(() => { - window.$message.success(t('project.workflow.success')) - getTableData({ - pageSize: variables.pageSize, - pageNo: variables.page, - searchVal: variables.searchVal - }) + deleteScheduleById(id, variables.projectCode).then(() => { + window.$message.success(t('project.workflow.success')) + getTableData({ + pageSize: variables.pageSize, + pageNo: variables.page, + searchVal: variables.searchVal }) + }) } return { diff --git a/dolphinscheduler-ui-next/src/views/projects/workflow/definition/tree/index.tsx b/dolphinscheduler-ui-next/src/views/projects/workflow/definition/tree/index.tsx index 1b62a1f22e..752824ff6f 100644 --- a/dolphinscheduler-ui-next/src/views/projects/workflow/definition/tree/index.tsx +++ b/dolphinscheduler-ui-next/src/views/projects/workflow/definition/tree/index.tsx @@ -27,7 +27,7 @@ import { Router, useRouter } from 'vue-router' import { viewTree } from '@/service/modules/process-definition' import { SelectMixedOption } from 'naive-ui/lib/select/src/interface' import { find } from 'lodash' -import { ITaskTypeNodeOption, ITaskStateOption } from './types' +import { ITaskTypeNodeOption } from './types' export default defineComponent({ name: 'WorkflowDefinitionTiming', @@ -202,14 +202,14 @@ export default defineComponent({ const initChartData = (node: any, newNode: any) => { newNode.children = [] node?.children.map((child: any) => { - let newChild = {} + const newChild = {} initChartData(child, newChild) newNode.children.push(newChild) }) newNode.name = node.name newNode.value = node.name === 'DAG' ? 'DAG' : node?.type - let taskTypeNodeOption = find(taskTypeNodeOptions.value, { + const taskTypeNodeOption = find(taskTypeNodeOptions.value, { taskType: newNode.value }) if (taskTypeNodeOption) { @@ -259,7 +259,7 @@ export default defineComponent({ } const getWorkflowTreeData = async (limit: number) => { - if (projectCode && definitionCode) { + if (projectCode.value && definitionCode) { const res = await viewTree(projectCode.value, definitionCode.value, { limit: limit }) @@ -331,7 +331,7 @@ export default defineComponent({ {taskTypeNodeOptions .filter((option: any) => option.image) - .map((option: any, index: number) => ( + .map((option: any, unused: number) => ( {option.taskType} diff --git a/dolphinscheduler-ui-next/src/views/projects/workflow/instance/components/log-modal.tsx b/dolphinscheduler-ui-next/src/views/projects/workflow/instance/components/log-modal.tsx index 1b328ac165..3e352214ea 100644 --- a/dolphinscheduler-ui-next/src/views/projects/workflow/instance/components/log-modal.tsx +++ b/dolphinscheduler-ui-next/src/views/projects/workflow/instance/components/log-modal.tsx @@ -84,18 +84,17 @@ export default defineComponent({ taskInstanceId: props.taskInstanceId, skipLineNum: loadingIndex.value * 1000, limit: loadingIndex.value === 0 ? 1000 : (loadingIndex.value + 1) * 1000 + }).then((res: any) => { + setTimeout(() => { + loadingRef.value = false + if (res) { + window.$message.success(t('project.workflow.update_log_success')) + } else { + window.$message.warning(t('project.workflow.no_more_log')) + } + }, 1500) + textareaLog.value.innerHTML = res || t('project.workflow.no_log') }) - .then((res: any) => { - setTimeout(() => { - loadingRef.value = false - if (res) { - window.$message.success(t('project.workflow.update_log_success')) - } else { - window.$message.warning(t('project.workflow.no_more_log')) - } - }, 1500) - textareaLog.value.innerHTML = res || t('project.workflow.no_log') - }) } const showLog = () => { @@ -103,25 +102,24 @@ export default defineComponent({ taskInstanceId: props.taskInstanceId, skipLineNum: loadingIndex.value * 1000, limit: loadingIndex.value === 0 ? 1000 : (loadingIndex.value + 1) * 1000 + }).then((res: any) => { + if (!res) { + isDataRef.value = false + setTimeout(() => { + window.$message.warning(t('project.workflow.no_more_log')) + }, 1000) + textareaLog.value.innerHTML = + contentRef.value || t('project.workflow.no_log') + } else { + isDataRef.value = true + contentRef.value = res + textareaLog.value.innerHTML = + contentRef.value || t('project.workflow.no_log') + setTimeout(() => { + textareaLog.value.scrollTop = 2 + }, 800) + } }) - .then((res: any) => { - if (!res) { - isDataRef.value = false - setTimeout(() => { - window.$message.warning(t('project.workflow.no_more_log')) - }, 1000) - textareaLog.value.innerHTML = - contentRef.value || t('project.workflow.no_log') - } else { - isDataRef.value = true - contentRef.value = res - textareaLog.value.innerHTML = - contentRef.value || t('project.workflow.no_log') - setTimeout(() => { - textareaLog.value.scrollTop = 2 - }, 800) - } - }) } const initLog = () => { diff --git a/dolphinscheduler-ui-next/src/views/resource/file/create/index.tsx b/dolphinscheduler-ui-next/src/views/resource/file/create/index.tsx index 287da3f30d..06be655325 100644 --- a/dolphinscheduler-ui-next/src/views/resource/file/create/index.tsx +++ b/dolphinscheduler-ui-next/src/views/resource/file/create/index.tsx @@ -109,7 +109,13 @@ export default defineComponent({
- + {t('resource.file.save')} - + {t('resource.file.create_folder')} - + {t('resource.file.create_file')} - + {t('resource.file.upload_files')} 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 754485622b..b3eda7835e 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 @@ -127,7 +127,7 @@ export default defineComponent({ } style={{ marginRight: '-5px' }} circle - class="btn-rename" + class='btn-rename' > diff --git a/dolphinscheduler-ui-next/src/views/resource/udf/function/index.tsx b/dolphinscheduler-ui-next/src/views/resource/udf/function/index.tsx index e53f1b7151..158b77b33a 100644 --- a/dolphinscheduler-ui-next/src/views/resource/udf/function/index.tsx +++ b/dolphinscheduler-ui-next/src/views/resource/udf/function/index.tsx @@ -94,7 +94,11 @@ export default defineComponent({
- + {t('resource.function.create_udf_function')} diff --git a/dolphinscheduler-ui-next/src/views/resource/udf/resource/index.tsx b/dolphinscheduler-ui-next/src/views/resource/udf/resource/index.tsx index eb23e9319a..2347d4011d 100644 --- a/dolphinscheduler-ui-next/src/views/resource/udf/resource/index.tsx +++ b/dolphinscheduler-ui-next/src/views/resource/udf/resource/index.tsx @@ -115,10 +115,19 @@ export default defineComponent({
- + {t('resource.udf.create_folder')} - + {t('resource.udf.upload_udf_resources')} diff --git a/dolphinscheduler-ui-next/src/views/resource/udf/resource/use-table.ts b/dolphinscheduler-ui-next/src/views/resource/udf/resource/use-table.ts index f6b80748b6..139362c65d 100644 --- a/dolphinscheduler-ui-next/src/views/resource/udf/resource/use-table.ts +++ b/dolphinscheduler-ui-next/src/views/resource/udf/resource/use-table.ts @@ -187,7 +187,7 @@ export function useTable() { circle: true, type: 'error', size: 'tiny', - class: 'btn-delete', + class: 'btn-delete' }, { icon: () => h(DeleteOutlined) diff --git a/dolphinscheduler-ui-next/src/views/security/user-manage/components/use-authorize.ts b/dolphinscheduler-ui-next/src/views/security/user-manage/components/use-authorize.ts index 9c43b98299..2de63121b4 100644 --- a/dolphinscheduler-ui-next/src/views/security/user-manage/components/use-authorize.ts +++ b/dolphinscheduler-ui-next/src/views/security/user-manage/components/use-authorize.ts @@ -15,7 +15,6 @@ * limitations under the License. */ import { reactive } from 'vue' -import { useI18n } from 'vue-i18n' import { queryAuthorizedProject, queryUnauthorizedProject @@ -40,8 +39,6 @@ import { removeUselessChildren } from '@/utils/tree-format' import type { TAuthType, IResourceOption, IOption } from '../types' export function useAuthorize() { - const { t } = useI18n() - const state = reactive({ saving: false, loading: false, @@ -124,13 +121,13 @@ export function useAuthorize() { ]) state.loading = false removeUselessChildren(resources[0]) - let udfResources = [] as IResourceOption[] - let fileResources = [] as IResourceOption[] + const udfResources = [] as IResourceOption[] + const fileResources = [] as IResourceOption[] resources[0].forEach((item: IResourceOption) => { item.type === 'FILE' ? fileResources.push(item) : udfResources.push(item) }) - let udfTargets = [] as number[] - let fileTargets = [] as number[] + const udfTargets = [] as number[] + const fileTargets = [] as number[] resources[1].forEach((item: { type: string; id: number }) => { item.type === 'FILE' ? fileTargets.push(item.id) @@ -138,7 +135,6 @@ export function useAuthorize() { }) state.fileResources = fileResources state.udfResources = udfResources - console.log(fileResources) state.authorizedFileResources = fileTargets state.authorizedUdfResources = fileTargets } diff --git a/dolphinscheduler-ui-next/src/views/security/user-manage/index.tsx b/dolphinscheduler-ui-next/src/views/security/user-manage/index.tsx index 4277701233..83054340f1 100644 --- a/dolphinscheduler-ui-next/src/views/security/user-manage/index.tsx +++ b/dolphinscheduler-ui-next/src/views/security/user-manage/index.tsx @@ -15,7 +15,7 @@ * limitations under the License. */ -import { defineComponent, toRefs, watch } from 'vue' +import { defineComponent, toRefs } from 'vue' import { NButton, NInput,