Browse Source

[UI-NEXT] Fix wrong packaging locations (#8851)

3.0.0/version-upgrade
kezhenxu94 3 years ago committed by GitHub
parent
commit
d3cbf8eeaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      .github/workflows/frontend.yml
  2. 3
      .github/workflows/unit-test.yml
  3. 2
      dolphinscheduler-api/src/main/assembly/dolphinscheduler-api-server.xml
  4. 2
      dolphinscheduler-dist/src/main/assembly/dolphinscheduler-bin.xml
  5. 3
      dolphinscheduler-dist/src/main/assembly/dolphinscheduler-src.xml
  6. 2
      dolphinscheduler-ui-next/src/components/chart/modules/Tree.tsx
  7. 2
      dolphinscheduler-ui-next/src/layouts/content/components/sidebar/index.tsx
  8. 2
      dolphinscheduler-ui-next/src/layouts/content/components/user/use-dropdown.ts
  9. 2
      dolphinscheduler-ui-next/src/layouts/content/index.tsx
  10. 11
      dolphinscheduler-ui-next/src/utils/log.ts
  11. 9
      dolphinscheduler-ui-next/src/views/login/index.tsx
  12. 6
      dolphinscheduler-ui-next/src/views/projects/list/components/project-modal.tsx
  13. 2
      dolphinscheduler-ui-next/src/views/projects/list/index.tsx
  14. 2
      dolphinscheduler-ui-next/src/views/projects/task/components/node/detail-modal.tsx
  15. 10
      dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-dependent.ts
  16. 2
      dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-rules.ts
  17. 10
      dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-sqoop-datasource.ts
  18. 14
      dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-save-modal.tsx
  19. 22
      dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/use-modal.ts
  20. 14
      dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/use-table.ts
  21. 9
      dolphinscheduler-ui-next/src/views/projects/workflow/definition/create/index.tsx
  22. 9
      dolphinscheduler-ui-next/src/views/projects/workflow/definition/detail/index.tsx
  23. 25
      dolphinscheduler-ui-next/src/views/projects/workflow/definition/timing/use-table.ts
  24. 10
      dolphinscheduler-ui-next/src/views/projects/workflow/definition/tree/index.tsx
  25. 56
      dolphinscheduler-ui-next/src/views/projects/workflow/instance/components/log-modal.tsx
  26. 8
      dolphinscheduler-ui-next/src/views/resource/file/create/index.tsx
  27. 9
      dolphinscheduler-ui-next/src/views/resource/file/index.tsx
  28. 2
      dolphinscheduler-ui-next/src/views/resource/file/table/table-action.tsx
  29. 6
      dolphinscheduler-ui-next/src/views/resource/udf/function/index.tsx
  30. 13
      dolphinscheduler-ui-next/src/views/resource/udf/resource/index.tsx
  31. 2
      dolphinscheduler-ui-next/src/views/resource/udf/resource/use-table.ts
  32. 12
      dolphinscheduler-ui-next/src/views/security/user-manage/components/use-authorize.ts
  33. 2
      dolphinscheduler-ui-next/src/views/security/user-manage/index.tsx

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

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

2
dolphinscheduler-api/src/main/assembly/dolphinscheduler-api-server.xml

@ -56,7 +56,7 @@
<outputDirectory>conf</outputDirectory>
</fileSet>
<fileSet>
<directory>${basedir}/../dolphinscheduler-ui/dist</directory>
<directory>${basedir}/../dolphinscheduler-ui-next/dist</directory>
<outputDirectory>./ui</outputDirectory>
</fileSet>
</fileSets>

2
dolphinscheduler-dist/src/main/assembly/dolphinscheduler-bin.xml vendored

@ -71,7 +71,7 @@
</fileSet>
<fileSet>
<directory>${basedir}/../dolphinscheduler-ui/dist</directory>
<directory>${basedir}/../dolphinscheduler-ui-next/dist</directory>
<outputDirectory>./ui</outputDirectory>
</fileSet>

3
dolphinscheduler-dist/src/main/assembly/dolphinscheduler-src.xml vendored

@ -56,6 +56,9 @@
<exclude>**/dolphinscheduler-ui/dist/**</exclude>
<exclude>**/dolphinscheduler-ui/node/**</exclude>
<exclude>**/dolphinscheduler-ui/node_modules/**</exclude>
<exclude>**/dolphinscheduler-ui-next/dist/**</exclude>
<exclude>**/dolphinscheduler-ui-next/node/**</exclude>
<exclude>**/dolphinscheduler-ui-next/node_modules/**</exclude>
<!-- python ignore -->
<exclude>**/dolphinscheduler-python/pydolphinscheduler/.pytest_cache/**</exclude>

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

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

@ -60,7 +60,7 @@ const Sidebar = defineComponent({
onExpand={() => (this.collapsedRef = false)}
>
<NMenu
class="tab-vertical"
class='tab-vertical'
value={this.sideKey}
options={this.sideMenuOptions}
defaultExpandedKeys={this.defaultExpandedKeys}

2
dolphinscheduler-ui-next/src/layouts/content/components/user/use-dropdown.ts

@ -18,7 +18,6 @@
import { useRouter } from 'vue-router'
import { logout } from '@/service/modules/logout'
import { useUserStore } from '@/store/user/user'
import { useMenuStore } from '@/store/menu/menu'
import type { Router } from 'vue-router'
import { DropdownOption } from 'naive-ui'
import cookies from 'js-cookie'
@ -26,7 +25,6 @@ import cookies from 'js-cookie'
export function useDropDown() {
const router: Router = useRouter()
const userStore = useUserStore()
const menuStore = useMenuStore()
const handleSelect = (key: string | number, unused: DropdownOption) => {
if (key === 'logout') {

2
dolphinscheduler-ui-next/src/layouts/content/index.tsx

@ -103,7 +103,7 @@ const Content = defineComponent({
<NLayout style='height: 100%'>
<NLayoutHeader style='height: 65px'>
<NavBar
class="tab-horizontal"
class='tab-horizontal'
onHandleMenuClick={this.getSideMenuOptions}
headerMenuOptions={this.headerMenuOptions}
localesOptions={this.localesOptions}

11
dolphinscheduler-ui-next/src/utils/log.ts

@ -16,8 +16,8 @@
*/
const log = {
capsule: (title: string, text: string, type?: string) => {},
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()
}

9
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'

6
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

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

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

10
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) => {

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

10
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(() => {

14
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}
>
<NForm
model={formValue.value}
rules={rule}
ref={formRef}
>
<NForm model={formValue.value} rules={rule} ref={formRef}>
<NFormItem label={t('project.dag.workflow_name')} path='name'>
<NInput v-model:value={formValue.value.name} />
</NFormItem>
@ -206,7 +203,8 @@ export default defineComponent({
min={0}
v-slots={{
suffix: () => '分'
}} />
}}
/>
</NFormItem>
)}
<NFormItem

