chore: 解决 jenkins 报错问题
parent
d29909f6ab
commit
f64fb71c66
|
@ -13,6 +13,6 @@ const codeMap = new Map([
|
||||||
])
|
])
|
||||||
const vueFiles = require.context('./', true, /\.vue$/)
|
const vueFiles = require.context('./', true, /\.vue$/)
|
||||||
export const components = getModules(vueFiles)
|
export const components = getModules(vueFiles)
|
||||||
export function getCurrentComponent(type: string) {
|
export function getCurrentComponent(type) {
|
||||||
return codeMap.get(type) || `${type.toLowerCase()}-module`
|
return codeMap.get(type) || `${type.toLowerCase()}-module`
|
||||||
}
|
}
|
|
@ -13,6 +13,6 @@ const codeMap = new Map([
|
||||||
])
|
])
|
||||||
const vueFiles = require.context('./', true, /\.vue$/)
|
const vueFiles = require.context('./', true, /\.vue$/)
|
||||||
export const optionComponents = getModules(vueFiles)
|
export const optionComponents = getModules(vueFiles)
|
||||||
export function getCurrentOptionComponent(type: string) {
|
export function getCurrentOptionComponent(type) {
|
||||||
return codeMap.get(type) || `${type.toLowerCase()}-option`
|
return codeMap.get(type) || `${type.toLowerCase()}-option`
|
||||||
}
|
}
|
|
@ -7,7 +7,7 @@ const vueFiles = require.context('./', true, /\.vue$/)
|
||||||
export const components = getModules(vueFiles)
|
export const components = getModules(vueFiles)
|
||||||
|
|
||||||
// 优先在map里取值, 组件命名规范 task.software.nginx => NginxNode task.software.iscsi.client=>IscsiClient
|
// 优先在map里取值, 组件命名规范 task.software.nginx => NginxNode task.software.iscsi.client=>IscsiClient
|
||||||
export function getCurrentComponent(code: string) {
|
export function getCurrentComponent(code) {
|
||||||
const [f, s = 'Node'] = code.split('task.maintain.')[1].split('.')
|
const [f, s = 'Node'] = code.split('task.maintain.')[1].split('.')
|
||||||
// 自定义组件
|
// 自定义组件
|
||||||
if (code.includes('task.maintain.custom')) return 'CustomNode'
|
if (code.includes('task.maintain.custom')) return 'CustomNode'
|
|
@ -17,7 +17,7 @@ const vueFiles = require.context('./', true, /\.vue$/)
|
||||||
export const components = getModules(vueFiles)
|
export const components = getModules(vueFiles)
|
||||||
|
|
||||||
// 优先在map里取值, 组件命名规范 task.software.nginx => NginxItem task.software.iscsi.client=>IscsiClient
|
// 优先在map里取值, 组件命名规范 task.software.nginx => NginxItem task.software.iscsi.client=>IscsiClient
|
||||||
export function getCurrentComponent(code: string) {
|
export function getCurrentComponent(code) {
|
||||||
const [f, s = 'Item'] = code.split('task.software.')[1].split('.')
|
const [f, s = 'Item'] = code.split('task.software.')[1].split('.')
|
||||||
return codeMap.get(code) || `${upperFirst(f)}${upperFirst(s)}`
|
return codeMap.get(code) || `${upperFirst(f)}${upperFirst(s)}`
|
||||||
}
|
}
|
|
@ -27,6 +27,6 @@
|
||||||
},
|
},
|
||||||
"lib": ["esnext", "dom", "dom.iterable", "scripthost"]
|
"lib": ["esnext", "dom", "dom.iterable", "scripthost"]
|
||||||
},
|
},
|
||||||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "tests/**/*.ts", "tests/**/*.tsx"],
|
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "tests/**/*.ts", "tests/**/*.tsx", "src/views/task/graph/maintain/components/index.js", "src/views/task/graph/software/components/index.js", "src/views/config/component-manage/create/options/index.js"],
|
||||||
"exclude": ["node_modules"]
|
"exclude": ["node_modules"]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue