Browse Source

[CI][UI Next][V1.0.0-Alpha] Add frontend UI to CI checks and fix the linting problems found (#8666)

3.0.0/version-upgrade
kezhenxu94 3 years ago committed by GitHub
parent
commit
60a00490c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      .github/workflows/frontend.yml
  2. 11
      dolphinscheduler-ui-next/.eslintrc.js
  3. 2
      dolphinscheduler-ui-next/src/components/form/fields/custom-parameters.ts
  4. 4
      dolphinscheduler-ui-next/src/components/form/fields/multi-condition.ts
  5. 2
      dolphinscheduler-ui-next/src/components/form/fields/multi-input.ts
  6. 12
      dolphinscheduler-ui-next/src/components/form/get-elements-by-json.ts
  7. 2
      dolphinscheduler-ui-next/src/components/form/use-form.ts
  8. 2
      dolphinscheduler-ui-next/src/layouts/content/components/sidebar/use-menuClick.ts
  9. 2
      dolphinscheduler-ui-next/src/layouts/content/components/user/use-dropdown.ts
  10. 40
      dolphinscheduler-ui-next/src/layouts/content/use-dataList.ts
  11. 2
      dolphinscheduler-ui-next/src/service/modules/lineages/index.ts
  12. 2
      dolphinscheduler-ui-next/src/service/modules/process-definition/index.ts
  13. 6
      dolphinscheduler-ui-next/src/service/modules/resources/index.ts
  14. 2
      dolphinscheduler-ui-next/src/service/modules/schedules/index.ts
  15. 2
      dolphinscheduler-ui-next/src/service/modules/task-instances/index.ts
  16. 2
      dolphinscheduler-ui-next/src/service/modules/token/index.ts
  17. 4
      dolphinscheduler-ui-next/src/utils/truncate-text.ts
  18. 2
      dolphinscheduler-ui-next/src/views/data-quality/rule/components/rule-modal.tsx
  19. 2
      dolphinscheduler-ui-next/src/views/data-quality/rule/index.tsx
  20. 6
      dolphinscheduler-ui-next/src/views/data-quality/rule/use-table.ts
  21. 2
      dolphinscheduler-ui-next/src/views/data-quality/task-result/use-table.ts
  22. 2
      dolphinscheduler-ui-next/src/views/datasource/list/json-highlight.tsx
  23. 3
      dolphinscheduler-ui-next/src/views/datasource/list/use-columns.ts
  24. 2
      dolphinscheduler-ui-next/src/views/datasource/list/use-table.ts
  25. 2
      dolphinscheduler-ui-next/src/views/home/use-task-state.ts
  26. 2
      dolphinscheduler-ui-next/src/views/monitor/servers/worker/index.tsx
  27. 2
      dolphinscheduler-ui-next/src/views/monitor/statistics/audit-log/use-table.ts
  28. 8
      dolphinscheduler-ui-next/src/views/projects/list/use-table.ts
  29. 2
      dolphinscheduler-ui-next/src/views/projects/overview/use-process-state.ts
  30. 2
      dolphinscheduler-ui-next/src/views/projects/overview/use-task-state.ts
  31. 2
      dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-datasource.ts
  32. 6
      dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-datax.ts
  33. 11
      dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-dependent.ts
  34. 6
      dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-sea-tunnel.ts
  35. 2
      dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-sql-type.ts
  36. 1
      dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-sqoop-target-type.ts
  37. 2
      dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-switch.ts
  38. 4
      dolphinscheduler-ui-next/src/views/projects/task/components/node/format-data.ts
  39. 2
      dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-conditions.ts
  40. 3
      dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-procedure.ts
  41. 2
      dolphinscheduler-ui-next/src/views/projects/task/definition/components/use-move.ts
  42. 2
      dolphinscheduler-ui-next/src/views/projects/task/definition/components/use-version.ts
  43. 2
      dolphinscheduler-ui-next/src/views/projects/task/definition/components/version-modal.tsx
  44. 18
      dolphinscheduler-ui-next/src/views/projects/task/definition/use-table.ts
  45. 2
      dolphinscheduler-ui-next/src/views/projects/task/definition/use-task.ts
  46. 2
      dolphinscheduler-ui-next/src/views/projects/task/instance/components/log-modal.tsx
  47. 16
      dolphinscheduler-ui-next/src/views/projects/task/instance/use-table.ts
  48. 2
      dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-auto-layout-modal.tsx
  49. 1
      dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/use-cell-update.ts
  50. 2
      dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/use-custom-cell-builder.ts
  51. 1
      dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/use-task-edit.ts
  52. 2
      dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/use-text-copy.ts
  53. 2
      dolphinscheduler-ui-next/src/views/projects/workflow/definition/create/index.tsx
  54. 2
      dolphinscheduler-ui-next/src/views/projects/workflow/definition/detail/index.tsx
  55. 2
      dolphinscheduler-ui-next/src/views/projects/workflow/instance/components/log-modal.tsx
  56. 4
      dolphinscheduler-ui-next/src/views/projects/workflow/relation/components/Graph.tsx
  57. 1
      dolphinscheduler-ui-next/src/views/projects/workflow/relation/use-relation.ts
  58. 15
      dolphinscheduler-ui-next/src/views/resource/task-group/option/components/form-modal.tsx
  59. 4
      dolphinscheduler-ui-next/src/views/resource/task-group/option/index.tsx
  60. 20
      dolphinscheduler-ui-next/src/views/resource/task-group/option/use-table.ts
  61. 12
      dolphinscheduler-ui-next/src/views/resource/task-group/queue/components/form-modal.tsx
  62. 1
      dolphinscheduler-ui-next/src/views/resource/task-group/queue/components/table-action.tsx
  63. 13
      dolphinscheduler-ui-next/src/views/resource/task-group/queue/index.tsx
  64. 3
      dolphinscheduler-ui-next/src/views/resource/task-group/queue/use-form.ts
  65. 10
      dolphinscheduler-ui-next/src/views/resource/task-group/queue/use-table.ts
  66. 10
      dolphinscheduler-ui-next/src/views/security/alarm-group-manage/use-table.ts
  67. 2
      dolphinscheduler-ui-next/src/views/security/alarm-instance-manage/use-columns.ts
  68. 2
      dolphinscheduler-ui-next/src/views/security/alarm-instance-manage/use-table.ts
  69. 10
      dolphinscheduler-ui-next/src/views/security/environment-manage/use-table.ts
  70. 6
      dolphinscheduler-ui-next/src/views/security/k8s-namespace-manage/components/use-modal.ts
  71. 10
      dolphinscheduler-ui-next/src/views/security/k8s-namespace-manage/use-table.ts
  72. 2
      dolphinscheduler-ui-next/src/views/security/tenant-manage/components/tenant-modal.tsx
  73. 8
      dolphinscheduler-ui-next/src/views/security/tenant-manage/components/use-modalData.ts
  74. 10
      dolphinscheduler-ui-next/src/views/security/tenant-manage/use-table.ts
  75. 2
      dolphinscheduler-ui-next/src/views/security/token-manage/components/use-modal.ts
  76. 15
      dolphinscheduler-ui-next/src/views/security/token-manage/use-table.ts
  77. 4
      dolphinscheduler-ui-next/src/views/security/user-manage/use-table.tsx
  78. 10
      dolphinscheduler-ui-next/src/views/security/worker-group-manage/use-table.ts
  79. 2
      dolphinscheduler-ui-next/src/views/security/yarn-queue-manage/components/use-modal.ts
  80. 5
      dolphinscheduler-ui-next/src/views/security/yarn-queue-manage/use-table.ts

1
.github/workflows/frontend.yml

@ -57,7 +57,6 @@ jobs:
node-version: 8
- name: Compile and Build
run: |
npm install node-sass --unsafe-perm
npm install
npm run lint
npm run build

11
dolphinscheduler-ui-next/.eslintrc.js

@ -48,15 +48,15 @@ module.exports = {
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^h$',
varsIgnorePattern: '^h$'
argsIgnorePattern: '^(unused|ignored).*$',
varsIgnorePattern: '^(unused|ignored).*$'
}
],
'no-unused-vars': [
'error',
{
argsIgnorePattern: '^h$',
varsIgnorePattern: '^h$'
argsIgnorePattern: '^(unused|ignored).*$',
varsIgnorePattern: '^(unused|ignored).*$'
}
],
'space-before-function-paren': 'off',
@ -65,6 +65,7 @@ module.exports = {
'vue/multi-word-component-names': 'off',
'vue/component-definition-name-casing': 'off',
'vue/require-valid-default-prop': 'off',
'no-console': 'error'
'no-console': 'error',
'vue/no-setup-props-destructure': 'off',
}
}

