mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-13 11:24:17 +00:00
feat: Cloud 支持局域网 IP 扫描
This commit is contained in:
committed by
Jiangjie.Bai
parent
db97240ad3
commit
c4d0462362
@@ -1402,6 +1402,7 @@
|
||||
"OpenStack": "OpenStack",
|
||||
"GCP": "Google Cloud Platform",
|
||||
"FC": "Fusion Compute",
|
||||
"LAN": "LAN",
|
||||
"AWS_China": "AWS(China)",
|
||||
"AWS_Int": "AWS(International)",
|
||||
"HuaweiCloud": "Huawei Cloud",
|
||||
|
||||
@@ -1445,6 +1445,7 @@
|
||||
"OpenStack": "OpenStack",
|
||||
"GCP": "Googleクラウド",
|
||||
"FC": "Fusion Compute",
|
||||
"LAN": "ローカルエリアネットワーク",
|
||||
"AWS_China": "AWS(中国)",
|
||||
"AWS_Int": "AWS (国際)",
|
||||
"HuaweiCloud": "ファーウェイ雲",
|
||||
|
||||
@@ -1446,6 +1446,7 @@
|
||||
"OpenStack": "OpenStack",
|
||||
"GCP": "谷歌云",
|
||||
"FC": "Fusion Compute",
|
||||
"LAN": "局域网",
|
||||
"AWS_China": "AWS(中国)",
|
||||
"AWS_Int": "AWS(国际)",
|
||||
"HuaweiCloud": "华为云",
|
||||
|
||||
@@ -76,7 +76,25 @@ export default {
|
||||
attrs[item] = encryptPassword(value)
|
||||
}
|
||||
}
|
||||
const toListFields = ['ip_group']
|
||||
for (const item of toListFields) {
|
||||
const value = attrs[item]
|
||||
attrs[item] = value?.split(',') || []
|
||||
}
|
||||
return values
|
||||
},
|
||||
afterGetFormValue(formValue) {
|
||||
// 这里有点奇怪获取回来的表单数据是这样的: port 不知怎么来的
|
||||
// port: 443
|
||||
// provider: "lan"
|
||||
// validity: false
|
||||
if (!formValue.attrs) {
|
||||
return formValue
|
||||
}
|
||||
if (Array.isArray(formValue.attrs.ip_group)) {
|
||||
formValue.attrs.ip_group = formValue.attrs.ip_group.toString()
|
||||
}
|
||||
return formValue
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<script type="text/jsx">
|
||||
import GenericListTable from '@/layout/components/GenericListTable'
|
||||
import { ACCOUNT_PROVIDER_ATTRS_MAP, aliyun, aws_china, aws_international, huaweicloud, qcloud, azure, azure_international, vmware, nutanix, qingcloud_private, huaweicloud_private, openstack, gcp, baiducloud, jdcloud, fc } from '../const'
|
||||
import { ACCOUNT_PROVIDER_ATTRS_MAP, aliyun, aws_china, aws_international, huaweicloud, qcloud, azure, azure_international, vmware, nutanix, qingcloud_private, huaweicloud_private, openstack, gcp, baiducloud, jdcloud, fc, lan } from '../const'
|
||||
|
||||
export default {
|
||||
name: 'AccountList',
|
||||
@@ -138,6 +138,10 @@ export default {
|
||||
{
|
||||
name: fc,
|
||||
title: ACCOUNT_PROVIDER_ATTRS_MAP[fc].title
|
||||
},
|
||||
{
|
||||
name: lan,
|
||||
title: ACCOUNT_PROVIDER_ATTRS_MAP[lan].title
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ export const gcp = 'gcp'
|
||||
export const fc = 'fc'
|
||||
export const baiducloud = 'baiducloud'
|
||||
export const jdcloud = 'jdcloud'
|
||||
export const lan = 'lan'
|
||||
|
||||
export const ACCOUNT_PROVIDER_ATTRS_MAP = {
|
||||
[aliyun]: {
|
||||
@@ -97,5 +98,10 @@ export const ACCOUNT_PROVIDER_ATTRS_MAP = {
|
||||
name: fc,
|
||||
title: i18n.t('xpack.Cloud.FC'),
|
||||
attrs: ['api_endpoint', 'username', 'password']
|
||||
},
|
||||
[lan]: {
|
||||
name: lan,
|
||||
title: i18n.t('xpack.Cloud.LAN'),
|
||||
attrs: ['ip_group', 'test_port', 'platform', 'hostname_prefix']
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user