mirror of
https://github.com/APIParkLab/APIPark.git
synced 2026-06-14 20:41:15 +08:00
Merge branch 'feature/v1.3/mj' into 'main'
fix: data-masking and integration bugs See merge request apipark/APIPark!93
This commit is contained in:
@@ -47,7 +47,6 @@ export const PolicyPublishModalContent = forwardRef<PolicyPublishModalHandle,Pol
|
||||
title: typeof x.title === 'string' ? $t(x.title) : x.title,
|
||||
})),[state.language])
|
||||
|
||||
console.log(translatedPolicyColumns,data.strategies)
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -6,7 +6,7 @@ import {BasicResponse, FORM_ERROR_TIPS, PLACEHOLDER, RESPONSE_TIPS, STATUS_CODE,
|
||||
import WithPermission from "@common/components/aoplatform/WithPermission.tsx";
|
||||
import { SYSTEM_PUBLISH_ONLINE_COLUMNS } from "@core/const/system/const.tsx";
|
||||
import { $t } from "@common/locales";
|
||||
import { ApprovalRouteColumns, ApprovalStatusColorClass, ApprovalUpstreamColumns, ChangeTypeEnum } from "@common/const/approval/const";
|
||||
import { ApprovalPolicyColumns, ApprovalRouteColumns, ApprovalStatusColorClass, ApprovalUpstreamColumns, ChangeTypeEnum } from "@common/const/approval/const";
|
||||
import { useGlobalContext } from "@common/contexts/GlobalStateContext";
|
||||
import { LoadingOutlined } from "@ant-design/icons";
|
||||
import { SystemInsidePublishOnlineItems } from "@core/pages/system/publish/SystemInsidePublishOnline";
|
||||
@@ -140,6 +140,19 @@ export const PublishApprovalModalContent = forwardRef<PublishApprovalModalHandle
|
||||
}
|
||||
}),[state.language])
|
||||
|
||||
|
||||
const translatedPolicyColumns = useMemo(()=>ApprovalPolicyColumns.map((x)=>{
|
||||
return {
|
||||
...x,
|
||||
title: typeof x.title === 'string' ? $t(x.title) : x.title,
|
||||
...(x.dataIndex === 'status' ? {
|
||||
render:(_,entity)=>(
|
||||
entity.status === 0 ? '正常' : '无效')
|
||||
}:{})
|
||||
}
|
||||
}),[state.language])
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
{!insidePage && <>
|
||||
@@ -219,6 +232,16 @@ export const PublishApprovalModalContent = forwardRef<PublishApprovalModalHandle
|
||||
/></Row>
|
||||
</>
|
||||
}
|
||||
<Row className="mt-mbase pb-[8px] h-[32px] font-bold" ><span >{$t('策略列表')}:</span></Row>
|
||||
<Row className="mb-mbase ">
|
||||
<Table
|
||||
bordered={true}
|
||||
columns={translatedPolicyColumns}
|
||||
size="small"
|
||||
rowKey="id"
|
||||
dataSource={data.diffs?.strategies || []}
|
||||
pagination={false}
|
||||
/></Row>
|
||||
{/* <Form.Item
|
||||
label={$t("备注")}
|
||||
name="remark"
|
||||
|
||||
@@ -241,6 +241,26 @@ export const ApprovalRouteColumns = [
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
export const ApprovalPolicyColumns = [
|
||||
{
|
||||
title:('名称'),
|
||||
dataIndex:'name',
|
||||
ellipsis:true,
|
||||
},
|
||||
{
|
||||
title:('优先级'),
|
||||
dataIndex:'priority',
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title:('状态'),
|
||||
dataIndex:'status',
|
||||
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
export const ApprovalUpstreamColumns = [
|
||||
{
|
||||
title:('上游类型'),
|
||||
|
||||
@@ -67,6 +67,7 @@ export type PublishApprovalInfoType = {
|
||||
diffs:{
|
||||
apis:PublishApprovalApiItem[]
|
||||
upstreams:PublishApprovalUpstreamItem[]
|
||||
strategies:Array<{name:string, priority:number,statues:0|1}>
|
||||
}
|
||||
clusterPublishStatus?:SystemInsidePublishOnlineItems[],
|
||||
error:string
|
||||
|
||||
@@ -232,13 +232,11 @@ export const GlobalContext = createContext<{
|
||||
const globalReducer = (state: GlobalState, action: GlobalAction): GlobalState => {
|
||||
switch (action.type) {
|
||||
case 'LOGIN':
|
||||
console.log('login')
|
||||
return {
|
||||
...state,
|
||||
isAuthenticated: true,
|
||||
};
|
||||
case 'LOGOUT':
|
||||
console.log('login')
|
||||
return {
|
||||
...state,
|
||||
isAuthenticated: false,
|
||||
|
||||
@@ -333,6 +333,7 @@
|
||||
"API 路由": "K51d1eb5d",
|
||||
"API 文档": "Ka2b6d281",
|
||||
"使用说明": "Kdefa9caa",
|
||||
"服务策略": "K52f72551",
|
||||
"发布": "K36856e71",
|
||||
"订阅管理": "K6382bbfd",
|
||||
"订阅审核": "K31af5b99",
|
||||
@@ -384,6 +385,8 @@
|
||||
"发布申请": "K56b4254f",
|
||||
"API 调用地址": "Kea2f9279",
|
||||
"API base URL 一般设置为API 网关的外部网络访问地址,或者是API网关绑定的域名。": "K7fc496a1",
|
||||
"集成地址": "K508d8bf4",
|
||||
"与外部平台集成时,获取 API 市场中文档信息的域名": "K67f4e9bb",
|
||||
"常规设置": "K8ab0fc95",
|
||||
"API 请求设置": "Kb66fec9d",
|
||||
"服务分类": "K4de0af74",
|
||||
@@ -463,7 +466,6 @@
|
||||
"添加部门": "K26c698bb",
|
||||
"添加子部门": "Kb9cf2a7d",
|
||||
"重命名": "Kc83551f5",
|
||||
"该数据删除后将无法找回,请确认是否删除?": "K5cfdd950",
|
||||
"成员": "K74aef1ad",
|
||||
"设置成员和对应的角色,成员只能够看到权限范围内的功能和数据。": "K3f1077c9",
|
||||
"搜索部门": "Kdce62a6",
|
||||
@@ -560,7 +562,6 @@
|
||||
"删除服务": "Kde6bae17",
|
||||
"删除操作不可恢复,请谨慎操作!": "K885ea699",
|
||||
"上游": "Kda8d5ea1",
|
||||
"服务策略": "K52f72551",
|
||||
"服务提供了高性能 API 网关,并且可以无缝接入多种大型 AI 模型,并将这些 AI 能力打包成 API 进行调用,从而大幅简化了 AI 模型的使用门槛。同时,我们的平台提供了完善的 API 管理功能,支持 API 的创建、监控、访问控制等,保障开发者可以高效、安全地开发和管理 API 服务。": "K12f58863",
|
||||
"添加服务": "K2d6658ed",
|
||||
"输入名称、ID、所属团队、负责人查找服务": "K7b8f623f",
|
||||
|
||||
@@ -744,5 +744,8 @@
|
||||
"K8457ea34": "All (0)",
|
||||
"K7ca9a795": "Attribute Name",
|
||||
"Kc4391744": "Attribute Value",
|
||||
"K678e13fc": "Configure (0)"
|
||||
"K678e13fc": "Configure (0)",
|
||||
"K508d8bf4": "Integration Address",
|
||||
"K67f4e9bb": "The domain name for obtaining API market documentation information when integrating with external platforms"
|
||||
|
||||
}
|
||||
|
||||
@@ -766,5 +766,8 @@
|
||||
"K8457ea34": "すべて (0)",
|
||||
"K7ca9a795": "属性名",
|
||||
"Kc4391744": "属性値",
|
||||
"K678e13fc": "設定 (0)"
|
||||
"K678e13fc": "設定 (0)",
|
||||
"K508d8bf4": "統合アドレス",
|
||||
"K67f4e9bb": "外部プラットフォームと統合する際に、API市場のドキュメント情報を取得するためのドメイン名"
|
||||
|
||||
}
|
||||
|
||||
@@ -1 +1,4 @@
|
||||
{}
|
||||
{
|
||||
"K508d8bf4": "集成地址",
|
||||
"K67f4e9bb": "与外部平台集成时,获取 API 市场中文档信息的域名"
|
||||
}
|
||||
@@ -1 +1,4 @@
|
||||
{}
|
||||
{
|
||||
"K508d8bf4": "集成地址",
|
||||
"K67f4e9bb": "与外部平台集成时,获取 API 市场中文档信息的域名"
|
||||
}
|
||||
@@ -42,6 +42,8 @@
|
||||
"K49731763": "请输入IP地址或CIDR范围,每条以换行分割",
|
||||
"K83237c89": "输入的IP或CIDR不符合格式",
|
||||
"K5ae2c87a": "请正确输入路径,如/usr/*或*/usr/*",
|
||||
"K508d8bf4": "集成地址",
|
||||
"K67f4e9bb": "与外部平台集成时,获取 API 市场中文档信息的域名",
|
||||
"Kc82b8374": "编辑策略",
|
||||
"K4b34a5e5": "策略类型",
|
||||
"K57f0fee8": "匹配条件",
|
||||
|
||||
@@ -1 +1,4 @@
|
||||
{}
|
||||
{
|
||||
"K508d8bf4": "集成地址",
|
||||
"K67f4e9bb": "与外部平台集成时,获取 API 市场中文档信息的域名"
|
||||
}
|
||||
@@ -10,6 +10,7 @@
|
||||
"K1deaa2dd": "User",
|
||||
"K631d646f": "Open API",
|
||||
"K1196b104": "APIPark",
|
||||
"K5cfdd950": "This data cannot be recovered after deletion. Are you sure you want to delete?",
|
||||
"Kb9052305": "Search Username, Email",
|
||||
"K40a89bd8": "Enter Name, ID to Search Member"
|
||||
}
|
||||
@@ -16,6 +16,7 @@
|
||||
"K9bdd8403": "API を安全に呼び出すためには、アプリケーションとトークンを作成する必要があります。",
|
||||
"Kc8239422": "チームにはユーザー、アプリケーション、サービスが含まれ、異なるチームのアプリケーションとサービスのデータは分離されています。企業内の部門/プロジェクトグループ/チームの管理に使用できます。",
|
||||
"Ka0a8840a": "他のアプリケーションのサブスクリプション申請をレビューし、承認後に API リクエストが発行できます。",
|
||||
"K5cfdd950": "このデータを削除すると、復元できません。削除しますか?",
|
||||
"Kb9052305": "ユーザー名またはメールを検索",
|
||||
"K5ece3bac": "チームとメンバーを設定してから、チーム内でサービスとアプリケーションを作成し、API をサブスクライブできます。メンバーは所属チーム内のサービスとアプリケーションのみを表示できます。",
|
||||
"K1512e983": "アプリケーション呼び出し統計",
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
"K9bdd8403": "为了安全地调用 API,你需要创建一个消费者以及Token。",
|
||||
"Kc8239422": "团队中包含了人员、消费者和服务,不同团队之间的消费者和服务数据是隔离的,可用于管理企业内部不同的部门/项目组/团队。",
|
||||
"Ka0a8840a": "审核其他消费者的订阅申请,审核通过后的才可发起 API 请求。",
|
||||
"K5cfdd950": "该数据删除后将无法找回,是否删除?",
|
||||
"Kb9052305": "搜索用户名、邮箱",
|
||||
"K5ece3bac": "设置团队和成员,然后你可以在团队内创建服务和消费者、订阅API,成员只能看到所属团队内的服务和消费者。",
|
||||
"K1512e983": "消费者调用统计",
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
"K9bdd8403": "為了安全地調用 API,你需要創建一個應用以及Token。",
|
||||
"Kc8239422": "團隊中包含了人員、應用程式和服務,不同團隊之間的應用程式和服務數據是隔離的,可用於管理企業內部不同的部門/項目組/團隊。",
|
||||
"Ka0a8840a": "審核其他應用程式的訂閱申請,審核通過後的才可發起 API 請求。",
|
||||
"K5cfdd950": "該數據刪除後將無法找回,是否刪除?",
|
||||
"Kb9052305": "搜索用戶名、電郵",
|
||||
"K5ece3bac": "設置團隊和成員,然後你可以在團隊內創建服務和應用程式、訂閱API,成員只能看到所屬團隊內的服務和應用程式。",
|
||||
"K1512e983": "應用程式調用統計",
|
||||
|
||||
@@ -766,5 +766,8 @@
|
||||
"K8457ea34": "所有(0)",
|
||||
"K7ca9a795": "屬性名稱",
|
||||
"Kc4391744": "屬性值",
|
||||
"K678e13fc": "配置(0)"
|
||||
"K678e13fc": "配置(0)",
|
||||
"K508d8bf4": "集成地址",
|
||||
"K67f4e9bb": "與外部平台集成時,用於獲取 API 市場文檔信息的域名"
|
||||
|
||||
}
|
||||
|
||||
@@ -67,7 +67,6 @@ const Login:FC = ()=> {
|
||||
|
||||
if (code === STATUS_CODE.SUCCESS) {
|
||||
dispatch({type:'LOGIN'})
|
||||
console.log('1')
|
||||
// message.success($t(RESPONSE_TIPS.loginSuccess));
|
||||
const callbackUrl = new URLSearchParams(window.location.search).get('callbackUrl');
|
||||
if (callbackUrl && callbackUrl !== 'null') {
|
||||
|
||||
@@ -4,7 +4,6 @@ import { Navigate, useLocation } from "react-router-dom"
|
||||
export default function Root() {
|
||||
const { state } = useGlobalContext()
|
||||
const location = useLocation()
|
||||
console.log(state?.isAuthenticated ,location?.pathname)
|
||||
return (<>
|
||||
{
|
||||
state?.isAuthenticated && !location?.pathname
|
||||
|
||||
@@ -63,6 +63,7 @@ const AiServiceInsidePage:FC = ()=> {
|
||||
getItem(<Link to="./route">{$t('API 路由')}</Link>, 'route',undefined,undefined,undefined,'team.service.router.view'),
|
||||
getItem(<Link to="./api">{$t('API 文档')}</Link>, 'api',undefined,undefined,undefined,'team.service.api_doc.view'),
|
||||
getItem(<Link to="./document">{$t('使用说明')}</Link>, 'document',undefined,undefined,undefined,'team.service.service_intro.view'),
|
||||
getItem(<Link to="./servicepolicy">{$t('服务策略')}</Link>, 'servicepolicy', undefined, undefined, undefined, 'team.service.policy.view'),
|
||||
getItem(<Link to="./publish">{$t('发布')}</Link>, 'publish',undefined,undefined,undefined,'team.service.release.view'),
|
||||
],
|
||||
'group'),
|
||||
@@ -111,7 +112,9 @@ const AiServiceInsidePage:FC = ()=> {
|
||||
setShowMenu(!routeId && !currentUrl.includes('route/create'))
|
||||
if(apiId !== undefined){
|
||||
setActiveMenu('api')
|
||||
}else if(serviceId !== currentUrl.split('/')[currentUrl.split('/').length - 1]){
|
||||
} else if(currentUrl.includes('servicepolicy')){
|
||||
setActiveMenu('servicepolicy')
|
||||
} else if(serviceId !== currentUrl.split('/')[currentUrl.split('/').length - 1]){
|
||||
setActiveMenu(currentUrl.split('/')[currentUrl.split('/').length - 1])
|
||||
}else{
|
||||
setActiveMenu('route')
|
||||
|
||||
@@ -10,6 +10,7 @@ type ApiRequestSettingFieldType = {
|
||||
siteLogo:string
|
||||
invokeAddress:string
|
||||
platformName:string
|
||||
sitePrefix:string
|
||||
}
|
||||
|
||||
export default function ApiRequestSetting(){
|
||||
@@ -20,7 +21,7 @@ export default function ApiRequestSetting(){
|
||||
|
||||
const onFinish = () => {
|
||||
form.validateFields().then((value)=>{
|
||||
return fetchData<BasicResponse<null>>('system/general',{method:'POST',eoBody:(value),eoTransformKeys:['invokeAddress','siteName','siteLogo','platformName']}).then(response=>{
|
||||
return fetchData<BasicResponse<null>>('system/general',{method:'POST',eoBody:(value),eoTransformKeys:['invokeAddress','siteName','siteLogo','platformName','sitePrefix']}).then(response=>{
|
||||
const {code,msg} = response
|
||||
if(code === STATUS_CODE.SUCCESS){
|
||||
message.success(msg || $t(RESPONSE_TIPS.success))
|
||||
@@ -37,7 +38,7 @@ export default function ApiRequestSetting(){
|
||||
};
|
||||
|
||||
const getSystemSetting = ()=>{
|
||||
fetchData<BasicResponse<{ general: ApiRequestSettingFieldType }>>('system/general',{method:'GET',eoTransformKeys:['site_name', 'site_logo','invoke_address','platform_name']}).then(response=>{
|
||||
fetchData<BasicResponse<{ general: ApiRequestSettingFieldType }>>('system/general',{method:'GET',eoTransformKeys:['site_name', 'site_logo','invoke_address','platform_name','site_prefix']}).then(response=>{
|
||||
const {code,data,msg} = response
|
||||
if(code === STATUS_CODE.SUCCESS){
|
||||
form.setFieldsValue(data.general)
|
||||
@@ -74,6 +75,14 @@ export default function ApiRequestSetting(){
|
||||
<Input className="w-INPUT_NORMAL" placeholder={$t(PLACEHOLDER.input)}/>
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item<ApiRequestSettingFieldType>
|
||||
label={$t("集成地址")}
|
||||
name="sitePrefix"
|
||||
rules={[{ required: true,whitespace:true }]}
|
||||
extra={$t("与外部平台集成时,获取 API 市场中文档信息的域名")}
|
||||
>
|
||||
<Input className="w-INPUT_NORMAL" placeholder={$t(PLACEHOLDER.input)}/>
|
||||
</Form.Item>
|
||||
|
||||
<Row className="mb-[10px]"
|
||||
>
|
||||
|
||||
@@ -81,7 +81,6 @@ const RemoteFormItem: React.FC<FilterFormItemProps> = (props) =>{
|
||||
type: 'checkbox',
|
||||
onChange: (selectedRowKeys: React.Key[]) => {
|
||||
onChange?.(selectedRowKeys as string[]);
|
||||
console.log(originRemoteList)
|
||||
onShowValueChange?.(selectedRowKeys.length === remoteCounts? $t('所有(0)',[title]) : originRemoteList.filter(x=>selectedRowKeys?.indexOf(x[option.key]))?.map(x=>x.title).join(' , '))
|
||||
},
|
||||
selectedRowKeys: value,
|
||||
@@ -94,17 +93,14 @@ const RemoteFormItem: React.FC<FilterFormItemProps> = (props) =>{
|
||||
onClick:()=>{
|
||||
if(value === undefined){
|
||||
onChange?.([record[rowKey]])
|
||||
console.log(record[rowKey],record)
|
||||
onShowValueChange?.(remoteCounts === 1 ? $t('所有(0)',[option?.title]) : record.name)
|
||||
}else if(value?.indexOf(record[rowKey])!== -1){
|
||||
const newSelectedKeys = value?.filter(x=>x!==record[rowKey])
|
||||
onChange?.(newSelectedKeys!)
|
||||
console.log(newSelectedKeys,newSelectedKeys.length === remoteCounts? $t('所有(0)',[option?.title]) : originRemoteList.filter(x=>newSelectedKeys.indexOf(x[rowKey]) !== -1)?.map(x=>x.name)?.join(' , '))
|
||||
onShowValueChange?.(newSelectedKeys.length === remoteCounts? $t('所有(0)',[option?.title]) : originRemoteList.filter(x=>newSelectedKeys.indexOf(x[rowKey]) !== -1)?.map(x=>x.name)?.join(' , '))
|
||||
}else{
|
||||
const newSelectedKeys = [...value,record[rowKey]]
|
||||
onChange?.(newSelectedKeys)
|
||||
console.log(newSelectedKeys,originRemoteList,rowKey,remoteCounts,newSelectedKeys.length === remoteCounts? $t('所有(0)',[option?.title]) : originRemoteList.filter(x=>newSelectedKeys.indexOf(x[rowKey]) !== -1)?.map(x=>x.name)?.join(' , '))
|
||||
onShowValueChange?.(newSelectedKeys.length === remoteCounts? $t('所有(0)',[option?.title]) : originRemoteList.filter(x=>newSelectedKeys.indexOf(x[rowKey]) !== -1)?.map(x=>x.name)?.join(' , '))
|
||||
}
|
||||
}
|
||||
@@ -172,7 +168,6 @@ const FilterForm = forwardRef<FilterFormHandle,FilterFormProps>(({
|
||||
},
|
||||
save:()=>form.validateFields().then((res)=>{
|
||||
const selectedOption = filterOptions.filter(x=>x.name === res.name)[0]
|
||||
console.log('??',res,selectedOption,filterType,label)
|
||||
return Promise.resolve({
|
||||
...res,
|
||||
label:filterType === 'pattern' ? res.values : label,
|
||||
|
||||
@@ -57,14 +57,12 @@ const FilterTable: React.FC<FilterTableProps> = ({
|
||||
label:res.label,
|
||||
title:res.title
|
||||
}
|
||||
console.log(res, newFilterForm, value)
|
||||
onChange?.([newFilterForm, ...(value?.filter(x=>!filterForm?.name|| x.name!==filterForm.name) || [])])
|
||||
closeDrawer()
|
||||
})
|
||||
};
|
||||
|
||||
const handleDeleteFilter = useCallback((item: FilterFormField) => {
|
||||
console.log(item, value, isModalVisible);
|
||||
const newFilterShowList = value?.filter((filter) => filter._eoKey !== item._eoKey) || [];
|
||||
onChange?.(newFilterShowList);
|
||||
}, [value, onChange]);
|
||||
@@ -109,7 +107,6 @@ const FilterTable: React.FC<FilterTableProps> = ({
|
||||
|
||||
useEffect(()=>{
|
||||
setSelectedOptionNameSet(new Set(value?.map(x=>x.name) || []))
|
||||
console.log('valuechange',value)
|
||||
},[value])
|
||||
return (
|
||||
<div>
|
||||
|
||||
@@ -33,7 +33,6 @@ const DataMasking = (props: any) => {
|
||||
const drawerRef = useRef<PolicyPublishModalHandle>(null)
|
||||
const { modal } = App.useApp()
|
||||
|
||||
useEffect(()=>{console.log(props, publishBtn)},[publishBtn])
|
||||
/**
|
||||
* 列表ref
|
||||
*/
|
||||
@@ -104,7 +103,6 @@ const DataMasking = (props: any) => {
|
||||
* @param entity 行数据
|
||||
*/
|
||||
const changeOpenApiStatus = (enabled: boolean, entity: any) => {
|
||||
console.log(enabled)
|
||||
fetchData<BasicResponse<null>>(
|
||||
`strategy/${serviceId === undefined? 'global':'service'}/data-masking/${enabled ? 'enable' :'disable' }`,
|
||||
{
|
||||
|
||||
@@ -65,7 +65,7 @@ const DataMaskingConfig = forwardRef<DataMaskingConfigHandle>((_,ref) => {
|
||||
const {code,data,msg} = response
|
||||
if(code === STATUS_CODE.SUCCESS){
|
||||
message.success(msg || $t(RESPONSE_TIPS.success))
|
||||
navigator(serviceId? '':'/globalpolicy/datamasking/list')
|
||||
navigator('../list')
|
||||
return Promise.resolve(true)
|
||||
}else{
|
||||
message.error(msg || $t(RESPONSE_TIPS.error))
|
||||
|
||||
@@ -14,7 +14,6 @@ const servicePolicy = () => {
|
||||
}
|
||||
]
|
||||
|
||||
console.log('publish',false)
|
||||
return (
|
||||
<>
|
||||
<PolicyTabContainer tabs={tabItems} />
|
||||
|
||||
@@ -98,7 +98,7 @@ export default function MonitorDetailPage(props:MonitorDetailPageProps){
|
||||
setTimeButton('hour');
|
||||
setDatePickerValue(null)
|
||||
setQueryData(null);
|
||||
monitorTableRef.current?.reload()
|
||||
// monitorTableRef.current?.reload()
|
||||
};
|
||||
|
||||
const openModal = (entity:MonitorApiData|MonitorSubscriberData) => {
|
||||
|
||||
@@ -14,7 +14,7 @@ const Integrate = ({ service }: { service: ServiceDetailType }) => {
|
||||
const {fetchData} = useFetch()
|
||||
|
||||
useEffect(()=>{
|
||||
setUrl(`${service?.basic?.sitePrefix || window.location?.origin}/${serviceId}/swagger` )
|
||||
setUrl(`${service?.basic?.sitePrefix || window.location?.origin}/api/v1/service/swagger/${serviceId}` )
|
||||
},[service])
|
||||
/**
|
||||
* Agent 平台地址
|
||||
@@ -60,7 +60,7 @@ const Integrate = ({ service }: { service: ServiceDetailType }) => {
|
||||
<Button type="primary" onClick={copyURL}>{$t('复制 URL')}</Button>
|
||||
</Space.Compact>
|
||||
<span className="text-[14px] font-bold">OR</span>
|
||||
<Button onClick={onDownload}>{$t('下载 Json 文件')}</Button>
|
||||
<Button href={`/api/v1/export/openapi/${serviceId}`} target="_blank">{$t('下载 Json 文件')}</Button>
|
||||
</div>
|
||||
<p className={stepClass}>{$t('步骤三:配置 API 密钥')}</p>
|
||||
<div className='my-[10px]'>{$t('在')}<a href={consumerAddress} target="_blank"> {$t('消费者')} </a>{$t('菜单中,选择已通过本 API 服务申请的消费者,')}</div>
|
||||
|
||||
Reference in New Issue
Block a user