[Feature]The utils configuration files are centrally managed under common (#9706)
parent
48d526f275
commit
7382284b7d
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { timezoneList } from '@/utils/timezone'
|
||||
import { timezoneList } from '@/common/timezone'
|
||||
|
||||
type Timezone = typeof timezoneList[number]
|
||||
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ import {
|
|||
COLUMN_WIDTH_CONFIG,
|
||||
calculateTableWidth,
|
||||
DefaultTableWidth
|
||||
} from '@/utils/column-width-config'
|
||||
} from '@/common/column-width-config'
|
||||
import type {
|
||||
TaskDefinitionItem,
|
||||
TaskDefinitionRes
|
||||
|
|
|
|||
|
|
@ -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({
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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({
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
@ -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'
|
||||
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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 => {},
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -29,12 +29,12 @@ import type {
|
|||
NamespaceListRes,
|
||||
NamespaceItem
|
||||
} from '@/service/modules/k8s-namespace/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()
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import {
|
|||
COLUMN_WIDTH_CONFIG,
|
||||
calculateTableWidth,
|
||||
DefaultTableWidth
|
||||
} from '@/utils/column-width-config'
|
||||
} from '@/common/column-width-config'
|
||||
|
||||
export function useTable() {
|
||||
const { t } = useI18n()
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import { NButton, NIcon, NPopconfirm, NSpace, NTooltip } from 'naive-ui'
|
|||
import { useI18n } from 'vue-i18n'
|
||||
import { DeleteOutlined, EditOutlined } from '@vicons/antd'
|
||||
import { queryAccessTokenList, deleteToken } from '@/service/modules/token'
|
||||
import { parseTime } from '@/utils/common'
|
||||
import { parseTime } from '@/common/common'
|
||||
import type { TokenRes } from '@/service/modules/token/types'
|
||||
|
||||
export function useTable() {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ import {
|
|||
COLUMN_WIDTH_CONFIG,
|
||||
calculateTableWidth,
|
||||
DefaultTableWidth
|
||||
} from '@/utils/column-width-config'
|
||||
} from '@/common/column-width-config'
|
||||
import type { TableColumns, InternalRowData } from './types'
|
||||
|
||||
export function useColumns(onCallback: Function) {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
import { reactive, onMounted } from 'vue'
|
||||
import { queryUserList, delUserById } from '@/service/modules/users'
|
||||
import { format } from 'date-fns'
|
||||
import { parseTime } from '@/utils/common'
|
||||
import { parseTime } from '@/common/common'
|
||||
import type { IRecord, TAuthType } from './types'
|
||||
|
||||
export function useTable() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue