mirror of
https://github.com/APIParkLab/APIPark.git
synced 2026-06-12 18:11:34 +08:00
@@ -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)
|
||||
|
||||
@@ -56,7 +56,7 @@ const InsidePage:FC<InsidePageProps> = ({showBanner=true,pageTitle,tagList,showB
|
||||
</p>
|
||||
</div>
|
||||
</div>}
|
||||
<div className={`max-h-full ${scrollPage ? 'overflow-hidden' : 'overflow-auto'} ${contentClassName || ''}`}>{children}</div>
|
||||
<div className={`h-full ${scrollPage ? 'overflow-hidden' : 'overflow-auto'} ${contentClassName || ''}`}>{children}</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -59,11 +59,15 @@ const PageList = <T extends Record<string, unknown>>(props: React.PropsWithChild
|
||||
const [tableWidth, setTableWidth] = useState<number|undefined>(undefined);
|
||||
const actionRef = useRef<ActionType>();
|
||||
const [allowTableClick,setAllowTableClick] = useState<boolean>(false)
|
||||
const {accessData,checkPermission,accessInit} = useGlobalContext()
|
||||
const {accessData,checkPermission,accessInit,state} = useGlobalContext()
|
||||
const [minTableWidth, setMinTableWidth] = useState<number>(0)
|
||||
|
||||
// 使用useImperativeHandle来自定义暴露给父组件的实例值
|
||||
useImperativeHandle(ref, () => actionRef.current!);
|
||||
|
||||
useEffect(()=>{
|
||||
actionRef?.current?.reload?.()
|
||||
},[state.language])
|
||||
|
||||
const lastAccess = useMemo(()=>{
|
||||
if(!tableClickAccess) return true
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@ export const SubscribeApprovalModalContent = forwardRef<SubscribeApprovalModalHa
|
||||
<div className="my-btnybase">{
|
||||
SubscribeApprovalList?.map((x)=>(
|
||||
<Row key={x.key} className="leading-[32px] mb-btnbase mx-auto">
|
||||
<Col className="text-left" span={6}>{x.title}:</Col>
|
||||
<Col className="text-left" span={6}>{$t(x.title)}:</Col>
|
||||
<Col >{(data as {[k:string]:unknown})?.[x.key]?.name || (data as {[k:string]:unknown})?.[x.key] || '-'}</Col>
|
||||
</Row>
|
||||
))
|
||||
|
||||
@@ -56,7 +56,7 @@ const TableBtnWithPermission = ({btnTitle, access, tooltip, disabled, navigateTo
|
||||
|
||||
return (<>{
|
||||
!btnAccess || (disabled&&tooltip) ?
|
||||
<Tooltip placement="top" title={tooltip ?? `暂无${btnTitle}权限,请联系管理员分配。`}>
|
||||
<Tooltip placement="top" title={tooltip ?? $t('暂无(0)权限,请联系管理员分配。',[btnTitle])}>
|
||||
<Button type="text" disabled={true} className={`h-[22px] border-none p-0 flex items-center bg-transparent ${className}`} key={btnType} icon={<Icon icon={TableIconName[btnType as keyof typeof TableIconName]} width="18" height="18"/>} >{}</Button>
|
||||
</Tooltip>
|
||||
:
|
||||
|
||||
@@ -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('驱动名称')}
|
||||
</>
|
||||
)
|
||||
}
|
||||
+6
-2
@@ -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<boolean>(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 (<>
|
||||
<PageList
|
||||
ref={pageListRef}
|
||||
columns = {[...columns,...operation]}
|
||||
columns = {[...translatedCol,...operation]}
|
||||
request={(params)=>getIntelligentPluginTableList(params)}
|
||||
addNewBtnTitle={$t('添加(0)',[$t(pluginName)])}
|
||||
searchPlaceholder={$t('搜索(0)名称',[$t(pluginName)])}
|
||||
|
||||
@@ -32,7 +32,7 @@ export const routerKeyMap = new Map<string, string[]|string>([
|
||||
|
||||
|
||||
export const COLUMNS_TITLE = {
|
||||
operate : $t('操作')
|
||||
operate : ''
|
||||
}
|
||||
|
||||
export const VALIDATE_MESSAGE = {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"Kfd50704d": "暂无(0)权限,请联系管理员分配。",
|
||||
"K48322168": "未分配",
|
||||
"K98f247f9": "超级管理员",
|
||||
"K9c8a571f": "团队管理员",
|
||||
"K929b485b": "运维管理员",
|
||||
"K82cc5ec2": "普通成员",
|
||||
"Ke41d7451": "只读成员",
|
||||
"Kf99e8b66": "服务管理员",
|
||||
"Kda8db57a": "服务开发者",
|
||||
"K216a1ac7": "应用开发者",
|
||||
"K27924db": "应用管理员",
|
||||
"K8dc5c723": "驱动名称",
|
||||
"K9919285b": "服务类型",
|
||||
"K396e56ab": "报文量"
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"Kfd50704d": "暂无(0)权限,请联系管理员分配。",
|
||||
"K48322168": "未分配",
|
||||
"K98f247f9": "超级管理员",
|
||||
"K9c8a571f": "团队管理员",
|
||||
"K929b485b": "运维管理员",
|
||||
"K82cc5ec2": "普通成员",
|
||||
"Ke41d7451": "只读成员",
|
||||
"Kf99e8b66": "服务管理员",
|
||||
"Kda8db57a": "服务开发者",
|
||||
"K216a1ac7": "应用开发者",
|
||||
"K27924db": "应用管理员",
|
||||
"K8dc5c723": "驱动名称",
|
||||
"K9919285b": "服务类型",
|
||||
"K396e56ab": "报文量"
|
||||
}
|
||||
@@ -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<MemberTableListItem>[] = [
|
||||
{
|
||||
title:$t('用户名'),
|
||||
title:('用户名'),
|
||||
dataIndex: 'name',
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
@@ -16,12 +16,12 @@ export const MEMBER_TABLE_COLUMNS: PageProColumns<MemberTableListItem>[] = [
|
||||
},
|
||||
},
|
||||
{
|
||||
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<MemberTableListItem>[] = [
|
||||
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,<span className="text-status_success">{$t('启用')}</span>],
|
||||
[false,<span className="text-status_fail">{$t('禁用')}</span>],
|
||||
[true,<span className="text-status_success">{('启用')}</span>],
|
||||
[false,<span className="text-status_fail">{('禁用')}</span>],
|
||||
])
|
||||
}
|
||||
];
|
||||
|
||||
@@ -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<PartitionCertTableListItem>[] = [
|
||||
{
|
||||
title:$t('证书'),
|
||||
title:('证书'),
|
||||
dataIndex: 'name',
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
@@ -17,7 +17,7 @@ export const PARTITION_CERT_TABLE_COLUMNS: PageProColumns<PartitionCertTableList
|
||||
},
|
||||
},
|
||||
{
|
||||
title:$t('绑定域名'),
|
||||
title:('绑定域名'),
|
||||
dataIndex: 'domains',
|
||||
renderText:(_,entity) =>(
|
||||
entity.domains.join(',')
|
||||
@@ -25,7 +25,7 @@ export const PARTITION_CERT_TABLE_COLUMNS: PageProColumns<PartitionCertTableList
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title:$t('过期日期'),
|
||||
title:('过期日期'),
|
||||
ellipsis: true,
|
||||
dataIndex: 'notAfter',
|
||||
width:100,
|
||||
@@ -35,7 +35,7 @@ export const PARTITION_CERT_TABLE_COLUMNS: PageProColumns<PartitionCertTableList
|
||||
},
|
||||
},
|
||||
{
|
||||
title:$t('更新者'),
|
||||
title:('更新者'),
|
||||
dataIndex: ['updater','name'],
|
||||
ellipsis: true,
|
||||
filters: true,
|
||||
@@ -44,7 +44,7 @@ export const PARTITION_CERT_TABLE_COLUMNS: PageProColumns<PartitionCertTableList
|
||||
filterSearch: true
|
||||
},
|
||||
{
|
||||
title:$t('更新时间'),
|
||||
title:('更新时间'),
|
||||
key: 'updateTime',
|
||||
dataIndex: 'updateTime',
|
||||
ellipsis:true,
|
||||
@@ -57,7 +57,7 @@ export const PARTITION_CERT_TABLE_COLUMNS: PageProColumns<PartitionCertTableList
|
||||
|
||||
export const PARTITION_CLUSTER_TABLE_COLUMNS : PageProColumns<PartitionClusterTableListItem>[] = [
|
||||
{
|
||||
title:$t('集群名称'),
|
||||
title:('集群名称'),
|
||||
dataIndex: 'name',
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
@@ -67,13 +67,13 @@ export const PARTITION_CLUSTER_TABLE_COLUMNS : PageProColumns<PartitionClusterTa
|
||||
},
|
||||
},
|
||||
{
|
||||
title:$t('集群 ID'),
|
||||
title:('集群 ID'),
|
||||
dataIndex: 'id',
|
||||
width: 140,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title:$t('状态'),
|
||||
title:('状态'),
|
||||
dataIndex: 'status',
|
||||
ellipsis:true,
|
||||
valueType: 'select',
|
||||
@@ -85,7 +85,7 @@ export const PARTITION_CLUSTER_TABLE_COLUMNS : PageProColumns<PartitionClusterTa
|
||||
])
|
||||
},
|
||||
{
|
||||
title: $t('描述'),
|
||||
title: ('描述'),
|
||||
dataIndex: 'description',
|
||||
ellipsis:true
|
||||
}
|
||||
@@ -94,7 +94,7 @@ export const PARTITION_CLUSTER_TABLE_COLUMNS : PageProColumns<PartitionClusterTa
|
||||
|
||||
export const PARTITION_CLUSTER_NODE_COLUMNS: PageProColumns<PartitionClusterNodeTableListItem>[] = [
|
||||
{
|
||||
title:$t('节点名称'),
|
||||
title:('节点名称'),
|
||||
dataIndex: 'name',
|
||||
ellipsis:true,
|
||||
fixed:'left',
|
||||
@@ -103,28 +103,28 @@ export const PARTITION_CLUSTER_NODE_COLUMNS: PageProColumns<PartitionClusterNode
|
||||
},
|
||||
},
|
||||
{
|
||||
title:$t('管理地址'),
|
||||
title:('管理地址'),
|
||||
dataIndex: 'managerAddress',
|
||||
ellipsis:true,
|
||||
width:200,
|
||||
render:(_,entity)=>(<CopyAddrList keyName="managerAddress" addrItem={entity} />)
|
||||
},
|
||||
{
|
||||
title:$t('服务地址'),
|
||||
title:('服务地址'),
|
||||
dataIndex: 'serviceAddress',
|
||||
ellipsis:true,
|
||||
width:230,
|
||||
render:(_,entity)=>(<CopyAddrList keyName="serviceAddress" addrItem={entity} />)
|
||||
},
|
||||
{
|
||||
title:$t('集群同步地址'),
|
||||
title:('集群同步地址'),
|
||||
dataIndex: 'peerAddress',
|
||||
ellipsis:true,
|
||||
width:230,
|
||||
render:(_,entity)=>(<CopyAddrList keyName="peerAddress" addrItem={entity} />)
|
||||
},
|
||||
{
|
||||
title:$t('状态'),
|
||||
title:('状态'),
|
||||
dataIndex: 'status',
|
||||
ellipsis:true,
|
||||
width:86,
|
||||
@@ -139,12 +139,12 @@ export const PARTITION_CLUSTER_NODE_COLUMNS: PageProColumns<PartitionClusterNode
|
||||
];
|
||||
|
||||
export const NODE_MODAL_COLUMNS:ColumnType<PartitionClusterNodeModalTableListItem>[] = [
|
||||
{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)=>(<CopyAddrList keyName="managerAddress" addrItem={entity} />)},
|
||||
{title:$t('服务地址'), dataIndex:'serviceAddress',width:240,ellipsis:true,render:(_,entity)=>(<CopyAddrList keyName="serviceAddress" addrItem={entity} />)},
|
||||
{title:$t('状态'), dataIndex:'status',
|
||||
{title:('管理地址'), dataIndex:'managerAddress',width:240,ellipsis:true,render:(_,entity)=>(<CopyAddrList keyName="managerAddress" addrItem={entity} />)},
|
||||
{title:('服务地址'), dataIndex:'serviceAddress',width:240,ellipsis:true,render:(_,entity)=>(<CopyAddrList keyName="serviceAddress" addrItem={entity} />)},
|
||||
{title:('状态'), dataIndex:'status',
|
||||
render:(text)=>(
|
||||
<span className={text === 0 ? 'text-status_fail' : 'text-status_success'}>{ClusterStatusEnum[text]}</span>
|
||||
)}
|
||||
@@ -152,7 +152,7 @@ export const NODE_MODAL_COLUMNS:ColumnType<PartitionClusterNodeModalTableListIte
|
||||
|
||||
export const PARTITION_LIST_COLUMNS: PageProColumns<PartitionTableListItem>[] = [
|
||||
{
|
||||
title:$t('环境名称'),
|
||||
title:('环境名称'),
|
||||
dataIndex: 'name',
|
||||
ellipsis:true,
|
||||
fixed:'left',
|
||||
@@ -161,20 +161,20 @@ export const PARTITION_LIST_COLUMNS: PageProColumns<PartitionTableListItem>[] =
|
||||
},
|
||||
},
|
||||
{
|
||||
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<PartitionTableListItem>[] =
|
||||
filterSearch: true
|
||||
},
|
||||
{
|
||||
title:$t('更新时间'),
|
||||
title:('更新时间'),
|
||||
dataIndex: 'updateTime',
|
||||
ellipsis:true,
|
||||
width:182,
|
||||
@@ -195,8 +195,8 @@ export const PARTITION_LIST_COLUMNS: PageProColumns<PartitionTableListItem>[] =
|
||||
];
|
||||
|
||||
export const ClusterStatusEnum ={
|
||||
0: $t('异常'),
|
||||
1: $t('正常')
|
||||
0: ('异常'),
|
||||
1: ('正常')
|
||||
}
|
||||
|
||||
export const DASHBOARD_SETTING_DRIVER_OPTION_LIST = [
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { $t } from "@common/locales"
|
||||
|
||||
export const ROLE_TABLE_COLUMNS = [
|
||||
{
|
||||
title:$t('角色名称'),
|
||||
title:'角色名称',
|
||||
dataIndex: 'name',
|
||||
ellipsis:true,
|
||||
fixed:'left',
|
||||
|
||||
@@ -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<SystemTableListItem>[] = [
|
||||
{
|
||||
title:$t('服务名称'),
|
||||
title:('服务名称'),
|
||||
dataIndex: 'name',
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
@@ -96,13 +96,13 @@ export const SYSTEM_TABLE_COLUMNS: PageProColumns<SystemTableListItem>[] = [
|
||||
},
|
||||
},
|
||||
{
|
||||
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<SystemTableListItem>[] = [
|
||||
// filterSearch: true,
|
||||
},
|
||||
{
|
||||
title:$t('API 数量'),
|
||||
title:('API 数量'),
|
||||
dataIndex: 'apiNum',
|
||||
ellipsis:true,
|
||||
sorter: (a,b)=> {
|
||||
@@ -118,12 +118,12 @@ export const SYSTEM_TABLE_COLUMNS: PageProColumns<SystemTableListItem>[] = [
|
||||
},
|
||||
},
|
||||
{
|
||||
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<SystemTableListItem>[] = [
|
||||
filterSearch: true,
|
||||
},
|
||||
{
|
||||
title:$t('创建时间'),
|
||||
title:('创建时间'),
|
||||
dataIndex: 'createTime',
|
||||
width:182,
|
||||
ellipsis:true,
|
||||
@@ -143,7 +143,7 @@ export const SYSTEM_TABLE_COLUMNS: PageProColumns<SystemTableListItem>[] = [
|
||||
|
||||
export const SYSTEM_SUBSERVICE_TABLE_COLUMNS: PageProColumns<SystemSubServiceTableListItem>[] = [
|
||||
{
|
||||
title:$t('服务名称'),
|
||||
title:('服务名称'),
|
||||
dataIndex: ['service','name'],
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
@@ -153,13 +153,13 @@ export const SYSTEM_SUBSERVICE_TABLE_COLUMNS: PageProColumns<SystemSubServiceTab
|
||||
},
|
||||
},
|
||||
{
|
||||
title:$t('服务 ID'),
|
||||
title:('服务 ID'),
|
||||
dataIndex: ['service','name'],
|
||||
width: 140,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title:$t('申请状态'),
|
||||
title:('申请状态'),
|
||||
dataIndex: 'applyStatus',
|
||||
ellipsis:{
|
||||
showTitle:true
|
||||
@@ -169,25 +169,25 @@ export const SYSTEM_SUBSERVICE_TABLE_COLUMNS: PageProColumns<SystemSubServiceTab
|
||||
onFilter: true,
|
||||
valueType: 'select',
|
||||
valueEnum:new Map([
|
||||
[0,<span className={SubscribeStatusColor[0]}>{$t('驳回')}</span>],
|
||||
[1,<span className={SubscribeStatusColor[1]}>{$t('审核中')}</span>],
|
||||
[2,<span className={SubscribeStatusColor[2]}>{$t('已订阅')}</span>],
|
||||
[3,<span className={SubscribeStatusColor[3]}>{$t('取消订阅')}</span>],
|
||||
[4,<span className={SubscribeStatusColor[4]}>{$t('取消申请')}</span>],
|
||||
[0,<span className={SubscribeStatusColor[0]}>{('驳回')}</span>],
|
||||
[1,<span className={SubscribeStatusColor[1]}>{('审核中')}</span>],
|
||||
[2,<span className={SubscribeStatusColor[2]}>{('已订阅')}</span>],
|
||||
[3,<span className={SubscribeStatusColor[3]}>{('取消订阅')}</span>],
|
||||
[4,<span className={SubscribeStatusColor[4]}>{('取消申请')}</span>],
|
||||
])
|
||||
},
|
||||
{
|
||||
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<SystemSubServiceTab
|
||||
filterSearch: true,
|
||||
},
|
||||
{
|
||||
title:$t('来源'),
|
||||
title:('来源'),
|
||||
dataIndex: 'from',
|
||||
ellipsis: true,
|
||||
filters: true,
|
||||
onFilter: true,
|
||||
valueType: 'select',
|
||||
valueEnum:new Map([
|
||||
[0,<span>{$t('手动添加')}</span>],
|
||||
[1,<span>{$t('订阅申请')}</span>],
|
||||
[0,<span>{('手动添加')}</span>],
|
||||
[1,<span>{('订阅申请')}</span>],
|
||||
])
|
||||
},
|
||||
{
|
||||
title:$t('添加时间'),
|
||||
title:('添加时间'),
|
||||
dataIndex: 'createTime',
|
||||
ellipsis:true,
|
||||
width:182,
|
||||
@@ -222,7 +222,7 @@ export const SYSTEM_SUBSERVICE_TABLE_COLUMNS: PageProColumns<SystemSubServiceTab
|
||||
|
||||
export const SYSTEM_SUBSCRIBER_TABLE_COLUMNS: PageProColumns<SystemSubscriberTableListItem>[] = [
|
||||
{
|
||||
title:$t('服务名称'),
|
||||
title:('服务名称'),
|
||||
dataIndex: ['service','name'],
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
@@ -232,35 +232,35 @@ export const SYSTEM_SUBSCRIBER_TABLE_COLUMNS: PageProColumns<SystemSubscriberTab
|
||||
},
|
||||
},
|
||||
{
|
||||
title:$t('服务 ID'),
|
||||
title:('服务 ID'),
|
||||
dataIndex: 'id',
|
||||
width: 140,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title:$t('订阅方'),
|
||||
title:('订阅方'),
|
||||
dataIndex: ['subscriber','name'],
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title:$t('所属团队'),
|
||||
title:('所属团队'),
|
||||
dataIndex: ['team','name'],
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title:$t('来源'),
|
||||
title:('来源'),
|
||||
dataIndex: 'from',
|
||||
ellipsis:true,
|
||||
filters: true,
|
||||
onFilter: true,
|
||||
valueType: 'select',
|
||||
valueEnum:new Map([
|
||||
[0,<span>{$t('手动添加')}</span>],
|
||||
[1,<span>{$t('订阅申请')}</span>],
|
||||
[0,<span>{('手动添加')}</span>],
|
||||
[1,<span>{('订阅申请')}</span>],
|
||||
])
|
||||
},
|
||||
{
|
||||
title:$t('订阅时间'),
|
||||
title:('订阅时间'),
|
||||
dataIndex: 'applyTime',
|
||||
ellipsis:true,
|
||||
width:182,
|
||||
@@ -272,7 +272,7 @@ export const SYSTEM_SUBSCRIBER_TABLE_COLUMNS: PageProColumns<SystemSubscriberTab
|
||||
|
||||
|
||||
export const memberModalColumn:ColumnsType<MemberItem> = [
|
||||
{title:$t('成员'),
|
||||
{title:('成员'),
|
||||
render:(_,entity)=>{
|
||||
return <>
|
||||
<div>
|
||||
@@ -288,7 +288,7 @@ export const memberModalColumn:ColumnsType<MemberItem> = [
|
||||
|
||||
export const SYSTEM_MEMBER_TABLE_COLUMN: PageProColumns<SystemMemberTableListItem>[] = [
|
||||
{
|
||||
title:$t('用户名'),
|
||||
title:('用户名'),
|
||||
dataIndex: ['user','name'],
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
@@ -298,12 +298,12 @@ export const SYSTEM_MEMBER_TABLE_COLUMN: PageProColumns<SystemMemberTableListIte
|
||||
},
|
||||
},
|
||||
{
|
||||
title:$t('邮箱'),
|
||||
title:('邮箱'),
|
||||
dataIndex: 'email',
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title:$t('角色'),
|
||||
title:('角色'),
|
||||
dataIndex: ['roles','name'],
|
||||
ellipsis:true
|
||||
|
||||
@@ -312,7 +312,7 @@ export const SYSTEM_MEMBER_TABLE_COLUMN: PageProColumns<SystemMemberTableListIte
|
||||
|
||||
export const MATCH_CONFIG:ConfigField<MatchItem>[] = [
|
||||
{
|
||||
title:$t('参数位置'),
|
||||
title:('参数位置'),
|
||||
key: 'position',
|
||||
component: <Select className="w-INPUT_NORMAL" options={Object.entries(MatchPositionEnum)?.map(([key,value])=>{
|
||||
return { label:value, value:key}
|
||||
@@ -323,13 +323,13 @@ export const MATCH_CONFIG:ConfigField<MatchItem>[] = [
|
||||
required: true,
|
||||
ellipsis:true
|
||||
}, {
|
||||
title:$t('参数名'),
|
||||
title:('参数名'),
|
||||
key: 'key',
|
||||
component: <Input className="w-INPUT_NORMAL" />,
|
||||
renderText: (value: unknown) => <>{value}</>,
|
||||
required: true
|
||||
}, {
|
||||
title:$t('匹配类型'),
|
||||
title:('匹配类型'),
|
||||
key: 'matchType',
|
||||
component: <Select className="w-INPUT_NORMAL" options={Object.entries(MatchTypeEnum)?.map(([key,value])=>{
|
||||
return { label:value, value:key}
|
||||
@@ -339,7 +339,7 @@ export const MATCH_CONFIG:ConfigField<MatchItem>[] = [
|
||||
},
|
||||
required: true
|
||||
}, {
|
||||
title:$t('参数值'),
|
||||
title:('参数值'),
|
||||
key: 'pattern',
|
||||
component: <Input className="w-INPUT_NORMAL"/>,
|
||||
renderText: (value: string) => {
|
||||
@@ -352,7 +352,7 @@ export const MATCH_CONFIG:ConfigField<MatchItem>[] = [
|
||||
|
||||
export const SYSTEM_API_TABLE_COLUMNS: PageProColumns<SystemApiTableListItem>[] = [
|
||||
{
|
||||
title:$t('名称'),
|
||||
title:('名称'),
|
||||
dataIndex: 'name',
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
@@ -363,7 +363,7 @@ export const SYSTEM_API_TABLE_COLUMNS: PageProColumns<SystemApiTableListItem>[]
|
||||
},
|
||||
},
|
||||
{
|
||||
title:$t('协议/方法'),
|
||||
title:('协议/方法'),
|
||||
dataIndex: 'method',
|
||||
ellipsis:true,
|
||||
filters: true,
|
||||
@@ -378,12 +378,12 @@ export const SYSTEM_API_TABLE_COLUMNS: PageProColumns<SystemApiTableListItem>[]
|
||||
},
|
||||
},
|
||||
{
|
||||
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<SystemApiTableListItem>[]
|
||||
filterSearch: true,
|
||||
},
|
||||
{
|
||||
title:$t('更新时间'),
|
||||
title:('更新时间'),
|
||||
dataIndex: 'updateTime',
|
||||
ellipsis:true,
|
||||
hideInSearch: true,
|
||||
@@ -405,7 +405,7 @@ export const SYSTEM_API_TABLE_COLUMNS: PageProColumns<SystemApiTableListItem>[]
|
||||
|
||||
export const SYSTEM_UPSTREAM_TABLE_COLUMNS: PageProColumns<SystemUpstreamTableListItem>[] = [
|
||||
{
|
||||
title:$t('名称'),
|
||||
title:('名称'),
|
||||
dataIndex: 'name',
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
@@ -415,13 +415,13 @@ export const SYSTEM_UPSTREAM_TABLE_COLUMNS: PageProColumns<SystemUpstreamTableLi
|
||||
},
|
||||
},
|
||||
{
|
||||
title:$t('上游 ID'),
|
||||
title:('上游 ID'),
|
||||
dataIndex: 'id',
|
||||
width: 140,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title:$t('创建人'),
|
||||
title:('创建人'),
|
||||
dataIndex: ['creator','name'],
|
||||
ellipsis: true,
|
||||
width:88,
|
||||
@@ -431,7 +431,7 @@ export const SYSTEM_UPSTREAM_TABLE_COLUMNS: PageProColumns<SystemUpstreamTableLi
|
||||
filterSearch: true,
|
||||
},
|
||||
{
|
||||
title:$t('更新人'),
|
||||
title:('更新人'),
|
||||
dataIndex: ['updater','name'],
|
||||
ellipsis: true,
|
||||
width:88,
|
||||
@@ -441,7 +441,7 @@ export const SYSTEM_UPSTREAM_TABLE_COLUMNS: PageProColumns<SystemUpstreamTableLi
|
||||
filterSearch: true,
|
||||
},
|
||||
{
|
||||
title:$t('创建时间'),
|
||||
title:('创建时间'),
|
||||
dataIndex: 'createTime',
|
||||
width:182,
|
||||
ellipsis:true,
|
||||
@@ -450,7 +450,7 @@ export const SYSTEM_UPSTREAM_TABLE_COLUMNS: PageProColumns<SystemUpstreamTableLi
|
||||
}
|
||||
},
|
||||
{
|
||||
title:$t('更新时间'),
|
||||
title:('更新时间'),
|
||||
dataIndex: 'updateTime',
|
||||
width:182,
|
||||
ellipsis:true,
|
||||
@@ -461,46 +461,46 @@ export const SYSTEM_UPSTREAM_TABLE_COLUMNS: PageProColumns<SystemUpstreamTableLi
|
||||
];
|
||||
|
||||
export const UpstreamDriverEnum = {
|
||||
'static':$t('静态上游'),
|
||||
'discoveries':$t('动态服务发现'),
|
||||
'static':('静态上游'),
|
||||
'discoveries':('动态服务发现'),
|
||||
}
|
||||
|
||||
export const typeOptions = [
|
||||
{ label: $t('静态上游'), value: 'static' },
|
||||
// { label: $t('动态服务发现', value: 'discoveries' },
|
||||
{ label: ('静态上游'), value: 'static' },
|
||||
// { label: ('动态服务发现', value: 'discoveries' },
|
||||
];
|
||||
|
||||
export const schemeOptions = [
|
||||
{ label:$t('HTTPS'), value:'HTTPS'},
|
||||
{ label:$t('HTTP'), value:'HTTP'},
|
||||
{ label:('HTTPS'), value:'HTTPS'},
|
||||
{ label:('HTTP'), value:'HTTP'},
|
||||
]
|
||||
export const balanceOptions = [
|
||||
{ label: $t('带权轮询'), value: 'round-robin' },
|
||||
{ label: $t('IP Hash'), value: 'ip-hash' },
|
||||
{ label: ('带权轮询'), value: 'round-robin' },
|
||||
{ label: ('IP Hash'), value: 'ip-hash' },
|
||||
];
|
||||
|
||||
export const passHostOptions = [
|
||||
{ label:$t('透传客户端请求 Host'), value:'pass'},
|
||||
{ label:$t('使用上游服务 Host'), value:'node'},
|
||||
{ label:$t('重写 Host'), value:'rewrite'},
|
||||
{ label:('透传客户端请求 Host'), value:'pass'},
|
||||
{ label:('使用上游服务 Host'), value:'node'},
|
||||
{ label:('重写 Host'), value:'rewrite'},
|
||||
]
|
||||
|
||||
export const proxyHeaderTypeOptions =[
|
||||
{label:$t('新增或修改'), value: 'ADD' },
|
||||
{ label: $t('删除'), value: 'DELETE' }
|
||||
{label:('新增或修改'), value: 'ADD' },
|
||||
{ label: ('删除'), value: 'DELETE' }
|
||||
]
|
||||
|
||||
export const PROXY_HEADER_CONFIG:ConfigField<ProxyHeaderItem>[] = [
|
||||
{
|
||||
title:$t('操作类型'),
|
||||
title:('操作类型'),
|
||||
key: 'optType',
|
||||
component: <Select className="w-INPUT_NORMAL" options={proxyHeaderTypeOptions}/>,
|
||||
renderText: (value: string) => {
|
||||
return (<>{value === 'ADD' ? $t('新增或修改'):$t('删除')}</>)
|
||||
return (<>{value === 'ADD' ? ('新增或修改'):('删除')}</>)
|
||||
},
|
||||
required: true
|
||||
}, {
|
||||
title:$t('参数名'),
|
||||
title:('参数名'),
|
||||
key: 'key',
|
||||
component: <Input className="w-INPUT_NORMAL"/>,
|
||||
renderText: (value: string) => {
|
||||
@@ -508,7 +508,7 @@ export const PROXY_HEADER_CONFIG:ConfigField<ProxyHeaderItem>[] = [
|
||||
},
|
||||
required: true
|
||||
}, {
|
||||
title:$t('参数值'),
|
||||
title:('参数值'),
|
||||
key: 'value',
|
||||
component: <Input className="w-INPUT_NORMAL" />,
|
||||
renderText: (value: string) => {
|
||||
@@ -520,12 +520,12 @@ export const PROXY_HEADER_CONFIG:ConfigField<ProxyHeaderItem>[] = [
|
||||
|
||||
export const NODE_CONFIG:ConfigField<NodeItem>[] = [
|
||||
{
|
||||
title:$t('集群'),
|
||||
title:('集群'),
|
||||
key: 'cluster',
|
||||
component: <Select className="w-INPUT_NORMAL" options={[]}/>,
|
||||
required: true
|
||||
}, {
|
||||
title:$t('地址'),
|
||||
title:('地址'),
|
||||
key: 'address',
|
||||
component: <Input className="w-INPUT_NORMAL" />,
|
||||
renderText: (value: string) => {
|
||||
@@ -533,7 +533,7 @@ export const NODE_CONFIG:ConfigField<NodeItem>[] = [
|
||||
},
|
||||
required: true
|
||||
}, {
|
||||
title:$t('权重'),
|
||||
title:('权重'),
|
||||
key: 'weight',
|
||||
component: <InputNumber className="w-INPUT_NORMAL"/>,
|
||||
renderText: (value: string) => {
|
||||
@@ -544,37 +544,37 @@ export const NODE_CONFIG:ConfigField<NodeItem>[] = [
|
||||
]
|
||||
|
||||
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<ServiceApiTableListItem>[] = [
|
||||
{
|
||||
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<ServiceApiTableL
|
||||
|
||||
export const apiModalColumn:ColumnsType<SimpleApiItem> = [
|
||||
{
|
||||
title:$t('所有 API'),
|
||||
title:('所有 API'),
|
||||
dataIndex:'method',
|
||||
},
|
||||
{
|
||||
@@ -596,7 +596,7 @@ export const apiModalColumn:ColumnsType<SimpleApiItem> = [
|
||||
|
||||
export const SYSTEM_AUTHORITY_TABLE_COLUMNS: PageProColumns<SystemAuthorityTableListItem>[] = [
|
||||
{
|
||||
title:$t('名称'),
|
||||
title:('名称'),
|
||||
dataIndex: 'name',
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
@@ -606,7 +606,7 @@ export const SYSTEM_AUTHORITY_TABLE_COLUMNS: PageProColumns<SystemAuthorityTable
|
||||
},
|
||||
},
|
||||
{
|
||||
title:$t('类型'),
|
||||
title:('类型'),
|
||||
dataIndex: 'driver',
|
||||
ellipsis:true,
|
||||
filters: true,
|
||||
@@ -622,7 +622,7 @@ export const SYSTEM_AUTHORITY_TABLE_COLUMNS: PageProColumns<SystemAuthorityTable
|
||||
}
|
||||
},
|
||||
{
|
||||
title:$t('隐藏鉴权信息'),
|
||||
title:('隐藏鉴权信息'),
|
||||
dataIndex: 'hideCredential',
|
||||
ellipsis:{
|
||||
showTitle:true
|
||||
@@ -636,7 +636,7 @@ export const SYSTEM_AUTHORITY_TABLE_COLUMNS: PageProColumns<SystemAuthorityTable
|
||||
])
|
||||
},
|
||||
{
|
||||
title:$t('过期时间'),
|
||||
title:('过期时间'),
|
||||
dataIndex: 'expireTime',
|
||||
ellipsis:true,
|
||||
width:182,
|
||||
@@ -648,7 +648,7 @@ export const SYSTEM_AUTHORITY_TABLE_COLUMNS: PageProColumns<SystemAuthorityTable
|
||||
},
|
||||
},
|
||||
{
|
||||
title:$t('更新者'),
|
||||
title:('更新者'),
|
||||
dataIndex: ['updater','name'],
|
||||
ellipsis: true,
|
||||
width:88,
|
||||
@@ -658,7 +658,7 @@ export const SYSTEM_AUTHORITY_TABLE_COLUMNS: PageProColumns<SystemAuthorityTable
|
||||
filterSearch: true,
|
||||
},
|
||||
{
|
||||
title:$t('创建时间'),
|
||||
title:('创建时间'),
|
||||
key: 'createTime',
|
||||
dataIndex: 'createTime',
|
||||
width:182,
|
||||
@@ -672,7 +672,7 @@ export const SYSTEM_AUTHORITY_TABLE_COLUMNS: PageProColumns<SystemAuthorityTable
|
||||
|
||||
export const SYSTEM_MYSERVICE_TABLE_COLUMNS: PageProColumns<MyServiceTableListItem>[] = [
|
||||
{
|
||||
title:$t('服务名称'),
|
||||
title:('服务名称'),
|
||||
dataIndex: 'name',
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
@@ -682,13 +682,13 @@ export const SYSTEM_MYSERVICE_TABLE_COLUMNS: PageProColumns<MyServiceTableListIt
|
||||
},
|
||||
},
|
||||
{
|
||||
title:$t('服务ID'),
|
||||
title:('服务ID'),
|
||||
dataIndex: 'id',
|
||||
width: 140,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title:$t('服务类型'),
|
||||
title:('服务类型'),
|
||||
dataIndex: 'serviceType',
|
||||
ellipsis:{
|
||||
showTitle:true
|
||||
@@ -698,22 +698,22 @@ export const SYSTEM_MYSERVICE_TABLE_COLUMNS: PageProColumns<MyServiceTableListIt
|
||||
valueType: 'select',
|
||||
valueEnum:{
|
||||
'public':{
|
||||
text:$t('公开服务')
|
||||
text:('公开服务')
|
||||
},
|
||||
'inner':{
|
||||
text:$t('内部服务')
|
||||
text:('内部服务')
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title:$t('API 数量'),
|
||||
title:('API 数量'),
|
||||
dataIndex: 'apiNum',
|
||||
sorter: (a,b)=> {
|
||||
return a.apiNum - b.apiNum
|
||||
},
|
||||
},
|
||||
{
|
||||
title:$t('状态'),
|
||||
title:('状态'),
|
||||
dataIndex: 'status',
|
||||
ellipsis:{
|
||||
showTitle:true
|
||||
@@ -722,12 +722,12 @@ export const SYSTEM_MYSERVICE_TABLE_COLUMNS: PageProColumns<MyServiceTableListIt
|
||||
onFilter: true,
|
||||
valueType: 'select',
|
||||
valueEnum:{
|
||||
'on':<span className="text-status_success">{$t('启用')}</span> ,
|
||||
'off':<span className="text-status_fail">{$t('停用')}</span>
|
||||
'on':<span className="text-status_success">{('启用')}</span> ,
|
||||
'off':<span className="text-status_fail">{('停用')}</span>
|
||||
}
|
||||
},
|
||||
{
|
||||
title:$t('更新时间'),
|
||||
title:('更新时间'),
|
||||
key: 'updateTime',
|
||||
dataIndex: 'updateTime',
|
||||
ellipsis:true,
|
||||
@@ -737,7 +737,7 @@ export const SYSTEM_MYSERVICE_TABLE_COLUMNS: PageProColumns<MyServiceTableListIt
|
||||
},
|
||||
},
|
||||
{
|
||||
title:$t('创建时间'),
|
||||
title:('创建时间'),
|
||||
key: 'createTime',
|
||||
dataIndex: 'createTime',
|
||||
width:182,
|
||||
@@ -752,7 +752,7 @@ export const SYSTEM_MYSERVICE_TABLE_COLUMNS: PageProColumns<MyServiceTableListIt
|
||||
|
||||
export const SYSTEM_UPSTREAM_GLOBAL_CONFIG_TABLE_COLUMNS: PageProColumns<GlobalNodeItem & {_id:string}>[] = [
|
||||
{
|
||||
title:$t('地址(IP 端口或域名)'),
|
||||
title:('地址(IP 端口或域名)'),
|
||||
dataIndex: 'address',
|
||||
width: '50%',
|
||||
formItemProps: {
|
||||
@@ -769,7 +769,7 @@ export const SYSTEM_UPSTREAM_GLOBAL_CONFIG_TABLE_COLUMNS: PageProColumns<GlobalN
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title:$t('权重(0-999)'),
|
||||
title:('权重(0-999)'),
|
||||
dataIndex: 'weight',
|
||||
valueType:'digit',
|
||||
formItemProps: {
|
||||
@@ -787,11 +787,11 @@ export const SYSTEM_UPSTREAM_GLOBAL_CONFIG_TABLE_COLUMNS: PageProColumns<GlobalN
|
||||
export const SYSTEM_INSIDE_APPROVAL_TAB_ITEMS: TabsProps['items'] = [
|
||||
{
|
||||
key: '0',
|
||||
label:$t('待审批'),
|
||||
label:('待审批'),
|
||||
},
|
||||
{
|
||||
key: '1',
|
||||
label: $t('已审批'),
|
||||
label: ('已审批'),
|
||||
}
|
||||
];
|
||||
|
||||
@@ -800,36 +800,36 @@ export const SYSTEM_INSIDE_APPROVAL_TAB_ITEMS: TabsProps['items'] = [
|
||||
export const SYSTEM_PUBLISH_TAB_ITEMS: TabsProps['items'] = [
|
||||
{
|
||||
key: '0',
|
||||
label: $t('发布版本'),
|
||||
label: ('发布版本'),
|
||||
},
|
||||
{
|
||||
key: '1',
|
||||
label: $t('发布申请记录'),
|
||||
label: ('发布申请记录'),
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
export const SYSTEM_SUBSCRIBE_APPROVAL_DETAIL_LIST = [
|
||||
{
|
||||
title:$t('服务名称'),key:'service',nested:'name'
|
||||
title:('服务名称'),key:'service',nested:'name'
|
||||
},
|
||||
{
|
||||
title:$t('服务 ID'),key:'applyTeam',nested:'id'
|
||||
title:('服务 ID'),key:'applyTeam',nested:'id'
|
||||
},
|
||||
{
|
||||
title:$t('所属团队'),key:'team',nested:'name'
|
||||
title:('所属团队'),key:'team',nested:'name'
|
||||
},
|
||||
{
|
||||
title:$t('所属系统'),key:'project',nested:'name'
|
||||
title:('所属系统'),key:'project',nested:'name'
|
||||
},
|
||||
{
|
||||
title:$t('申请状态'),key:'status',renderText:()=>{}
|
||||
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 <span className={STATUS_COLOR[entity.status as keyof typeof STATUS_COLOR]}>{$t('成功')}</span>
|
||||
return <span className={STATUS_COLOR[entity.status as keyof typeof STATUS_COLOR]}>{('成功')}</span>
|
||||
case 'error':
|
||||
return <Tooltip title={entity.error || $t('上线失败')}><span className={`${STATUS_COLOR[entity.status as keyof typeof STATUS_COLOR]} truncate block`}>{$t('失败')} {entity.error}</span></Tooltip>
|
||||
return <Tooltip title={entity.error || ('上线失败')}><span className={`${STATUS_COLOR[entity.status as keyof typeof STATUS_COLOR]} truncate block`}>{('失败')} {entity.error}</span></Tooltip>
|
||||
default:
|
||||
return <LoadingOutlined className="text-theme" spin />
|
||||
}
|
||||
@@ -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(<Link to="./api">{$t('API')}</Link>, 'api',undefined,undefined,undefined,'team.service.api.view'),
|
||||
getItem(<Link to="./upstream">{$t('上游')}</Link>, 'upstream',undefined,undefined,undefined,'team.service.upstream.view'),
|
||||
getItem(<Link to="./document">{$t('使用说明')}</Link>, 'document',undefined,undefined,undefined,''),
|
||||
getItem(<Link to="./publish">{$t('发布')}</Link>, 'publish',undefined,undefined,undefined,'team.service.release.view'),
|
||||
],
|
||||
'group'),
|
||||
getItem($t('订阅管理'), 'provideSer', null,
|
||||
[
|
||||
getItem(<Link to="./approval">{$t('订阅审批')}</Link>, 'approval',undefined,undefined,undefined,'team.service.subscription.view'),
|
||||
getItem(<Link to="./subscriber">{$t('订阅方管理')}</Link>, 'subscriber',undefined,undefined,undefined,'team.service.subscription.view'),
|
||||
],
|
||||
'group'),
|
||||
getItem($t('管理'), 'mng', null,
|
||||
[
|
||||
APP_MODE === 'pro' ? getItem(<Link to="./topology">{$t('调用拓扑图')}</Link>, 'topology',undefined,undefined,undefined,'project.mySystem.topology.view'):null,
|
||||
getItem(<Link to="./setting">{$t('设置')}</Link>, 'setting',undefined,undefined,undefined,'')],
|
||||
'group'),
|
||||
];
|
||||
|
||||
@@ -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<TeamTableListItem>[] = [
|
||||
{
|
||||
title:$t('名称'),
|
||||
title:('名称'),
|
||||
dataIndex: 'name',
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
@@ -21,18 +21,18 @@ export const TEAM_TABLE_COLUMNS: PageProColumns<TeamTableListItem>[] = [
|
||||
},
|
||||
},
|
||||
{
|
||||
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<TeamTableListItem>[] = [
|
||||
},
|
||||
},
|
||||
{
|
||||
title:$t('负责人'),
|
||||
title:('负责人'),
|
||||
dataIndex: ['master','name'],
|
||||
ellipsis: true,
|
||||
width:108,
|
||||
@@ -50,7 +50,7 @@ export const TEAM_TABLE_COLUMNS: PageProColumns<TeamTableListItem>[] = [
|
||||
filterSearch: true,
|
||||
},
|
||||
{
|
||||
title:$t('创建时间'),
|
||||
title:('创建时间'),
|
||||
dataIndex: 'createTime',
|
||||
ellipsis:true,
|
||||
width:182,
|
||||
@@ -63,7 +63,7 @@ export const TEAM_TABLE_COLUMNS: PageProColumns<TeamTableListItem>[] = [
|
||||
|
||||
export const TEAM_SYSTEM_TABLE_COLUMNS: PageProColumns<SystemTableListItem>[] = [
|
||||
{
|
||||
title:$t('服务名称'),
|
||||
title:('服务名称'),
|
||||
dataIndex: 'name',
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
@@ -73,18 +73,18 @@ export const TEAM_SYSTEM_TABLE_COLUMNS: PageProColumns<SystemTableListItem>[] =
|
||||
},
|
||||
},
|
||||
{
|
||||
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<SystemTableListItem>[] =
|
||||
},
|
||||
},
|
||||
{
|
||||
title:$t('服务数量'),
|
||||
title:('服务数量'),
|
||||
dataIndex: 'serviceNum',
|
||||
ellipsis:true,
|
||||
sorter: (a,b)=> {
|
||||
@@ -100,7 +100,7 @@ export const TEAM_SYSTEM_TABLE_COLUMNS: PageProColumns<SystemTableListItem>[] =
|
||||
},
|
||||
},
|
||||
{
|
||||
title:$t('负责人'),
|
||||
title:('负责人'),
|
||||
dataIndex: ['master','name'],
|
||||
ellipsis: true,
|
||||
width:108,
|
||||
@@ -110,7 +110,7 @@ export const TEAM_SYSTEM_TABLE_COLUMNS: PageProColumns<SystemTableListItem>[] =
|
||||
filterSearch: true
|
||||
},
|
||||
{
|
||||
title:$t('添加日期'),
|
||||
title:('添加日期'),
|
||||
dataIndex: 'createTime',
|
||||
ellipsis: true,
|
||||
sorter: (a,b)=> {
|
||||
@@ -121,7 +121,7 @@ export const TEAM_SYSTEM_TABLE_COLUMNS: PageProColumns<SystemTableListItem>[] =
|
||||
|
||||
export const TEAM_MEMBER_TABLE_COLUMNS: PageProColumns<TeamMemberTableListItem>[] = [
|
||||
{
|
||||
title:$t('姓名'),
|
||||
title:'姓名',
|
||||
dataIndex: ['user','name'],
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
@@ -131,12 +131,12 @@ export const TEAM_MEMBER_TABLE_COLUMNS: PageProColumns<TeamMemberTableListItem>[
|
||||
},
|
||||
},
|
||||
{
|
||||
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<TeamMemberTableListItem>[
|
||||
|
||||
|
||||
export const TEAM_MEMBER_MODAL_TABLE_COLUMNS:ColumnsType<MemberItem> = [
|
||||
{title:$t('成员'),
|
||||
{title:('成员'),
|
||||
render:(_,entity)=>{
|
||||
return <>
|
||||
<div>
|
||||
@@ -161,11 +161,4 @@ export const TEAM_MEMBER_MODAL_TABLE_COLUMNS:ColumnsType<MemberItem> = [
|
||||
}}
|
||||
]
|
||||
|
||||
export const TEAM_INSIDE_MENU_ITEMS: MenuProps['items'] = [
|
||||
getItem($t('管理'), 'grp', null,
|
||||
[
|
||||
getItem(<Link to="member">{$t('成员')}</Link>, 'member',undefined, undefined, undefined,'team.team.member.view'),
|
||||
getItem(<Link to="setting">{$t('设置')}</Link>, 'setting',undefined,undefined,undefined,'team.team.team.view')],
|
||||
'group'),
|
||||
];
|
||||
|
||||
@@ -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<MemberItem>[]= [
|
||||
{
|
||||
title:$t('用户名'),
|
||||
title:('用户名'),
|
||||
dataIndex: 'name',
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
@@ -17,12 +17,12 @@ export const USER_LIST_COLUMNS: PageProColumns<MemberItem>[]= [
|
||||
},
|
||||
},
|
||||
{
|
||||
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<MemberItem>[]= [
|
||||
];
|
||||
|
||||
export const MEMBER_MODAL_COLUMNS:ColumnsType<MemberItem> = [
|
||||
{title:$t('所有成员'),
|
||||
{title:('所有成员'),
|
||||
width:215,
|
||||
|
||||
render:(_,entity)=>{
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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<PublishApprovalModalHandle>(null)
|
||||
const [approvalBtnLoading,setApprovalBtnLoading] = useState<boolean>(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 = () => {
|
||||
|
||||
@@ -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(<Link to="/approval?type=subscribe">{$t('订阅申请')}</Link>, 'subscribe'),
|
||||
getItem(<Link to="/approval?type=release">{$t('发布申请')}</Link>, '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(<Link to="/approval?type=subscribe">{$t('订阅申请')}</Link>, 'subscribe'),
|
||||
getItem(<Link to="/approval?type=release">{$t('发布申请')}</Link>, 'release')],
|
||||
'group'),
|
||||
],[state.language])
|
||||
|
||||
const onMenuClick: MenuProps['onClick'] = (e) => {
|
||||
setPageType(e.key as 'subscribe'|'release')
|
||||
|
||||
@@ -21,6 +21,7 @@ export default function Guide(){
|
||||
<p>{$t("如果你喜欢我们的产品,欢迎给我们 Star 或提供产品反馈意见。")}</p>
|
||||
</div>}
|
||||
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:
|
||||
<div className="">
|
||||
|
||||
@@ -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<RouterParams>();
|
||||
@@ -17,25 +18,18 @@ const LogSettings = ()=>{
|
||||
const {fetchData} = useFetch()
|
||||
const [loading, setLoading] = useState<boolean>(true)
|
||||
const navigateTo = useNavigate()
|
||||
const {state} = useGlobalContext()
|
||||
|
||||
const getDynamicMenuList = ()=>{
|
||||
return fetchData<BasicResponse<{ dynamics:DynamicMenuItem[] }>>(`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(
|
||||
<Link to={`template/${x.name}`}>{x.title}</Link>,
|
||||
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(
|
||||
<Link to={`template/${x.name}`}>{$t(x.title)}</Link>,
|
||||
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}
|
||||
/>
|
||||
<div className={`w-full flex flex-1 flex-col h-full overflow-auto bg-MAIN_BG pt-btnbase pl-btnbase pr-PAGE_INSIDE_X pb-PAGE_INSIDE_B overflow-x-hidden`}>
|
||||
<Outlet context={{accessPrefix:'system.devops.log_configuration'}}/>
|
||||
|
||||
@@ -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<React.Key[]>([]);
|
||||
const [departmentValueEnum,setDepartmentValueEnum] = useState<ColumnFilterItem[] >([])
|
||||
const {accessData} = useGlobalContext()
|
||||
const {accessData,state} = useGlobalContext()
|
||||
const [columns,setColumns] = useState<PageProColumns<MemberTableListItem>[]>([])
|
||||
|
||||
const operation:PageProColumns<MemberTableListItem>[] =[
|
||||
@@ -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 (
|
||||
<>
|
||||
<PageList
|
||||
id="global_member"
|
||||
ref={pageListRef}
|
||||
columns={[...columns, ...operation]}
|
||||
columns={[...translatedCol, ...operation]}
|
||||
request={()=>getMemberList()}
|
||||
addNewBtnTitle={(!memberGroupId ||['unknown','disable'].indexOf(memberGroupId?.toString()) === -1)?$t("添加账号") : ""}
|
||||
searchPlaceholder={$t("输入用户名、邮箱查找成员")}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -150,7 +150,7 @@ const PartitionInsideCert:FC = ()=>{
|
||||
const editRef = useRef<PartitionCertConfigHandle>(null)
|
||||
const pageListRef = useRef<ActionType>(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<BasicResponse<{certificates:PartitionCertTableListItem}>>('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 (
|
||||
<InsidePage
|
||||
|
||||
@@ -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<RouterParams>();
|
||||
@@ -17,22 +18,16 @@ const LogSettings = ()=>{
|
||||
const {fetchData} = useFetch()
|
||||
const [loading, setLoading] = useState<boolean>(true)
|
||||
const navigateTo = useNavigate()
|
||||
const {state} = useGlobalContext()
|
||||
|
||||
const getDynamicMenuList = ()=>{
|
||||
setLoading(true)
|
||||
fetchData<BasicResponse<{ dynamics:DynamicMenuItem[] }>>(`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(
|
||||
<Link to={`template/${x.name}`}>{x.title}</Link>,
|
||||
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(
|
||||
<Link to={`template/${x.name}`}>{$t(x.title)}</Link>,
|
||||
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}
|
||||
/>
|
||||
<div className={`w-full flex flex-1 flex-col h-full overflow-auto bg-MAIN_BG`}>
|
||||
<Outlet />
|
||||
|
||||
@@ -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<ActionType>(null);
|
||||
const {accessData} = useGlobalContext()
|
||||
const {accessData,state} = useGlobalContext()
|
||||
const navigateTo = useNavigate()
|
||||
|
||||
const operation:(type:string)=>PageProColumns<RoleTableListItem>[] =(type:string)=>[
|
||||
@@ -45,7 +45,7 @@ const RoleList = ()=>{
|
||||
return fetchData<BasicResponse<{roles:RoleTableListItem[]}>>(`${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 (<>
|
||||
<InsidePage
|
||||
className="pb-PAGE_INSIDE_B overflow-y-auto"
|
||||
@@ -131,7 +133,7 @@ const RoleList = ()=>{
|
||||
id="global_role"
|
||||
tableClass="role_table mb-btnrbase"
|
||||
ref={pageListRef}
|
||||
columns={[...ROLE_TABLE_COLUMNS as PageProColumns<RoleTableListItem, "text">[], ...operation('system')]}
|
||||
columns={[...columns as PageProColumns<RoleTableListItem, "text">[], ...operation('system')]}
|
||||
request={()=>getRoleList('system')}
|
||||
addNewBtnTitle={$t("添加角色")}
|
||||
showPagination={false}
|
||||
|
||||
@@ -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<string>()
|
||||
const navigateTo = useNavigate()
|
||||
|
||||
@@ -52,6 +53,31 @@ const SystemInsidePage:FC = ()=> {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
const SYSTEM_PAGE_MENU_ITEMS = useMemo(()=>[
|
||||
getItem($t('服务'), 'assets', null,
|
||||
[
|
||||
getItem(<Link to="./api">{$t('API')}</Link>, 'api',undefined,undefined,undefined,'team.service.api.view'),
|
||||
getItem(<Link to="./upstream">{$t('上游')}</Link>, 'upstream',undefined,undefined,undefined,'team.service.upstream.view'),
|
||||
getItem(<Link to="./document">{$t('使用说明')}</Link>, 'document',undefined,undefined,undefined,''),
|
||||
getItem(<Link to="./publish">{$t('发布')}</Link>, 'publish',undefined,undefined,undefined,'team.service.release.view'),
|
||||
],
|
||||
'group'),
|
||||
getItem($t('订阅管理'), 'provideSer', null,
|
||||
[
|
||||
getItem(<Link to="./approval">{$t('订阅审批')}</Link>, 'approval',undefined,undefined,undefined,'team.service.subscription.view'),
|
||||
getItem(<Link to="./subscriber">{$t('订阅方管理')}</Link>, 'subscriber',undefined,undefined,undefined,'team.service.subscription.view'),
|
||||
],
|
||||
'group'),
|
||||
getItem($t('管理'), 'mng', null,
|
||||
[
|
||||
APP_MODE === 'pro' ? getItem(<Link to="./topology">{$t('调用拓扑图')}</Link>, 'topology',undefined,undefined,undefined,'project.mySystem.topology.view'):null,
|
||||
getItem(<Link to="./setting">{$t('设置')}</Link>, 'setting',undefined,undefined,undefined,'')],
|
||||
'group'),
|
||||
],[state.language])
|
||||
|
||||
|
||||
const menuData = useMemo(()=>{
|
||||
const filterMenu = (menu:MenuItemGroupType<MenuItemType>[])=>{
|
||||
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)
|
||||
|
||||
@@ -25,7 +25,7 @@ const SystemInsideSubscriber:FC = ()=>{
|
||||
const addRef = useRef<SystemSubscriberConfigHandle>(null)
|
||||
const pageListRef = useRef<ActionType>(null);
|
||||
const [memberValueEnum, setMemberValueEnum] = useState<{[k:string]:{text:string}}>({})
|
||||
const {accessData} = useGlobalContext()
|
||||
const {accessData,state} = useGlobalContext()
|
||||
const getSystemSubscriber = ()=>{
|
||||
return fetchData<BasicResponse<{subscribers:SystemSubscriberTableListItem[]}>>('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 (
|
||||
<PageList
|
||||
|
||||
@@ -29,7 +29,7 @@ const SystemList:FC = ()=>{
|
||||
const [memberValueEnum, setMemberValueEnum] = useState<{[k:string]:{text:string}}>({})
|
||||
const [open, setOpen] = useState(false);
|
||||
const drawerFormRef = useRef<SystemConfigHandle>(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 = [
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ const SystemInsideApiList:FC = ()=>{
|
||||
const copyRef = useRef<SystemInsideApiCreateHandle>(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<SystemInsideApiDocumentHandle>(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<string | boolean>|undefined= ()=>{
|
||||
switch(drawerType){
|
||||
|
||||
@@ -39,7 +39,7 @@ const SystemInsideApprovalList:FC = ()=>{
|
||||
const subscribeRef = useRef<SubscribeApprovalModalHandle>(null)
|
||||
const [approvalBtnLoading,setApprovalBtnLoading] = useState<boolean>(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 (
|
||||
<div className="h-full not-top-padding-table">
|
||||
|
||||
@@ -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<string>('')
|
||||
const [drawerType, setDrawerType] = useState<'approval'|'view'|'add'|'publish'|'online'>('view')
|
||||
const [drawerVisible, setDrawerVisible] = useState<boolean>(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()
|
||||
|
||||
@@ -46,7 +46,7 @@ const TeamInsideMember:FC = ()=>{
|
||||
const addRef = useRef<TransferTableHandle<TeamMemberTableListItem>>(null)
|
||||
const pageListRef = useRef<ActionType>(null);
|
||||
const [allMemberIds, setAllMemberIds] = useState<string[]>([])
|
||||
const {accessData} = useGlobalContext()
|
||||
const {accessData,state} = useGlobalContext()
|
||||
const [selectableMemberIds,setSelectableMemberIds] = useState<Set<string>>(new Set())
|
||||
const [addMemberBtnLoading, setAddMemberBtnLoading] = useState<boolean>(false)
|
||||
const [modalVisible, setModalVisible] = useState<boolean>(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 = ()=>{
|
||||
<PageList
|
||||
id="global_team_member"
|
||||
ref={pageListRef}
|
||||
columns = {[...columns,...operation]}
|
||||
columns = {[...translatedCol,...operation]}
|
||||
request={()=>getMemberList()}
|
||||
primaryKey="user.id"
|
||||
addNewBtnTitle={$t('添加成员')}
|
||||
|
||||
@@ -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<string>()
|
||||
|
||||
@@ -30,6 +31,14 @@ const TeamInsidePage:FC = ()=> {
|
||||
setActiveMenu(key)
|
||||
};
|
||||
|
||||
const TEAM_INSIDE_MENU_ITEMS = useMemo(()=> [
|
||||
getItem(('管理'), 'grp', null,
|
||||
[
|
||||
getItem(<Link to="member">{$t('成员')}</Link>, 'member',undefined, undefined, undefined,'team.team.member.view'),
|
||||
getItem(<Link to="setting">{$t('设置')}</Link>, 'setting',undefined,undefined,undefined,'team.team.team.view')],
|
||||
'group'),
|
||||
], [state.language])
|
||||
|
||||
const menuData = useMemo(()=>{
|
||||
const filterMenu = (menu:MenuItemGroupType<MenuItemType>[])=>{
|
||||
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)
|
||||
|
||||
@@ -28,7 +28,7 @@ const TeamList:FC = ()=>{
|
||||
const {fetchData} = useFetch()
|
||||
const [memberValueEnum, setMemberValueEnum] = useState<{[k:string]:{text:string}}>({})
|
||||
const teamConfigRef = useRef<TeamConfigHandle>(null)
|
||||
const {accessData,checkPermission,accessInit, getGlobalAccessData} = useGlobalContext()
|
||||
const {accessData,checkPermission,accessInit, getGlobalAccessData,state} = useGlobalContext()
|
||||
const [curTeam, setCurTeam] = useState<TeamConfigFieldType>({} as TeamConfigFieldType)
|
||||
const [modalVisible, setModalVisible] = useState<boolean>(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 (
|
||||
|
||||
@@ -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<RouterParams>();
|
||||
const location = useLocation()
|
||||
const navigateTo = useNavigate()
|
||||
const [activeMenu, setActiveMenu] = useState<string>()
|
||||
const {state} = useGlobalContext()
|
||||
|
||||
|
||||
const menuData = [
|
||||
getItem(<Link to="changepsw">{$t('修改密码')}</Link>, 'changepsw')]
|
||||
const menuData = useMemo(()=>[
|
||||
getItem(<Link to="changepsw">{$t('修改密码')}</Link>, 'changepsw')],[state.language])
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -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<LineGraphProps> = ({ className, lineData, titles, yAx
|
||||
const [legendSelected, setLegendSelected] = useState<Record<string,boolean>>(type === 'traffic' ? {...MONITOR_LINE_CHART_BASIC_MESSAGE_SELECTED}:{...MONITOR_LINE_CHART_BASIC_INVOKE_SELECTED})
|
||||
const chartRef = useRef<ECharts>(null);
|
||||
const containerRef = useRef<HTMLDivElement>(null);
|
||||
const {state} = useGlobalContext()
|
||||
|
||||
const handleWindowResize = () => {
|
||||
// 直接使用引用中的实例和DOM元素
|
||||
@@ -349,7 +351,8 @@ const MonitorLineGraph: FC<LineGraphProps> = ({ 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<LineGraphProps> = ({ 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<LineGraphProps> = ({ 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<LineGraphProps> = ({ 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<LineGraphProps> = ({ 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<LineGraphProps> = ({ className, lineData, titles, yAx
|
||||
}
|
||||
return getOption()
|
||||
|
||||
},[compare, type,lineData,yAxisTitle,titles,legendSelected])
|
||||
},[compare, type,lineData,yAxisTitle,titles,legendSelected, state.language])
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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<PieGraphProps> = ({ 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<PieGraphProps> = ({ 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<PieGraphProps> = ({ 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<PieGraphProps> = ({ 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<PieGraphProps> = ({ className,title, pieData, labelNam
|
||||
data: transferData(pieData),
|
||||
},
|
||||
],
|
||||
}
|
||||
}),[state.language])
|
||||
|
||||
return (
|
||||
<div className={`${className} min-w-[570px] p-[16px] relative text-DESC_TEXT overflow-x-auto rounded`}>
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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<ServiceHubTableListItem>[] = [
|
||||
{
|
||||
title:$t('服务名称'),
|
||||
title:('服务名称'),
|
||||
dataIndex: 'name',
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
@@ -17,38 +17,32 @@ export const SERVICE_HUB_TABLE_COLUMNS: PageProColumns<ServiceHubTableListItem>[
|
||||
},
|
||||
},
|
||||
{
|
||||
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'),
|
||||
];
|
||||
|
||||
@@ -66,7 +66,7 @@ const ServiceHubApiDocument = ({service}:{service:ServiceDetailType})=>{
|
||||
<div className="flex flex-col p-btnbase pt-[4px] h-full flex-1 overflow-auto" id='layout-ref'>
|
||||
<div className='bg-[#fff] rounded p-btnbase pl-0 flex justify-between'>
|
||||
<div className="w-[calc(100%-220px)]" >
|
||||
<p className="font-bold text-[20px] leading-[32px] mb-[12px] h-[32px]" id="apiDocument-list">API 列表</p>
|
||||
<p className="font-bold text-[20px] leading-[32px] mb-[12px] h-[32px]" id="apiDocument-list">{$t('API 列表')}</p>
|
||||
<div className="">
|
||||
{apiDocs?.map((apiDetail)=>(
|
||||
<div className="mb-btnbase " key={apiDetail.id} id={`apiDocument-${apiDetail.id}`}>
|
||||
|
||||
@@ -67,7 +67,7 @@ export const ApprovalModalContent = forwardRef<SubSubscribeApprovalModalHandle,S
|
||||
{SYSTEM_SUBSCRIBE_APPROVAL_DETAIL_LIST?.map((x)=>{
|
||||
return (
|
||||
<Row key={x.key} className="leading-[32px] mb-btnbase">
|
||||
<Col className="text-left" span={8}>{x.title}:</Col>
|
||||
<Col className="text-left" span={8}>{$t(x.title)}:</Col>
|
||||
<Col >{x.nested ? data?.[x.key]?.[x.nested] : ( (data as {[k:string]:unknown})?.[x.key] || '-')}</Col>
|
||||
</Row>)
|
||||
})}
|
||||
|
||||
+2
-1
@@ -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)=>
|
||||
<div className="my-btnybase">{
|
||||
detail?.length > 0 && detail.map((k,i)=>(
|
||||
<Row className="leading-[32px]" key={i}>
|
||||
<Col className="pr-[8px]" offset={1} span={5}>{k.key}:</Col>
|
||||
<Col className="pr-[8px]" offset={1} span={5}>{$t(k.key)}:</Col>
|
||||
<Col className="break-all" span={18}>{ k.value || '-'}</Col>
|
||||
</Row>
|
||||
))
|
||||
|
||||
@@ -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<string[]>([])
|
||||
const [loading, setLoading] = useState<boolean>(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
|
||||
},[])
|
||||
|
||||
Reference in New Issue
Block a user