Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions frontend/packages/common/src/locales/keyHashMap.json
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,8 @@
"AI 代理集成": "Ke6908f16",
"请先订阅该服务": "K71ed51fa",
"申请": "K4aa9ed2c",
"未配置 API Key": "Kf7b54a1",
"配置": "K2a1422d2",
"选择 API Key": "K1bec8cbe",
"新增 API Key": "Kb0e0aeda",
"API 密钥可用于调用系统级 Open API 和 MCP。": "K9d81999c",
Expand Down
4 changes: 3 additions & 1 deletion frontend/packages/common/src/locales/scan/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -984,5 +984,7 @@
"K50693bd8": "Enable Authorization",
"K682b11cb": "Feishu Authorization Login",
"K45c99f97": "The APP ID parameter can be found on the App Credentials and Basic Information page in the Feishu Developer Console",
"K56e77c4": "The APP Secret parameter can be found on the App Credentials and Basic Information page in the Feishu Developer Console"
"K56e77c4": "The APP Secret parameter can be found on the App Credentials and Basic Information page in the Feishu Developer Console",
"Kf7b54a1": "API Key not configured",
"K2a1422d2": "Configure"
}
4 changes: 3 additions & 1 deletion frontend/packages/common/src/locales/scan/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -1006,5 +1006,7 @@
"K50693bd8": "認可を有効化",
"K682b11cb": "Feishu 認証ログイン",
"K45c99f97": "APP ID パラメータは Feishu 開発者コンソールのアプリ認証情報と基本情報ページにあります",
"K56e77c4": "APP Secret パラメータは Feishu 開発者コンソールのアプリ認証情報と基本情報ページにあります"
"K56e77c4": "APP Secret パラメータは Feishu 開発者コンソールのアプリ認証情報と基本情報ページにあります",
"Kf7b54a1": "API Key が設定されていません",
"K2a1422d2": "設定"
}
4 changes: 3 additions & 1 deletion frontend/packages/common/src/locales/scan/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -935,5 +935,7 @@
"K50693bd8": "启用授权",
"K682b11cb": "飞书授权登录",
"K45c99f97": "APP ID 参数位于飞书开发人员控制台中的应用程序凭证和基础信息页面上",
"K56e77c4": "APP Secret 参数位于飞书开发人员控制台中的应用程序凭证和基础信息页面上"
"K56e77c4": "APP Secret 参数位于飞书开发人员控制台中的应用程序凭证和基础信息页面上",
"Kf7b54a1": "未配置 API Key",
"K2a1422d2": "配置"
}
4 changes: 3 additions & 1 deletion frontend/packages/common/src/locales/scan/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -1006,5 +1006,7 @@
"K50693bd8": "啟用授權",
"K682b11cb": "飛書授權登入",
"K45c99f97": "APP ID 參數位於飛書開發人員控制台中的應用程式憑證與基礎資訊頁面",
"K56e77c4": "APP Secret 參數位於飛書開發人員控制台中的應用程式憑證與基礎資訊頁面"
"K56e77c4": "APP Secret 參數位於飛書開發人員控制台中的應用程式憑證與基礎資訊頁面",
"Kf7b54a1": "未配置 API Key",
"K2a1422d2": "配置"
}
6 changes: 3 additions & 3 deletions frontend/packages/core/src/pages/auth/Auth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const Auth = () => {
}, [state.language])
const onFinish = () => {
form.validateFields().then((value) => {
return fetchData<BasicResponse<null>>(`/account/third/${value.authType}`, {
return fetchData<BasicResponse<null>>(`account/third/${value.authType}`, {
method: 'POST',
eoBody: {
enable: value.enabled,
Expand Down Expand Up @@ -71,7 +71,7 @@ const Auth = () => {
value: string
}[]
}>
>('/account/third', {
>('account/third', {
method: 'GET',
}).then((response) => {
const { code, data, msg } = response
Expand All @@ -87,7 +87,7 @@ const Auth = () => {
* 获取第三方授权配置
*/
const getThirdPartyAuthSetting = () => {
fetchData<BasicResponse<{ info: AuthSetting }>>(`/account/third/${form.getFieldValue('authType')}`, {
fetchData<BasicResponse<{ info: AuthSetting }>>(`account/third/${form.getFieldValue('authType')}`, {
method: 'GET',
eoTransformKeys: ['client_id', 'client_secret']
}).then((response) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ export const IntegrationAIContainer = forwardRef<IntegrationAIContainerRef, Inte
navigator('/mcpKey')
}

const dropAuthPage = () => {
navigator(`/consumer/${consumerParams?.teamId}/inside/${consumerParams?.consumerId}/authorization`)
}

/**
* 获取全局 API Key 列表
*/
Expand Down Expand Up @@ -492,7 +496,7 @@ export const IntegrationAIContainer = forwardRef<IntegrationAIContainerRef, Inte
</div>
</div>
)}
{type === 'service' && !apiKeyList.length ? (
{(type === 'service' || type === 'consumer') && !apiKeyList.length ? (
<>
<Card
style={{ borderRadius: '10px' }}
Expand All @@ -501,12 +505,23 @@ export const IntegrationAIContainer = forwardRef<IntegrationAIContainerRef, Inte
body: 'p-[10px]'
}}
>
<div className="flex flex-col items-center justify-center py-3">
<span className="text-[14px] mb-5">{$t('请先订阅该服务')}</span>
<Button type="primary" onClick={() => openModal?.('apply')}>
{$t('申请')}
</Button>
</div>
{
type === 'service' ? (
<div className="flex flex-col items-center justify-center py-3">
<span className="text-[14px] mb-5">{$t('请先订阅该服务')}</span>
<Button type="primary" onClick={() => openModal?.('apply')}>
{$t('申请')}
</Button>
</div>
) : (
<div className="flex flex-col items-center justify-center py-3">
<span className="text-[14px] mb-5">{$t('未配置 API Key')}</span>
<Button type="primary" onClick={() => dropAuthPage()}>
{$t('配置')}
</Button>
</div>
)
}
</Card>
</>
) : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ export default function ManagementInsidePage() {

const TENANT_MANAGEMENT_APP_MENU: MenuProps['items'] = useMemo(
() => [
getItem($t('订阅的服务'), 'service', undefined, undefined, undefined, 'team.application.subscription.view'),
getItem($t('MCP 服务'), 'mcp', undefined, undefined, undefined, 'team.consumer.mcp.view'),
getItem($t('访问授权'), 'authorization', undefined, undefined, undefined, 'team.consumer.authorization.view'),
getItem($t('MCP 服务'), 'mcp', undefined, undefined, undefined, 'team.consumer.mcp.view'),
getItem($t('订阅的服务'), 'service', undefined, undefined, undefined, 'team.application.subscription.view'),
getItem($t('消费者管理'), 'setting', undefined, undefined, undefined, 'team.application.application.view')
],
[state.language]
Expand Down