Skip to content

Commit

Permalink
feat: 一键迁移添加nexus默认配置
Browse files Browse the repository at this point in the history
  • Loading branch information
wanghao7717 committed Jan 13, 2025
1 parent 5074b62 commit 1143c1d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
8 changes: 4 additions & 4 deletions platform-core/config/menu-api-map.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
"method": "get"
},
{
"url": "platform/v1/models",
"url": "/platform/v1/models",
"method": "get"
},
{
Expand Down Expand Up @@ -188,7 +188,7 @@
"method": "post"
},
{
"url": "platform/v1/plugins/objectmetas/id/${objectMetaId}",
"url": "/platform/v1/plugins/objectmetas/id/${objectMetaId}",
"method": "get"
},
{
Expand Down Expand Up @@ -226,7 +226,7 @@
"method": "get"
},
{
"url": "/platform/v1/packages?all=${isRetrieveAllPluginPackages}",
"url": "/platform/v1/packages",
"method": "get"
},
{
Expand Down Expand Up @@ -1095,7 +1095,7 @@
},
{
"key": "getNexusConfig",
"url": "/platform/v1/resource/items/nexus",
"url": "/platform/v1/data/transfer/export/nexus",
"method": "GET"
}
]
Expand Down
2 changes: 1 addition & 1 deletion wecube-portal/src/api/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ export const addCustomer = data => req.post('/platform/v1/data/transfer/export/c
// 删除客户
export const deleteCustomer = id => req.delete(`/platform/v1/data/transfer/export/customer?id=${id}`)
// 获取nexus配置详情
export const getNexusConfig = () => req.get('/platform/v1/resource/items/nexus')
export const getNexusConfig = () => req.get('/platform/v1/data/transfer/export/nexus')

// 资源管理-资源实例重构
// 新增资源实例
Expand Down
2 changes: 1 addition & 1 deletion wecube-portal/src/api/server.json
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,7 @@
},
{
"key": "getNexusConfig",
"path": "/platform/v1/resource/items/nexus",
"path": "/platform/v1/data/transfer/export/nexus",
"method": "get",
"description": "获取nexus配置"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: wanghao7717 792974788@qq.com
* @Date: 2025-01-07 20:01:01
* @LastEditors: wanghao7717 792974788@qq.com
* @LastEditTime: 2025-01-13 14:57:28
* @LastEditTime: 2025-01-13 15:21:35
-->
<template>
<BaseDrawer
Expand Down Expand Up @@ -65,15 +65,15 @@
prop="name"
:rules="{required: true, message: $t('fe_can_not_be_empty'), trigger: 'blur'}"
>
<Input v-model.trim="form.name" :maxlength="200" />
<Input v-model.trim="form.name" :maxlength="100" />
</FormItem>
<!--nexus地址-->
<FormItem
:label="$t('pi_nexus_address')"
prop="nexusAddr"
:rules="{required: true, message: $t('fe_can_not_be_empty'), trigger: 'blur'}"
>
<Input v-model.trim="form.nexusAddr" :maxlength="100" />
<Input v-model.trim="form.nexusAddr" :maxlength="200" />
</FormItem>
<!--nexus账号-->
<FormItem
Expand Down Expand Up @@ -150,7 +150,11 @@ export default {
async handleInitCustomInfo() {
const { status, data } = await getNexusConfig()
if (status === 'OK') {
this.form = Object.assign({}, this.form, data)
const { nexusUser, nexusPwd, nexusUrl, nexusRepo } = data || {}
this.form.nexusAddr = nexusUrl
this.form.nexusAccount = nexusUser
this.form.nexusPwd = nexusPwd
this.form.nexusRepo = nexusRepo
}
},
// 获取目标客户列表
Expand Down

0 comments on commit 1143c1d

Please sign in to comment.