Skip to content

Commit

Permalink
[Feature]The utils configuration files are centrally managed under co…
Browse files Browse the repository at this point in the history
…mmon (#9706)
  • Loading branch information
labbomb authored Apr 24, 2022
1 parent 48d526f commit 7382284
Show file tree
Hide file tree
Showing 46 changed files with 54 additions and 54 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import {
} from '@vicons/antd'
import { useRoute } from 'vue-router'
import { useUserStore } from '@/store/user/user'
import { timezoneList } from '@/utils/timezone'
import { timezoneList } from '@/common/timezone'
import type { UserInfoRes } from '@/service/modules/users/types'

export function useDataList() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { ITaskState } from '@/utils/types'
import type { ITaskState } from '@/common/types'

interface CodeReq {
projectCode: number
Expand Down
2 changes: 1 addition & 1 deletion dolphinscheduler-ui-next/src/store/timezone/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import { timezoneList } from '@/utils/timezone'
import { timezoneList } from '@/common/timezone'

type Timezone = typeof timezoneList[number]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import TableAction from './components/table-action'
import _ from 'lodash'
import { format } from 'date-fns'
import { TableColumns } from 'naive-ui/es/data-table/src/interface'
import { parseTime } from '@/utils/common'
import { parseTime } from '@/common/common'

export function useTable(viewRuleEntry = (unusedRuleJson: string): void => {}) {
const { t } = useI18n()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ import {
COLUMN_WIDTH_CONFIG,
calculateTableWidth,
DefaultTableWidth
} from '@/utils/column-width-config'
} from '@/common/column-width-config'
import type {
ResultItem,
ResultListRes
} from '@/service/modules/data-quality/types'
import { parseTime } from '@/utils/common'
import { parseTime } from '@/common/common'

export function useTable() {
const { t } = useI18n()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
COLUMN_WIDTH_CONFIG,
calculateTableWidth,
DefaultTableWidth
} from '@/utils/column-width-config'
} from '@/common/column-width-config'
import type { TableColumns } from './types'

export function useColumns(onCallback: Function) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { reactive, ref } from 'vue'
import { useAsyncState } from '@vueuse/core'
import { queryAuditLogListPaging } from '@/service/modules/audit'
import { format } from 'date-fns'
import { parseTime } from '@/utils/common'
import { parseTime } from '@/common/common'
import type { AuditListRes } from '@/service/modules/audit/types'

export function useTable() {
Expand Down
4 changes: 2 additions & 2 deletions dolphinscheduler-ui-next/src/views/projects/list/use-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { useI18n } from 'vue-i18n'
import { useAsyncState } from '@vueuse/core'
import ButtonLink from '@/components/button-link'
import { queryProjectListPaging } from '@/service/modules/projects'
import { parseTime } from '@/utils/common'
import { parseTime } from '@/common/common'
import { deleteProject } from '@/service/modules/projects'
import { format } from 'date-fns'
import { useRouter } from 'vue-router'
Expand All @@ -36,7 +36,7 @@ import {
COLUMN_WIDTH_CONFIG,
calculateTableWidth,
DefaultTableWidth
} from '@/utils/column-width-config'
} from '@/common/column-width-config'
import type { Router } from 'vue-router'
import type { ProjectRes } from '@/service/modules/projects/types'
import { DeleteOutlined, EditOutlined } from '@vicons/antd'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { NIcon } from 'naive-ui'
import { useRelationCustomParams, useDependentTimeout } from '.'
import { useTaskNodeStore } from '@/store/project/task-node'
import { queryAllProjectList } from '@/service/modules/projects'
import { tasksState } from '@/utils/common'
import { tasksState } from '@/common/common'
import {
queryProcessDefinitionList,
getTasksByDefinitionList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export type {
WorkflowInstance
} from '@/views/projects/workflow/components/dag/types'
export type { IResource, ProgramType, IMainJar } from '@/store/project/types'
export type { ITaskState } from '@/utils/types'
export type { ITaskState } from '@/common/types'

type SourceType = 'MYSQL' | 'HDFS' | 'HIVE'
type ModelType = 'import' | 'export'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import {
COLUMN_WIDTH_CONFIG,
calculateTableWidth,
DefaultTableWidth
} from '@/utils/column-width-config'
} from '@/common/column-width-config'
import type {
TaskDefinitionItem,
TaskDefinitionRes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import Card from '@/components/card'
import LogModal from '@/components/log-modal'
import { useAsyncState } from '@vueuse/core'
import { queryLog } from '@/service/modules/log'
import { stateType } from '@/utils/common'
import { stateType } from '@/common/common'
import styles from './index.module.scss'

const TaskInstance = defineComponent({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ITaskState } from '@/utils/types'
import { ITaskState } from '@/common/types'

export type { Router } from 'vue-router'
export type { TaskInstancesRes } from '@/service/modules/task-instances/types'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ import {
} from '@vicons/antd'
import { format } from 'date-fns'
import { useRoute, useRouter } from 'vue-router'
import { parseTime, tasksState } from '@/utils/common'
import { parseTime, tasksState } from '@/common/common'
import {
COLUMN_WIDTH_CONFIG,
calculateTableWidth,
DefaultTableWidth
} from '@/utils/column-width-config'
} from '@/common/column-width-config'
import type { Router, TaskInstancesRes, IRecord, ITaskState } from './types'

export function useTable() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { defineComponent, onMounted, PropType, inject, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import { useRoute } from 'vue-router'
import styles from './menu.module.scss'
import { uuid } from '@/utils/common'
import { uuid } from '@/common/common'
import { IWorkflowTaskInstance } from './types'

const props = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { defineComponent, onMounted, PropType, ref, computed } from 'vue'
import { useI18n } from 'vue-i18n'
import { listAlertGroupById } from '@/service/modules/alert-group'
import { queryAllWorkerGroups } from '@/service/modules/worker-groups'
import { runningType, warningTypeList } from '@/utils/common'
import { runningType, warningTypeList } from '@/common/common'
import { IStartupParam } from './types'
import styles from './startup.module.scss'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

import { TaskType } from '@/views/projects/task/constants/task-type'
export type { ITaskState } from '@/utils/types'
export type { ITaskState } from '@/common/types'

export interface ProcessDefinition {
id: number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import { render, h, ref } from 'vue'
import { useRoute } from 'vue-router'
import { useI18n } from 'vue-i18n'
import { tasksState } from '@/utils/common'
import { tasksState } from '@/common/common'
import { NODE, NODE_STATUS_MARKUP } from './dag-config'
import { queryTaskListByProcessId } from '@/service/modules/process-instances'
import NodeStatus from '@/views/projects/workflow/components/dag/dag-node-status'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import {
NPopover
} from 'naive-ui'
import { ArrowDownOutlined, ArrowUpOutlined } from '@vicons/antd'
import { timezoneList } from '@/utils/timezone'
import { timezoneList } from '@/common/timezone'
import Crontab from '@/components/crontab'

const props = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import {
updateSchedule,
previewSchedule
} from '@/service/modules/schedules'
import { parseTime } from '@/utils/common'
import { parseTime } from '@/common/common'
import { EnvironmentItem } from '@/service/modules/environment/types'
import { ITimingState } from './types'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import {
COLUMN_WIDTH_CONFIG,
calculateTableWidth,
DefaultTableWidth
} from '@/utils/column-width-config'
} from '@/common/column-width-config'
import { format } from 'date-fns-tz'
import { ISearchParam } from './types'
import styles from '../index.module.scss'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 { tasksState } from '@/utils/common'
import { tasksState } from '@/common/common'
import type { ITaskTypeNodeOption } from './types'

export default defineComponent({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import {
COLUMN_WIDTH_CONFIG,
calculateTableWidth,
DefaultTableWidth
} from '@/utils/column-width-config'
} from '@/common/column-width-config'
import type { IDefinitionParam } from './types'
import type { Router } from 'vue-router'
import type { TableColumns, RowKey } from 'naive-ui/es/data-table/src/interface'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
import { defineComponent, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import { format } from 'date-fns'
import { stateType } from '@/utils/common'
import { stateType } from '@/common/common'

export default defineComponent({
name: 'ProcessInstanceCondition',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import * as echarts from 'echarts'
import type { Ref } from 'vue'
import { useI18n } from 'vue-i18n'
import initChart from '@/components/chart'
import { tasksState } from '@/utils/common'
import { tasksState } from '@/common/common'
import { format } from 'date-fns'
import { parseTime } from '@/utils/common'
import { parseTime } from '@/common/common'
import type { ISeriesData, ITaskState } from '../type'

const props = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ITaskState } from '@/utils/types'
import { ITaskState } from '@/common/types'

interface ITask {
taskName: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ import {
} from '@/service/modules/process-instances'
import { execute } from '@/service/modules/executors'
import TableAction from './components/table-action'
import { runningType } from '@/utils/common'
import { parseTime } from '@/utils/common'
import { runningType } from '@/common/common'
import { parseTime } from '@/common/common'
import styles from './index.module.scss'
import { renderStateCell } from '../../task/instance/use-table'
import {
COLUMN_WIDTH_CONFIG,
calculateTableWidth,
DefaultTableWidth
} from '@/utils/column-width-config'
} from '@/common/column-width-config'
import type { Router } from 'vue-router'
import type { IWorkflowInstance } from '@/service/modules/process-instances/types'
import type { ICountDownParam } from './types'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import Card from '@/components/card'
import MonacoEditor from '@/components/monaco-editor'
import { useCreate } from './use-create'
import { useForm } from './use-form'
import { fileTypeArr } from '@/utils/common'
import { fileTypeArr } from '@/common/common'

import styles from '../index.module.scss'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
import _ from 'lodash'
import { useI18n } from 'vue-i18n'
import { ResourceFileTableData } from '../types'
import { fileTypeArr } from '@/utils/common'
import { fileTypeArr } from '@/common/common'
import { downloadResource, deleteResource } from '@/service/modules/resources'
import { IRenameFile, IRtDisb } from '../types'
import type { Router } from 'vue-router'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import { h } from 'vue'
import { useI18n } from 'vue-i18n'
import { useRouter } from 'vue-router'
import { bytesToSize } from '@/utils/common'
import { bytesToSize } from '@/common/common'
import { useFileStore } from '@/store/file/file'
import TableAction from './table-action'
import { IRenameFile } from '../types'
Expand All @@ -27,7 +27,7 @@ import {
COLUMN_WIDTH_CONFIG,
calculateTableWidth,
DefaultTableWidth
} from '@/utils/column-width-config'
} from '@/common/column-width-config'
import type { Router } from 'vue-router'
import type { TableColumns } from 'naive-ui/es/data-table/src/interface'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ import { queryTaskGroupListPaging } from '@/service/modules/task-group'
import { queryAllProjectList } from '@/service/modules/projects'
import TableAction from './components/table-action'
import _ from 'lodash'
import { parseTime } from '@/utils/common'
import { parseTime } from '@/common/common'
import {
COLUMN_WIDTH_CONFIG,
calculateTableWidth,
DefaultTableWidth
} from '@/utils/column-width-config'
} from '@/common/column-width-config'
import type { TableColumns } from 'naive-ui/es/data-table/src/interface'

export function useTable(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import {
COLUMN_WIDTH_CONFIG,
calculateTableWidth,
DefaultTableWidth
} from '@/utils/column-width-config'
import { parseTime } from '@/utils/common'
} from '@/common/column-width-config'
import { parseTime } from '@/common/common'

export function useTable(
updatePriority = (unusedQueueId: number, unusedPriority: number): void => {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
COLUMN_WIDTH_CONFIG,
calculateTableWidth,
DefaultTableWidth
} from '@/utils/column-width-config'
} from '@/common/column-width-config'
import type { IUdfFunctionParam } from './types'

export function useTable() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import { h, ref, reactive } from 'vue'
import { useI18n } from 'vue-i18n'
import { useRouter } from 'vue-router'
import { bytesToSize } from '@/utils/common'
import { bytesToSize } from '@/common/common'
import { useFileStore } from '@/store/file/file'
import type { Router } from 'vue-router'
import type { TableColumns } from 'naive-ui/es/data-table/src/interface'
Expand All @@ -36,7 +36,7 @@ import {
COLUMN_WIDTH_CONFIG,
calculateTableWidth,
DefaultTableWidth
} from '@/utils/column-width-config'
} from '@/common/column-width-config'
import type { IUdfResourceParam } from './types'

const goSubFolder = (router: Router, item: any) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
delAlertGroupById
} from '@/service/modules/alert-group'
import { DeleteOutlined, EditOutlined } from '@vicons/antd'
import { parseTime } from '@/utils/common'
import { parseTime } from '@/common/common'
import type { AlarmGroupRes } from '@/service/modules/alert-group/types'

export function useTable() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
deleteAlertPluginInstance
} from '@/service/modules/alert-plugin'
import { format } from 'date-fns'
import { parseTime } from '@/utils/common'
import { parseTime } from '@/common/common'
import type { IRecord } from './types'

export function useTable() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ import type {
EnvironmentRes,
EnvironmentItem
} from '@/service/modules/environment/types'
import { parseTime } from '@/utils/common'
import { parseTime } from '@/common/common'
import {
COLUMN_WIDTH_CONFIG,
calculateTableWidth,
DefaultTableWidth
} from '@/utils/column-width-config'
} from '@/common/column-width-config'

export function useTable() {
const { t } = useI18n()
Expand Down
Loading

0 comments on commit 7382284

Please sign in to comment.