2
dolphinscheduler-ui-next/src/components/form/fields/custom-parameters.ts

@ -103,7 +103,7 @@ export function renderCustomParameters(
const { field, children = [] } = mergedItem
const { defaultValue, ruleItem } = getDefaultValue(children)
rules.push(ruleItem)
const getChild = (item: object, i: number, disabled: boolean) =>
const getChild = (item: object, i: number, unused: boolean) =>
children.map((child: IJsonItem) => {
const mergedChild = isFunction(child) ? child(i) : child
return h(

4
dolphinscheduler-ui-next/src/components/form/fields/multi-condition.ts

@ -66,9 +66,9 @@ const MultiCondition = defineComponent({
export function renderMultiCondition(
item: IJsonItem,
fields: { [field: string]: any },
rules: { [key: string]: FormItemRule }[]
unused: { [key: string]: FormItemRule }[]
) {
let ruleItem: { [key: string]: FormItemRule } = {}
const ruleItem: { [key: string]: FormItemRule } = {}
// the fields is the data of the task definition.
// the item is the options of this component in the form.

2
dolphinscheduler-ui-next/src/components/form/fields/multi-input.ts

@ -71,7 +71,7 @@ const MultiInput = defineComponent({
export function renderMultiInput(
item: IJsonItem,
fields: { [field: string]: any },
rules: { [key: string]: FormItemRule }[]
unused: { [key: string]: FormItemRule }[]
) {
const { field } = isFunction(item) ? item() : item
// the fields is the data of the task definition.

12
dolphinscheduler-ui-next/src/components/form/get-elements-by-json.ts

@ -29,17 +29,9 @@ export default function getElementByJson(
const rules: FormRules = {}
const initialValues: { [field: string]: any } = {}
const elements: IFormItem[] = []
for (let item of json) {
for (const item of json) {
const mergedItem = isFunction(item) ? item() : item
const {
name,
value,
field,
span = 24,
children,
validate,
...rest
} = mergedItem
const { name, value, field, children, validate, ...rest } = mergedItem
if (value || value === 0) {
fields[field] = value
initialValues[field] = value

2
dolphinscheduler-ui-next/src/components/form/use-form.ts

@ -27,7 +27,7 @@ export function useForm() {
}
const setValues = (initialValues: { [field: string]: any }) => {
for (let [key, value] of Object.entries(initialValues)) {
for (const [key, value] of Object.entries(initialValues)) {
state.formRef.model[key] = value
}
}

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

@ -22,7 +22,7 @@ import { MenuOption } from 'naive-ui'
export function useMenuClick() {
const router: Router = useRouter()
const handleMenuClick = (key: string, item: MenuOption) => {
const handleMenuClick = (key: string, unused: MenuOption) => {
// console.log(key, item)
router.push({ path: `${key}` })
}

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

@ -27,7 +27,7 @@ export function useDropDown() {
const userStore = useUserStore()
const menuStore = useMenuStore()
const handleSelect = (key: string | number, option: DropdownOption) => {
const handleSelect = (key: string | number, unused: DropdownOption) => {
menuStore.setMenuKey('')
if (key === 'logout') {
useLogout()

40
dolphinscheduler-ui-next/src/layouts/content/use-dataList.ts

@ -141,7 +141,7 @@ export function useDataList() {
children: [
{
label: t('menu.file_manage'),
key: `/resource/file-manage`,
key: '/resource/file-manage',
icon: renderIcon(FileSearchOutlined)
},
{
@ -151,11 +151,11 @@ export function useDataList() {
children: [
{
label: t('menu.resource_manage'),
key: `/resource/resource-manage`
key: '/resource/resource-manage'
},
{
label: t('menu.function_manage'),
key: `/resource/function-manage`
key: '/resource/function-manage'
}
]
},
@ -183,12 +183,12 @@ export function useDataList() {
children: [
{
label: t('menu.task_result'),
key: `/data-quality/task-result`,
key: '/data-quality/task-result',
icon: renderIcon(ApartmentOutlined)
},
{
label: t('menu.rule'),
key: `/data-quality/rule`,
key: '/data-quality/rule',
icon: renderIcon(BarsOutlined)
}
]
@ -211,15 +211,15 @@ export function useDataList() {
children: [
{
label: t('menu.master'),
key: `/monitor/master`
key: '/monitor/master'
},
{
label: t('menu.worker'),
key: `/monitor/worker`
key: '/monitor/worker'
},
{
label: t('menu.db'),
key: `/monitor/db`
key: '/monitor/db'
}
]
},
@ -230,11 +230,11 @@ export function useDataList() {
children: [
{
label: t('menu.statistics'),
key: `/monitor/statistics`
key: '/monitor/statistics'
},
{
label: t('menu.audit_log'),
key: `/monitor/audit-log`
key: '/monitor/audit-log'
}
]
}
@ -249,54 +249,54 @@ export function useDataList() {
? [
{
label: t('menu.tenant_manage'),
key: `/security/tenant-manage`,
key: '/security/tenant-manage',
icon: renderIcon(UsergroupAddOutlined)
},
{
label: t('menu.user_manage'),
key: `/security/user-manage`,
key: '/security/user-manage',
icon: renderIcon(UserAddOutlined)
},
{
label: t('menu.alarm_group_manage'),
key: `/security/alarm-group-manage`,
key: '/security/alarm-group-manage',
icon: renderIcon(WarningOutlined)
},
{
label: t('menu.alarm_instance_manage'),
key: `/security/alarm-instance-manage`,
key: '/security/alarm-instance-manage',
icon: renderIcon(InfoCircleOutlined)
},
{
label: t('menu.worker_group_manage'),
key: `/security/worker-group-manage`,
key: '/security/worker-group-manage',
icon: renderIcon(ControlOutlined)
},
{
label: t('menu.yarn_queue_manage'),
key: `/security/yarn-queue-manage`,
key: '/security/yarn-queue-manage',
icon: renderIcon(SlackOutlined)
},
{
label: t('menu.environment_manage'),
key: `/security/environment-manage`,
key: '/security/environment-manage',
icon: renderIcon(EnvironmentOutlined)
},
{
label: t('menu.k8s_namespace_manage'),
key: `/security/k8s-namespace-manage`,
key: '/security/k8s-namespace-manage',
icon: renderIcon(CloudServerOutlined)
},
{
label: t('menu.token_manage'),
key: `/security/token-manage`,
key: '/security/token-manage',
icon: renderIcon(SafetyOutlined)
}
]
: [
{
label: t('menu.token_manage'),
key: `/security/token-manage`,
key: '/security/token-manage',
icon: renderIcon(SafetyOutlined)
}
]

2
dolphinscheduler-ui-next/src/service/modules/lineages/index.ts

@ -16,7 +16,7 @@
*/
import { axios } from '@/service/service'
import { ProjectCodeReq, WorkFlowNameReq, WorkflowCodeReq } from './types'
import { ProjectCodeReq, WorkflowCodeReq } from './types'
export function queryWorkFlowList(projectCode: ProjectCodeReq): any {
return axios({

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

@ -19,10 +19,8 @@ import { axios } from '@/service/service'
import {
CodeReq,
CodesReq,
FileReq,
NameReq,
ReleaseStateReq,
VersionReq,
LimitReq,
PageReq,
ListReq,

6
dolphinscheduler-ui-next/src/service/modules/resources/index.ts

@ -18,7 +18,6 @@
import { axios, downloadFile } from '@/service/service'
import {
ResourceTypeReq,
UdfTypeReq,
NameReq,
FileNameReq,
FullNameReq,
@ -223,10 +222,7 @@ export function updateResourceContent(data: ContentReq, id: number): any {
})
}
export function viewResource(
params: ViewResourceReq,
id: number
): any {
export function viewResource(params: ViewResourceReq, id: number): any {
return axios({
url: `/resources/${id}/view`,
method: 'get',

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

@ -18,13 +18,11 @@
import { axios } from '@/service/service'
import {
ProjectCodeReq,
IdReq,
CodeReq,
ListReq,
ScheduleReq,
WorkerGroupIdReq,
CreateScheduleReq,
DeleteScheduleReq,
ProcessDefinitionCodeReq
} from './types'

2
dolphinscheduler-ui-next/src/service/modules/task-instances/index.ts

@ -37,5 +37,5 @@ export function forceSuccess(taskId: IdReq, projectCode: ProjectCodeReq): any {
}
export function downloadLog(id: number): void {
downloadFile(`log/download-log`, { taskInstanceId: id })
downloadFile('log/download-log', { taskInstanceId: id })
}

2
dolphinscheduler-ui-next/src/service/modules/token/index.ts

@ -60,7 +60,7 @@ export function deleteToken(id: number): any {
export function generateToken(data: TokenReq): any {
return axios({
url: `/access-tokens/generate`,
url: '/access-tokens/generate',
method: 'post',
data
})

4
dolphinscheduler-ui-next/src/utils/truncate-text.ts

@ -25,7 +25,7 @@ export default function truncateText(text: string, n: number) {
const exp = /[\u4E00-\u9FA5]/
let res = ''
let len = text.length
let chinese = text.match(new RegExp(exp, 'g'))
const chinese = text.match(new RegExp(exp, 'g'))
if (chinese) {
len += chinese.length
}
@ -33,7 +33,7 @@ export default function truncateText(text: string, n: number) {
let i = 0
let acc = 0
while (true) {
let char = text[i]
const char = text[i]
if (exp.test(char)) {
acc += 2
} else {

2
dolphinscheduler-ui-next/src/views/data-quality/rule/components/rule-modal.tsx

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { defineComponent, h, PropType, reactive, ref, toRefs, watch } from 'vue'
import { defineComponent, PropType } from 'vue'
import { useI18n } from 'vue-i18n'
import { NDataTable } from 'naive-ui'
import Modal from '@/components/modal'

2
dolphinscheduler-ui-next/src/views/data-quality/rule/index.tsx

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { defineComponent, onMounted, ref, toRefs, watch } from 'vue'
import { defineComponent, onMounted, ref, toRefs } from 'vue'
import {
NSpace,
NInput,

6
dolphinscheduler-ui-next/src/views/data-quality/rule/use-table.ts

@ -19,13 +19,13 @@ import { useI18n } from 'vue-i18n'
import { h, reactive, ref } from 'vue'
import { useAsyncState } from '@vueuse/core'
import { queryRuleListPaging } from '@/service/modules/data-quality'
import type { Rule, RuleRes } from '@/service/modules/data-quality/types'
import type { RuleRes } from '@/service/modules/data-quality/types'
import TableAction from './components/table-action'
import _ from 'lodash'
import { parseISO, format } from 'date-fns'
import { TableColumns } from 'naive-ui/es/data-table/src/interface'
export function useTable(viewRuleEntry = (ruleJson: string): void => {}) {
export function useTable(viewRuleEntry = (unusedRuleJson: string): void => {}) {
const { t } = useI18n()
const variables = reactive({
@ -106,7 +106,7 @@ export function useTable(viewRuleEntry = (ruleJson: string): void => {}) {
const { state } = useAsyncState(
queryRuleListPaging(data).then((res: RuleRes) => {
variables.tableData = res.totalList.map((item, index) => {
variables.tableData = res.totalList.map((item, unused) => {
const ruleName =
'data_quality.rule.' + item.name.substring(3, item.name.length - 1)
const ruleNameLocale = t(ruleName)

2
dolphinscheduler-ui-next/src/views/data-quality/task-result/use-table.ts

@ -180,7 +180,7 @@ export function useTable() {
const { state } = useAsyncState(
queryExecuteResultListPaging(data).then((res: ResultListRes) => {
variables.tableData = res.totalList.map((item, index) => {
variables.tableData = res.totalList.map((item, unused) => {
return {
...item
}

2
dolphinscheduler-ui-next/src/views/datasource/list/json-highlight.tsx

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { defineComponent, PropType, h } from 'vue'
import { defineComponent, PropType } from 'vue'
import { NText } from 'naive-ui'
import { isBoolean, isNumber, isPlainObject } from 'lodash'
import styles from './json-highlight.module.scss'

3
dolphinscheduler-ui-next/src/views/datasource/list/use-columns.ts

@ -20,7 +20,6 @@ import { useI18n } from 'vue-i18n'
import { NPopover, NButton, NIcon, NPopconfirm, NSpace } from 'naive-ui'
import { EditOutlined, DeleteOutlined } from '@vicons/antd'
import JsonHighlight from './json-highlight'
import styles from './index.module.scss'
import { TableColumns } from './types'
export function useColumns(onCallback: Function) {
@ -84,7 +83,7 @@ export function useColumns(onCallback: Function) {
title: t('datasource.operation'),
key: 'operation',
width: 150,
render: (rowData, rowIndex) => {
render: (rowData, unused) => {
return h(NSpace, null, {
default: () => [
h(

2
dolphinscheduler-ui-next/src/views/datasource/list/use-table.ts

@ -60,7 +60,7 @@ export function useTable() {
const deleteRecord = async (id: number) => {
try {
const res = await deleteDataSource(id)
const ignored = await deleteDataSource(id)
updateList()
} catch (e) {
window.$message.error((e as Error).message)

2
dolphinscheduler-ui-next/src/views/home/use-task-state.ts

@ -29,7 +29,7 @@ export function useTaskState() {
endDate: !date ? '' : format(date[1], 'yyyy-MM-dd HH:mm:ss'),
projectCode: 0
}).then((res: TaskStateRes): StateData => {
const table = res.taskCountDtos.map((item, index) => {
const table = res.taskCountDtos.map((item, unused) => {
return {
state: item.taskStateType,
number: item.count

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

@ -121,7 +121,7 @@ const master = defineComponent({
workerRef[0] && (
<NDataTable
columns={columnsRef}
data={workerRef[0].zkDirectories.map((item, index) => {
data={workerRef[0].zkDirectories.map((item, unused) => {
return { directory: item }
})}
striped

2
dolphinscheduler-ui-next/src/views/monitor/statistics/audit-log/use-table.ts

@ -84,7 +84,7 @@ export function useTable() {
const { state } = useAsyncState(
queryAuditLogListPaging(data).then((res: AuditListRes) => {
variables.tableData = res.totalList.map((item, index) => {
variables.tableData = res.totalList.map((item, unused) => {
return {
...item
}

8
dolphinscheduler-ui-next/src/views/projects/list/use-table.ts

@ -30,9 +30,9 @@ import { useMenuStore } from '@/store/menu/menu'
export function useTable(
updateProjectItem = (
code: number,
name: string,
description: string
unusedCode: number,
unusedName: string,
unusedDescription: string
): void => {},
resetTableData = () => {}
) {
@ -101,7 +101,7 @@ export function useTable(
const { state } = useAsyncState(
queryProjectListPaging(params).then((res: ProjectRes) => {
variables.totalPage = res.totalPage
variables.tableData = res.totalList.map((item, index) => {
variables.tableData = res.totalList.map((item, unused) => {
item.createTime = format(
parseISO(item.createTime),
'yyyy-MM-dd HH:mm:ss'

2
dolphinscheduler-ui-next/src/views/projects/overview/use-process-state.ts

@ -32,7 +32,7 @@ export function useProcessState() {
endDate: !date ? '' : format(date[1], 'yyyy-MM-dd HH:mm:ss'),
projectCode: Number(route.params.projectCode)
}).then((res: TaskStateRes): StateData => {
const table = res.taskCountDtos.map((item, index) => {
const table = res.taskCountDtos.map((item, unused) => {
return {
state: item.taskStateType,
number: item.count

2
dolphinscheduler-ui-next/src/views/projects/overview/use-task-state.ts

@ -32,7 +32,7 @@ export function useTaskState() {
endDate: !date ? '' : format(date[1], 'yyyy-MM-dd HH:mm:ss'),
projectCode: Number(route.params.projectCode)
}).then((res: TaskStateRes): StateData => {
const table = res.taskCountDtos.map((item, index) => {
const table = res.taskCountDtos.map((item, unused) => {
return {
state: item.taskStateType,
number: item.count

2
dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-datasource.ts

@ -53,7 +53,7 @@ export function useDatasource(
options.value.push({ label: item.name, value: String(item.id) })
})
if (options.value && model.datasource) {
let item = find(options.value, { value: String(model.datasource) })
const item = find(options.value, { value: String(model.datasource) })
if (!item) {
model.datasource = null
}

6
dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-datax.ts

@ -17,7 +17,7 @@
import { ref, onMounted, watch } from 'vue'
import { useI18n } from 'vue-i18n'
import type { IJsonItem } from '../types'
import { find, indexOf } from 'lodash'
import { find } from 'lodash'
import { TypeReq } from '@/service/modules/data-source/types'
import { queryDataSourceList } from '@/service/modules/data-source'
@ -171,7 +171,7 @@ export function useDataX(model: { [field: string]: any }): IJsonItem[] {
datasourceOptions.value.push({ label: item.name, value: String(item.id) })
})
if (datasourceOptions.value && model.dataSource) {
let item = find(datasourceOptions.value, {
const item = find(datasourceOptions.value, {
value: String(model.dataSource)
})
if (!item) {
@ -191,7 +191,7 @@ export function useDataX(model: { [field: string]: any }): IJsonItem[] {
})
})
if (destinationDatasourceOptions.value && model.dataTarget) {
let item = find(destinationDatasourceOptions.value, {
const item = find(destinationDatasourceOptions.value, {
value: String(model.dataTarget)
})
if (!item) {

11
dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-dependent.ts

@ -227,7 +227,6 @@ export function useDependent(model: { [field: string]: any }): IJsonItem[] {
dependItem.definitionCode
)
}
console.log(dependItem)
if (dependItem.cycle) {
dependItem.dateOptions = DATE_LSIT[dependItem.cycle]
}
@ -240,7 +239,7 @@ export function useDependent(model: { [field: string]: any }): IJsonItem[] {
...useDependentTimeout(model),
...useRelationCustomParams({
model,
children: (i: number = 0) => ({
children: (i = 0) => ({
type: 'custom-parameters',
field: 'dependItemList',
span: 18,
@ -260,7 +259,7 @@ export function useDependent(model: { [field: string]: any }): IJsonItem[] {
},
options: projectList
}),
(j: number = 0) => ({
(j = 0) => ({
type: 'select',
field: 'definitionCode',
span: 12,
@ -279,7 +278,7 @@ export function useDependent(model: { [field: string]: any }): IJsonItem[] {
model.dependTaskList[i]?.dependItemList[j]
?.definitionCodeOptions || []
}),
(j: number = 0) => ({
(j = 0) => ({
type: 'select',
field: 'depTaskCode',
span: 12,
@ -290,7 +289,7 @@ export function useDependent(model: { [field: string]: any }): IJsonItem[] {
model.dependTaskList[i]?.dependItemList[j]?.depTaskCodeOptions ||
[]
}),
(j: number = 0) => ({
(j = 0) => ({
type: 'select',
field: 'cycle',
span: 12,
@ -302,7 +301,7 @@ export function useDependent(model: { [field: string]: any }): IJsonItem[] {
},
options: CYCLE_LIST
}),
(j: number = 0) => ({
(j = 0) => ({
type: 'select',
field: 'dateValue',
span: 12,

6
dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-sea-tunnel.ts

@ -117,12 +117,12 @@ export function useSeaTunnel(model: { [field: string]: any }): IJsonItem[] {
const parseRawScript = () => {
if (model.rawScript) {
model.rawScript.split('\n').forEach((script: string) => {
let params = script.replace(baseScript, '').split('--')
const params = script.replace(baseScript, '').split('--')
params?.forEach((param: string) => {
let pair = param.split(' ')
const pair = param.split(' ')
if (pair && pair.length >= 2) {
if (pair[0] === 'master') {
let prefix = pair[1].substring(0, 8)
const prefix = pair[1].substring(0, 8)
if (pair[1] && (prefix === 'mesos://' || prefix === 'spark://')) {
model.master = prefix
model.masterUrl = pair[1].substring(8, pair[1].length)

2
dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-sql-type.ts

@ -19,7 +19,7 @@ import { ref, onMounted } from 'vue'
import { useI18n } from 'vue-i18n'
import type { IJsonItem } from '../types'
export function useSqlType(model: { [field: string]: any }): IJsonItem {
export function useSqlType(unusedModel: { [field: string]: any }): IJsonItem {
const { t } = useI18n()
const options = ref([] as { label: string; value: string }[])

1
dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-sqoop-target-type.ts

@ -92,7 +92,6 @@ export function useTargetType(model: { [field: string]: any }): IJsonItem[] {
watch(
() => [model.sourceType, model.srcQueryType],
([sourceType, srcQueryType]) => {
console.log(sourceType, srcQueryType)
getTargetTypesBySourceType(sourceType, srcQueryType)
}
)

2
dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-switch.ts

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { nextTick, onMounted, ref, watch } from 'vue'
import { ref, watch } from 'vue'
import { useI18n } from 'vue-i18n'
import type { IJsonItem } from '../types'
import { queryProcessDefinitionByCode } from '@/service/modules/process-definition'

4
dolphinscheduler-ui-next/src/views/projects/task/components/node/format-data.ts

@ -404,7 +404,7 @@ const buildRawScript = (model: INodeData) => {
let master = model.master
let masterUrl = model?.masterUrl ? model?.masterUrl : ''
let deployMode = model.deployMode
let queue = model.queue
const queue = model.queue
if (model.deployMode === 'local') {
master = 'local'
@ -423,7 +423,7 @@ const buildRawScript = (model: INodeData) => {
let rawScript = ''
model.resourceList?.forEach((id: number) => {
let item = find(model.resourceFiles, { id: id })
const item = find(model.resourceFiles, { id: id })
rawScript =
rawScript +

2
dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-conditions.ts

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { reactive, watch } from 'vue'
import { reactive } from 'vue'
import * as Fields from '../fields/index'
import type { IJsonItem, INodeData, ITaskData } from '../types'

3
dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-procedure.ts

@ -19,7 +19,6 @@ import { reactive } from 'vue'
import * as Fields from '../fields/index'
import type { IJsonItem, INodeData } from '../types'
import { ITaskData } from '../types'
import { useI18n } from 'vue-i18n'
export function useProcedure({
projectCode,
@ -32,8 +31,6 @@ export function useProcedure({
readonly?: boolean
data?: ITaskData
}) {
const { t } = useI18n()
const model = reactive({
name: '',
taskType: 'PROCEDURE',

2
dolphinscheduler-ui-next/src/views/projects/task/definition/components/use-move.ts

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { reactive, ref, SetupContext } from 'vue'
import { reactive, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import { useAsyncState } from '@vueuse/core'
import { querySimpleList } from '@/service/modules/process-definition'

2
dolphinscheduler-ui-next/src/views/projects/task/definition/components/use-version.ts

@ -188,7 +188,7 @@ export function useVersion() {
{ code: variables.taskCode },
{ projectCode }
).then((res: TaskDefinitionVersionRes) => {
variables.tableData = res.totalList.map((item, index) => {
variables.tableData = res.totalList.map((item, unused) => {
return {
...item
}

2
dolphinscheduler-ui-next/src/views/projects/task/definition/components/version-modal.tsx

@ -17,7 +17,7 @@
import { defineComponent, onMounted, PropType, toRefs, watch } from 'vue'
import Modal from '@/components/modal'
import { NDataTable, NPagination, useThemeVars } from 'naive-ui'
import { NDataTable, NPagination } from 'naive-ui'
import { useI18n } from 'vue-i18n'
import { useVersion } from './use-version'
import styles from './version.module.scss'

18
dolphinscheduler-ui-next/src/views/projects/task/definition/use-table.ts

@ -143,7 +143,8 @@ export function useTable(onEdit: Function) {
}
},
{
icon: () => h(NIcon, null, { default: () => h(EditOutlined) })
icon: () =>
h(NIcon, null, { default: () => h(EditOutlined) })
}
),
default: () => t('project.task.edit')
@ -169,7 +170,8 @@ export function useTable(onEdit: Function) {
}
},
{
icon: () => h(NIcon, null, { default: () => h(DragOutlined) })
icon: () =>
h(NIcon, null, { default: () => h(DragOutlined) })
}
),
default: () => t('project.task.move')
@ -192,7 +194,10 @@ export function useTable(onEdit: Function) {
}
},
{
icon: () => h(NIcon, null, { default: () => h(ExclamationCircleOutlined) })
icon: () =>
h(NIcon, null, {
default: () => h(ExclamationCircleOutlined)
})
}
),
default: () => t('project.task.version')
@ -223,7 +228,10 @@ export function useTable(onEdit: Function) {
row.processReleaseState === 'ONLINE'
},
{
icon: () => h(NIcon, null, { default: () => h(DeleteOutlined) })
icon: () =>
h(NIcon, null, {
default: () => h(DeleteOutlined)
})
}
),
default: () => t('project.task.delete')
@ -272,7 +280,7 @@ export function useTable(onEdit: Function) {
const { state } = useAsyncState(
queryTaskDefinitionListPaging({ ...params }, { projectCode }).then(
(res: TaskDefinitionRes) => {
variables.tableData = res.totalList.map((item, index) => {
variables.tableData = res.totalList.map((item, unused) => {
if (Object.keys(item.upstreamTaskMap).length > 0) {
item.upstreamTaskMap = Object.keys(item.upstreamTaskMap).map(
(code) => item.upstreamTaskMap[code]

2
dolphinscheduler-ui-next/src/views/projects/task/definition/use-task.ts

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { reactive, onMounted } from 'vue'
import { reactive } from 'vue'
import {
genTaskCodeList,
saveSingle,

2
dolphinscheduler-ui-next/src/views/projects/task/instance/components/log-modal.tsx

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { defineComponent, onMounted, PropType, toRefs, watch } from 'vue'
import { defineComponent, PropType, toRefs, watch } from 'vue'
import { useI18n } from 'vue-i18n'
import { NLog } from 'naive-ui'
import { useModal } from './use-modal'

16
dolphinscheduler-ui-next/src/views/projects/task/instance/use-table.ts

@ -31,7 +31,6 @@ import {
} from '@vicons/antd'
import { parseISO, format } from 'date-fns'
import { useRoute } from 'vue-router'
import { downloadFile } from '@/service/service'
import type { TaskInstancesRes } from '@/service/modules/task-instances/types'
export function useTable() {
@ -145,7 +144,10 @@ export function useTable() {
}
},
{
icon: () => h(NIcon, null, { default: () => h(CheckCircleOutlined) })
icon: () =>
h(NIcon, null, {
default: () => h(CheckCircleOutlined)
})
}
),
default: () => t('project.task.serial_wait')
@ -165,7 +167,10 @@ export function useTable() {
onClick: () => handleLog(row)
},
{
icon: () => h(NIcon, null, { default: () => h(AlignLeftOutlined) })
icon: () =>
h(NIcon, null, {
default: () => h(AlignLeftOutlined)
})
}
),
default: () => t('project.task.view_log')
@ -185,7 +190,8 @@ export function useTable() {
onClick: () => downloadLog(row.id)
},
{
icon: () => h(NIcon, null, { default: () => h(DownloadOutlined) })
icon: () =>
h(NIcon, null, { default: () => h(DownloadOutlined) })
}
),
default: () => t('project.task.download_log')
@ -243,7 +249,7 @@ export function useTable() {
const { state } = useAsyncState(
queryTaskListPaging(data, { projectCode }).then(
(res: TaskInstancesRes) => {
variables.tableData = res.totalList.map((item, index) => {
variables.tableData = res.totalList.map((item, unused) => {
item.submitTime = format(
parseISO(item.submitTime),
'yyyy-MM-dd HH:mm:ss'

2
dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-auto-layout-modal.tsx

@ -55,7 +55,7 @@ const props = {
export default defineComponent({
name: 'dag-format-modal',
props,
setup(props, context) {
setup(props, unusedContext) {
const { t } = useI18n()
const { formValue, formRef, submit, cancel } = props

1
dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/use-cell-update.ts

@ -64,7 +64,6 @@ export function useCellUpdate(options: Options) {
coordinate: Coordinate = { x: 100, y: 100 }
) {
if (!TASK_TYPES_MAP[type as TaskType]) {
console.warn(`taskType:${type} is invalid!`)
return
}
const node = buildNode(id, type, name, flag, coordinate)

2
dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/use-custom-cell-builder.ts

@ -44,7 +44,7 @@ export function useCustomCellBuilder() {
function buildEdge(
sourceId: string,
targetId: string,
label: string = ''
label = ''
): Edge.Metadata {
return {
shape: X6_EDGE_NAME,

1
dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/use-task-edit.ts

@ -15,7 +15,6 @@
* limitations under the License.
*/
import _ from 'lodash'
import { ref, onMounted, watch } from 'vue'
import type { Ref } from 'vue'
import type { Graph } from '@antv/x6'

2
dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/use-text-copy.ts

@ -27,7 +27,7 @@ export function useTextCopy() {
const { copy } = useClipboard()
const message = useMessage()
const copyText = (text: string) => {
copy(text).then((res) => {
copy(text).then(() => {
message.success(t('project.dag.copy_success'))
})
}

2
dolphinscheduler-ui-next/src/views/projects/workflow/definition/create/index.tsx

@ -76,7 +76,7 @@ export default defineComponent({
},
projectCode
)
.then((res: any) => {
.then((ignored: any) => {
message.success(t('project.dag.success'))
router.push({ path: `/projects/${projectCode}/workflow-definition` })
})

2
dolphinscheduler-ui-next/src/views/projects/workflow/definition/detail/index.tsx

@ -95,7 +95,7 @@ export default defineComponent({
code,
projectCode
)
.then((res: any) => {
.then((ignored: any) => {
message.success(t('project.dag.success'))
router.push({ path: `/projects/${projectCode}/workflow-definition` })
})

2
dolphinscheduler-ui-next/src/views/projects/workflow/instance/components/log-modal.tsx

@ -28,7 +28,7 @@ import {
renderSlot
} from 'vue'
import { useI18n } from 'vue-i18n'
import { dateEnGB, NButton, NIcon, NTooltip } from 'naive-ui'
import { NButton, NIcon, NTooltip } from 'naive-ui'
import { queryLog } from '@/service/modules/log'
import {
DownloadOutlined,

4
dolphinscheduler-ui-next/src/views/projects/workflow/relation/components/Graph.tsx

@ -47,8 +47,6 @@ const GraphChart = defineComponent({
const graphChartRef: Ref<HTMLDivElement | null> = ref(null)
const { t } = useI18n()
console.log(props.seriesData)
const legendData = [
{ name: t('project.workflow.online') },
{ name: t('project.workflow.workflow_offline') },
@ -56,8 +54,6 @@ const GraphChart = defineComponent({
]
const getCategory = (schedulerStatus: number, workflowStatus: number) => {
console.log(schedulerStatus, workflowStatus)
switch (true) {
case workflowStatus === 0:
return 1

1
dolphinscheduler-ui-next/src/views/projects/workflow/relation/use-relation.ts

@ -39,7 +39,6 @@ export function useRelation() {
variables.seriesData = []
variables.seriesData = obj.map((item) => {
console.log(item)
return {
name: item.workFlowName,
id: item.workFlowCode,

15
dolphinscheduler-ui-next/src/views/resource/task-group/option/components/form-modal.tsx

@ -15,15 +15,7 @@
* limitations under the License.
*/
import {
defineComponent,
PropType,
toRefs,
onMounted,
ref,
toRaw,
Ref
} from 'vue'
import { defineComponent, PropType, toRefs, onMounted, ref, Ref } from 'vue'
import { NForm, NFormItem, NInput, NSelect } from 'naive-ui'
import { useForm } from '../use-form'
import Modal from '@/components/modal'
@ -56,7 +48,10 @@ const FormModal = defineComponent({
onMounted(() => {
queryAllProjectList().then((res: any[]) => {
res.map((item) => {
let option: SelectMixedOption = { label: item.name, value: item.code }
const option: SelectMixedOption = {
label: item.name,
value: item.code
}
projectOptions.value.push(option)
})
})

4
dolphinscheduler-ui-next/src/views/resource/task-group/option/index.tsx

@ -22,9 +22,7 @@ import {
NInput,
NCard,
NDataTable,
NSwitch,
NPagination,
NTooltip
NPagination
} from 'naive-ui'
import Card from '@/components/card'
import { SearchOutlined } from '@vicons/antd'

20
dolphinscheduler-ui-next/src/views/resource/task-group/option/use-table.ts

@ -15,12 +15,9 @@
* limitations under the License.
*/
import { useAsyncState, useAsyncQueue } from '@vueuse/core'
import { h, reactive, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import { parseISO, format } from 'date-fns'
import { useRouter } from 'vue-router'
import type { Router } from 'vue-router'
import type { TableColumns } from 'naive-ui/es/data-table/src/interface'
import { queryTaskGroupListPaging } from '@/service/modules/task-group'
import { queryAllProjectList } from '@/service/modules/projects'
@ -29,17 +26,16 @@ import _ from 'lodash'
export function useTable(
updateItem = (
id: number,
name: string,
projectCode: number,
groupSize: number,
description: string,
status: number
unusedId: number,
unusedName: string,
unusedProjectCode: number,
unusedGroupSize: number,
unusedDescription: string,
unusedStatus: number
): void => {},
resetTableData = () => {}
) {
const { t } = useI18n()
const router: Router = useRouter()
const columns: TableColumns<any> = [
{ title: '#', key: 'index', render: (row, index) => index + 1 },
@ -96,10 +92,10 @@ export function useTable(
(values: any[]) => {
variables.totalPage = values[0].totalPage
variables.tableData = values[0].totalList.map(
(item: any, index: number) => {
(item: any, unused: number) => {
let projectName = ''
if (values[1]) {
let project = _.find(values[1], { code: item.projectCode })
const project = _.find(values[1], { code: item.projectCode })
if (project) {
projectName = project.name
}

12
dolphinscheduler-ui-next/src/views/resource/task-group/queue/components/form-modal.tsx

@ -15,15 +15,7 @@
* limitations under the License.
*/
import {
defineComponent,
PropType,
toRefs,
ref,
toRaw,
Ref,
onMounted
} from 'vue'
import { defineComponent, PropType, toRefs, onMounted } from 'vue'
import { NForm, NFormItem, NInput } from 'naive-ui'
import { useForm } from '../use-form'
import Modal from '@/components/modal'
@ -52,7 +44,7 @@ const FormModal = defineComponent({
})
const onConfirm = () => {
let value = state.formData.priority + ''
const value = state.formData.priority + ''
if (value) {
modifyTaskGroupQueuePriority(state.formData).then(() => {
emit('confirm')

1
dolphinscheduler-ui-next/src/views/resource/task-group/queue/components/table-action.tsx

@ -21,7 +21,6 @@ import { NSpace, NTooltip, NButton, NIcon } from 'naive-ui'
import { EditOutlined, PlayCircleOutlined } from '@vicons/antd'
import type {
TaskGroupQueueIdReq,
TaskGroupQueuePriorityUpdateReq,
TaskGroupQueue
} from '@/service/modules/task-group/types'
import { forceStartTaskInQueue } from '@/service/modules/task-group'

13
dolphinscheduler-ui-next/src/views/resource/task-group/queue/index.tsx

@ -60,14 +60,6 @@ const taskGroupQueue = defineComponent({
priority: 0
})
const requestData = () => {
getTableData({
pageSize: variables.pageSize,
pageNo: variables.page,
groupId: variables.groupId
})
}
const resetTableData = () => {
getTableData({
pageSize: variables.pageSize,
@ -120,7 +112,10 @@ const taskGroupQueue = defineComponent({
if (!searchParamRef.groupId) {
searchParamRef.groupId = item.id
}
let option: SelectMixedOption = { label: item.name, value: item.id }
const option: SelectMixedOption = {
label: item.name,
value: item.id
}
taskGroupOptions.value.push(option)
})
}

3
dolphinscheduler-ui-next/src/views/resource/task-group/queue/use-form.ts

@ -19,7 +19,6 @@ import { useI18n } from 'vue-i18n'
import { reactive, ref } from 'vue'
import type { FormRules } from 'naive-ui'
import type { TaskGroupQueuePriorityUpdateReq } from '@/service/modules/task-group/types'
import _ from 'lodash'
export function useForm() {
const { t } = useI18n()
@ -35,7 +34,7 @@ export function useForm() {
required: true,
trigger: ['input', 'blur'],
validator() {
let value = state.formData.priority + ''
const value = state.formData.priority + ''
if (value && state.formData.priority >= 0) {
} else {
return new Error(t('resource.task_group_queue.priority_not_empty'))

10
dolphinscheduler-ui-next/src/views/resource/task-group/queue/use-table.ts

@ -15,12 +15,9 @@
* limitations under the License.
*/
import { useAsyncState, useAsyncQueue } from '@vueuse/core'
import { h, reactive, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import { parseISO, format } from 'date-fns'
import { useRouter } from 'vue-router'
import type { Router } from 'vue-router'
import type { TableColumns } from 'naive-ui/es/data-table/src/interface'
import {
queryTaskGroupListPaging,
@ -30,11 +27,10 @@ import TableAction from './components/table-action'
import _ from 'lodash'
export function useTable(
updatePriority = (queueId: number, priority: number): void => {},
updatePriority = (unusedQueueId: number, unusedPriority: number): void => {},
resetTableData = () => {}
) {
const { t } = useI18n()
const router: Router = useRouter()
const columns: TableColumns<any> = [
{ title: '#', key: 'index', render: (row, index) => index + 1 },
@ -97,10 +93,10 @@ export function useTable(
const taskGroupList = values[1].totalList
variables.totalPage = values[0].totalPage
variables.tableData = values[0].totalList.map(
(item: any, index: number) => {
(item: any, unused: number) => {
let taskGroupName = ''
if (taskGroupList) {
let taskGroup = _.find(taskGroupList, { id: item.groupId })
const taskGroup = _.find(taskGroupList, { id: item.groupId })
if (taskGroup) {
taskGroupName = taskGroup.name
}

10
dolphinscheduler-ui-next/src/views/security/alarm-group-manage/use-table.ts

@ -81,7 +81,8 @@ export function useTable() {
}
},
{
icon: () => h(NIcon, null, { default: () => h(EditOutlined) })
icon: () =>
h(NIcon, null, { default: () => h(EditOutlined) })
}
),
default: () => t('security.alarm_group.edit')
@ -109,7 +110,10 @@ export function useTable() {
size: 'small'
},
{
icon: () => h(NIcon, null, { default: () => h(DeleteOutlined) })
icon: () =>
h(NIcon, null, {
default: () => h(DeleteOutlined)
})
}
),
default: () => t('security.alarm_group.delete')
@ -153,7 +157,7 @@ export function useTable() {
const getTableData = (params: any) => {
const { state } = useAsyncState(
queryAlertGroupListPaging({ ...params }).then((res: AlarmGroupRes) => {
variables.tableData = res.totalList.map((item, index) => {
variables.tableData = res.totalList.map((item, unused) => {
item.createTime = format(
parseISO(item.createTime),
'yyyy-MM-dd HH:mm:ss'

2
dolphinscheduler-ui-next/src/views/security/alarm-instance-manage/use-columns.ts

@ -50,7 +50,7 @@ export function useColumns(onCallback: Function) {
title: t('security.alarm_instance.operation'),
key: 'operation',
width: 150,
render: (rowData, rowIndex) => {
render: (rowData, unused) => {
return h(NSpace, null, {
default: () => [
h(

2
dolphinscheduler-ui-next/src/views/security/alarm-instance-manage/use-table.ts

@ -73,7 +73,7 @@ export function useTable() {
const deleteRecord = async (id: number) => {
try {
const res = await deleteAlertPluginInstance(id)
const ignored = await deleteAlertPluginInstance(id)
updateList()
} catch (e) {
window.$message.error((e as Error).message)

10
dolphinscheduler-ui-next/src/views/security/environment-manage/use-table.ts

@ -105,7 +105,8 @@ export function useTable() {
}
},
{
icon: () => h(NIcon, null, { default: () => h(EditOutlined) })
icon: () =>
h(NIcon, null, { default: () => h(EditOutlined) })
}
),
default: () => t('security.environment.edit')
@ -134,7 +135,10 @@ export function useTable() {
class: 'delete'
},
{
icon: () => h(NIcon, null, { default: () => h(DeleteOutlined) })
icon: () =>
h(NIcon, null, {
default: () => h(DeleteOutlined)
})
}
),
default: () => t('security.environment.delete')
@ -178,7 +182,7 @@ export function useTable() {
const getTableData = (params: any) => {
const { state } = useAsyncState(
queryEnvironmentListPaging({ ...params }).then((res: EnvironmentRes) => {
variables.tableData = res.totalList.map((item, index) => {
variables.tableData = res.totalList.map((item, unused) => {
item.createTime = format(
parseISO(item.createTime),
'yyyy-MM-dd HH:mm:ss'

6
dolphinscheduler-ui-next/src/views/security/k8s-namespace-manage/components/use-modal.ts

@ -87,9 +87,11 @@ export function useModal(
}
const updateK8SNamespaceModal = () => {
updateK8sNamespace(variables.model, variables.model.id).then((res: any) => {
updateK8sNamespace(variables.model, variables.model.id).then(
(ignored: any) => {
ctx.emit('confirmModal', props.showModalRef)
})
}
)
}
return {

10
dolphinscheduler-ui-next/src/views/security/k8s-namespace-manage/use-table.ts

@ -113,7 +113,8 @@ export function useTable() {
}
},
{
icon: () => h(NIcon, null, { default: () => h(EditOutlined) })
icon: () =>
h(NIcon, null, { default: () => h(EditOutlined) })
}
),
default: () => t('security.k8s_namespace.edit')
@ -141,7 +142,10 @@ export function useTable() {
size: 'small'
},
{
icon: () => h(NIcon, null, { default: () => h(DeleteOutlined) })
icon: () =>
h(NIcon, null, {
default: () => h(DeleteOutlined)
})
}
),
default: () => t('security.k8s_namespace.delete')
@ -172,7 +176,7 @@ export function useTable() {
const getTableData = (params: any) => {
const { state } = useAsyncState(
queryNamespaceListPaging({ ...params }).then((res: NamespaceListRes) => {
variables.tableData = res.totalList.map((item, index) => {
variables.tableData = res.totalList.map((item, unused) => {
item.createTime = format(
parseISO(item.createTime),
'yyyy-MM-dd HH:mm:ss'

2
dolphinscheduler-ui-next/src/views/security/tenant-manage/components/tenant-modal.tsx

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { defineComponent, onMounted, PropType, toRefs, watch } from 'vue'
import { defineComponent, PropType, toRefs, watch } from 'vue'
import Modal from '@/components/modal'
import { NForm, NFormItem, NInput, NSelect } from 'naive-ui'
import { useModalData } from './use-modalData'

8
dolphinscheduler-ui-next/src/views/security/tenant-manage/components/use-modalData.ts

@ -76,19 +76,19 @@ export function useModalData(
const submitTenantModal = () => {
verifyTenantCode({ tenantCode: variables.model.tenantCode }).then(
(res: any) => {
(unused: any) => {
const data = {
tenantCode: variables.model.tenantCode,
queueId: variables.model.queueId,
description: variables.model.description
}
createTenant(data).then(
(res: any) => {
(unused: any) => {
variables.model.tenantCode = ''
variables.model.description = ''
ctx.emit('confirmModal', props.showModalRef)
},
(err: any) => {
(unused: any) => {
return
}
)
@ -103,7 +103,7 @@ export function useModalData(
description: variables.model.description,
id: variables.model.id
}
updateTenant(data, { id: variables.model.id }).then((res: any) => {
updateTenant(data, { id: variables.model.id }).then((unused: any) => {
ctx.emit('confirmModal', props.showModalRef)
})
}

10
dolphinscheduler-ui-next/src/views/security/tenant-manage/use-table.ts

@ -98,7 +98,8 @@ export function useTable() {
}
},
{
icon: () => h(NIcon, null, { default: () => h(EditOutlined) })
icon: () =>
h(NIcon, null, { default: () => h(EditOutlined) })
}
),
default: () => t('security.tenant.edit')
@ -127,7 +128,10 @@ export function useTable() {
class: 'delete'
},
{
icon: () => h(NIcon, null, { default: () => h(DeleteOutlined) })
icon: () =>
h(NIcon, null, {
default: () => h(DeleteOutlined)
})
}
),
default: () => t('security.tenant.delete')
@ -158,7 +162,7 @@ export function useTable() {
const getTableData = (params: any) => {
const { state } = useAsyncState(
queryTenantListPaging({ ...params }).then((res: any) => {
variables.tableData = res.totalList.map((item: any, index: number) => {
variables.tableData = res.totalList.map((item: any, unused: number) => {
return {
...item
}

2
dolphinscheduler-ui-next/src/views/security/token-manage/components/use-modal.ts

@ -20,14 +20,12 @@ import { useI18n } from 'vue-i18n'
import { useUserStore } from '@/store/user/user'
import { useAsyncState } from '@vueuse/core'
import { format } from 'date-fns'
import { queryAlertPluginInstanceList } from '@/service/modules/alert-plugin'
import { listAll } from '@/service/modules/users'
import {
generateToken,
createToken,
updateToken
} from '@/service/modules/token'
import type { AlertPluginItem } from '@/service/modules/alert-plugin/types'
import type { UserListRes } from '@/service/modules/users/types'
import type { UserInfoRes } from '@/service/modules/users/types'

15
dolphinscheduler-ui-next/src/views/security/token-manage/use-table.ts

@ -20,13 +20,8 @@ import { reactive, h, ref } from 'vue'
import { parseISO, format } from 'date-fns'
import { NButton, NIcon, NPopconfirm, NSpace, NTooltip } from 'naive-ui'
import { useI18n } from 'vue-i18n'
import {
queryAlertGroupListPaging,
delAlertGroupById
} from '@/service/modules/alert-group'
import { DeleteOutlined, EditOutlined } from '@vicons/antd'
import { queryAccessTokenList, deleteToken } from '@/service/modules/token'
import type { AlarmGroupRes } from '@/service/modules/alert-group/types'
import type { TokenRes } from '@/service/modules/token/types'
export function useTable() {
@ -90,7 +85,8 @@ export function useTable() {
}
},
{
icon: () => h(NIcon, null, { default: () => h(EditOutlined) })
icon: () =>
h(NIcon, null, { default: () => h(EditOutlined) })
}
),
default: () => t('security.token.edit')
@ -119,7 +115,10 @@ export function useTable() {
class: 'delete'
},
{
icon: () => h(NIcon, null, { default: () => h(DeleteOutlined) })
icon: () =>
h(NIcon, null, {
default: () => h(DeleteOutlined)
})
}
),
default: () => t('security.token.delete')
@ -163,7 +162,7 @@ export function useTable() {
const getTableData = (params: any) => {
const { state } = useAsyncState(
queryAccessTokenList({ ...params }).then((res: TokenRes) => {
variables.tableData = res.totalList.map((item, index) => {
variables.tableData = res.totalList.map((item, unused) => {
item.expireTime = format(
parseISO(item.expireTime),
'yyyy-MM-dd HH:mm:ss'

4
dolphinscheduler-ui-next/src/views/security/user-manage/use-table.tsx

@ -61,7 +61,7 @@ function useColumns({ onEdit, onDelete }: UseTableProps) {
{
title: t('security.user.state'),
key: 'state',
render: (rowData: any, rowIndex: number) => {
render: (rowData: any, unused: number) => {
return rowData.state === 1 ? (
<NTag type='success'>{t('security.user.state_enabled')}</NTag>
) : (
@ -84,7 +84,7 @@ function useColumns({ onEdit, onDelete }: UseTableProps) {
key: 'operation',
fixed: 'right',
width: 140,
render: (rowData: any, rowIndex: number) => {
render: (rowData: any, unused: number) => {
return (
<NSpace>
<NDropdown

10
dolphinscheduler-ui-next/src/views/security/worker-group-manage/use-table.ts

@ -102,7 +102,8 @@ export function useTable() {
}
},
{
icon: () => h(NIcon, null, { default: () => h(EditOutlined) })
icon: () =>
h(NIcon, null, { default: () => h(EditOutlined) })
}
),
default: () => t('security.worker_group.edit')
@ -131,7 +132,10 @@ export function useTable() {
class: 'delete'
},
{
icon: () => h(NIcon, null, { default: () => h(DeleteOutlined) })
icon: () =>
h(NIcon, null, {
default: () => h(DeleteOutlined)
})
}
),
default: () => t('security.worker_group.delete')
@ -175,7 +179,7 @@ export function useTable() {
const getTableData = (params: any) => {
const { state } = useAsyncState(
queryAllWorkerGroupsPaging({ ...params }).then((res: WorkerGroupRes) => {
variables.tableData = res.totalList.map((item, index) => {
variables.tableData = res.totalList.map((item, unused) => {
return {
...item
}

2
dolphinscheduler-ui-next/src/views/security/yarn-queue-manage/components/use-modal.ts

@ -76,7 +76,7 @@ export function useModal(
const updateYarnQueueModal = () => {
updateQueue({ ...variables.model }, { id: variables.model.id }).then(
(res: any) => {
(ignored: any) => {
ctx.emit('confirmModal', props.showModalRef)
}
)

5
dolphinscheduler-ui-next/src/views/security/yarn-queue-manage/use-table.ts

@ -77,7 +77,8 @@ export function useTable() {
}
},
{
icon: () => h(NIcon, null, { default: () => h(EditOutlined) })
icon: () =>
h(NIcon, null, { default: () => h(EditOutlined) })
}
),
default: () => t('security.yarn_queue.edit')
@ -103,7 +104,7 @@ export function useTable() {
const getTableData = (params: any) => {
const { state } = useAsyncState(
queryQueueListPaging({ ...params }).then((res: QueueRes) => {
variables.tableData = res.totalList.map((item, index) => {
variables.tableData = res.totalList.map((item, unused) => {
return {
...item
}

Loading…
Cancel
Save