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: service data-masking layout See merge request apipark/APIPark!101
This commit is contained in:
@@ -684,7 +684,7 @@
|
||||
"K35f23b64": "Follow these steps for integration:",
|
||||
"Kf5cd608b": "Step 1: Create a custom plugin on the Agent platform",
|
||||
"K4c81c7b6": "For details on the operations of different Agent platforms, refer to",
|
||||
"K275f7ffa": "the 'Agent Integration Manual'",
|
||||
"K275f7ffa": "the Agent Integration Manual",
|
||||
"K49b81d06": "Step 2: Import API documentation data",
|
||||
"K4a3b62be": "You can import API documentation data to the Agent platform via the following URL or by downloading the JSON file.",
|
||||
"K42697e11": "Copy URL",
|
||||
|
||||
@@ -19,7 +19,7 @@ const APP_MODE = import.meta.env.VITE_APP_MODE;
|
||||
|
||||
const AiServiceInsidePage:FC = ()=> {
|
||||
const { message } = App.useApp()
|
||||
const { teamId,serviceId,apiId, routeId } = useParams<RouterParams>();
|
||||
const { teamId,serviceId,apiId, routeId,policyId } = useParams<RouterParams>();
|
||||
const location = useLocation()
|
||||
const currentUrl = location.pathname
|
||||
const {fetchData} = useFetch()
|
||||
@@ -109,7 +109,9 @@ const AiServiceInsidePage:FC = ()=> {
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
setShowMenu(!routeId && !currentUrl.includes('route/create'))
|
||||
// route edit and policy edit page don't need to show menu
|
||||
setShowMenu(!routeId && !currentUrl.includes('route/create') && !policyId &&!currentUrl.includes('servicepolicy/datamasking/create'))
|
||||
|
||||
if(apiId !== undefined){
|
||||
setActiveMenu('api')
|
||||
} else if(currentUrl.includes('servicepolicy')){
|
||||
|
||||
@@ -78,7 +78,7 @@ export default function ApiRequestSetting(){
|
||||
<Form.Item<ApiRequestSettingFieldType>
|
||||
label={$t("集成地址")}
|
||||
name="sitePrefix"
|
||||
rules={[{ required: true,whitespace:true }]}
|
||||
rules={[{ whitespace:true }]}
|
||||
extra={$t("与外部平台集成时,获取 API 市场中文档信息的域名")}
|
||||
>
|
||||
<Input className="w-INPUT_NORMAL" placeholder={$t(PLACEHOLDER.input)}/>
|
||||
|
||||
@@ -76,7 +76,7 @@ const DataMasking = (props: any) => {
|
||||
{
|
||||
title: '',
|
||||
key: 'option',
|
||||
btnNums: rowOperation.length,
|
||||
btnNums: rowOperation.length -1,
|
||||
fixed: 'right',
|
||||
valueType: 'option',
|
||||
render: (_: React.ReactNode, entity: any) => [
|
||||
|
||||
@@ -96,6 +96,7 @@ const DataMaskingConfig = forwardRef<DataMaskingConfigHandle>((_,ref) => {
|
||||
showBorder={false}
|
||||
scrollPage={false}
|
||||
className="overflow-y-auto"
|
||||
backUrl={serviceId ? '../list' : undefined}
|
||||
>
|
||||
<Spin indicator={<LoadingOutlined style={{ fontSize: 24 }} spin />} spinning={loading} wrapperClassName=' pb-PAGE_INSIDE_B pr-PAGE_INSIDE_X'>
|
||||
<WithPermission access={onEdit ? [`${ serviceId === undefined ? 'system.devops':'team.service'}.policy.edit`] :''}>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
|
||||
import { FC, useEffect, useMemo, useState } from "react";
|
||||
import { Link, Outlet, useLocation, useNavigate, useParams } from "react-router-dom";
|
||||
import { RouterParams } from "@core/components/aoplatform/RenderRoutes.tsx";
|
||||
import { App, Menu, MenuProps } from "antd";
|
||||
import { BasicResponse, RESPONSE_TIPS, STATUS_CODE } from "@common/const/const.tsx";
|
||||
import { useFetch } from "@common/hooks/http.ts";
|
||||
@@ -15,11 +14,12 @@ import { ItemType, MenuItemGroupType, MenuItemType } from "antd/es/menu/hooks/us
|
||||
import { cloneDeep } from "lodash-es";
|
||||
import { $t } from "@common/locales/index.ts";
|
||||
import { getItem } from "@common/utils/navigation.tsx";
|
||||
import { RouterParams } from "@common/const/type.ts";
|
||||
const APP_MODE = import.meta.env.VITE_APP_MODE;
|
||||
|
||||
const SystemInsidePage: FC = () => {
|
||||
const { message } = App.useApp()
|
||||
const { teamId, serviceId, apiId, routeId } = useParams<RouterParams>();
|
||||
const { teamId, serviceId, apiId, routeId,policyId } = useParams<RouterParams>();
|
||||
const location = useLocation()
|
||||
const currentUrl = location.pathname
|
||||
const { fetchData } = useFetch()
|
||||
@@ -107,8 +107,9 @@ const SystemInsidePage: FC = () => {
|
||||
setActiveMenu(key)
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
setShowMenu(!routeId && !currentUrl.includes('route/create'))
|
||||
useEffect(() => {
|
||||
// route edit and policy edit page don't need to show menu
|
||||
setShowMenu(!routeId && !currentUrl.includes('route/create') && !policyId && !currentUrl.includes('servicepolicy/datamasking/create'))
|
||||
if (apiId !== undefined) {
|
||||
setActiveMenu('api')
|
||||
} else if(currentUrl.includes('servicepolicy')){
|
||||
|
||||
Reference in New Issue
Block a user