22
dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/use-modal.ts

@ -99,10 +99,10 @@ export function useModal(
? JSON.stringify(startParams)
: ''
await startProcessInstance(state.startForm, variables.projectCode)
window.$message.success(t('project.workflow.success'))
ctx.emit('updateList')
ctx.emit('update:show')
await startProcessInstance(state.startForm, variables.projectCode)
window.$message.success(t('project.workflow.success'))
ctx.emit('updateList')
ctx.emit('update:show')
}
})
}
@ -194,10 +194,11 @@ export function useModal(
}
const getStartParamsList = (code: number) => {
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
})
}
})
}

14
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 {

9
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 () => (

9
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(() => {

25
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 {

10
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({
<NSpace align='center'>
{taskTypeNodeOptions
.filter((option: any) => option.image)
.map((option: any, index: number) => (
.map((option: any, unused: number) => (
<NButton text size='tiny' color={option.color}>
<NImage width='20' src={option.image} />
{option.taskType}

56
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 = () => {

8
dolphinscheduler-ui-next/src/views/resource/file/create/index.tsx

@ -109,7 +109,13 @@ export default defineComponent({
</NFormItem>
<div class={styles['file-edit-content']}>
<div class={styles.submit}>
<NButton type='info' size='small' round onClick={this.handleFile} class='btn-submit'>
<NButton
type='info'
size='small'
round
onClick={this.handleFile}
class='btn-submit'
>
{t('resource.file.save')}
</NButton>
<NButton

9
dolphinscheduler-ui-next/src/views/resource/file/index.tsx

@ -188,13 +188,16 @@ export default defineComponent({
<div class={styles['conditions-model']}>
<NSpace>
<NButtonGroup>
<NButton onClick={handleCreateFolder} class="btn-create-directory">
<NButton
onClick={handleCreateFolder}
class='btn-create-directory'
>
{t('resource.file.create_folder')}
</NButton>
<NButton onClick={handleCreateFile} class="btn-create-file">
<NButton onClick={handleCreateFile} class='btn-create-file'>
{t('resource.file.create_file')}
</NButton>
<NButton onClick={handleUploadFile} class="btn-upload-file">
<NButton onClick={handleUploadFile} class='btn-upload-file'>
{t('resource.file.upload_files')}
</NButton>
</NButtonGroup>

2
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'
>
<NIcon>
<EditOutlined />

6
dolphinscheduler-ui-next/src/views/resource/udf/function/index.tsx

@ -94,7 +94,11 @@ export default defineComponent({
<Card class={styles.card}>
<div class={styles.header}>
<NSpace>
<NButton type='primary' onClick={this.handleCreateFolder} class='btn-create-udf-function'>
<NButton
type='primary'
onClick={this.handleCreateFolder}
class='btn-create-udf-function'
>
{t('resource.function.create_udf_function')}
</NButton>
</NSpace>

13
dolphinscheduler-ui-next/src/views/resource/udf/resource/index.tsx

@ -115,10 +115,19 @@ export default defineComponent({
<Card class={styles.card}>
<div class={styles.header}>
<NSpace>
<NButton type='primary' onClick={this.handleCreateFolder} class='btn-create-directory'>
<NButton
type='primary'
onClick={this.handleCreateFolder}
class='btn-create-directory'
>
{t('resource.udf.create_folder')}
</NButton>
<NButton strong secondary onClick={this.handleUploadFile} class='btn-upload-udf'>
<NButton
strong
secondary
onClick={this.handleUploadFile}
class='btn-upload-udf'
>
{t('resource.udf.upload_udf_resources')}
</NButton>
</NSpace>

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

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

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

Loading…
Cancel
Save