diff --git a/frontend/packages/common/src/components/aoplatform/BasicLayout.tsx b/frontend/packages/common/src/components/aoplatform/BasicLayout.tsx index 2e5ff29d..cf17e1f1 100644 --- a/frontend/packages/common/src/components/aoplatform/BasicLayout.tsx +++ b/frontend/packages/common/src/components/aoplatform/BasicLayout.tsx @@ -156,7 +156,7 @@ const themeToken = { if(code === STATUS_CODE.SUCCESS){ dispatch({type:'LOGOUT'}) resetAccess() - message.success(msg || RESPONSE_TIPS.logoutSuccess) + // message.success(msg || RESPONSE_TIPS.logoutSuccess) navigate('/login') }else{ message.error(msg ||RESPONSE_TIPS.error) diff --git a/frontend/packages/common/src/components/aoplatform/InsidePage.tsx b/frontend/packages/common/src/components/aoplatform/InsidePage.tsx index af44813e..d394f6d6 100644 --- a/frontend/packages/common/src/components/aoplatform/InsidePage.tsx +++ b/frontend/packages/common/src/components/aoplatform/InsidePage.tsx @@ -56,7 +56,7 @@ const InsidePage:FC = ({showBanner=true,pageTitle,tagList,showB

} -
{children}
+
{children}
) } diff --git a/frontend/packages/common/src/components/aoplatform/PageList.tsx b/frontend/packages/common/src/components/aoplatform/PageList.tsx index e632d43e..70fdcb9c 100644 --- a/frontend/packages/common/src/components/aoplatform/PageList.tsx +++ b/frontend/packages/common/src/components/aoplatform/PageList.tsx @@ -59,11 +59,15 @@ const PageList = >(props: React.PropsWithChild const [tableWidth, setTableWidth] = useState(undefined); const actionRef = useRef(); const [allowTableClick,setAllowTableClick] = useState(false) - const {accessData,checkPermission,accessInit} = useGlobalContext() + const {accessData,checkPermission,accessInit,state} = useGlobalContext() const [minTableWidth, setMinTableWidth] = useState(0) // 使用useImperativeHandle来自定义暴露给父组件的实例值 useImperativeHandle(ref, () => actionRef.current!); + + useEffect(()=>{ + actionRef?.current?.reload?.() + },[state.language]) const lastAccess = useMemo(()=>{ if(!tableClickAccess) return true diff --git a/frontend/packages/common/src/components/aoplatform/SubscribeApprovalModalContent.tsx b/frontend/packages/common/src/components/aoplatform/SubscribeApprovalModalContent.tsx index 8433ac7f..fc79139e 100644 --- a/frontend/packages/common/src/components/aoplatform/SubscribeApprovalModalContent.tsx +++ b/frontend/packages/common/src/components/aoplatform/SubscribeApprovalModalContent.tsx @@ -72,7 +72,7 @@ export const SubscribeApprovalModalContent = forwardRef{ SubscribeApprovalList?.map((x)=>( - {x.title}: + {$t(x.title)}: {(data as {[k:string]:unknown})?.[x.key]?.name || (data as {[k:string]:unknown})?.[x.key] || '-'} )) diff --git a/frontend/packages/common/src/components/aoplatform/TableBtnWithPermission.tsx b/frontend/packages/common/src/components/aoplatform/TableBtnWithPermission.tsx index 8c72617b..e547c9e4 100644 --- a/frontend/packages/common/src/components/aoplatform/TableBtnWithPermission.tsx +++ b/frontend/packages/common/src/components/aoplatform/TableBtnWithPermission.tsx @@ -56,7 +56,7 @@ const TableBtnWithPermission = ({btnTitle, access, tooltip, disabled, navigateTo return (<>{ !btnAccess || (disabled&&tooltip) ? - + : diff --git a/frontend/packages/common/src/components/aoplatform/UnUsedWordForTranslate.tsx b/frontend/packages/common/src/components/aoplatform/UnUsedWordForTranslate.tsx index 3cbb5eee..3e4df653 100644 --- a/frontend/packages/common/src/components/aoplatform/UnUsedWordForTranslate.tsx +++ b/frontend/packages/common/src/components/aoplatform/UnUsedWordForTranslate.tsx @@ -9,9 +9,17 @@ export const TranslateWord = ()=>{ {$t('Kafka文件日志')} {$t('NSQ文件日志')} {$t('Syslog文件日志')} - {$t('文件日志')} - {$t('文件日志')} - {$t('文件日志')} + {$t('未分配')} + {$t('超级管理员')} + {$t('团队管理员')} + {$t('运维管理员')} + {$t('普通成员')} + {$t('只读成员')} + {$t('服务管理员')} + {$t('服务开发者')} + {$t('应用开发者')} + {$t('应用管理员')} + {$t('驱动名称')} ) } \ No newline at end of file diff --git a/frontend/packages/common/src/components/aoplatform/intelligent-plugin/IntelligentPluginList.tsx b/frontend/packages/common/src/components/aoplatform/intelligent-plugin/IntelligentPluginList.tsx index aea8fff9..8381052b 100644 --- a/frontend/packages/common/src/components/aoplatform/intelligent-plugin/IntelligentPluginList.tsx +++ b/frontend/packages/common/src/components/aoplatform/intelligent-plugin/IntelligentPluginList.tsx @@ -1,6 +1,6 @@ import PageList, { PageProColumns } from "@common/components/aoplatform/PageList.tsx"; import {App, Divider, Spin} from "antd"; -import {useEffect, useRef, useState} from "react"; +import {useEffect, useMemo, useRef, useState} from "react"; import { useLocation, useOutletContext, useParams} from "react-router-dom"; import {useBreadcrumb} from "@common/contexts/BreadcrumbContext.tsx"; import {ActionType, ParamsType} from "@ant-design/pro-components"; @@ -15,6 +15,7 @@ import TableBtnWithPermission from "@common/components/aoplatform/TableBtnWithPe import { DrawerWithFooter } from "@common/components/aoplatform/DrawerWithFooter.tsx"; import { LoadingOutlined } from "@ant-design/icons"; import { $t } from "@common/locales/index.ts"; +import { useGlobalContext } from "@common/contexts/GlobalStateContext.tsx"; type DynamicTableField = { name: string, @@ -106,6 +107,7 @@ export default function IntelligentPluginList(){ const [drawerLoading, setDrawerLoading] = useState(false) const location = useLocation().pathname const {accessPrefix} = useOutletContext<{accessPrefix:string}>() + const {state} = useGlobalContext() const getIntelligentPluginTableList=(params:ParamsType & { @@ -155,6 +157,8 @@ export default function IntelligentPluginList(){ return ({ data: [], success: false });}) } + const translatedCol = useMemo(()=>columns.map(x=>({...x, title:typeof x.title === 'string' ? $t(x.title as string) : x.title})),[columns,state.language]) + const getConfig = (data:DynamicTableConfig)=>{ const {basic,list } = data const {title,drivers} = basic @@ -315,7 +319,7 @@ export default function IntelligentPluginList(){ return (<> getIntelligentPluginTableList(params)} addNewBtnTitle={$t('添加(0)',[$t(pluginName)])} searchPlaceholder={$t('搜索(0)名称',[$t(pluginName)])} diff --git a/frontend/packages/common/src/const/const.tsx b/frontend/packages/common/src/const/const.tsx index 2e50c2db..c2ade5bb 100644 --- a/frontend/packages/common/src/const/const.tsx +++ b/frontend/packages/common/src/const/const.tsx @@ -32,7 +32,7 @@ export const routerKeyMap = new Map([ export const COLUMNS_TITLE = { - operate : $t('操作') + operate : '' } export const VALIDATE_MESSAGE = { diff --git a/frontend/packages/common/src/locales/scan/en-GB.json b/frontend/packages/common/src/locales/scan/en-GB.json index c25c27ed..a1ecea9e 100644 --- a/frontend/packages/common/src/locales/scan/en-GB.json +++ b/frontend/packages/common/src/locales/scan/en-GB.json @@ -1,602 +1,602 @@ { - "Kc0e5ef9f": "Workspace", - "K3863c722": "My", - "K4de11e23": "Home", - "Kfe93ef35": "Applications", - "Kb58e0c3f": "Services", - "Kc9e489f5": "Team", - "K61c89f5f": "API Marketplace", - "K16d71239": "Dashboard", - "K714c192d": "Runtime View", - "Kd57dfe97": "System Topology", - "K3fe97dcc": "System Settings", - "K67ef3525": "Organization", - "K74aef1ad": "Members", - "Kf644225f": "Roles", - "K958da71f": "Service Category Management", - "Kf270ca55": "Operations & Integrations", - "Ke93d36ed": "Cluster", - "K9708a557": "Monitoring Reports", - "K481e8a05": "Certificate", - "Kca53edd0": "Logs", - "Kb283e720": "Resources", - "K631d646f": "Open API", - "K6535ff9c": "Account Settings", - "Kf15499b4": "Log Out", - "Kabbd6e6": "Documentation", - "K1196b104": "APIPark - Enterprise API Open Platform", - "K1f42de3": "HTTP Status Codes", - "K4770dff4": "System Status Codes", - "Kf89e58f1": "Description", - "K9e53c664": "Submit", - "Kf8e7294c": "Previous Step", - "Ka0451c97": "Cancel", - "Kb1dedda3": "Close", - "Kb2fc7600": "Add Configuration", - "K4e07217d": "Edit Configuration", - "K4ea968fe": "Edit(0)", - "Ka7aaaeb": "Add(0)", - "Kaff78ecf": "Please Enter Key", - "K65d46535": "Please Enter Value", - "Kc14b2ea3": "Back", - "K11d3633a": "ID", - "Kbff43de3": "Name", - "K16ca79ef": "Driver", - "K7a369eef": "Published", - "Kcfa1a4d2": "Offline", - "K771dc3b7": "Online", - "K530f5951": "View", - "Kecbd7449": "Delete", - "K1cbe2507": "Confirm", - "K48325b6": "Search(0) Name", - "Ka1d885c1": "Add", - "Kad207008": "Edit", - "Ke4b7722": "简体中文", - "Kd185073d": "English", - "K1ff96ff": "Apply System", - "K9bf855d6": "Associated Team", - "K11b994ed": "Applicant", - "K939baba7": "Application Date", - "Kdab2e63b": "Version Number", - "K8b29c460": "Version Description", - "K36a72ad1": "API List", - "K54e44357": "Upstream List", - "Kb8e8e6f5": "Remarks", - "K1ab0ae5b": "Application Reason", - "K53c00c3c": "Review Comments", - "K7edf331d": "Time", - "Kef45b208": "Last 1 Hour", - "K9dbf22b8": "Last 24 Hours", - "K820fbfab": "Last 3 Days", - "Kd6d28fc": "Last 7 Days", - "K3d7465f7": "File Logs", - "Kc87167a0": "HTTP Logs", - "K80ef19d3": "Kafka File Logs", - "K398cc3c5": "NSQ File Logs", - "K2bcdb54": "Syslog File Logs", - "K23fda291": "No Operation Permission, Please Contact Administrator.", - "K4618cb0a": "WeChat Mini Program", - "Ka854f511": "Path Required for File Retrieval", - "Kaa11a695": "Non-HTTPS or Non-HTTP Code Samples Are Not Supported", - "Kbe46924e": "Search Programming Language...", - "Ke8e4f258": "Programming Language", - "K29c07a47": "Success Example", - "K1f5c814d": "Failure Example", - "K4ef022d7": "Default text/html;charset=UTF-8", - "Kd061b5bf": "No Sample Provided", - "Kc14cec33": "Binary", - "K48b4d9e3": "Request Header", - "Kcd347eaf": "Request Body", - "K9e100bfe": "Query Parameters", - "K3e9f12fd": "REST Parameters", - "K2bfa290c": "API Request Editor", - "Kb36d111a": "Response Header", - "K980bde79": "Response", - "Kb04d201a": "More Settings", - "Kee74f5b4": "Add Sub-Parameter", - "Kc7d3106c": "Add Row Below", - "Keaabd222": "Tag", - "K8ad2c50e": "Parameter Name", - "K67d68dd1": "Type", - "K29245f47": "Required", - "Ke32cbcd3": "Example", - "Kc13936c6": "Enter URL or cURL", - "Ka1ede006": "HTTP", - "K152ac44e": "Parameter Location", - "K1660ae72": "Match Type", - "K91ced765": "Parameter Value", - "K5b265628": "Operation Type", - "K1826982d": "Add or Modify", - "Kd65b55f5": "Match Parameter Value", - "K15f35bf2": "Forward Upstream Path", - "K79dec0dd": "Request Timeout", - "K7d465645": "Bind Upstream Service", - "K63a6404d": "Retry Time", - "K47740727": "Forward Upstream Request Header", - "K2b605d42": "More", - "K1df9fbd5": "Import", - "K5e85df18": "Import Format", - "K9eaf7885": "Full Replacement", - "Kf8c3a80b": "Insert at End", - "Kd96b2d7d": "Incremental Update", - "Kf2fc08eb": "Request Header", - "Ka45f1d8": "REST Parameters", - "K94bb113a": "Size", - "K359919b5": "Save As File", - "K38bf1b90": "Response", - "K59f4186e": "Response Header", - "K5f1e23fd": "Body", - "Kf404ef7d": "Send (Enter)", - "K2dbfd648": "Abort", - "Kacabc771": "Seconds", - "K13ae6a93": "Copy", - "Ke54a14a3": "Format", - "K43934f6d": "Search", - "K741decac": "Replace", - "Kd507abff": "Confirm", - "Kca2d1624": "The (0) must not be negative.", - "K792b255a": "The (0) must be greater than or equal to the (1).", - "Kf0bed26d": "Value Enumeration", - "K633a03ca": "Enumeration", - "Kd2766caf": "Minimum Length", - "Kd6d52485": "Maximum Length", - "Kea15f66c": "Minimum Value", - "K1af340ff": "Maximum Value", - "K68691e16": "Drag Files Here to Upload, or Click to Select Files", - "Kcec46ae": "Upload Files", - "K760fb044": "Files Selected", - "Kea2bdee0": "Please Enter Interface Name", - "K49053438": "Detailed Description", - "K148f6fa4": "Advanced Matching", - "K3ae4c789": "Forwarding Configuration", - "K2f4d0a37": "Request Parameters", - "Kde2d6dbd": "Return Example", - "K70e6069c": "Test API", - "Ke4603448": "Request Header", - "K89fd86b3": "Request Body", - "K8747e3c4": "Request Sample Code", - "K8613e6e7": "Response Example", - "Kab1c2159": "Response Header", - "Kd2be51d1": "Response Body", - "K831aa6c0": "Applicant - Application", - "K58ca9485": "Apply Service", - "K283f55b4": "Service System", - "Kd60d204": "Service Team", - "K3a9a3b75": "Approval Status", - "K4f57b2de": "Approver", - "K31dabc6b": "Approval Time", - "K8582af3f": "Reject", - "K54e27f57": "Approve", - "K7eeca185": "Approval Complete", - "Kd4061161": "Publishing Under Review", - "K823bfe63": "Online", - "K97ddb3f8": "-", - "Kc9315fa1": "Rejected", - "K3fbe7511": "Publishing Error", - "Ke64e695c": "Publishing", - "K17f93984": "API Name", - "K1365fe45": "Request Method", - "Kc380335f": "Path", - "K4ee62e8": "This API Lacks (0)(1)(2), Please Provide", - "K385591f3": "Forwarding Information,", - "K68415c14": "Documentation Information,", - "K133b75e9": "Upstream Information,", - "Kad98e030": "Upstream Type", - "Kdeed8399": "Static Upstream", - "K78b1ca25": "Address", - "K6208054": "Pending Approval", - "K1be7f021": "Approved", - "K677a4959": "Publishing Terminated", - "Kfd6d2d3d": "Closed", - "K9d7e880a": "Published Version", - "K855135f": "Version Creation Time", - "Kcbf39b82": "Version Status", - "K339d15b5": "Creator", - "K7194cea2": "Review Time", - "K69827c60": "Publishing Status", - "K1644b775": "New", - "K4fdf4dcc": "Change", - "K33d66e26": "No Change", - "K9b70c007": "Missing Fields", - "Kd85208a3": "Rejected", - "K8adf7f8b": "Under Review", - "Kad6aa439": "Subscribed", - "K3118fdb0": "Unsubscribe", - "K9a68443b": "Cancel Application", - "K18307d56": "Manual Addition", - "K705fe9f5": "Subscription Application", - "Kbc96ebec": "Applicant Application", - "K1f89176d": "Applicant Team", - "Kfe731dfc": "Action", - "K71661ee8": "Required Field", - "Kcbee3f8": "Invalid Email Address", - "K442cfba1": "Please Enter", - "K3bb646e4": "Please Select", - "Ka4ecfa40": "English, Numbers, or Underscores Only; Must Start with a Letter", - "K39686a7f": "Supports Combination of Letters, Numbers, Hyphens, and Underscores", - "K4d6a0190": "Approval Comments Required When Rejecting", - "K37318b68": "Unable to Connect to Cluster; Please Check Address or Firewall Configuration", - "K7f0c746d": "Operation Successful", - "K6a365d01": "Operation Failed", - "K978062b6": "In Progress", - "Kca7bd6d4": "Loading Data", - "K3c93b77e": "Failed to Retrieve Data", - "Ke108c369": "Login Successful", - "K9168d3e": "Logout Successful, Redirecting to Login Page", - "K2f8a7ab7": "Review Comments Not Provided", - "Kb858d78a": "Copy Successful", - "K26e85d15": "Copy Failed, Please Copy Manually", - "K5cfdd950": "This Data Will Be Permanently Deleted, Are You Sure You Want to Delete?", - "K2a3f24ac": "Default Worksheet", - "K7e1ab4b0": "To", - "Kf1b166e7": "Details", - "K28555332": "URLs with Double Slashes // Are Not Supported", - "Keb9fcdad": "Username", - "Kc654b275": "Email", - "Kbe2ecc69": "Department", - "K759fb403": "Status", - "K52c8a730": "Enable", - "K718c9310": "Disable", - "K2c5882be": "Bind Domain", - "K1cc07937": "Expiration Date", - "K8b7c2592": "Updated By", - "Keefda53d": "Update Time", - "K9f3db3ca": "Cluster Name", - "Ke7487049": "Cluster ID", - "Kb660ffe8": "Node Name", - "Kf12b3034": "Management Address", - "K867e6faf": "Service Address", - "K37348a5e": "Cluster Sync Address", - "K151d2bb7": "Environment Name", - "Kfa744afd": "Number of Clusters", - "K23a3bd72": "Error", - "Ke039b9b5": "Normal", - "K5c123bad": "Role Name", - "K76036e25": "HTTP Request Header", - "K8d4cbf50": "Cookie", - "K44607e3f": "Exact Match", - "Kc287500a": "Prefix Match", - "Kfc0b1147": "Suffix Match", - "Ka4a92043": "Substring Match", - "K30b2e44f": "Non-Exact Match", - "Kb1587991": "Null Match", - "K1e97dbd8": "Exists Match", - "Kc8ee3e62": "Does Not Exist Match", - "K87c5a801": "Case-Sensitive Regex Match", - "K95f062f1": "Case-Insensitive Regex Match", - "Kfbd230a5": "Any Match", - "K413b9869": "Service Name", - "K1e84ad04": "Service ID", - "K72b0c0b3": "Number of APIs", - "Kf7200cd9": "Person in Charge", - "Kefaf9956": "Creation Time", - "K98db2cb9": "Application Status", - "Ke792d01c": "Service Association", - "K61b62ace": "Source", - "Ke63767cf": "Addition Time", - "K3a67ea90": "Subscriber", - "K442937c4": "Subscription Time", - "K34111022": "Protocol/Method", - "K62d10724": "URL", - "Ka9481f95": "Creator", - "Kf88d56fd": "Upstream ID", - "K11a92fb2": "Updater", - "K2c2bc64f": "Dynamic Service Discovery", - "Kc9a2a716": "HTTPS", - "Ka7f8266f": "Weighted Round-Robin", - "Kd17edabd": "IP Hash", - "Kaeba0229": "Pass Through Client Request Host", - "K6d7e2fd0": "Use Upstream Service Host", - "K31332633": "Rewrite Host", - "Ke65db976": "Weight", - "Kf966b12d": "Internal Service: Accessible via Gateway, but Not Listed in Service Plaza", - "Kfc939e49": "Public Service: Accessible via Gateway, Listed in Service Plaza, and Subscribable by Other Applications", - "Ke96ccf45": " ", - "K5582ac8": "Request Path", - "K92485dd1": "All APIs", - "Ke64e43a": "Hide Authentication Information", - "K1a78e6f0": "Expiration Time", - "K40bbb0a3": "Service ID", - "K9919285": "Service Type", - "K63938137": "Public Service", - "Kfb20a12": "Internal Service", - "Kedd64e4d": "Disabled", - "Ka29b346f": "Address (IP Port or Domain)", - "K63b1e0dc": "Weight (0-999)", - "K74ab00a3": "Approved", - "Kea996156": "Publishing Application Record", - "Kbea7d266": "Associated System", - "Ka36c13cc": "Calling System Name", - "Kd78d73a7": "Calling Service Name", - "K73c144eb": "Current System Name", - "K285bd65e": "Called Service Name", - "K5cbab635": "Called System Name", - "K93c2696e": "Online Result", - "K43fcaf94": "Success", - "Kc71c6a9": "Online Failed", - "K56c686f8": "Failed", - "K3ba29a85": "API", - "Kda8d5ea1": "Upstream", - "Kdefa9caa": "Usage Instructions", - "K36856e71": "Publish", - "K6382bbfd": "Subscription Management", - "K2eef4e4": "Subscription Review", - "Ka97bd9e5": "Subscriber Management", - "K5974bf24": "Management", - "K3fa5c4c3": "Call Topology", - "Kb5c7b82d": "Settings", - "K2472615e": "Number of Services", - "Kc02aa5f1": "Number of APIs", - "Ke08ff808": "Addition Date", - "Kd7d84192": "Name", - "Kc88e03b6": "Team Roles", - "Kdf35c48c": "All Members", - "K3818f03d": "Approval", - "K56b4254f": "Publishing Application", - "Kd518ba3e": "Hello! Welcome to APIPark", - "Ke66e4182": "APIPark allows you to quickly build an API open portal/market within your enterprise, offering extreme forwarding performance, API observability, service governance, multi-tenant management, subscription approval processes, and many other benefits.", - "Kedd41c18": "If you like our product, please consider giving us a Star or providing feedback.", - "Kef02fd87": "Quick Start", - "K43a3b38d": "We've provided some tasks to help you quickly get acquainted with APIPark.", - "Kc8239422": "Teams include personnel, applications, and services. Data between different teams is isolated, and can be used to manage different departments/project teams/teams within the enterprise.", - "Kd5be0cd7": "Services include a set of APIs and can be published to the API Marketplace for use by other teams.", - "K4ea67613": "Applications serve as identities for applying for services and calling APIs. They can apply for service calls in the API Marketplace, and each application has its own independent API access authentication.", - "Ka4748416": "Search for Services and APIs", - "K383e17e5": "You can view all public services in the API Marketplace.", - "K8f7808e6": "Subscribe to Services", - "Kb0755523": "To call an API of a particular service, you need to subscribe to the service first and wait for approval from the team providing the service before initiating API requests.", - "Kd28a1aa5": "Review Subscription Applications", - "K4472e361": "The team providing the service can review subscription applications from other teams. Only after approval can applications initiate API requests.", - "K297d8563": "The Dashboard provides various statistical charts to help us understand the API's operating status.", - "K48f7e21f": "Learn More Features", - "Ka3626c8c": "Hide Quick Start", - "Kd2c1a316": "Log In", - "Kf076f63c": "Please Enter Account", - "K80a560a1": "Account", - "K25c895d5": "Please Enter Password", - "K551b0348": "Password", - "K192b3e38": "Guest Mode", - "K91aa4801": "In guest mode, you can view all pages and features, but cannot edit data. Guest mode is for product feature exploration only, and you can disable it in the formal product.", - "K480045ce": "Version (0)-(1)", - "Kadee8e49": "Log Configuration", - "K3453272": "APIPark provides detailed API call logs to help enterprises monitor, analyze, and audit API operation statuses.", - "K33c76dbc": "Department Name", - "K84829ca9": "Parent Department ID", - "K4d7fc74b": "Sub-department Name", - "Ka16e6c44": "Inactive or Disabled Members Cannot Be Added to Departments", - "Ked03ba97": "Please Select the Department to Which the Member Should Be Added", - "K5e237e06": "Name", - "K184d3473": "Add Account", - "K1ecb35f2": "Edit Member Information", - "Ke6f00b44": "Join Department", - "K501cb1e7": "Are You Sure You Want to Delete This Member? This Action Cannot Be Undone.", - "Kf20863b5": "Members and Departments", - "K5f27a546": "Enter Username, Email to Search for Members", - "K26c698bb": "Add Department", - "Kb9cf2a7d": "Add Sub-department", - "Kc83551f5": "Rename", - "K3f1077c9": "Set Member Roles; Members Can Only See Features and Data Within Their Permission Scope.", - "Kdce62a6": "Search Department", - "K8ef69ee2": "Key", - "Kba3507d6": "Upload Key", - "K93ac0f23": "Key Files Usually Have a .key File Extension", - "K7cdd1331": "Upload Certificate", - "K6d91905d": "Certificate Files Usually Have a .crt or .pem File Extension", - "Kd0f6ded7": "Add Certificate", - "Ke5732d60": "Modify Certificate", - "K3ca07a70": "Certificate Management", - "Kdb927f83": "By Configuring and Managing SSL Certificates for API Services, Enterprises Can Encrypt Data Transmission to Prevent Sensitive Information from Being Stolen or Tampered With.", - "K877985b7": "Modify Configuration", - "Kdf66a675": "Set the Cluster Accessing the API to Ensure Stable Operation in a Distributed Environment and Flexibly Scale and Optimize According to Business Needs.", - "Kaf074220": "Not Configured", - "K5878440c": "Cluster Address", - "K5e9022f8": "Next Step", - "Kdbafd6f9": "Set Data Sources for Monitoring Reports; Once Configured, You Can Get Detailed API Call Statistical Charts.", - "K1358acf": "Statistical Charts", - "K8fa58214": "Data Source", - "K62dabdf6": "Address (IP:Port)", - "K2db12335": "Organization", - "K8e7a0f80": "Resource Configuration", - "Kabfe9512": "Save", - "K95c3fd8b": "Set Role Permission Scope.", - "K138facd3": "System-Level Role", - "K6eac768d": "Add Role", - "Kb9c2cf02": "Team-Level Role", - "Kb4ceecea": "Add Subcategory", - "K67479e88": "Modify Category Name", - "K2bc75e2c": "Add Category", - "Kab4aab44": "Rename Category", - "K8e0e6977": "Set Service Categories to Facilitate Quick API Discovery by Team Members.", - "Ke595a20a": "Category Name", - "K9679728f": "Parent Category ID", - "K9b2d08fd": "Subcategory Name", - "Kf14e76e5": "Replica", - "K2e050340": "API Basic Information", - "K90f3c02f": "Forwarding Rule Settings", - "K6ea8d549": "Edit Documentation", - "Kff5c18ac": "Last Editor", - "K2eb99415": "Forwarding Rules", - "Ke93388fd": "Edit API", - "K1b1ae3b0": "Copy API", - "K84aabfd4": "Add API", - "K6a662463": "Enter Name, URL to Search API", - "K59bc6280": "API Details", - "K2a16c93b": "Unit: ms, Minimum Value: 1", - "K469e475a": "Retry Count", - "Kd568e15c": "Publishing Result", - "K35f990b0": "View Details", - "Kdbc1f6cb": "Publishing Application", - "Kb6860a3f": "Rollback", - "Ka3494f4b": "Are You Sure You Want to Rollback?", - "Kb397a99f": "Revoke Application", - "K7d401c0f": "Are You Sure You Want to Revoke the Application?", - "Ke1b79b93": "Terminate Publishing", - "Ka2449180": "Are You Sure You Want to Terminate Publishing?", - "K2cb02f38": "New Version", - "Ka9c08390": "Only PNG, JPG, or SVG Format Images Are Allowed", - "Kcf756b7a": "API Call Prefix", - "K43d101a": "Optional, As Prefix for All APIs in Service, E.g., host/{service_name}/{api_path}, Cannot Be Modified Once Saved", - "Kdc840242": "Icon", - "K427a5bd5": "Only .png .jpg .jpeg .svg Format Images Are Supported, Files Larger Than 1KB Will Be Compressed", - "K44bc352d": "Logo", - "Kf52a584d": "Service Category", - "K72b21be5": "Set the Category Where the Service Is Displayed in the Service Marketplace", - "Kde6bae17": "Delete Service", - "K885ea699": "This Action Is Irreversible, Please Proceed with Caution!", - "K617f34f1": "Last Updated By", - "K6ebca204": "Last Update Time", - "K39ab0358": "Add Subscriber", - "K2d6658ed": "Add Service", - "K7b8f623f": "Enter Name, ID, Associated Team, Person in Charge to Search Service", - "Kdd9b5008": "Default Backend IP Address", - "K6bc47edb": "Request Protocol", - "Kc9acdb25": "Load Balancing", - "K632dba5c": "Forward Host", - "Kc1f08a63": "Rewrite Domain Name", - "K628f6851": "Timeout", - "Kaff62621": "Timeout Retry Count", - "Kc41ca30e": "Rate Limiting", - "K813e1c0a": "Team Name", - "K692f5aa6": "Team ID", - "K5de0bc2": "Team ID (team_id) Can Be Used to Retrieve the Team, Cannot Be Modified Once Saved.", - "Ka63dd985": "Team Leader", - "Ka6bcd272": "Leader Has Management Authority over the Team, Services, and Members within the Team", - "Ka2012bdd": "Delete Team", - "Kbde1f3d": "Service Data Must Be Cleared Before Deletion", - "K395acc14": "Remove Member", - "Kec46a57f": "Add Member", - "K48724410": "Enter Name to Search", - "Kb9052305": "Search Username, Email", - "K5ece3bac": "Set Team and Members; You Can Then Create Services and Applications, Subscribe to APIs within the Team; Members Can Only See Services and Applications within Their Team.", - "K510cdd27": "Add Team", - "K9244ae14": "Enter Name, ID, Person in Charge to Search Team", - "Kc7b24b4b": "Configure Team", - "Kecb51e2c": "Old Password", - "K8266bcf2": "New Password", - "Ka9aef039": "Confirm Password", - "Kcf42dcda": "Passwords Do Not Match", - "Kf876a42d": "Change Password", - "K8ed884f": "Manage Personal Account", - "K9be8e1d7": "API Call Statistics", - "K521ab28e": "Select Service", - "Kcc8265e1": "Select API", - "K8aefc1e4": "Enter Request Path to Search", - "K50d471b2": "Reset", - "Kee8ae330": "Query", - "Ka2c794a2": "Export", - "Kaf70c3b": "Exit Fullscreen", - "Kd22841a4": "(0) Call Details", - "K1512e983": "Application Call Statistics", - "Kb4d2007f": "Please Select Application", - "K8c7f2d2e": "Call Trend", - "K657c3452": "(0)-(1) Call Trend", - "Kc04efb87": "Call Volume Statistics", - "Keb98266e": "Join Overall Data Comparison", - "K18c2ed46": "(0) Call Volume", - "Kc3741830": "(0) Success Rate", - "Ka6aa5863": "Total Requests", - "K9eaef42": "Success Rate", - "K7082a4af": "Total Forwards", - "K1ce386fb": "Forward Success Rate", - "K87d6877e": "4xx", - "K4c8a54db": "5xx", - "Kd566283e": "Overall Call Trend", - "Kd23a0be6": "Request Payload Volume", - "Kec3e8361": "Response Payload Volume", - "Ke6250744": "4XX", - "K2d79d4e1": "5XX", - "Kcf6553c6": "Service Call Statistics", - "Kffcfe375": "Please Select Service", - "Ka65f739c": "Call Details", - "K89b7ac79": "Top 10 API Requests", - "Kc0915603": "Top 10 Application Calls", - "Kf90b54": "Top 10 Service Calls", - "Kfb26388": "No Request Statistics Data", - "Kc8cbd8f8": "Request Statistics", - "K8dece48": "No Forwarding Statistics Data", - "K1ee32434": "Forwarding Statistics", - "Kcd125e4d": "No Call Volume Statistics Data", - "Kaa114e8b": "No Payload Volume Statistics Data", - "K3ad84406": "Payload Volume Statistics", - "K19a3ebe0": "Successful Requests", - "Kcaa8259": "Successful Forwards", - "K888f038f": "Failed Status Code Count", - "K42d2bef2": "Average Response Time (ms)", - "K9197c994": "Maximum Response Time (ms)", - "K7c2f3fee": "Minimum Response Time (ms)", - "K3d85ea54": "Average Request Traffic (KB)", - "Keec09d32": "Maximum Request Traffic (KB)", - "K3786b48": "Minimum Request Traffic (KB)", - "K5168eb63": "Application Name", - "K546e46f": "Application ID", - "K4a1a14": "Monitoring Overview", - "K69741ea7": "Service Call Statistics", - "K9c8d9933": "API Call Statistics", - "K28cf9613": "Per Minute", - "K18f25019": "Every 5 Minutes", - "Kf00f01ca": "Per Hour", - "Kfcda87fc": "Per Day", - "K29ec75dc": "Per Week", - "K145e4941": "Billion", - "Ke6a935d": "Ten Thousand", - "K8f7abcab": "Times", - "K146477a8": "Service Tags", - "K4de0af74": "Service Categories", - "Kcce1af60": "Subscribed Services", - "Kb6e9328f": "Access Authorization", - "Kb7e869a4": "Application Management", - "Kd59290a2": "Search Categories or Tags", - "K6b75bdbc": "No API Data", - "Kd8a7a689": "Search or Select Application", - "K4b15d6f5": "Application Reason", - "Kb71b5a13": "Authentication Type", - "K4d1465ee": "Iss", - "K5dcd7ed8": "Signature Algorithm", - "K5b0eedd3": "Secret", - "K44f4ffe1": "RSA Public Key", - "Kc5ecd7d9": "Username JsonPath", - "K417d85cf": "Validation Field", - "K3b82fe1d": "Base64 Encryption", - "K49b5f4a3": "AK", - "K31418470": "SK", - "Kbfeb5297": "APIKey", - "K95764d1d": "Delete Application", - "K217cb125": "Authentication Details", - "K2bb63eca": "Add Authentication", - "Kd74d69b7": "Edit Authentication", - "K9cbe1e0": "Modify", - "Kd23d1716": "Add Authorization", - "K9dfa2c97": "Never Expire", - "Kfa920c0": "Expiration Time", - "Kbeb4e991": "Review Details", - "Ked811bb1": "Are You Sure You Want to Unsubscribe?", - "K50c39a62": "Cancel Subscription Application", - "K1856c229": "Are You Sure You Want to Cancel the Subscription Application?", - "K66ea2f0": "Search Service", - "Kfeb2559b": "Under Review", - "Ka2b6d281": "API Documentation", - "K667bbbe7": "Add Application", - "Ka4b45550": "No Service Description", - "K3c7b175f": "Number of Subscribed Services: (0) Approved, (1) Pending", - "K850b4b2d": "Status Code", - "Kbe3e9335": "Exit Test", - "K370a3eb2": "Service Marketplace", - "Kf7ec36d": "Service Details", - "K59cdbec3": "Introduction", - "K4aa9ed2c": "Apply", - "K6c060779": "Service Information", - "K8723422e": "Access Application", - "Kb97544cb": "Supplier", - "Kb32f0afe": "Category", - "K81634069": "Version", - "K96a2f1c8": "No Tags", - "K93d5a66e": "Number of Access Applications", - "K3e770a75": "Authentication Token", - "K96059c69": "Associated Tags", - "K32263abd": "Add Open API", - "K7829bb78": "Configure Open API", - "Kcdf76005": "Open API", - "Ke2601944": "Invoke Service", - "K8504bca8": "Zoom In", - "K693c1b41": "Zoom Out" -} + "Kc0e5ef9f": "Workspace", + "K3863c722": "My", + "K4de11e23": "Home", + "Kfe93ef35": "Applications", + "Kb58e0c3f": "Services", + "Kc9e489f5": "Team", + "K61c89f5f": "API Marketplace", + "K16d71239": "Dashboard", + "K714c192d": "Runtime View", + "Kd57dfe97": "System Topology", + "K3fe97dcc": "System Settings", + "K67ef3525": "Organization", + "K74aef1ad": "Members", + "Kf644225f": "Roles", + "K958da71f": "Service Category Management", + "Kf270ca55": "Operations & Integrations", + "Ke93d36ed": "Cluster", + "K9708a557": "Monitoring Reports", + "K481e8a05": "Certificate", + "Kca53edd0": "Logs", + "Kb283e720": "Resources", + "K631d646f": "Open API", + "K6535ff9c": "Account Settings", + "Kf15499b4": "Log Out", + "Kabbd6e6": "Documentation", + "K1196b104": "APIPark - Enterprise API Open Platform", + "K1f42de3": "HTTP Status Codes", + "K4770dff4": "System Status Codes", + "Kf89e58f1": "Description", + "K9e53c664": "Submit", + "Kf8e7294c": "Previous Step", + "Ka0451c97": "Cancel", + "Kb1dedda3": "Close", + "Kb2fc7600": "Add Configuration", + "K4e07217d": "Edit Configuration", + "K4ea968fe": "Edit(0)", + "Ka7aaaeb": "Add(0)", + "Kaff78ecf": "Please Enter Key", + "K65d46535": "Please Enter Value", + "Kc14b2ea3": "Back", + "K11d3633a": "ID", + "Kbff43de3": "Name", + "K16ca79ef": "Driver", + "K7a369eef": "Published", + "Kcfa1a4d2": "Offline", + "K771dc3b7": "Online", + "K530f5951": "View", + "Kecbd7449": "Delete", + "K1cbe2507": "Confirm", + "K48325b6": "Search(0) Name", + "Ka1d885c1": "Add", + "Kad207008": "Edit", + "Ke4b7722": "简体中文", + "Kd185073d": "English", + "K1ff96ff": "Apply System", + "K9bf855d6": "Associated Team", + "K11b994ed": "Applicant", + "K939baba7": "Application Date", + "Kdab2e63b": "Version Number", + "K8b29c460": "Version Description", + "K36a72ad1": "API List", + "K54e44357": "Upstream List", + "Kb8e8e6f5": "Remarks", + "K1ab0ae5b": "Application Reason", + "K53c00c3c": "Review Comments", + "K7edf331d": "Time", + "Kef45b208": "Last 1 Hour", + "K9dbf22b8": "Last 24 Hours", + "K820fbfab": "Last 3 Days", + "Kd6d28fc": "Last 7 Days", + "K3d7465f7": "File Logs", + "Kc87167a0": "HTTP Logs", + "K80ef19d3": "Kafka File Logs", + "K398cc3c5": "NSQ File Logs", + "K2bcdb54": "Syslog File Logs", + "K23fda291": "No Operation Permission, Please Contact Administrator.", + "K4618cb0a": "WeChat Mini Program", + "Ka854f511": "Path Required for File Retrieval", + "Kaa11a695": "Non-HTTPS or Non-HTTP Code Samples Are Not Supported", + "Kbe46924e": "Search Programming Language...", + "Ke8e4f258": "Programming Language", + "K29c07a47": "Success Example", + "K1f5c814d": "Failure Example", + "K4ef022d7": "Default text/html;charset=UTF-8", + "Kd061b5bf": "No Sample Provided", + "Kc14cec33": "Binary", + "K48b4d9e3": "Request Header", + "Kcd347eaf": "Request Body", + "K9e100bfe": "Query Parameters", + "K3e9f12fd": "REST Parameters", + "K2bfa290c": "API Request Editor", + "Kb36d111a": "Response Header", + "K980bde79": "Response", + "Kb04d201a": "More Settings", + "Kee74f5b4": "Add Sub-Parameter", + "Kc7d3106c": "Add Row Below", + "Keaabd222": "Tag", + "K8ad2c50e": "Parameter Name", + "K67d68dd1": "Type", + "K29245f47": "Required", + "Ke32cbcd3": "Example", + "Kc13936c6": "Enter URL or cURL", + "Ka1ede006": "HTTP", + "K152ac44e": "Parameter Location", + "K1660ae72": "Match Type", + "K91ced765": "Parameter Value", + "K5b265628": "Operation Type", + "K1826982d": "Add or Modify", + "Kd65b55f5": "Match Parameter Value", + "K15f35bf2": "Forward Upstream Path", + "K79dec0dd": "Request Timeout", + "K7d465645": "Bind Upstream Service", + "K63a6404d": "Retry Time", + "K47740727": "Forward Upstream Request Header", + "K2b605d42": "More", + "K1df9fbd5": "Import", + "K5e85df18": "Import Format", + "K9eaf7885": "Full Replacement", + "Kf8c3a80b": "Insert at End", + "Kd96b2d7d": "Incremental Update", + "Kf2fc08eb": "Request Header", + "Ka45f1d8": "REST Parameters", + "K94bb113a": "Size", + "K359919b5": "Save As File", + "K38bf1b90": "Response", + "K59f4186e": "Response Header", + "K5f1e23fd": "Body", + "Kf404ef7d": "Send (Enter)", + "K2dbfd648": "Abort", + "Kacabc771": "Seconds", + "K13ae6a93": "Copy", + "Ke54a14a3": "Format", + "K43934f6d": "Search", + "K741decac": "Replace", + "Kd507abff": "Confirm", + "Kca2d1624": "The (0) must not be negative.", + "K792b255a": "The (0) must be greater than or equal to the (1).", + "Kf0bed26d": "Value Enumeration", + "K633a03ca": "Enumeration", + "Kd2766caf": "Minimum Length", + "Kd6d52485": "Maximum Length", + "Kea15f66c": "Minimum Value", + "K1af340ff": "Maximum Value", + "K68691e16": "Drag Files Here to Upload, or Click to Select Files", + "Kcec46ae": "Upload Files", + "K760fb044": "Files Selected", + "Kea2bdee0": "Please Enter Interface Name", + "K49053438": "Detailed Description", + "K148f6fa4": "Advanced Matching", + "K3ae4c789": "Forwarding Configuration", + "K2f4d0a37": "Request Parameters", + "Kde2d6dbd": "Return Example", + "K70e6069c": "Test API", + "Ke4603448": "Request Header", + "K89fd86b3": "Request Body", + "K8747e3c4": "Request Sample Code", + "K8613e6e7": "Response Example", + "Kab1c2159": "Response Header", + "Kd2be51d1": "Response Body", + "K831aa6c0": "Applicant - Application", + "K58ca9485": "Apply Service", + "K283f55b4": "Service System", + "Kd60d204": "Service Team", + "K3a9a3b75": "Approval Status", + "K4f57b2de": "Approver", + "K31dabc6b": "Approval Time", + "K8582af3f": "Reject", + "K54e27f57": "Approve", + "K7eeca185": "Approval Complete", + "Kd4061161": "Publishing Under Review", + "K823bfe63": "Online", + "K97ddb3f8": "-", + "Kc9315fa1": "Rejected", + "K3fbe7511": "Publishing Error", + "Ke64e695c": "Publishing", + "K17f93984": "API Name", + "K1365fe45": "Request Method", + "Kc380335f": "Path", + "K4ee62e8": "This API Lacks (0)(1)(2), Please Provide", + "K385591f3": "Forwarding Information,", + "K68415c14": "Documentation Information,", + "K133b75e9": "Upstream Information,", + "Kad98e030": "Upstream Type", + "Kdeed8399": "Static Upstream", + "K78b1ca25": "Address", + "K6208054": "Pending Approval", + "K1be7f021": "Approved", + "K677a4959": "Publishing Terminated", + "Kfd6d2d3d": "Closed", + "K9d7e880a": "Published Version", + "K855135f": "Version Creation Time", + "Kcbf39b82": "Version Status", + "K339d15b5": "Creator", + "K7194cea2": "Review Time", + "K69827c60": "Publishing Status", + "K1644b775": "New", + "K4fdf4dcc": "Change", + "K33d66e26": "No Change", + "K9b70c007": "Missing Fields", + "Kd85208a3": "Rejected", + "K8adf7f8b": "Under Review", + "Kad6aa439": "Subscribed", + "K3118fdb0": "Unsubscribe", + "K9a68443b": "Cancel Application", + "K18307d56": "Manual Addition", + "K705fe9f5": "Subscription Application", + "Kbc96ebec": "Applicant Application", + "K1f89176d": "Applicant Team", + "Kfe731dfc": "Action", + "K71661ee8": "Required Field", + "Kcbee3f8": "Invalid Email Address", + "K442cfba1": "Please Enter", + "K3bb646e4": "Please Select", + "Ka4ecfa40": "English, Numbers, or Underscores Only; Must Start with a Letter", + "K39686a7f": "Supports Combination of Letters, Numbers, Hyphens, and Underscores", + "K4d6a0190": "Approval Comments Required When Rejecting", + "K37318b68": "Unable to Connect to Cluster; Please Check Address or Firewall Configuration", + "K7f0c746d": "Operation Successful", + "K6a365d01": "Operation Failed", + "K978062b6": "In Progress", + "Kca7bd6d4": "Loading Data", + "K3c93b77e": "Failed to Retrieve Data", + "Ke108c369": "Login Successful", + "K9168d3e": "Logout Successful, Redirecting to Login Page", + "K2f8a7ab7": "Review Comments Not Provided", + "Kb858d78a": "Copy Successful", + "K26e85d15": "Copy Failed, Please Copy Manually", + "K5cfdd950": "This Data Will Be Permanently Deleted, Are You Sure You Want to Delete?", + "K2a3f24ac": "Default Worksheet", + "K7e1ab4b0": "To", + "Kf1b166e7": "Details", + "K28555332": "URLs with Double Slashes // Are Not Supported", + "Keb9fcdad": "Username", + "Kc654b275": "Email", + "Kbe2ecc69": "Department", + "K759fb403": "Status", + "K52c8a730": "Enable", + "K718c9310": "Disable", + "K2c5882be": "Bind Domain", + "K1cc07937": "Expiration Date", + "K8b7c2592": "Updated By", + "Keefda53d": "Update Time", + "K9f3db3ca": "Cluster Name", + "Ke7487049": "Cluster ID", + "Kb660ffe8": "Node Name", + "Kf12b3034": "Management Address", + "K867e6faf": "Service Address", + "K37348a5e": "Cluster Sync Address", + "K151d2bb7": "Environment Name", + "Kfa744afd": "Number of Clusters", + "K23a3bd72": "Error", + "Ke039b9b5": "Normal", + "K5c123bad": "Role Name", + "K76036e25": "HTTP Request Header", + "K8d4cbf50": "Cookie", + "K44607e3f": "Exact Match", + "Kc287500a": "Prefix Match", + "Kfc0b1147": "Suffix Match", + "Ka4a92043": "Substring Match", + "K30b2e44f": "Non-Exact Match", + "Kb1587991": "Null Match", + "K1e97dbd8": "Exists Match", + "Kc8ee3e62": "Does Not Exist Match", + "K87c5a801": "Case-Sensitive Regex Match", + "K95f062f1": "Case-Insensitive Regex Match", + "Kfbd230a5": "Any Match", + "K413b9869": "Service Name", + "K1e84ad04": "Service ID", + "K72b0c0b3": "Number of APIs", + "Kf7200cd9": "Person in Charge", + "Kefaf9956": "Creation Time", + "K98db2cb9": "Application Status", + "Ke792d01c": "Service Association", + "K61b62ace": "Source", + "Ke63767cf": "Addition Time", + "K3a67ea90": "Subscriber", + "K442937c4": "Subscription Time", + "K34111022": "Protocol/Method", + "K62d10724": "URL", + "Ka9481f95": "Creator", + "Kf88d56fd": "Upstream ID", + "K11a92fb2": "Updater", + "K2c2bc64f": "Dynamic Service Discovery", + "Kc9a2a716": "HTTPS", + "Ka7f8266f": "Weighted Round-Robin", + "Kd17edabd": "IP Hash", + "Kaeba0229": "Pass Through Client Request Host", + "K6d7e2fd0": "Use Upstream Service Host", + "K31332633": "Rewrite Host", + "Ke65db976": "Weight", + "Kf966b12d": "Internal Service: Accessible via Gateway, but Not Listed in Service Plaza", + "Kfc939e49": "Public Service: Accessible via Gateway, Listed in Service Plaza, and Subscribable by Other Applications", + "Ke96ccf45": " ", + "K5582ac8": "Request Path", + "K92485dd1": "All APIs", + "Ke64e43a": "Hide Authentication Information", + "K1a78e6f0": "Expiration Time", + "K40bbb0a3": "Service ID", + "K9919285": "Service Type", + "K63938137": "Public Service", + "Kfb20a12": "Internal Service", + "Kedd64e4d": "Disabled", + "Ka29b346f": "Address (IP Port or Domain)", + "K63b1e0dc": "Weight (0-999)", + "K74ab00a3": "Approved", + "Kea996156": "Publishing Application Record", + "Kbea7d266": "Associated System", + "Ka36c13cc": "Calling System Name", + "Kd78d73a7": "Calling Service Name", + "K73c144eb": "Current System Name", + "K285bd65e": "Called Service Name", + "K5cbab635": "Called System Name", + "K93c2696e": "Online Result", + "K43fcaf94": "Success", + "Kc71c6a9": "Online Failed", + "K56c686f8": "Failed", + "K3ba29a85": "API", + "Kda8d5ea1": "Upstream", + "Kdefa9caa": "Usage Instructions", + "K36856e71": "Publish", + "K6382bbfd": "Subscription Management", + "K2eef4e4": "Subscription Review", + "Ka97bd9e5": "Subscriber Management", + "K5974bf24": "Management", + "K3fa5c4c3": "Call Topology", + "Kb5c7b82d": "Settings", + "K2472615e": "Number of Services", + "Kc02aa5f1": "Number of APIs", + "Ke08ff808": "Addition Date", + "Kd7d84192": "Name", + "Kc88e03b6": "Team Roles", + "Kdf35c48c": "All Members", + "K3818f03d": "Approval", + "K56b4254f": "Publishing Application", + "Kd518ba3e": "Hello! Welcome to APIPark", + "Ke66e4182": "APIPark allows you to quickly build an API open portal/market within your enterprise, offering extreme forwarding performance, API observability, service governance, multi-tenant management, subscription approval processes, and many other benefits.", + "Kedd41c18": "If you like our product, please consider giving us a Star or providing feedback.", + "Kef02fd87": "Quick Start", + "K43a3b38d": "We've provided some tasks to help you quickly get acquainted with APIPark.", + "Kc8239422": "Teams include personnel, applications, and services. Data between different teams is isolated, and can be used to manage different departments/project teams/teams within the enterprise.", + "Kd5be0cd7": "Services include a set of APIs and can be published to the API Marketplace for use by other teams.", + "K4ea67613": "Applications serve as identities for applying for services and calling APIs. They can apply for service calls in the API Marketplace, and each application has its own independent API access authentication.", + "Ka4748416": "Search for Services and APIs", + "K383e17e5": "You can view all public services in the API Marketplace.", + "K8f7808e6": "Subscribe to Services", + "Kb0755523": "To call an API of a particular service, you need to subscribe to the service first and wait for approval from the team providing the service before initiating API requests.", + "Kd28a1aa5": "Review Subscription Applications", + "K4472e361": "The team providing the service can review subscription applications from other teams. Only after approval can applications initiate API requests.", + "K297d8563": "The Dashboard provides various statistical charts to help us understand the API's operating status.", + "K48f7e21f": "Learn More Features", + "Ka3626c8c": "Hide Quick Start", + "Kd2c1a316": "Log In", + "Kf076f63c": "Please Enter Account", + "K80a560a1": "Account", + "K25c895d5": "Please Enter Password", + "K551b0348": "Password", + "K192b3e38": "Guest Mode", + "K91aa4801": "In guest mode, you can view all pages and features, but cannot edit data. Guest mode is for product feature exploration only, and you can disable it in the formal product.", + "K480045ce": "Version (0)-(1)", + "Kadee8e49": "Log Configuration", + "K3453272": "APIPark provides detailed API call logs to help enterprises monitor, analyze, and audit API operation statuses.", + "K33c76dbc": "Department Name", + "K84829ca9": "Parent Department ID", + "K4d7fc74b": "Sub-department Name", + "Ka16e6c44": "Inactive or Disabled Members Cannot Be Added to Departments", + "Ked03ba97": "Please Select the Department to Which the Member Should Be Added", + "K5e237e06": "Name", + "K184d3473": "Add Account", + "K1ecb35f2": "Edit Member Information", + "Ke6f00b44": "Join Department", + "K501cb1e7": "Are You Sure You Want to Delete This Member? This Action Cannot Be Undone.", + "Kf20863b5": "Members and Departments", + "K5f27a546": "Enter Username, Email to Search for Members", + "K26c698bb": "Add Department", + "Kb9cf2a7d": "Add Sub-department", + "Kc83551f5": "Rename", + "K3f1077c9": "Set Member Roles; Members Can Only See Features and Data Within Their Permission Scope.", + "Kdce62a6": "Search Department", + "K8ef69ee2": "Key", + "Kba3507d6": "Upload Key", + "K93ac0f23": "Key Files Usually Have a .key File Extension", + "K7cdd1331": "Upload Certificate", + "K6d91905d": "Certificate Files Usually Have a .crt or .pem File Extension", + "Kd0f6ded7": "Add Certificate", + "Ke5732d60": "Modify Certificate", + "K3ca07a70": "Certificate Management", + "Kdb927f83": "By Configuring and Managing SSL Certificates for API Services, Enterprises Can Encrypt Data Transmission to Prevent Sensitive Information from Being Stolen or Tampered With.", + "K877985b7": "Modify Configuration", + "Kdf66a675": "Set the Cluster Accessing the API to Ensure Stable Operation in a Distributed Environment and Flexibly Scale and Optimize According to Business Needs.", + "Kaf074220": "Not Configured", + "K5878440c": "Cluster Address", + "K5e9022f8": "Next Step", + "Kdbafd6f9": "Set Data Sources for Monitoring Reports; Once Configured, You Can Get Detailed API Call Statistical Charts.", + "K1358acf": "Statistical Charts", + "K8fa58214": "Data Source", + "K62dabdf6": "Address (IP:Port)", + "K2db12335": "Organization", + "K8e7a0f80": "Resource Configuration", + "Kabfe9512": "Save", + "K95c3fd8b": "Set Role Permission Scope.", + "K138facd3": "System-Level Role", + "K6eac768d": "Add Role", + "Kb9c2cf02": "Team-Level Role", + "Kb4ceecea": "Add Subcategory", + "K67479e88": "Modify Category Name", + "K2bc75e2c": "Add Category", + "Kab4aab44": "Rename Category", + "K8e0e6977": "Set Service Categories to Facilitate Quick API Discovery by Team Members.", + "Ke595a20a": "Category Name", + "K9679728f": "Parent Category ID", + "K9b2d08fd": "Subcategory Name", + "Kf14e76e5": "Replica", + "K2e050340": "API Basic Information", + "K90f3c02f": "Forwarding Rule Settings", + "K6ea8d549": "Edit Documentation", + "Kff5c18ac": "Last Editor", + "K2eb99415": "Forwarding Rules", + "Ke93388fd": "Edit API", + "K1b1ae3b0": "Copy API", + "K84aabfd4": "Add API", + "K6a662463": "Enter Name, URL to Search API", + "K59bc6280": "API Details", + "K2a16c93b": "Unit: ms, Minimum Value: 1", + "K469e475a": "Retry Count", + "Kd568e15c": "Publishing Result", + "K35f990b0": "View Details", + "Kdbc1f6cb": "Publishing Application", + "Kb6860a3f": "Rollback", + "Ka3494f4b": "Are You Sure You Want to Rollback?", + "Kb397a99f": "Revoke Application", + "K7d401c0f": "Are You Sure You Want to Revoke the Application?", + "Ke1b79b93": "Terminate Publishing", + "Ka2449180": "Are You Sure You Want to Terminate Publishing?", + "K2cb02f38": "New Version", + "Ka9c08390": "Only PNG, JPG, or SVG Format Images Are Allowed", + "Kcf756b7a": "API Call Prefix", + "K43d101a": "Optional, As Prefix for All APIs in Service, E.g., host/{service_name}/{api_path}, Cannot Be Modified Once Saved", + "Kdc840242": "Icon", + "K427a5bd5": "Only .png .jpg .jpeg .svg Format Images Are Supported, Files Larger Than 1KB Will Be Compressed", + "K44bc352d": "Logo", + "Kf52a584d": "Service Category", + "K72b21be5": "Set the Category Where the Service Is Displayed in the Service Marketplace", + "Kde6bae17": "Delete Service", + "K885ea699": "This Action Is Irreversible, Please Proceed with Caution!", + "K617f34f1": "Last Updated By", + "K6ebca204": "Last Update Time", + "K39ab0358": "Add Subscriber", + "K2d6658ed": "Add Service", + "K7b8f623f": "Enter Name, ID, Associated Team, Person in Charge to Search Service", + "Kdd9b5008": "Default Backend IP Address", + "K6bc47edb": "Request Protocol", + "Kc9acdb25": "Load Balancing", + "K632dba5c": "Forward Host", + "Kc1f08a63": "Rewrite Domain Name", + "K628f6851": "Timeout", + "Kaff62621": "Timeout Retry Count", + "Kc41ca30e": "Rate Limiting", + "K813e1c0a": "Team Name", + "K692f5aa6": "Team ID", + "K5de0bc2": "Team ID (team_id) Can Be Used to Retrieve the Team, Cannot Be Modified Once Saved.", + "Ka63dd985": "Team Leader", + "Ka6bcd272": "Leader Has Management Authority over the Team, Services, and Members within the Team", + "Ka2012bdd": "Delete Team", + "Kbde1f3d": "Service Data Must Be Cleared Before Deletion", + "K395acc14": "Remove Member", + "Kec46a57f": "Add Member", + "K48724410": "Enter Name to Search", + "Kb9052305": "Search Username, Email", + "K5ece3bac": "Set Team and Members; You Can Then Create Services and Applications, Subscribe to APIs within the Team; Members Can Only See Services and Applications within Their Team.", + "K510cdd27": "Add Team", + "K9244ae14": "Enter Name, ID, Person in Charge to Search Team", + "Kc7b24b4b": "Configure Team", + "Kecb51e2c": "Old Password", + "K8266bcf2": "New Password", + "Ka9aef039": "Confirm Password", + "Kcf42dcda": "Passwords Do Not Match", + "Kf876a42d": "Change Password", + "K8ed884f": "Manage Personal Account", + "K9be8e1d7": "API Call Statistics", + "K521ab28e": "Select Service", + "Kcc8265e1": "Select API", + "K8aefc1e4": "Enter Request Path to Search", + "K50d471b2": "Reset", + "Kee8ae330": "Query", + "Ka2c794a2": "Export", + "Kaf70c3b": "Exit Fullscreen", + "Kd22841a4": "(0) Call Details", + "K1512e983": "Application Call Statistics", + "Kb4d2007f": "Please Select Application", + "K8c7f2d2e": "Call Trend", + "K657c3452": "(0)-(1) Call Trend", + "Kc04efb87": "Call Volume Statistics", + "Keb98266e": "Join Overall Data Comparison", + "K18c2ed46": "(0) Call Volume", + "Kc3741830": "(0) Success Rate", + "Ka6aa5863": "Total Requests", + "K9eaef42": "Success Rate", + "K7082a4af": "Total Forwards", + "K1ce386fb": "Forward Success Rate", + "K87d6877e": "4xx", + "K4c8a54db": "5xx", + "Kd566283e": "Overall Call Trend", + "Kd23a0be6": "Request Payload Volume", + "Kec3e8361": "Response Payload Volume", + "Ke6250744": "4XX", + "K2d79d4e1": "5XX", + "Kcf6553c6": "Service Call Statistics", + "Kffcfe375": "Please Select Service", + "Ka65f739c": "Call Details", + "K89b7ac79": "Top 10 API Requests", + "Kc0915603": "Top 10 Application Calls", + "Kf90b54": "Top 10 Service Calls", + "Kfb26388": "No Request Statistics Data", + "Kc8cbd8f8": "Request Statistics", + "K8dece48": "No Forwarding Statistics Data", + "K1ee32434": "Forwarding Statistics", + "Kcd125e4d": "No Call Volume Statistics Data", + "Kaa114e8b": "No Payload Volume Statistics Data", + "K3ad84406": "Payload Volume Statistics", + "K19a3ebe0": "Successful Requests", + "Kcaa8259": "Successful Forwards", + "K888f038f": "Failed Status Code Count", + "K42d2bef2": "Average Response Time (ms)", + "K9197c994": "Maximum Response Time (ms)", + "K7c2f3fee": "Minimum Response Time (ms)", + "K3d85ea54": "Average Request Traffic (KB)", + "Keec09d32": "Maximum Request Traffic (KB)", + "K3786b48": "Minimum Request Traffic (KB)", + "K5168eb63": "Application Name", + "K546e46f": "Application ID", + "K4a1a14": "Monitoring Overview", + "K69741ea7": "Service Call Statistics", + "K9c8d9933": "API Call Statistics", + "K28cf9613": "Per Minute", + "K18f25019": "Every 5 Minutes", + "Kf00f01ca": "Per Hour", + "Kfcda87fc": "Per Day", + "K29ec75dc": "Per Week", + "K145e4941": "Billion", + "Ke6a935d": "Ten Thousand", + "K8f7abcab": "Times", + "K146477a8": "Service Tags", + "K4de0af74": "Service Categories", + "Kcce1af60": "Subscribed Services", + "Kb6e9328f": "Access Authorization", + "Kb7e869a4": "Application Management", + "Kd59290a2": "Search Categories or Tags", + "K6b75bdbc": "No API Data", + "Kd8a7a689": "Search or Select Application", + "K4b15d6f5": "Application Reason", + "Kb71b5a13": "Authentication Type", + "K4d1465ee": "Iss", + "K5dcd7ed8": "Signature Algorithm", + "K5b0eedd3": "Secret", + "K44f4ffe1": "RSA Public Key", + "Kc5ecd7d9": "Username JsonPath", + "K417d85cf": "Validation Field", + "K3b82fe1d": "Base64 Encryption", + "K49b5f4a3": "AK", + "K31418470": "SK", + "Kbfeb5297": "APIKey", + "K95764d1d": "Delete Application", + "K217cb125": "Authentication Details", + "K2bb63eca": "Add Authentication", + "Kd74d69b7": "Edit Authentication", + "K9cbe1e0": "Modify", + "Kd23d1716": "Add Authorization", + "K9dfa2c97": "Never Expire", + "Kfa920c0": "Expiration Time", + "Kbeb4e991": "Review Details", + "Ked811bb1": "Are You Sure You Want to Unsubscribe?", + "K50c39a62": "Cancel Subscription Application", + "K1856c229": "Are You Sure You Want to Cancel the Subscription Application?", + "K66ea2f0": "Search Service", + "Kfeb2559b": "Under Review", + "Ka2b6d281": "API Documentation", + "K667bbbe7": "Add Application", + "Ka4b45550": "No Service Description", + "K3c7b175f": "Number of Subscribed Services: (0) Approved, (1) Pending", + "K850b4b2d": "Status Code", + "Kbe3e9335": "Exit Test", + "K370a3eb2": "Service Marketplace", + "Kf7ec36d": "Service Details", + "K59cdbec3": "Introduction", + "K4aa9ed2c": "Apply", + "K6c060779": "Service Information", + "K8723422e": "Access Application", + "Kb97544cb": "Supplier", + "Kb32f0afe": "Category", + "K81634069": "Version", + "K96a2f1c8": "No Tags", + "K93d5a66e": "Number of Access Applications", + "K3e770a75": "Authentication Token", + "K96059c69": "Associated Tags", + "K32263abd": "Add Open API", + "K7829bb78": "Configure Open API", + "Kcdf76005": "Open API", + "Ke2601944": "Invoke Service", + "K8504bca8": "Zoom In", + "K693c1b41": "Zoom Out" + } \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/newJson/en-GB.json b/frontend/packages/common/src/locales/scan/newJson/en-GB.json new file mode 100644 index 00000000..e7efcc3f --- /dev/null +++ b/frontend/packages/common/src/locales/scan/newJson/en-GB.json @@ -0,0 +1,16 @@ +{ + "Kfd50704d": "暂无(0)权限,请联系管理员分配。", + "K48322168": "未分配", + "K98f247f9": "超级管理员", + "K9c8a571f": "团队管理员", + "K929b485b": "运维管理员", + "K82cc5ec2": "普通成员", + "Ke41d7451": "只读成员", + "Kf99e8b66": "服务管理员", + "Kda8db57a": "服务开发者", + "K216a1ac7": "应用开发者", + "K27924db": "应用管理员", + "K8dc5c723": "驱动名称", + "K9919285b": "服务类型", + "K396e56ab": "报文量" +} diff --git a/frontend/packages/common/src/locales/scan/newJson/zh-CN.json b/frontend/packages/common/src/locales/scan/newJson/zh-CN.json new file mode 100644 index 00000000..e7efcc3f --- /dev/null +++ b/frontend/packages/common/src/locales/scan/newJson/zh-CN.json @@ -0,0 +1,16 @@ +{ + "Kfd50704d": "暂无(0)权限,请联系管理员分配。", + "K48322168": "未分配", + "K98f247f9": "超级管理员", + "K9c8a571f": "团队管理员", + "K929b485b": "运维管理员", + "K82cc5ec2": "普通成员", + "Ke41d7451": "只读成员", + "Kf99e8b66": "服务管理员", + "Kda8db57a": "服务开发者", + "K216a1ac7": "应用开发者", + "K27924db": "应用管理员", + "K8dc5c723": "驱动名称", + "K9919285b": "服务类型", + "K396e56ab": "报文量" +} diff --git a/frontend/packages/core/src/const/member/const.tsx b/frontend/packages/core/src/const/member/const.tsx index b785bff2..3413bb59 100644 --- a/frontend/packages/core/src/const/member/const.tsx +++ b/frontend/packages/core/src/const/member/const.tsx @@ -1,12 +1,12 @@ import { PageProColumns } from "@common/components/aoplatform/PageList"; import { MemberTableListItem } from "./type"; -import { $t } from "@common/locales"; + export const MEMBER_TABLE_COLUMNS: PageProColumns[] = [ { - title:$t('用户名'), + title:('用户名'), dataIndex: 'name', ellipsis:true, width:160, @@ -16,12 +16,12 @@ export const MEMBER_TABLE_COLUMNS: PageProColumns[] = [ }, }, { - title:$t('邮箱'), + title:('邮箱'), dataIndex: 'email', ellipsis:true, }, { - title:$t('部门'), + title:('部门'), dataIndex: 'department', ellipsis:true, filterMode:'tree', @@ -32,20 +32,20 @@ export const MEMBER_TABLE_COLUMNS: PageProColumns[] = [ filterSearch: true, }, { - title:$t('角色'), + title:('角色'), dataIndex: 'roles', ellipsis:true, width:200 }, { - title:$t('状态'), + title:('状态'), dataIndex:'enable', valueType: 'select', filters: true, onFilter: true, valueEnum:new Map([ - [true,{$t('启用')}], - [false,{$t('禁用')}], + [true,{('启用')}], + [false,{('禁用')}], ]) } ]; diff --git a/frontend/packages/core/src/const/partitions/const.tsx b/frontend/packages/core/src/const/partitions/const.tsx index cc5f7f43..1734c392 100644 --- a/frontend/packages/core/src/const/partitions/const.tsx +++ b/frontend/packages/core/src/const/partitions/const.tsx @@ -1,13 +1,13 @@ import { PartitionCertTableListItem, PartitionClusterNodeModalTableListItem, PartitionClusterNodeTableListItem, PartitionClusterTableListItem, PartitionTableListItem } from "./types"; import { ColumnType } from "antd/es/table"; import CopyAddrList from "@common/components/aoplatform/CopyAddrList"; -import { $t } from "@common/locales"; + import { PageProColumns } from "@common/components/aoplatform/PageList"; export const PARTITION_CERT_TABLE_COLUMNS: PageProColumns[] = [ { - title:$t('证书'), + title:('证书'), dataIndex: 'name', ellipsis:true, width:160, @@ -17,7 +17,7 @@ export const PARTITION_CERT_TABLE_COLUMNS: PageProColumns( entity.domains.join(',') @@ -25,7 +25,7 @@ export const PARTITION_CERT_TABLE_COLUMNS: PageProColumns[] = [ { - title:$t('集群名称'), + title:('集群名称'), dataIndex: 'name', ellipsis:true, width:160, @@ -67,13 +67,13 @@ export const PARTITION_CLUSTER_TABLE_COLUMNS : PageProColumns[] = [ { - title:$t('节点名称'), + title:('节点名称'), dataIndex: 'name', ellipsis:true, fixed:'left', @@ -103,28 +103,28 @@ export const PARTITION_CLUSTER_NODE_COLUMNS: PageProColumns() }, { - title:$t('服务地址'), + title:('服务地址'), dataIndex: 'serviceAddress', ellipsis:true, width:230, render:(_,entity)=>() }, { - title:$t('集群同步地址'), + title:('集群同步地址'), dataIndex: 'peerAddress', ellipsis:true, width:230, render:(_,entity)=>() }, { - title:$t('状态'), + title:('状态'), dataIndex: 'status', ellipsis:true, width:86, @@ -139,12 +139,12 @@ export const PARTITION_CLUSTER_NODE_COLUMNS: PageProColumns[] = [ - {title:$t('名称'), dataIndex:'name',width:200, + {title:('名称'), dataIndex:'name',width:200, ellipsis:true, fixed:'left'}, - {title:$t('管理地址'), dataIndex:'managerAddress',width:240,ellipsis:true,render:(_,entity)=>()}, - {title:$t('服务地址'), dataIndex:'serviceAddress',width:240,ellipsis:true,render:(_,entity)=>()}, - {title:$t('状态'), dataIndex:'status', + {title:('管理地址'), dataIndex:'managerAddress',width:240,ellipsis:true,render:(_,entity)=>()}, + {title:('服务地址'), dataIndex:'serviceAddress',width:240,ellipsis:true,render:(_,entity)=>()}, + {title:('状态'), dataIndex:'status', render:(text)=>( {ClusterStatusEnum[text]} )} @@ -152,7 +152,7 @@ export const NODE_MODAL_COLUMNS:ColumnType[] = [ { - title:$t('环境名称'), + title:('环境名称'), dataIndex: 'name', ellipsis:true, fixed:'left', @@ -161,20 +161,20 @@ export const PARTITION_LIST_COLUMNS: PageProColumns[] = }, }, { - title:$t('ID'), + title:('ID'), dataIndex: 'id', ellipsis:true, width:140, }, // { - // title:$t('集群数量', + // title:('集群数量', // dataIndex: 'clusterNum', // sorter: (a,b)=> { // return a.clusterNum - b.clusterNum // }, // }, { - title:$t('更新者'), + title:('更新者'), dataIndex: ['updater','name'], ellipsis: true, filters: true, @@ -184,7 +184,7 @@ export const PARTITION_LIST_COLUMNS: PageProColumns[] = filterSearch: true }, { - title:$t('更新时间'), + title:('更新时间'), dataIndex: 'updateTime', ellipsis:true, width:182, @@ -195,8 +195,8 @@ export const PARTITION_LIST_COLUMNS: PageProColumns[] = ]; export const ClusterStatusEnum ={ - 0: $t('异常'), - 1: $t('正常') + 0: ('异常'), + 1: ('正常') } export const DASHBOARD_SETTING_DRIVER_OPTION_LIST = [ diff --git a/frontend/packages/core/src/const/role/const.tsx b/frontend/packages/core/src/const/role/const.tsx index ca4f2cab..2631d033 100644 --- a/frontend/packages/core/src/const/role/const.tsx +++ b/frontend/packages/core/src/const/role/const.tsx @@ -1,8 +1,7 @@ -import { $t } from "@common/locales" export const ROLE_TABLE_COLUMNS = [ { - title:$t('角色名称'), + title:'角色名称', dataIndex: 'name', ellipsis:true, fixed:'left', diff --git a/frontend/packages/core/src/const/system/const.tsx b/frontend/packages/core/src/const/system/const.tsx index a48c4b98..bdadaeab 100644 --- a/frontend/packages/core/src/const/system/const.tsx +++ b/frontend/packages/core/src/const/system/const.tsx @@ -10,7 +10,7 @@ import { LoadingOutlined } from "@ant-design/icons"; import { SystemInsidePublishOnlineItems } from "../../pages/system/publish/SystemInsidePublishOnline"; import dayjs from 'dayjs'; import { Link } from "react-router-dom"; -import { $t } from "@common/locales"; + import { PageProColumns } from "@common/components/aoplatform/PageList"; export enum SubscribeEnum{ @@ -39,34 +39,34 @@ export enum SubscribeFromEnum { export const MatchPositionEnum = { - 'header' : $t('HTTP 请求头'), - 'query': $t('请求参数'), - 'cookie' : $t('Cookie') + 'header' : ('HTTP 请求头'), + 'query': ('请求参数'), + 'cookie' : ('Cookie') } export const MatchTypeEnum = { - 'EQUAL' : $t('全等匹配'), - 'PREFIX' : $t('前缀匹配'), - 'SUFFIX' :$t('后缀匹配'), - 'SUBSTR' : $t('子串匹配'), - 'UNEQUAL' : $t('非等匹配'), - 'NULL' : $t('空值匹配'), - 'EXIST' : $t('存在匹配'), - 'UNEXIST':$t('不存在匹配'), - 'REGEXP':$t('区分大小写的正则匹配'), - 'REGEXPG':$t('不区分大小写的正则匹配'), - 'unknown': $t('任意匹配') + 'EQUAL' : ('全等匹配'), + 'PREFIX' : ('前缀匹配'), + 'SUFFIX' :('后缀匹配'), + 'SUBSTR' : ('子串匹配'), + 'UNEQUAL' : ('非等匹配'), + 'NULL' : ('空值匹配'), + 'EXIST' : ('存在匹配'), + 'UNEXIST':('不存在匹配'), + 'REGEXP':('区分大小写的正则匹配'), + 'REGEXPG':('不区分大小写的正则匹配'), + 'unknown': ('任意匹配') } export const SYSTEM_I18NEXT_FOR_ENUM = { - [SubscribeEnum.Rejected]:$t('驳回'), - [SubscribeEnum.Reviewing]:$t('审核中'), - [SubscribeEnum.Subscribed]:$t('已订阅'), - [SubscribeEnum.Unsubscribed]:$t('取消订阅'), - [SubscribeEnum.CancelRequest]:$t('取消申请'), - [SubscribeFromEnum.manual]:$t('手动添加'), - [SubscribeFromEnum.subscribe]:$t('订阅申请'), + [SubscribeEnum.Rejected]:('驳回'), + [SubscribeEnum.Reviewing]:('审核中'), + [SubscribeEnum.Subscribed]:('已订阅'), + [SubscribeEnum.Unsubscribed]:('取消订阅'), + [SubscribeEnum.CancelRequest]:('取消申请'), + [SubscribeFromEnum.manual]:('手动添加'), + [SubscribeFromEnum.subscribe]:('订阅申请'), } export const HTTP_METHOD = ['GET','POST','PUT','DELETE','PATCH','HEAD'] @@ -86,7 +86,7 @@ export const ALGORITHM_ITEM = [ export const SYSTEM_TABLE_COLUMNS: PageProColumns[] = [ { - title:$t('服务名称'), + title:('服务名称'), dataIndex: 'name', ellipsis:true, width:160, @@ -96,13 +96,13 @@ export const SYSTEM_TABLE_COLUMNS: PageProColumns[] = [ }, }, { - title:$t('服务 ID'), + title:('服务 ID'), dataIndex: 'id', width: 140, ellipsis:true, }, { - title:$t('所属团队'), + title:('所属团队'), dataIndex: ['team','name'], ellipsis:true, // filters: true, @@ -110,7 +110,7 @@ export const SYSTEM_TABLE_COLUMNS: PageProColumns[] = [ // filterSearch: true, }, { - title:$t('API 数量'), + title:('API 数量'), dataIndex: 'apiNum', ellipsis:true, sorter: (a,b)=> { @@ -118,12 +118,12 @@ export const SYSTEM_TABLE_COLUMNS: PageProColumns[] = [ }, }, { - title: $t('描述'), + title: ('描述'), dataIndex: 'description', ellipsis:true, }, { - title:$t('负责人'), + title:('负责人'), dataIndex: ['master','name'], ellipsis: true, width:108, @@ -133,7 +133,7 @@ export const SYSTEM_TABLE_COLUMNS: PageProColumns[] = [ filterSearch: true, }, { - title:$t('创建时间'), + title:('创建时间'), dataIndex: 'createTime', width:182, ellipsis:true, @@ -143,7 +143,7 @@ export const SYSTEM_TABLE_COLUMNS: PageProColumns[] = [ export const SYSTEM_SUBSERVICE_TABLE_COLUMNS: PageProColumns[] = [ { - title:$t('服务名称'), + title:('服务名称'), dataIndex: ['service','name'], ellipsis:true, width:160, @@ -153,13 +153,13 @@ export const SYSTEM_SUBSERVICE_TABLE_COLUMNS: PageProColumns{$t('驳回')}], - [1,{$t('审核中')}], - [2,{$t('已订阅')}], - [3,{$t('取消订阅')}], - [4,{$t('取消申请')}], + [0,{('驳回')}], + [1,{('审核中')}], + [2,{('已订阅')}], + [3,{('取消订阅')}], + [4,{('取消申请')}], ]) }, { - title:$t('所属服务'), + title:('所属服务'), dataIndex: ['project','name'], ellipsis:true }, { - title:$t('所属团队'), + title:('所属团队'), dataIndex: ['team','name'], ellipsis:true }, { - title:$t('申请人'), + title:('申请人'), dataIndex: ['applier','name'], ellipsis: true, width:88, @@ -197,19 +197,19 @@ export const SYSTEM_SUBSERVICE_TABLE_COLUMNS: PageProColumns{$t('手动添加')}], - [1,{$t('订阅申请')}], + [0,{('手动添加')}], + [1,{('订阅申请')}], ]) }, { - title:$t('添加时间'), + title:('添加时间'), dataIndex: 'createTime', ellipsis:true, width:182, @@ -222,7 +222,7 @@ export const SYSTEM_SUBSERVICE_TABLE_COLUMNS: PageProColumns[] = [ { - title:$t('服务名称'), + title:('服务名称'), dataIndex: ['service','name'], ellipsis:true, width:160, @@ -232,35 +232,35 @@ export const SYSTEM_SUBSCRIBER_TABLE_COLUMNS: PageProColumns{$t('手动添加')}], - [1,{$t('订阅申请')}], + [0,{('手动添加')}], + [1,{('订阅申请')}], ]) }, { - title:$t('订阅时间'), + title:('订阅时间'), dataIndex: 'applyTime', ellipsis:true, width:182, @@ -272,7 +272,7 @@ export const SYSTEM_SUBSCRIBER_TABLE_COLUMNS: PageProColumns = [ - {title:$t('成员'), + {title:('成员'), render:(_,entity)=>{ return <>
@@ -288,7 +288,7 @@ export const memberModalColumn:ColumnsType = [ export const SYSTEM_MEMBER_TABLE_COLUMN: PageProColumns[] = [ { - title:$t('用户名'), + title:('用户名'), dataIndex: ['user','name'], ellipsis:true, width:160, @@ -298,12 +298,12 @@ export const SYSTEM_MEMBER_TABLE_COLUMN: PageProColumns[] = [ { - title:$t('参数位置'), + title:('参数位置'), key: 'position', component: , renderText: (value: unknown) => <>{value}, required: true }, { - title:$t('匹配类型'), + title:('匹配类型'), key: 'matchType', component: , renderText: (value: string) => { @@ -352,7 +352,7 @@ export const MATCH_CONFIG:ConfigField[] = [ export const SYSTEM_API_TABLE_COLUMNS: PageProColumns[] = [ { - title:$t('名称'), + title:('名称'), dataIndex: 'name', ellipsis:true, width:160, @@ -363,7 +363,7 @@ export const SYSTEM_API_TABLE_COLUMNS: PageProColumns[] }, }, { - title:$t('协议/方法'), + title:('协议/方法'), dataIndex: 'method', ellipsis:true, filters: true, @@ -378,12 +378,12 @@ export const SYSTEM_API_TABLE_COLUMNS: PageProColumns[] }, }, { - title:$t('URL'), + title:('URL'), dataIndex: 'requestPath', ellipsis:true }, { - title:$t('创建者'), + title:('创建者'), dataIndex: ['creator','name'], ellipsis: true, filters: true, @@ -392,7 +392,7 @@ export const SYSTEM_API_TABLE_COLUMNS: PageProColumns[] filterSearch: true, }, { - title:$t('更新时间'), + title:('更新时间'), dataIndex: 'updateTime', ellipsis:true, hideInSearch: true, @@ -405,7 +405,7 @@ export const SYSTEM_API_TABLE_COLUMNS: PageProColumns[] export const SYSTEM_UPSTREAM_TABLE_COLUMNS: PageProColumns[] = [ { - title:$t('名称'), + title:('名称'), dataIndex: 'name', ellipsis:true, width:160, @@ -415,13 +415,13 @@ export const SYSTEM_UPSTREAM_TABLE_COLUMNS: PageProColumns[] = [ { - title:$t('操作类型'), + title:('操作类型'), key: 'optType', component: , renderText: (value: string) => { @@ -508,7 +508,7 @@ export const PROXY_HEADER_CONFIG:ConfigField[] = [ }, required: true }, { - title:$t('参数值'), + title:('参数值'), key: 'value', component: , renderText: (value: string) => { @@ -520,12 +520,12 @@ export const PROXY_HEADER_CONFIG:ConfigField[] = [ export const NODE_CONFIG:ConfigField[] = [ { - title:$t('集群'), + title:('集群'), key: 'cluster', component: , renderText: (value: string) => { @@ -533,7 +533,7 @@ export const NODE_CONFIG:ConfigField[] = [ }, required: true }, { - title:$t('权重'), + title:('权重'), key: 'weight', component: , renderText: (value: string) => { @@ -544,37 +544,37 @@ export const NODE_CONFIG:ConfigField[] = [ ] export const visualizations = [ - {label:$t('内部服务:可通过网关访问,但不展示在服务广场'),value:'inner'}, - {label:$t('公开服务:可通过网关访问,展示在服务广场,可被其他应用订阅'),value:'public'}]; + {label:('内部服务:可通过网关访问,但不展示在服务广场'),value:'inner'}, + {label:('公开服务:可通过网关访问,展示在服务广场,可被其他应用订阅'),value:'public'}]; export const SYSTEM_MYSERVICE_API_TABLE_COLUMNS: PageProColumns[] = [ { - title:$t(' '), + title:(' '), dataIndex: 'id', width:'40px', fixed:'left' }, { - title:$t('名称'), + title:('名称'), dataIndex: 'name', width:160, fixed:'left', ellipsis:true }, { - title:$t('请求方式'), + title:('请求方式'), dataIndex: 'method', ellipsis:true }, { - title:$t('请求路径'), + title:('请求路径'), dataIndex: 'path', ellipsis:true }, { - title: $t('描述'), + title: ('描述'), dataIndex: 'description', ellipsis:true } @@ -583,7 +583,7 @@ export const SYSTEM_MYSERVICE_API_TABLE_COLUMNS: PageProColumns = [ { - title:$t('所有 API'), + title:('所有 API'), dataIndex:'method', }, { @@ -596,7 +596,7 @@ export const apiModalColumn:ColumnsType = [ export const SYSTEM_AUTHORITY_TABLE_COLUMNS: PageProColumns[] = [ { - title:$t('名称'), + title:('名称'), dataIndex: 'name', ellipsis:true, width:160, @@ -606,7 +606,7 @@ export const SYSTEM_AUTHORITY_TABLE_COLUMNS: PageProColumns[] = [ { - title:$t('服务名称'), + title:('服务名称'), dataIndex: 'name', ellipsis:true, width:160, @@ -682,13 +682,13 @@ export const SYSTEM_MYSERVICE_TABLE_COLUMNS: PageProColumns { return a.apiNum - b.apiNum }, }, { - title:$t('状态'), + title:('状态'), dataIndex: 'status', ellipsis:{ showTitle:true @@ -722,12 +722,12 @@ export const SYSTEM_MYSERVICE_TABLE_COLUMNS: PageProColumns{$t('启用')} , - 'off':{$t('停用')} + 'on':{('启用')} , + 'off':{('停用')} } }, { - title:$t('更新时间'), + title:('更新时间'), key: 'updateTime', dataIndex: 'updateTime', ellipsis:true, @@ -737,7 +737,7 @@ export const SYSTEM_MYSERVICE_TABLE_COLUMNS: PageProColumns[] = [ { - title:$t('地址(IP 端口或域名)'), + title:('地址(IP 端口或域名)'), dataIndex: 'address', width: '50%', formItemProps: { @@ -769,7 +769,7 @@ export const SYSTEM_UPSTREAM_GLOBAL_CONFIG_TABLE_COLUMNS: PageProColumns{} + title:('申请状态'),key:'status',renderText:()=>{} }, { - title:$t('申请人'),key:'applier',nested:'name' + title:('申请人'),key:'applier',nested:'name' }, { - title:$t('申请时间'),key:'applyTime' + title:('申请时间'),key:'applyTime' }, ] @@ -837,27 +837,27 @@ export const SYSTEM_TOPOLOGY_NODE_TYPE_COLOR_MAP = { subscriberProject:{ stroke:'#3291F8FF', fill: '#3291F8FF', - name:$t('调用系统名称') + name:('调用系统名称') }, subscriberService:{ stroke:'#3D46F2', fill: '#7371FC33', - name:$t('调用服务名称') + name:('调用服务名称') }, curProject:{ stroke:'#7371FCFF', fill: '#7371FCFF', - name:$t('当前系统名称') + name:('当前系统名称') }, invokeService:{ stroke:'#3D46F2', fill: '#7371FC33', - name:$t('被调用服务名称') + name:('被调用服务名称') }, invokeProject:{ stroke:'#19C56BFF', fill: '#19C56BFF', - name:$t('被调用系统名称') + name:('被调用系统名称') }, application:{ stroke:'#ffa940', @@ -869,7 +869,7 @@ export const SYSTEM_TOPOLOGY_NODE_TYPE_COLOR_MAP = { export const SYSTEM_PUBLISH_ONLINE_COLUMNS = [ { - title:$t('上线结果'), + title:('上线结果'), dataIndex: 'status', ellipsis:{ showTitle:true @@ -877,9 +877,9 @@ export const SYSTEM_TOPOLOGY_NODE_TYPE_COLOR_MAP = { render:(_:unknown,entity:SystemInsidePublishOnlineItems)=>{ switch(entity.status){ case 'done': - return {$t('成功')} + return {('成功')} case 'error': - return {$t('失败')} {entity.error} + return {('失败')} {entity.error} default: return } @@ -887,27 +887,4 @@ export const SYSTEM_TOPOLOGY_NODE_TYPE_COLOR_MAP = { }, ] -const APP_MODE = import.meta.env.VITE_APP_MODE; - - export const SYSTEM_PAGE_MENU_ITEMS: MenuProps['items'] = [ - getItem($t('服务'), 'assets', null, - [ - getItem({$t('API')}, 'api',undefined,undefined,undefined,'team.service.api.view'), - getItem({$t('上游')}, 'upstream',undefined,undefined,undefined,'team.service.upstream.view'), - getItem({$t('使用说明')}, 'document',undefined,undefined,undefined,''), - getItem({$t('发布')}, 'publish',undefined,undefined,undefined,'team.service.release.view'), - ], - 'group'), - getItem($t('订阅管理'), 'provideSer', null, - [ - getItem({$t('订阅审批')}, 'approval',undefined,undefined,undefined,'team.service.subscription.view'), - getItem({$t('订阅方管理')}, 'subscriber',undefined,undefined,undefined,'team.service.subscription.view'), - ], - 'group'), - getItem($t('管理'), 'mng', null, - [ - APP_MODE === 'pro' ? getItem({$t('调用拓扑图')}, 'topology',undefined,undefined,undefined,'project.mySystem.topology.view'):null, - getItem({$t('设置')}, 'setting',undefined,undefined,undefined,'')], - 'group'), -]; diff --git a/frontend/packages/core/src/const/team/const.tsx b/frontend/packages/core/src/const/team/const.tsx index c57936f3..45ce7c53 100644 --- a/frontend/packages/core/src/const/team/const.tsx +++ b/frontend/packages/core/src/const/team/const.tsx @@ -6,12 +6,12 @@ import { getItem } from "@common/utils/navigation"; import { SystemTableListItem } from "../system/type"; import { MenuProps } from "antd/lib"; import { Link } from "react-router-dom"; -import { $t } from "@common/locales"; + import { PageProColumns } from "@common/components/aoplatform/PageList"; export const TEAM_TABLE_COLUMNS: PageProColumns[] = [ { - title:$t('名称'), + title:('名称'), dataIndex: 'name', ellipsis:true, width:160, @@ -21,18 +21,18 @@ export const TEAM_TABLE_COLUMNS: PageProColumns[] = [ }, }, { - title:$t('ID'), + title:('ID'), dataIndex: 'id', width: 140, ellipsis:true }, { - title: $t('描述'), + title: ('描述'), dataIndex: 'description', ellipsis:true }, { - title:$t('服务数量'), + title:('服务数量'), dataIndex: 'serviceNum', ellipsis:true, sorter: (a,b)=> { @@ -40,7 +40,7 @@ export const TEAM_TABLE_COLUMNS: PageProColumns[] = [ }, }, { - title:$t('负责人'), + title:('负责人'), dataIndex: ['master','name'], ellipsis: true, width:108, @@ -50,7 +50,7 @@ export const TEAM_TABLE_COLUMNS: PageProColumns[] = [ filterSearch: true, }, { - title:$t('创建时间'), + title:('创建时间'), dataIndex: 'createTime', ellipsis:true, width:182, @@ -63,7 +63,7 @@ export const TEAM_TABLE_COLUMNS: PageProColumns[] = [ export const TEAM_SYSTEM_TABLE_COLUMNS: PageProColumns[] = [ { - title:$t('服务名称'), + title:('服务名称'), dataIndex: 'name', ellipsis:true, width:160, @@ -73,18 +73,18 @@ export const TEAM_SYSTEM_TABLE_COLUMNS: PageProColumns[] = }, }, { - title:$t('服务 ID'), + title:('服务 ID'), dataIndex: 'id', width: 140, ellipsis:true }, { - title:$t('所属团队'), + title:('所属团队'), dataIndex: ['team','name'], ellipsis:true }, { - title:$t('API数量'), + title:('API数量'), dataIndex: 'apiNum', ellipsis:true, sorter: (a,b)=> { @@ -92,7 +92,7 @@ export const TEAM_SYSTEM_TABLE_COLUMNS: PageProColumns[] = }, }, { - title:$t('服务数量'), + title:('服务数量'), dataIndex: 'serviceNum', ellipsis:true, sorter: (a,b)=> { @@ -100,7 +100,7 @@ export const TEAM_SYSTEM_TABLE_COLUMNS: PageProColumns[] = }, }, { - title:$t('负责人'), + title:('负责人'), dataIndex: ['master','name'], ellipsis: true, width:108, @@ -110,7 +110,7 @@ export const TEAM_SYSTEM_TABLE_COLUMNS: PageProColumns[] = filterSearch: true }, { - title:$t('添加日期'), + title:('添加日期'), dataIndex: 'createTime', ellipsis: true, sorter: (a,b)=> { @@ -121,7 +121,7 @@ export const TEAM_SYSTEM_TABLE_COLUMNS: PageProColumns[] = export const TEAM_MEMBER_TABLE_COLUMNS: PageProColumns[] = [ { - title:$t('姓名'), + title:'姓名', dataIndex: ['user','name'], ellipsis:true, width:160, @@ -131,12 +131,12 @@ export const TEAM_MEMBER_TABLE_COLUMNS: PageProColumns[ }, }, { - title:$t('团队角色'), + title:('团队角色'), dataIndex: 'roles', ellipsis:true, }, { - title:$t('添加日期'), + title:('添加日期'), dataIndex: 'attachTime', ellipsis:true, sorter: (a,b)=> { @@ -147,7 +147,7 @@ export const TEAM_MEMBER_TABLE_COLUMNS: PageProColumns[ export const TEAM_MEMBER_MODAL_TABLE_COLUMNS:ColumnsType = [ - {title:$t('成员'), + {title:('成员'), render:(_,entity)=>{ return <>
@@ -161,11 +161,4 @@ export const TEAM_MEMBER_MODAL_TABLE_COLUMNS:ColumnsType = [ }} ] - export const TEAM_INSIDE_MENU_ITEMS: MenuProps['items'] = [ - getItem($t('管理'), 'grp', null, - [ - getItem({$t('成员')}, 'member',undefined, undefined, undefined,'team.team.member.view'), - getItem({$t('设置')}, 'setting',undefined,undefined,undefined,'team.team.team.view')], - 'group'), - ]; \ No newline at end of file diff --git a/frontend/packages/core/src/const/user/const.tsx b/frontend/packages/core/src/const/user/const.tsx index 3b9b2ecb..d05e0422 100644 --- a/frontend/packages/core/src/const/user/const.tsx +++ b/frontend/packages/core/src/const/user/const.tsx @@ -2,12 +2,12 @@ import { ColumnsType } from "antd/es/table"; import { MemberItem } from "@common/const/type"; import { Tooltip } from "antd"; -import { $t } from "@common/locales"; + import { PageProColumns } from "@common/components/aoplatform/PageList"; export const USER_LIST_COLUMNS: PageProColumns[]= [ { - title:$t('用户名'), + title:('用户名'), dataIndex: 'name', ellipsis:true, width:160, @@ -17,12 +17,12 @@ export const USER_LIST_COLUMNS: PageProColumns[]= [ }, }, { - title:$t('邮箱'), + title:('邮箱'), dataIndex: 'email', ellipsis:true, }, { - title:$t('部门'), + title:('部门'), dataIndex: 'department', ellipsis:{ showTitle:true @@ -37,7 +37,7 @@ export const USER_LIST_COLUMNS: PageProColumns[]= [ ]; export const MEMBER_MODAL_COLUMNS:ColumnsType = [ - {title:$t('所有成员'), + {title:('所有成员'), width:215, render:(_,entity)=>{ diff --git a/frontend/packages/core/src/pages/Login.tsx b/frontend/packages/core/src/pages/Login.tsx index 222195d3..cbbe0597 100644 --- a/frontend/packages/core/src/pages/Login.tsx +++ b/frontend/packages/core/src/pages/Login.tsx @@ -64,7 +64,7 @@ const Login:FC = ()=> { if (code === STATUS_CODE.SUCCESS) { dispatch({type:'LOGIN'}) - message.success(RESPONSE_TIPS.loginSuccess); + // message.success(RESPONSE_TIPS.loginSuccess); const callbackUrl = new URLSearchParams(window.location.search).get('callbackUrl'); if (callbackUrl && callbackUrl !== 'null') { navigate(callbackUrl); diff --git a/frontend/packages/core/src/pages/approval/ApprovalList.tsx b/frontend/packages/core/src/pages/approval/ApprovalList.tsx index d9332e9e..f6606a19 100644 --- a/frontend/packages/core/src/pages/approval/ApprovalList.tsx +++ b/frontend/packages/core/src/pages/approval/ApprovalList.tsx @@ -27,6 +27,7 @@ import WithPermission from "@common/components/aoplatform/WithPermission.tsx"; import { SimpleMemberItem } from "@common/const/type.ts"; import TableBtnWithPermission from "@common/components/aoplatform/TableBtnWithPermission.tsx"; import { $t } from "@common/locales"; +import { useGlobalContext } from "@common/contexts/GlobalStateContext"; export default function ApprovalList({pageType,pageStatus}:{pageType:'subscribe'|'release',pageStatus:0|1}){ const { modal,message } = App.useApp() @@ -41,6 +42,7 @@ export default function ApprovalList({pageType,pageStatus}:{pageType:'subscribe' const publishRef = useRef(null) const [approvalBtnLoading,setApprovalBtnLoading] = useState(false) const [memberValueEnum, setMemberValueEnum] = useState<{[k:string]:{text:string}}>({}) + const {state} = useGlobalContext() const getApprovalList = ()=>{ if(!tableHttpReload){ @@ -152,8 +154,8 @@ export default function ApprovalList({pageType,pageStatus}:{pageType:'subscribe' const columns = useMemo(()=>{ const newCol = [...(pageType === 'subscribe'? SUBSCRIBE_APPROVAL_TABLE_COLUMN:PUBLISH_APPROVAL_TABLE_COLUMN)] const res = pageStatus === 0 ? newCol.filter((x)=>TODO_LIST_COLUMN_NOT_INCLUDE_KEY.indexOf(x.dataIndex as string) === -1): newCol - return res - },[pageType,pageStatus]) + return res.map(x=>({...x, title:typeof x.title === 'string' ? $t(x.title as string) : x.title})) + },[pageType,pageStatus, state.language]) const manualReloadTable = () => { diff --git a/frontend/packages/core/src/pages/approval/ApprovalPage.tsx b/frontend/packages/core/src/pages/approval/ApprovalPage.tsx index fa7324d2..6523f9f3 100644 --- a/frontend/packages/core/src/pages/approval/ApprovalPage.tsx +++ b/frontend/packages/core/src/pages/approval/ApprovalPage.tsx @@ -1,19 +1,13 @@ import { Menu, MenuProps, Tabs, TabsProps} from "antd"; import {Link, useLocation, useNavigate} from "react-router-dom"; -import {useEffect, useState} from "react"; +import {useEffect, useMemo, useState} from "react"; import ApprovalList from "./ApprovalList.tsx"; import { getItem } from "@common/utils/navigation.tsx"; import { $t } from "@common/locales/index.ts"; +import { useGlobalContext } from "@common/contexts/GlobalStateContext.tsx"; -const menuItems: MenuProps['items'] = [ - getItem($t('管理'), 'mng', null, - [ - getItem({$t('订阅申请')}, 'subscribe'), - getItem({$t('发布申请')}, 'release')], - 'group'), -]; const items: TabsProps['items'] = [ { @@ -33,6 +27,15 @@ export default function ApprovalPage(){ const query =new URLSearchParams(useLocation().search) const [pageType,setPageType] = useState<'subscribe'|'release'>((query?.get('type') ||'subscribe') as 'subscribe'|'release') const [pageStatus,setPageStatus] = useState<0|1>(Number(query.get('status') ||0) as 0|1) + const {state} = useGlobalContext() + + const menuItems = useMemo(()=>[ + getItem($t('管理'), 'mng', null, + [ + getItem({$t('订阅申请')}, 'subscribe'), + getItem({$t('发布申请')}, 'release')], + 'group'), + ],[state.language]) const onMenuClick: MenuProps['onClick'] = (e) => { setPageType(e.key as 'subscribe'|'release') diff --git a/frontend/packages/core/src/pages/guide/Guide.tsx b/frontend/packages/core/src/pages/guide/Guide.tsx index cf3f61da..2bc726a5 100644 --- a/frontend/packages/core/src/pages/guide/Guide.tsx +++ b/frontend/packages/core/src/pages/guide/Guide.tsx @@ -21,6 +21,7 @@ export default function Guide(){

{$t("如果你喜欢我们的产品,欢迎给我们 Star 或提供产品反馈意见。")}

} showBorder={false} + scrollPage={false} contentClassName=" pr-PAGE_INSIDE_X pb-PAGE_INSIDE_B" > {showGuide && @@ -28,7 +29,7 @@ export default function Guide(){ size="large" expandIconPosition='end' defaultActiveKey={['1']} - className="bg-[linear-gradient(153.41deg,rgba(244,245,255,1)_0.23%,rgba(255,255,255,1)_83.32%)] rounded-[10px] h-full [&>.ant-collapse-item]:h-full [&>.ant-collapse-item]:flex [&>.ant-collapse-item]:flex-col [&>.ant-collapse-item>.ant-collapse-content]:bg-transparent [&>.ant-collapse-item>.ant-collapse-content]:overflow-auto " + className="bg-[linear-gradient(153.41deg,rgba(244,245,255,1)_0.23%,rgba(255,255,255,1)_83.32%)] rounded-[10px] [&>.ant-collapse-item>.ant-collapse-content]:bg-transparent " items={[{ key: '1', label:
diff --git a/frontend/packages/core/src/pages/logsettings/LogSettings.tsx b/frontend/packages/core/src/pages/logsettings/LogSettings.tsx index c84616b6..4c5fd60c 100644 --- a/frontend/packages/core/src/pages/logsettings/LogSettings.tsx +++ b/frontend/packages/core/src/pages/logsettings/LogSettings.tsx @@ -2,13 +2,14 @@ import { Menu, MenuProps, Skeleton, message } from "antd"; import { Link, Outlet, useNavigate, useParams } from "react-router-dom"; import InsidePage from "@common/components/aoplatform/InsidePage"; -import { useEffect, useState } from "react"; +import { useEffect, useMemo, useState } from "react"; import { BasicResponse, RESPONSE_TIPS, STATUS_CODE } from "@common/const/const"; import { DynamicMenuItem, } from "@common/const/type"; import { useFetch } from "@common/hooks/http"; import { getItem } from "@common/utils/navigation"; import { RouterParams } from "@core/components/aoplatform/RenderRoutes"; import { $t } from "@common/locales"; +import { useGlobalContext } from "@common/contexts/GlobalStateContext"; const LogSettings = ()=>{ const {moduleId} = useParams(); @@ -17,25 +18,18 @@ const LogSettings = ()=>{ const {fetchData} = useFetch() const [loading, setLoading] = useState(true) const navigateTo = useNavigate() + const {state} = useGlobalContext() const getDynamicMenuList = ()=>{ return fetchData>(`simple/dynamics/log`,{method:'GET'}).then(response=>{ const {code,data,msg} = response if(code === STATUS_CODE.SUCCESS){ - const newMenu:MenuProps['items'] = data.dynamics.map((x:DynamicMenuItem)=> - getItem( - {x.title}, - x.name, - undefined, - undefined, - undefined, - 'system.devops.log_configuration.view')) - setMenuItems(newMenu) + setMenuItems(data.dynamics) if(!activeMenu || activeMenu.length === 0){ navigateTo(`/logsettings/template/${data.dynamics[0].name}`) } - return Promise.resolve(newMenu) + return Promise.resolve(data.dynamics) }else{ message.error(msg || RESPONSE_TIPS.error) return Promise.reject(msg || RESPONSE_TIPS.error) @@ -43,6 +37,22 @@ const LogSettings = ()=>{ }) } + const menuData = useMemo(()=>{ + const newMenu = menuItems?.map((x:DynamicMenuItem)=>{ + console.log(state.language, $t(x.title)) + + return getItem( + {$t(x.title)}, + x.name, + undefined, + undefined, + undefined, + 'system.devops.log_configuration.view') + }) + console.log(newMenu) + return newMenu + },[state.language,menuItems]) + const onMenuClick: MenuProps['onClick'] = ({key}) => { setActiveMenu(key) }; @@ -71,7 +81,7 @@ const LogSettings = ()=>{ onClick={onMenuClick} style={{ width: 220 }} mode="inline" - items={menuItems} + items={menuData} />
diff --git a/frontend/packages/core/src/pages/member/MemberList.tsx b/frontend/packages/core/src/pages/member/MemberList.tsx index f42c70b9..aacbb8e3 100644 --- a/frontend/packages/core/src/pages/member/MemberList.tsx +++ b/frontend/packages/core/src/pages/member/MemberList.tsx @@ -1,5 +1,5 @@ import PageList, { PageProColumns } from "@common/components/aoplatform/PageList.tsx"; -import {forwardRef, useEffect, useImperativeHandle, useRef, useState} from "react"; +import {forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState} from "react"; import { useOutletContext, useParams} from "react-router-dom"; import {RouterParams} from "@core/components/aoplatform/RenderRoutes.tsx"; import {ActionType } from "@ant-design/pro-components"; @@ -119,7 +119,7 @@ const MemberList = ()=>{ const { setBreadcrumb } = useBreadcrumb() const [selectedRowKeys, setSelectedRowKeys] = useState([]); const [departmentValueEnum,setDepartmentValueEnum] = useState([]) - const {accessData} = useGlobalContext() + const {accessData,state} = useGlobalContext() const [columns,setColumns] = useState[]>([]) const operation:PageProColumns[] =[ @@ -332,7 +332,7 @@ const MemberList = ()=>{ className="w-full" mode="multiple" value={entity.roles?.map((x:EntityItem)=>x.id)} - options={data.roles?.map((x:{id:string,name:string})=>({label:x.name, value:x.id}))} + options={data.roles?.map((x:{id:string,name:string})=>({label:$t(x.name), value:x.id}))} onChange={(value)=>{ changeMemberInfo(value,entity ).then((res)=>{ if(res) manualReloadTable() @@ -354,12 +354,14 @@ const MemberList = ()=>{ }) } + const translatedCol = useMemo(()=>columns?.map(x=>({...x, title:typeof x.title === 'string' ? $t(x.title as string) : x.title})), [columns, state.language]) + return ( <> getMemberList()} addNewBtnTitle={(!memberGroupId ||['unknown','disable'].indexOf(memberGroupId?.toString()) === -1)?$t("添加账号") : ""} searchPlaceholder={$t("输入用户名、邮箱查找成员")} diff --git a/frontend/packages/core/src/pages/member/MemberPage.tsx b/frontend/packages/core/src/pages/member/MemberPage.tsx index 0a18c5ea..11934e94 100644 --- a/frontend/packages/core/src/pages/member/MemberPage.tsx +++ b/frontend/packages/core/src/pages/member/MemberPage.tsx @@ -170,7 +170,7 @@ const MemberPage = ()=>{ const treeData = useMemo(() => { const loop = (data: DepartmentListItem[], parentIds:string[] = []): DataNode[] => data?.map((item) => { - const strTitle = item.name as string; + const strTitle = $t(item.name) as string; const index = strTitle.indexOf(searchWord); const beforeStr = strTitle.substring(0, index); const afterStr = strTitle.slice(index + searchWord.length); diff --git a/frontend/packages/core/src/pages/partitions/PartitionInsideCert.tsx b/frontend/packages/core/src/pages/partitions/PartitionInsideCert.tsx index 019b9504..076bdb4e 100644 --- a/frontend/packages/core/src/pages/partitions/PartitionInsideCert.tsx +++ b/frontend/packages/core/src/pages/partitions/PartitionInsideCert.tsx @@ -150,7 +150,7 @@ const PartitionInsideCert:FC = ()=>{ const editRef = useRef(null) const pageListRef = useRef(null); const [memberValueEnum, setMemberValueEnum] = useState<{[k:string]:{text:string}}>({}) - const {accessData} = useGlobalContext() + const {accessData,state} = useGlobalContext() const getPartitionCertList =(): Promise<{ data: PartitionCertTableListItem[], success: boolean }>=> { return fetchData>('certificates',{method:'GET',eoTransformKeys:['partition_id','update_time','not_before','not_after']}).then(response=>{ @@ -273,8 +273,9 @@ const PartitionInsideCert:FC = ()=>{ } const columns = useMemo(()=>{ - return PARTITION_CERT_TABLE_COLUMNS.map(x=>{if(x.filters &&((x.dataIndex as string[])?.indexOf('updater') !== -1) ){x.valueEnum = memberValueEnum} return x}) - },[memberValueEnum]) + const res = PARTITION_CERT_TABLE_COLUMNS.map(x=>{if(x.filters &&((x.dataIndex as string[])?.indexOf('updater') !== -1) ){x.valueEnum = memberValueEnum} return {...x,title:typeof x.title === 'string' ? $t(x.title as string) : x.title}}) + return res + },[memberValueEnum, state.language]) return ( { const {moduleId} = useParams(); @@ -17,22 +18,16 @@ const LogSettings = ()=>{ const {fetchData} = useFetch() const [loading, setLoading] = useState(true) const navigateTo = useNavigate() + const {state} = useGlobalContext() const getDynamicMenuList = ()=>{ setLoading(true) fetchData>(`simple/dynamics/resource`,{method:'GET'}).then(response=>{ const {code,data,msg} = response if(code === STATUS_CODE.SUCCESS){ - const newMenu:MenuProps['items'] = data.dynamics.map((x:DynamicMenuItem)=> - getItem( - {x.title}, - x.name, - undefined, - undefined, - undefined, - 'system.partition.self.view')) + - setMenuItems(newMenu) + setMenuItems(data.dynamics) if(!activeMenu || activeMenu.length === 0){ navigateTo(`/resourcesettings/template/${data.dynamics[0].name}`) } @@ -42,6 +37,24 @@ const LogSettings = ()=>{ }).finally(()=>setLoading(false)) } + + const menuData = useMemo(()=>{ + const newMenu = menuItems?.map((x:DynamicMenuItem)=>{ + console.log(state.language, $t(x.title)) + + return getItem( + {$t(x.title)}, + x.name, + undefined, + undefined, + undefined, + 'system.devops.log_configuration.view') + }) + console.log(newMenu) + return newMenu + },[state.language,menuItems]) + + const onMenuClick: MenuProps['onClick'] = ({key}) => { setActiveMenu(key) }; @@ -69,7 +82,7 @@ const LogSettings = ()=>{ onClick={onMenuClick} style={{ width: 220 }} mode="inline" - items={menuItems} + items={menuData} />
diff --git a/frontend/packages/core/src/pages/role/RoleList.tsx b/frontend/packages/core/src/pages/role/RoleList.tsx index 17b101bd..3394bb7b 100644 --- a/frontend/packages/core/src/pages/role/RoleList.tsx +++ b/frontend/packages/core/src/pages/role/RoleList.tsx @@ -1,6 +1,6 @@ import { App} from "antd"; import PageList, { PageProColumns } from "@common/components/aoplatform/PageList.tsx"; -import { useEffect, useRef,} from "react"; +import { useEffect, useMemo, useRef,} from "react"; import {ActionType} from "@ant-design/pro-components"; import {useBreadcrumb} from "@common/contexts/BreadcrumbContext.tsx"; import {BasicResponse, COLUMNS_TITLE, DELETE_TIPS, RESPONSE_TIPS, STATUS_CODE} from "@common/const/const.tsx"; @@ -21,7 +21,7 @@ const RoleList = ()=>{ const { setBreadcrumb } = useBreadcrumb() const {fetchData} = useFetch() const pageListRef = useRef(null); - const {accessData} = useGlobalContext() + const {accessData,state} = useGlobalContext() const navigateTo = useNavigate() const operation:(type:string)=>PageProColumns[] =(type:string)=>[ @@ -45,7 +45,7 @@ const RoleList = ()=>{ return fetchData>(`${group}/roles`,{method:'GET'}).then(response=>{ const {code,data,msg} = response if(code === STATUS_CODE.SUCCESS){ - return {data:data.roles, success: true} + return {data:data.roles?.map((x:RoleTableListItem)=>({...x,name:$t(x.name)})), success: true} }else{ message.error(msg || RESPONSE_TIPS.error) return {data:[], success:false} @@ -117,6 +117,8 @@ const RoleList = ()=>{ title: $t('角色')}]) }, []); + const columns = useMemo(()=>ROLE_TABLE_COLUMNS.map((x)=>({...x, title:typeof x.title === 'string' ? $t(x.title as string) : x.title})),[state.language]) + return (<> { id="global_role" tableClass="role_table mb-btnrbase" ref={pageListRef} - columns={[...ROLE_TABLE_COLUMNS as PageProColumns[], ...operation('system')]} + columns={[...columns as PageProColumns[], ...operation('system')]} request={()=>getRoleList('system')} addNewBtnTitle={$t("添加角色")} showPagination={false} diff --git a/frontend/packages/core/src/pages/system/SystemInsidePage.tsx b/frontend/packages/core/src/pages/system/SystemInsidePage.tsx index 577755ac..07cfb391 100644 --- a/frontend/packages/core/src/pages/system/SystemInsidePage.tsx +++ b/frontend/packages/core/src/pages/system/SystemInsidePage.tsx @@ -1,12 +1,11 @@ import {FC, useEffect, useMemo, useState} from "react"; -import {Outlet, useLocation, useNavigate, useParams} from "react-router-dom"; +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"; import { useSystemContext} from "../../contexts/SystemContext.tsx"; -import { SYSTEM_PAGE_MENU_ITEMS } from "../../const/system/const.tsx"; import { SystemConfigFieldType } from "../../const/system/type.ts"; import { useGlobalContext } from "@common/contexts/GlobalStateContext.tsx"; import { PERMISSION_DEFINITION } from "@common/const/permissions.ts"; @@ -15,6 +14,8 @@ import Paragraph from "antd/es/typography/Paragraph"; import { ItemType, MenuItemGroupType, MenuItemType } from "antd/es/menu/hooks/useItems"; import { cloneDeep } from "lodash-es"; import { $t } from "@common/locales/index.ts"; +import { getItem } from "@common/utils/navigation.tsx"; +const APP_MODE = import.meta.env.VITE_APP_MODE; const SystemInsidePage:FC = ()=> { const { message } = App.useApp() @@ -23,7 +24,7 @@ const SystemInsidePage:FC = ()=> { const currentUrl = location.pathname const {fetchData} = useFetch() const { setPrefixForce,setApiPrefix ,systemInfo,setSystemInfo} = useSystemContext() - const { accessData,checkPermission,accessInit} = useGlobalContext() + const { accessData,checkPermission,accessInit,state} = useGlobalContext() const [activeMenu, setActiveMenu] = useState() const navigateTo = useNavigate() @@ -52,6 +53,31 @@ const SystemInsidePage:FC = ()=> { }) } + + + const SYSTEM_PAGE_MENU_ITEMS = useMemo(()=>[ + getItem($t('服务'), 'assets', null, + [ + getItem({$t('API')}, 'api',undefined,undefined,undefined,'team.service.api.view'), + getItem({$t('上游')}, 'upstream',undefined,undefined,undefined,'team.service.upstream.view'), + getItem({$t('使用说明')}, 'document',undefined,undefined,undefined,''), + getItem({$t('发布')}, 'publish',undefined,undefined,undefined,'team.service.release.view'), + ], + 'group'), + getItem($t('订阅管理'), 'provideSer', null, + [ + getItem({$t('订阅审批')}, 'approval',undefined,undefined,undefined,'team.service.subscription.view'), + getItem({$t('订阅方管理')}, 'subscriber',undefined,undefined,undefined,'team.service.subscription.view'), + ], + 'group'), + getItem($t('管理'), 'mng', null, + [ + APP_MODE === 'pro' ? getItem({$t('调用拓扑图')}, 'topology',undefined,undefined,undefined,'project.mySystem.topology.view'):null, + getItem({$t('设置')}, 'setting',undefined,undefined,undefined,'')], + 'group'), +],[state.language]) + + const menuData = useMemo(()=>{ const filterMenu = (menu:MenuItemGroupType[])=>{ const newMenu = cloneDeep(menu) @@ -70,7 +96,7 @@ const SystemInsidePage:FC = ()=> { return pre ?? 'api' }) return filteredMenu || [] - },[accessData,accessInit]) + },[accessData,accessInit, SYSTEM_PAGE_MENU_ITEMS]) const onMenuClick: MenuProps['onClick'] = ({key}) => { setActiveMenu(key) diff --git a/frontend/packages/core/src/pages/system/SystemInsideSubscriber.tsx b/frontend/packages/core/src/pages/system/SystemInsideSubscriber.tsx index c734a45b..4490e0c1 100644 --- a/frontend/packages/core/src/pages/system/SystemInsideSubscriber.tsx +++ b/frontend/packages/core/src/pages/system/SystemInsideSubscriber.tsx @@ -25,7 +25,7 @@ const SystemInsideSubscriber:FC = ()=>{ const addRef = useRef(null) const pageListRef = useRef(null); const [memberValueEnum, setMemberValueEnum] = useState<{[k:string]:{text:string}}>({}) - const {accessData} = useGlobalContext() + const {accessData,state} = useGlobalContext() const getSystemSubscriber = ()=>{ return fetchData>('service/subscribers',{method:'GET',eoParams:{service:serviceId,team:teamId},eoTransformKeys:['apply_time']}).then(response=>{ const {code,data,msg} = response @@ -136,8 +136,8 @@ const SystemInsideSubscriber:FC = ()=>{ }, [serviceId]); const columns = useMemo(()=>{ - return SYSTEM_SUBSCRIBER_TABLE_COLUMNS.map(x=>{if(x.filters &&((x.dataIndex as string[])?.indexOf('applier') !== -1 || (x.dataIndex as string[])?.indexOf('approver') !== -1) ){x.valueEnum = memberValueEnum} return x}) - },[memberValueEnum]) + return SYSTEM_SUBSCRIBER_TABLE_COLUMNS.map(x=>{if(x.filters &&((x.dataIndex as string[])?.indexOf('applier') !== -1 || (x.dataIndex as string[])?.indexOf('approver') !== -1) ){x.valueEnum = memberValueEnum} return {...x,title:typeof x.title === 'string' ? $t(x.title as string) : x.title}}) + },[memberValueEnum,state.language]) return ( { const [memberValueEnum, setMemberValueEnum] = useState<{[k:string]:{text:string}}>({}) const [open, setOpen] = useState(false); const drawerFormRef = useRef(null) - const {checkPermission,accessInit, getGlobalAccessData} = useGlobalContext() + const {checkPermission,accessInit, getGlobalAccessData,state} = useGlobalContext() const getSystemList = ()=>{ if(!accessInit){ @@ -124,9 +124,9 @@ const SystemList:FC = ()=>{ x.valueEnum = teamList } - return x}) + return {...x,title:typeof x.title === 'string' ? $t(x.title as string) : x.title}}) return res - },[memberValueEnum,teamList]) + },[memberValueEnum,teamList,state.language]) const steps = [ { diff --git a/frontend/packages/core/src/pages/system/api/SystemInsideApiList.tsx b/frontend/packages/core/src/pages/system/api/SystemInsideApiList.tsx index d70b6c64..6894a84e 100644 --- a/frontend/packages/core/src/pages/system/api/SystemInsideApiList.tsx +++ b/frontend/packages/core/src/pages/system/api/SystemInsideApiList.tsx @@ -33,7 +33,7 @@ const SystemInsideApiList:FC = ()=>{ const copyRef = useRef(null) const {apiPrefix, prefixForce} = useSystemContext() const [memberValueEnum, setMemberValueEnum] = useState<{[k:string]:{text:string}}>({}) - const {accessData} = useGlobalContext() + const {accessData,state} = useGlobalContext() const [drawerType,setDrawerType]= useState<'add'|'edit'|'view'|'upstream'|undefined>() const [open, setOpen] = useState(false); const drawerEditFormRef = useRef(null) @@ -193,8 +193,8 @@ const SystemInsideApiList:FC = ()=>{ }; const columns = useMemo(()=>{ - return SYSTEM_API_TABLE_COLUMNS.map(x=>{if(x.filters &&((x.dataIndex as string[])?.indexOf('creator') !== -1) ){x.valueEnum = memberValueEnum} return x}) - },[memberValueEnum]) + return SYSTEM_API_TABLE_COLUMNS.map(x=>{if(x.filters &&((x.dataIndex as string[])?.indexOf('creator') !== -1) ){x.valueEnum = memberValueEnum} return {...x,title:typeof x.title === 'string' ? $t(x.title as string) : x.title}}) + },[memberValueEnum,state.language]) const handlerSubmit:() => Promise|undefined= ()=>{ switch(drawerType){ diff --git a/frontend/packages/core/src/pages/system/approval/SystemInsideApprovalList.tsx b/frontend/packages/core/src/pages/system/approval/SystemInsideApprovalList.tsx index f60e5de6..04cd01cc 100644 --- a/frontend/packages/core/src/pages/system/approval/SystemInsideApprovalList.tsx +++ b/frontend/packages/core/src/pages/system/approval/SystemInsideApprovalList.tsx @@ -39,7 +39,7 @@ const SystemInsideApprovalList:FC = ()=>{ const subscribeRef = useRef(null) const [approvalBtnLoading,setApprovalBtnLoading] = useState(false) const [memberValueEnum, setMemberValueEnum] = useState<{[k:string]:{text:string}}>({}) - const {accessData} = useGlobalContext() + const {accessData,state} = useGlobalContext() const openModal = async (type:'approval'|'view',entity:SubscribeApprovalTableListItem)=>{ message.loading(RESPONSE_TIPS.loading) @@ -166,8 +166,8 @@ const SystemInsideApprovalList:FC = ()=>{ const columns = useMemo(()=>{ const newCol = [...(!(query.get('status'))? SUBSCRIBE_APPROVAL_INNER_TODO_TABLE_COLUMN:SUBSCRIBE_APPROVAL_INNER_DONE_TABLE_COLUMN)] const filteredCol = pageStatus === 0 ? newCol.filter((x)=>TODO_LIST_COLUMN_NOT_INCLUDE_KEY.indexOf(x.dataIndex as string) === -1): newCol - return filteredCol.map(x=>{if(x.filters &&((x.dataIndex as string[])?.indexOf('applier') !== -1 || (x.dataIndex as string[])?.indexOf('approver') !== -1) ){x.valueEnum = memberValueEnum} return x}) - },[pageStatus,memberValueEnum]) + return filteredCol.map(x=>{if(x.filters &&((x.dataIndex as string[])?.indexOf('applier') !== -1 || (x.dataIndex as string[])?.indexOf('approver') !== -1) ){x.valueEnum = memberValueEnum} return {...x,title: typeof x.title === 'string' ? $t(x.title as string) : x.title}}) + },[pageStatus,memberValueEnum,state.language]) return (
diff --git a/frontend/packages/core/src/pages/system/publish/SystemInsidePublishList.tsx b/frontend/packages/core/src/pages/system/publish/SystemInsidePublishList.tsx index 69ab08b3..9c855c45 100644 --- a/frontend/packages/core/src/pages/system/publish/SystemInsidePublishList.tsx +++ b/frontend/packages/core/src/pages/system/publish/SystemInsidePublishList.tsx @@ -38,7 +38,7 @@ const SystemInsidePublicList:FC = ()=>{ const query =new URLSearchParams(useLocation().search) const currLocation = useLocation().pathname const [memberValueEnum, setMemberValueEnum] = useState<{[k:string]:{text:string}}>({}) - const {accessData} = useGlobalContext() + const {accessData,state} = useGlobalContext() const [drawerTitle, setDrawerTitle] = useState('') const [drawerType, setDrawerType] = useState<'approval'|'view'|'add'|'publish'|'online'>('view') const [drawerVisible, setDrawerVisible] = useState(false) @@ -378,8 +378,8 @@ const SystemInsidePublicList:FC = ()=>{ } const columns = useMemo(()=>{ - return ((pageType === 'insideSystem' || pageStatus === 0 ) ? PUBLISH_APPROVAL_VERSION_INNER_TABLE_COLUMN:PUBLISH_APPROVAL_RECORD_INNER_TABLE_COLUMN).map(x=>{if(x.filters &&(x.dataIndex as string[])?.indexOf('creator') !== -1){x.valueEnum = memberValueEnum} return x}) - },[pageType, pageStatus, memberValueEnum]) + return ((pageType === 'insideSystem' || pageStatus === 0 ) ? PUBLISH_APPROVAL_VERSION_INNER_TABLE_COLUMN:PUBLISH_APPROVAL_RECORD_INNER_TABLE_COLUMN).map(x=>{if(x.filters &&(x.dataIndex as string[])?.indexOf('creator') !== -1){x.valueEnum = memberValueEnum} return {...x,title:typeof x.title === 'string' ? $t(x.title as string) : x.title}}) + },[pageType, pageStatus, memberValueEnum,state.language]) useEffect(() => { !init && pageListRef.current?.reload() diff --git a/frontend/packages/core/src/pages/team/TeamInsideMember.tsx b/frontend/packages/core/src/pages/team/TeamInsideMember.tsx index a24cc76e..58f930d5 100644 --- a/frontend/packages/core/src/pages/team/TeamInsideMember.tsx +++ b/frontend/packages/core/src/pages/team/TeamInsideMember.tsx @@ -46,7 +46,7 @@ const TeamInsideMember:FC = ()=>{ const addRef = useRef>(null) const pageListRef = useRef(null); const [allMemberIds, setAllMemberIds] = useState([]) - const {accessData} = useGlobalContext() + const {accessData,state} = useGlobalContext() const [selectableMemberIds,setSelectableMemberIds] = useState>(new Set()) const [addMemberBtnLoading, setAddMemberBtnLoading] = useState(false) const [modalVisible, setModalVisible] = useState(false) @@ -267,6 +267,11 @@ const TeamInsideMember:FC = ()=>{ }) } + const translatedCol = useMemo(()=>{ + const res = columns?.map(x=>{ + return({...x, title: typeof x.title === 'string' ? $t(x.title as string) : x.title}) }) + return res + },[columns, state.language]) useEffect(() => { getRoleList() @@ -284,7 +289,7 @@ const TeamInsideMember:FC = ()=>{ getMemberList()} primaryKey="user.id" addNewBtnTitle={$t('添加成员')} diff --git a/frontend/packages/core/src/pages/team/TeamInsidePage.tsx b/frontend/packages/core/src/pages/team/TeamInsidePage.tsx index 1f19c98b..72f57599 100644 --- a/frontend/packages/core/src/pages/team/TeamInsidePage.tsx +++ b/frontend/packages/core/src/pages/team/TeamInsidePage.tsx @@ -1,6 +1,6 @@ import {FC, useEffect, useMemo, useState} from "react"; -import { Outlet, useLocation, useNavigate, useParams} from "react-router-dom"; +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"; @@ -15,6 +15,7 @@ import { cloneDeep } from "lodash-es"; import { PERMISSION_DEFINITION } from "@common/const/permissions.ts"; import { TeamConfigType } from "@core/const/team/type.ts"; import { $t } from "@common/locales/index.ts"; +import { getItem } from "@common/utils/navigation.tsx"; const TeamInsidePage:FC = ()=> { const { message } = App.useApp() @@ -22,7 +23,7 @@ const TeamInsidePage:FC = ()=> { const {fetchData} = useFetch() const location = useLocation() const { teamInfo ,setTeamInfo ,} = useTeamContext() - const {getTeamAccessData,cleanTeamAccessData,accessData,checkPermission,teamDataFlushed,accessInit} = useGlobalContext() + const {getTeamAccessData,cleanTeamAccessData,accessData,checkPermission,teamDataFlushed,accessInit,state} = useGlobalContext() const navigateTo = useNavigate() const [activeMenu, setActiveMenu] = useState() @@ -30,6 +31,14 @@ const TeamInsidePage:FC = ()=> { setActiveMenu(key) }; + const TEAM_INSIDE_MENU_ITEMS = useMemo(()=> [ + getItem(('管理'), 'grp', null, + [ + getItem({$t('成员')}, 'member',undefined, undefined, undefined,'team.team.member.view'), + getItem({$t('设置')}, 'setting',undefined,undefined,undefined,'team.team.team.view')], + 'group'), + ], [state.language]) + const menuData = useMemo(()=>{ const filterMenu = (menu:MenuItemGroupType[])=>{ const newMenu = cloneDeep(menu) @@ -52,7 +61,7 @@ const TeamInsidePage:FC = ()=> { return pre }) return filteredMenu || [] - },[accessData,accessInit]) + },[accessData,accessInit, state.language]) const getTeamInfo = ()=>{ setTeamInfo?.(undefined) diff --git a/frontend/packages/core/src/pages/team/TeamList.tsx b/frontend/packages/core/src/pages/team/TeamList.tsx index a366979a..2fdbe784 100644 --- a/frontend/packages/core/src/pages/team/TeamList.tsx +++ b/frontend/packages/core/src/pages/team/TeamList.tsx @@ -28,7 +28,7 @@ const TeamList:FC = ()=>{ const {fetchData} = useFetch() const [memberValueEnum, setMemberValueEnum] = useState<{[k:string]:{text:string}}>({}) const teamConfigRef = useRef(null) - const {accessData,checkPermission,accessInit, getGlobalAccessData} = useGlobalContext() + const {accessData,checkPermission,accessInit, getGlobalAccessData,state} = useGlobalContext() const [curTeam, setCurTeam] = useState({} as TeamConfigFieldType) const [modalVisible, setModalVisible] = useState(false) const [modalType, setModalType] = useState<'add'|'edit'>('add') @@ -159,8 +159,8 @@ const TeamList:FC = ()=>{ },[]) const columns = useMemo(()=>{ - return TEAM_TABLE_COLUMNS.map(x=>{if(x.filters &&((x.dataIndex as string[])?.indexOf('master') !== -1 ) ){x.valueEnum = memberValueEnum} return x}) - },[memberValueEnum]) + return TEAM_TABLE_COLUMNS.map(x=>{if(x.filters &&((x.dataIndex as string[])?.indexOf('master') !== -1 ) ){x.valueEnum = memberValueEnum} return {...x, title:typeof x.title === 'string' ? $t(x.title as string) : x.title}}) + },[memberValueEnum,state.language]) return ( diff --git a/frontend/packages/core/src/pages/userProfile/UserProfile.tsx b/frontend/packages/core/src/pages/userProfile/UserProfile.tsx index 07025e00..7b94b593 100644 --- a/frontend/packages/core/src/pages/userProfile/UserProfile.tsx +++ b/frontend/packages/core/src/pages/userProfile/UserProfile.tsx @@ -1,21 +1,23 @@ -import {FC, useEffect, useState} from "react"; +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 { Menu} from "antd"; import InsidePage from "@common/components/aoplatform/InsidePage.tsx"; import { getItem } from "@common/utils/navigation.tsx"; import { $t } from "@common/locales"; +import { useGlobalContext } from "@common/contexts/GlobalStateContext"; const UserProfile:FC = ()=> { const {teamId} = useParams(); const location = useLocation() const navigateTo = useNavigate() const [activeMenu, setActiveMenu] = useState() + const {state} = useGlobalContext() - const menuData = [ - getItem({$t('修改密码')}, 'changepsw')] + const menuData = useMemo(()=>[ + getItem({$t('修改密码')}, 'changepsw')],[state.language]) useEffect(() => { diff --git a/frontend/packages/dashboard/src/component/MonitorLineGraph.tsx b/frontend/packages/dashboard/src/component/MonitorLineGraph.tsx index ef73aca8..830105b6 100644 --- a/frontend/packages/dashboard/src/component/MonitorLineGraph.tsx +++ b/frontend/packages/dashboard/src/component/MonitorLineGraph.tsx @@ -5,6 +5,7 @@ import { InvokeData, LineGraphType, MessageData } from '@dashboard/const/type'; import { MONITOR_LINE_CHART_BASIC_INVOKE_SELECTED, MONITOR_LINE_CHART_BASIC_MESSAGE_SELECTED, MONITOR_LINE_CHART_OPTION_CONFIG, MONITOR_NAME_MAP } from '@dashboard/const/const'; import { yUnitFormatter } from '../utils/dashboard'; import { $t } from '@common/locales'; +import { useGlobalContext } from '@common/contexts/GlobalStateContext'; type LineGraphProps = { className?:string @@ -22,6 +23,7 @@ const MonitorLineGraph: FC = ({ className, lineData, titles, yAx const [legendSelected, setLegendSelected] = useState>(type === 'traffic' ? {...MONITOR_LINE_CHART_BASIC_MESSAGE_SELECTED}:{...MONITOR_LINE_CHART_BASIC_INVOKE_SELECTED}) const chartRef = useRef(null); const containerRef = useRef(null); + const {state} = useGlobalContext() const handleWindowResize = () => { // 直接使用引用中的实例和DOM元素 @@ -349,7 +351,8 @@ const MonitorLineGraph: FC = ({ className, lineData, titles, yAx ...MONITOR_LINE_CHART_OPTION_CONFIG, legend: { orient: 'horizontal', - top: '50', + top: '40', + left:'16', selected: { 转发总数: true, 转发成功率: true, @@ -426,7 +429,8 @@ const MonitorLineGraph: FC = ({ className, lineData, titles, yAx ...MONITOR_LINE_CHART_OPTION_CONFIG, legend: { orient: 'horizontal', - top: '50', + top: '40', + left:'16', selected: { 转发总数: true, 转发成功率: true, @@ -599,8 +603,8 @@ const MonitorLineGraph: FC = ({ className, lineData, titles, yAx ...MONITOR_LINE_CHART_OPTION_CONFIG, legend: { orient: 'horizontal', - top: '50', - left:'10', + top: '40', + left:'16', selected: {...MONITOR_LINE_CHART_BASIC_MESSAGE_SELECTED} }, grid: { @@ -627,7 +631,7 @@ const MonitorLineGraph: FC = ({ className, lineData, titles, yAx }, yAxis: [{ type: 'value', - name: (lineData as MessageData)?.date.length > 0 ? `${yAxisTitle}报文量(KB)` : '', + name: (lineData as MessageData)?.date.length > 0 ? `${yAxisTitle}${$t('报文量')}(KB)` : '', nameLocation: 'end', nameTextStyle: { align: 'left' @@ -687,10 +691,11 @@ const MonitorLineGraph: FC = ({ className, lineData, titles, yAx option.title = { text: titles[0], - left: '10', + left: '16', textStyle: { fontSize: 16, - color: '#666666' + color: '#666666', + fontWeight:'normal', } } // 当勾选请求成功率或转发成功率其中之一时,显示右侧y轴 @@ -708,7 +713,7 @@ const MonitorLineGraph: FC = ({ className, lineData, titles, yAx } return getOption() - },[compare, type,lineData,yAxisTitle,titles,legendSelected]) + },[compare, type,lineData,yAxisTitle,titles,legendSelected, state.language]) diff --git a/frontend/packages/dashboard/src/component/MonitorPieGraph.tsx b/frontend/packages/dashboard/src/component/MonitorPieGraph.tsx index 9c42343a..f9f092fa 100644 --- a/frontend/packages/dashboard/src/component/MonitorPieGraph.tsx +++ b/frontend/packages/dashboard/src/component/MonitorPieGraph.tsx @@ -1,7 +1,8 @@ -import {FC} from 'react'; +import {FC, useMemo} from 'react'; import ECharts,{EChartsOption} from 'echarts-for-react'; import { changeNumberUnit } from '../utils/dashboard'; import { $t } from '@common/locales'; +import { useGlobalContext } from '@common/contexts/GlobalStateContext'; type PieGraphProps = { className?:string, @@ -16,7 +17,7 @@ type PieGraphProps = { } const MonitorPieGraph: FC = ({ className,title, pieData, labelName, labelValue, subText, subValue,status4xxCount,status5xxCount }) => { - + const {state} = useGlobalContext() const transferData: (value:{[key:string]:number})=>Array<{name:string, value:number}> = (value:{[key:string]:number})=> { const res:Array<{name:string, value:number}> = [] const keys = Object.keys(value) @@ -26,14 +27,14 @@ const MonitorPieGraph: FC = ({ className,title, pieData, labelNam return res } - const option: EChartsOption = { + const option: EChartsOption = useMemo(()=>({ tooltip: { trigger: 'item', }, title: [ { right: '10', - subtext: `{title|${subText}}{percent|${subValue}}`, + subtext: `{title|${$t(subText)}}{percent|${subValue}}`, top: '15%', subtextStyle: { rich: { @@ -53,7 +54,7 @@ const MonitorPieGraph: FC = ({ className,title, pieData, labelNam right: '10', orient: 'vertical', formatter: (name) => { - return `{title|${name}}{percent|${changeNumberUnit(pieData[name]) || '0'}}`; + return `{title|${$t(name)}}{percent|${changeNumberUnit(pieData[name]) || '0'}}`; }, textStyle: { rich: { @@ -74,7 +75,7 @@ const MonitorPieGraph: FC = ({ className,title, pieData, labelNam label: { show: true, position: 'center', - formatter: '{text|' + labelName + '}\n{value|' + labelValue + '}', + formatter: '{text|' + $t(labelName) + '}\n{value|' + labelValue + '}', rich: { text: { fontSize: 14, color: '#666666', lineHeight: 22, padding: [0, 0, 6, 0] }, value: { fontSize: 20, color: '#333333', lineHeight: 32, padding: [0, 0, 6, 0] }, @@ -86,7 +87,7 @@ const MonitorPieGraph: FC = ({ className,title, pieData, labelNam data: transferData(pieData), }, ], - } + }),[state.language]) return (
diff --git a/frontend/packages/dashboard/src/component/MonitorTotalPage.tsx b/frontend/packages/dashboard/src/component/MonitorTotalPage.tsx index 9e453fb4..dbea1f86 100644 --- a/frontend/packages/dashboard/src/component/MonitorTotalPage.tsx +++ b/frontend/packages/dashboard/src/component/MonitorTotalPage.tsx @@ -4,7 +4,7 @@ import dayjs from "dayjs"; import customParseFormat from "dayjs/plugin/customParseFormat"; import { useState, useEffect, useRef, useReducer } from "react"; import { useParams } from "react-router-dom"; -import { BasicResponse, STATUS_CODE } from "@common/const/const"; +import { BasicResponse, RESPONSE_TIPS, STATUS_CODE } from "@common/const/const"; import { SummaryPieData, SearchBody, PieData, MonitorApiData, MonitorSubscriberData, InvokeData, MessageData } from "@dashboard/const/type"; import { getTime, getTimeUnit, changeNumberUnit } from "../utils/dashboard"; import { RouterParams } from "@core/components/aoplatform/RenderRoutes"; @@ -119,8 +119,8 @@ const MonitorTotalPage = (props:MonitorTotalPageProps) => { setPieError(false) setRequestStatic(data.requestSummary) setProxyStatic(data.proxySummary) - setRequestPie({ 请求成功数: data.requestSummary.success, 请求失败数: data.requestSummary.fail }) - setProxyPie({ 转发成功数: data.proxySummary.success, 转发失败数: data.proxySummary.fail }) + setRequestPie({ [('请求成功数')]: data.requestSummary.success, [('请求失败数')]: data.requestSummary.fail }) + setProxyPie({ [('转发成功数')]: data.proxySummary.success, [('转发失败数')]: data.proxySummary.fail }) setPieError(false) // this.requestPieRef?.changePieChart() // this.proxyPieRef?.changePieChart() diff --git a/frontend/packages/dashboard/src/const/const.tsx b/frontend/packages/dashboard/src/const/const.tsx index 97601bae..ca8e7f9e 100644 --- a/frontend/packages/dashboard/src/const/const.tsx +++ b/frontend/packages/dashboard/src/const/const.tsx @@ -247,7 +247,8 @@ export const MONITOR_LINE_CHART_BASIC_MESSAGE_SELECTED = { export const MONITOR_LINE_CHART_OPTION_CONFIG : EChartsOption = { legend: { orient: 'horizontal', - top: '50', + top: '40', + left:'16', selected: MONITOR_LINE_CHART_BASIC_INVOKE_SELECTED }, tooltip: { diff --git a/frontend/packages/market/src/const/serviceHub/const.tsx b/frontend/packages/market/src/const/serviceHub/const.tsx index 761bc422..7670fe10 100644 --- a/frontend/packages/market/src/const/serviceHub/const.tsx +++ b/frontend/packages/market/src/const/serviceHub/const.tsx @@ -2,12 +2,12 @@ import { MenuProps } from "antd"; import { getItem } from "@common/utils/navigation"; import { ServiceHubTableListItem } from "./type"; -import { $t } from "@common/locales"; + import { PageProColumns } from "@common/components/aoplatform/PageList"; export const SERVICE_HUB_TABLE_COLUMNS: PageProColumns[] = [ { - title:$t('服务名称'), + title:('服务名称'), dataIndex: 'name', ellipsis:true, width:160, @@ -17,38 +17,32 @@ export const SERVICE_HUB_TABLE_COLUMNS: PageProColumns[ }, }, { - title:$t('服务ID'), + title:('服务ID'), dataIndex: 'id', width: 140, ellipsis:true }, { - title:$t('服务标签'), + title:('服务标签'), dataIndex: 'tags', ellipsis:true, renderText:(_,entity:ServiceHubTableListItem)=>entity.tags?.map(x=>x.name).join(',') || '-' }, { - title:$t('所属系统'), + title:('所属系统'), dataIndex: ['app','name'], ellipsis:true }, { - title:$t('所属团队'), + title:('所属团队'), dataIndex: ['team','name'], ellipsis:true }, { - title:$t('服务分类'), + title:('服务分类'), dataIndex: ['catalogue','name'], ellipsis:true } ]; -export const TENANT_MANAGEMENT_APP_MENU: MenuProps['items'] = [ - - getItem($t('订阅的服务'), 'service'), - getItem($t('访问授权'), 'authorization'), - getItem($t('应用管理'), 'setting'), -]; diff --git a/frontend/packages/market/src/pages/serviceHub/ServiceHubApiDocument.tsx b/frontend/packages/market/src/pages/serviceHub/ServiceHubApiDocument.tsx index f677e2fb..7ac2fef8 100644 --- a/frontend/packages/market/src/pages/serviceHub/ServiceHubApiDocument.tsx +++ b/frontend/packages/market/src/pages/serviceHub/ServiceHubApiDocument.tsx @@ -66,7 +66,7 @@ const ServiceHubApiDocument = ({service}:{service:ServiceDetailType})=>{
-

API 列表

+

{$t('API 列表')}

{apiDocs?.map((apiDetail)=>(
diff --git a/frontend/packages/market/src/pages/serviceHub/management/ApprovalModalContent.tsx b/frontend/packages/market/src/pages/serviceHub/management/ApprovalModalContent.tsx index 7af5d508..b5399dd1 100644 --- a/frontend/packages/market/src/pages/serviceHub/management/ApprovalModalContent.tsx +++ b/frontend/packages/market/src/pages/serviceHub/management/ApprovalModalContent.tsx @@ -67,7 +67,7 @@ export const ApprovalModalContent = forwardRef{ return ( - {x.title}: + {$t(x.title)}: {x.nested ? data?.[x.key]?.[x.nested] : ( (data as {[k:string]:unknown})?.[x.key] || '-')} ) })} diff --git a/frontend/packages/market/src/pages/serviceHub/management/ManagementAuthorityView.tsx b/frontend/packages/market/src/pages/serviceHub/management/ManagementAuthorityView.tsx index f5133a81..2d7bd358 100644 --- a/frontend/packages/market/src/pages/serviceHub/management/ManagementAuthorityView.tsx +++ b/frontend/packages/market/src/pages/serviceHub/management/ManagementAuthorityView.tsx @@ -1,3 +1,4 @@ +import { $t } from "@common/locales"; import {Col, Row} from "antd"; import {useEffect, useState} from "react"; @@ -16,7 +17,7 @@ export const ManagementAuthorityView = ({entity}:ManagementAuthorityViewProps)=>
{ detail?.length > 0 && detail.map((k,i)=>( - {k.key}: + {$t(k.key)}: { k.value || '-'} )) diff --git a/frontend/packages/market/src/pages/serviceHub/management/ManagementInsidePage.tsx b/frontend/packages/market/src/pages/serviceHub/management/ManagementInsidePage.tsx index 773ada32..58f42fc9 100644 --- a/frontend/packages/market/src/pages/serviceHub/management/ManagementInsidePage.tsx +++ b/frontend/packages/market/src/pages/serviceHub/management/ManagementInsidePage.tsx @@ -13,6 +13,8 @@ import { useTenantManagementContext } from "@market/contexts/TenantManagementCon import { ManagementConfigFieldType } from "./ManagementConfig"; import { useGlobalContext } from "@common/contexts/GlobalStateContext"; import { $t } from "@common/locales"; +import { getItem } from "@common/utils/navigation"; +import { MenuItemType } from "antd/es/menu/interface"; export default function ManagementInsidePage(){ const { message } = App.useApp() @@ -25,8 +27,14 @@ export default function ManagementInsidePage(){ const [openKeys, setOpenKeys] = useState([]) const [loading, setLoading] = useState(false) const {appName,setAppName} = useTenantManagementContext() - const {getTeamAccessData,cleanTeamAccessData} = useGlobalContext() + const {getTeamAccessData,cleanTeamAccessData,state} = useGlobalContext() + const TENANT_MANAGEMENT_APP_MENU: MenuProps['items'] = useMemo(()=>[ + getItem($t('订阅的服务'), 'service'), + getItem($t('访问授权'), 'authorization'), + getItem($t('应用管理'), 'setting'), + ],[state.language]) + const menuData = useMemo(()=>{ return TENANT_MANAGEMENT_APP_MENU },[])