mirror of
https://github.com/APIParkLab/APIPark.git
synced 2026-06-14 20:41:15 +08:00
Compare commits
29 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b216556867 | |||
| c9ae05b22e | |||
| e31d41a276 | |||
| 0e20987fb8 | |||
| 11da5e9d26 | |||
| 2c6c194821 | |||
| fa2607e9b8 | |||
| 46143c3fe0 | |||
| 83e3cc85f2 | |||
| 64fdf59905 | |||
| 2dcb7ebd74 | |||
| d6bf3139ff | |||
| d5e6062ec9 | |||
| 9030cff8ba | |||
| d2e428ada8 | |||
| 74156ec84c | |||
| f9e6bc92d7 | |||
| 9884586cc9 | |||
| 2b7c1ded15 | |||
| 1080f33282 | |||
| cc5c0a0a89 | |||
| 85971447e1 | |||
| c07e54ec03 | |||
| 70f834e1cf | |||
| c320c6f2a2 | |||
| 5f03973bf2 | |||
| ab2a0d8ae2 | |||
| 7e48402591 | |||
| cd441ccfe7 |
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/frontend/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>APIPark</title>
|
||||
<title>2APIPark</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
@@ -243,7 +243,7 @@ const themeToken = {
|
||||
</div>
|
||||
)}
|
||||
logo={Logo}
|
||||
pageTitleRender={()=>$t('APIPark - 企业API数据开放平台')}
|
||||
pageTitleRender={()=>$t('APIPark')}
|
||||
menuFooterRender={(props) => {
|
||||
if (props?.collapsed) return undefined;
|
||||
}}
|
||||
|
||||
@@ -1,27 +1,23 @@
|
||||
|
||||
import { GetProp, TransferProps, TreeDataNode, theme, Transfer, Tree, Spin } from "antd";
|
||||
import { DataNode, TreeProps } from "antd/es/tree";
|
||||
import { TransferProps, TreeDataNode, Tree, Spin, Input, Empty } from "antd";
|
||||
import { DataNode } from "antd/es/tree";
|
||||
import { Ref, forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
||||
import { ApartmentOutlined, LoadingOutlined, UserOutlined } from "@ant-design/icons";
|
||||
import { cloneDeep, debounce } from "lodash-es";
|
||||
import { ColumnsType } from "antd/es/table";
|
||||
import { $t } from "@common/locales";
|
||||
import { useGlobalContext } from "@common/contexts/GlobalStateContext";
|
||||
|
||||
type TransferItem = GetProp<TransferProps, 'dataSource'>[number];
|
||||
|
||||
export type TransferTableProps<T> = {
|
||||
request?:(k?:string)=>Promise<{data:T[],success:boolean}>
|
||||
columns: ColumnsType<T>
|
||||
primaryKey:string
|
||||
onSelect:(selectedData:T[])=>void
|
||||
onSelect:(selectedData:string[])=>void
|
||||
tableType?:'member'|'api'
|
||||
disabledData:string[]
|
||||
searchPlaceholder?:string
|
||||
}
|
||||
|
||||
export type TransferTableHandle<T> = {
|
||||
selectedData: () => T[];
|
||||
selectedRowKeys: () => React.Key[];
|
||||
}
|
||||
|
||||
@@ -31,10 +27,6 @@ interface TreeTransferProps {
|
||||
onChange: TransferProps['onChange'];
|
||||
}
|
||||
|
||||
// Customize Table Transfer
|
||||
const isChecked = (selectedKeys: React.Key[], eventKey: React.Key) =>
|
||||
selectedKeys.includes(eventKey);
|
||||
|
||||
const generateTree = (
|
||||
treeNodes: TreeDataNode[] = [],
|
||||
checkedKeys: TreeTransferProps['targetKeys'] = [],
|
||||
@@ -73,200 +65,104 @@ const generateTree = (
|
||||
)
|
||||
};
|
||||
|
||||
const TransferTree = (props)=>{
|
||||
const { direction, token, tableHeight, dataSource, targetKeys, onItemSelect, onItemSelectAll,checkedKey,selectedKeys, filteredItems ,disabledData} = props;
|
||||
const [expandedKeys, setExpandedKeys] = useState<string[]>([]);
|
||||
|
||||
const getExpandedKeys = (newData:TreeDataNode[], expandedSet:Set<string> = new Set())=>{
|
||||
newData.forEach((item)=>{
|
||||
if(item.children && item.children.length > 0){
|
||||
expandedSet.add(item.key)
|
||||
getExpandedKeys(item.children,expandedSet)
|
||||
}
|
||||
})
|
||||
return expandedSet
|
||||
}
|
||||
|
||||
const treeData:TreeDataNode[] = useMemo(()=>{
|
||||
const filteredSet = filteredItems && filteredItems.length > 0 ? new Set(filteredItems.map((x)=>x.id)) : new Set()
|
||||
const res = dataSource && dataSource.length > 0 ? generateTree(dataSource, targetKeys,direction === 'right',disabledData,filteredSet) : []
|
||||
setExpandedKeys(Array.from(getExpandedKeys(res)))
|
||||
return res
|
||||
},[
|
||||
dataSource, targetKeys,direction ,disabledData,filteredItems
|
||||
])
|
||||
|
||||
const onExpand: TreeProps['onExpand'] = (expandedKeysValue) => {
|
||||
setExpandedKeys(expandedKeysValue as string[]);
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
<div style={{ padding: token.paddingXS }}>
|
||||
<Tree
|
||||
className="icon-tree"
|
||||
blockNode
|
||||
checkable
|
||||
showIcon
|
||||
checkedKeys={direction === 'left' ? Array.from(new Set([...checkedKey,...disabledData])) : selectedKeys }
|
||||
defaultExpandAll
|
||||
expandedKeys={expandedKeys}
|
||||
onExpand={onExpand}
|
||||
height={tableHeight}
|
||||
icon={(props)=> { return (props.type === 'member' ? <UserOutlined /> :<ApartmentOutlined /> )} }
|
||||
treeData={treeData}
|
||||
onCheck={(_checkedKeys, e:{checked: boolean, checkedNodes, node, event, halfCheckedKeys}) => {
|
||||
if(e.checked){
|
||||
onItemSelectAll( _checkedKeys, e.checked);
|
||||
}else{
|
||||
const checkedKeyArrFromTree = e.checkedNodes.map(node => node.key)
|
||||
onItemSelectAll((checkedKey as string[]).filter(key => checkedKeyArrFromTree.indexOf(key) === -1),e.checked)
|
||||
}
|
||||
}}
|
||||
onSelect={(_, { node: { key } }) => {
|
||||
onItemSelect(key as string, !isChecked(checkedKey, key));
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
const MemberTransfer= forwardRef<TransferTableHandle<{[k:string]:unknown}>, TransferTableProps<{[k:string]:unknown}>>(
|
||||
<T extends {[k:string]:unknown}>(props: TransferTableProps<T>, ref:Ref<TransferTableHandle<T>>) => {
|
||||
const {request,columns,primaryKey,onSelect,tableType,disabledData = [],searchPlaceholder} = props
|
||||
const [tableHeight, setTableHeight] = useState(window.innerHeight * 80 / 100 - 64 - 72 - 56 - 16 -3);
|
||||
const [targetKeys, setTargetKeys] = useState<TreeTransferProps['targetKeys']>([]);
|
||||
const [dataSource, setDataSource] = useState<DataNode[] >([])
|
||||
const parentRef = useRef<HTMLDivElement>(null);
|
||||
const [loading, setLoading] = useState<boolean>(false)
|
||||
const {state} = useGlobalContext()
|
||||
|
||||
const [expandedKeys, setExpandedKeys] = useState<string[]>([]);
|
||||
const [searchWord, setSearchWord] = useState<string>('')
|
||||
useEffect(()=>{
|
||||
setTargetKeys(disabledData)
|
||||
},[disabledData])
|
||||
|
||||
useImperativeHandle(ref, () =>({
|
||||
selectedData: () => dataSource,
|
||||
selectedRowKeys: () => targetKeys,}))
|
||||
|
||||
const onChange: TreeTransferProps['onChange'] = (keys) => {
|
||||
onSelect?.(new Set(keys))
|
||||
setTargetKeys(Array.from(new Set(keys)));
|
||||
};
|
||||
const translatedDataSource = useMemo(()=>{
|
||||
|
||||
const loop = (data: DataNode[]): DataNode[] =>
|
||||
data?.map((item) => {
|
||||
const strTitle:string = item.name === '所有成员' ? $t(item.name) as string : item.name as string;
|
||||
const index = strTitle.indexOf(searchWord);
|
||||
const beforeStr = strTitle.substring(0, index);
|
||||
const afterStr = strTitle.slice(index + searchWord.length);
|
||||
const title =
|
||||
index > -1 ? (
|
||||
<span className='w-[calc(100%-16px)] truncate' title={strTitle}>
|
||||
{beforeStr}
|
||||
<span className="text-theme">{searchWord}</span>
|
||||
{afterStr}
|
||||
</span>
|
||||
) : (
|
||||
<span className='w-[calc(100%-16px)] truncate' title={`${strTitle}`}>{strTitle}</span>
|
||||
)
|
||||
if (item.children) {
|
||||
return {
|
||||
...item,
|
||||
title,
|
||||
disableCheckbox:disabledData.indexOf(item.key as string) !== -1,
|
||||
icon:<ApartmentOutlined />,
|
||||
children: loop(item.children as T[]) };
|
||||
}
|
||||
|
||||
const { token } = theme.useToken();
|
||||
|
||||
const transferDataSource: TransferItem[] = useMemo(()=>{
|
||||
function flatten(list: TreeDataNode[] = [], res:TransferItem[]) {
|
||||
list.forEach((item) => {
|
||||
res.push({...item, title:item.title === '所有成员' ? $t((item as unknown as {title:string}).title):item.title }as TransferItem);
|
||||
flatten(item.children,res);
|
||||
});
|
||||
}
|
||||
const res:TransferItem[] =[]
|
||||
flatten(dataSource,res);
|
||||
return res
|
||||
},[
|
||||
dataSource, state.language
|
||||
])
|
||||
|
||||
|
||||
const translatedDataSource = useMemo(()=>dataSource.map((item)=>({
|
||||
...item,
|
||||
name:item.name === '所有成员' ? $t((item as unknown as {name:string}).name):item.name,
|
||||
})),[dataSource, state.language])
|
||||
|
||||
|
||||
|
||||
let memo: Record<string, boolean> = {};
|
||||
|
||||
const handlerFilterOption = (inputValue: string, item: any, parentResult: boolean = false, childrenSet: Set<string> = new Set()): boolean => {
|
||||
const cacheKey = `${inputValue}_${item.key}`;
|
||||
if (memo[cacheKey]) {
|
||||
return memo[cacheKey];
|
||||
}
|
||||
|
||||
childrenSet.add(item.key);
|
||||
let result = item.title.includes(inputValue) || parentResult
|
||||
if (item.children) {
|
||||
for (const child of item.children) {
|
||||
if (handlerFilterOption(inputValue, child, result,childrenSet)) {
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (result) {
|
||||
memo[cacheKey] = result;
|
||||
childrenSet.forEach((key) => {
|
||||
memo[`${inputValue}_${key}`] = result;
|
||||
return {
|
||||
...item,
|
||||
title,
|
||||
icon:<UserOutlined />,
|
||||
isLeaf:true,
|
||||
disableCheckbox:disabledData.indexOf(item.key as string) !== -1
|
||||
};
|
||||
});
|
||||
}
|
||||
return result;
|
||||
};
|
||||
return loop(dataSource);
|
||||
},[dataSource, state.language, searchWord])
|
||||
|
||||
|
||||
const getInitExpandKeys = (data:T[], expandKeys:string[] = [])=>{
|
||||
data.forEach((item)=>{
|
||||
if(item.children?.length){
|
||||
expandKeys.push(item.key as string)
|
||||
getInitExpandKeys(item.children,expandKeys)
|
||||
}
|
||||
})
|
||||
return expandKeys
|
||||
}
|
||||
|
||||
const getDataSource = ()=>{
|
||||
setLoading(true)
|
||||
request && request().then((res)=>{
|
||||
const {data,success} = res
|
||||
setDataSource(success? data : [])
|
||||
setExpandedKeys(getInitExpandKeys(success? data:[]))
|
||||
}).finally(()=>{setLoading(false)})
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
getDataSource()
|
||||
const handleResize = () => {
|
||||
setTableHeight(window.innerHeight * 80 / 100 - 64 - 72 - 56 - 16 -3)
|
||||
};
|
||||
|
||||
const debouncedHandleResize = debounce(handleResize, 200);
|
||||
|
||||
// 监听窗口大小变化
|
||||
window.addEventListener('resize', debouncedHandleResize);
|
||||
handleResize();
|
||||
return () => {
|
||||
window.removeEventListener('resize', debouncedHandleResize);
|
||||
};
|
||||
}, []);
|
||||
useEffect(() => {
|
||||
getDataSource()
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div ref={parentRef}>
|
||||
<Spin indicator={<LoadingOutlined style={{ fontSize: 24 }} spin />} spinning={loading} className=''>
|
||||
<Transfer
|
||||
showSearch
|
||||
onSearch={(dir)=>{
|
||||
memo = {};
|
||||
}}
|
||||
listStyle={{width:'408px'}}
|
||||
disabledData={disabledData}
|
||||
filterOption={(inputValue: string, item: any) => handlerFilterOption(inputValue, item)}
|
||||
targetKeys={targetKeys}
|
||||
dataSource={transferDataSource}
|
||||
className="tree-transfer"
|
||||
render={(item) => item.title!}
|
||||
showSelectAll={false}
|
||||
onChange={onChange}
|
||||
titles={['','']}
|
||||
>
|
||||
{({ direction, onItemSelect, selectedKeys,onItemSelectAll ,filteredItems}) => {
|
||||
const treeProps = {
|
||||
dataSource:translatedDataSource, direction, onItemSelect, selectedKeys,onItemSelectAll ,filteredItems,token,tableHeight,targetKeys,disabledData
|
||||
}
|
||||
if (direction === 'left') {
|
||||
const checkedKey = [...selectedKeys, ...targetKeys as string[]];
|
||||
return (
|
||||
<TransferTree {...treeProps} checkedKey={checkedKey} />
|
||||
);
|
||||
}
|
||||
if(direction === 'right'){
|
||||
const checkedKey = [...selectedKeys,...targetKeys as string[]];
|
||||
return (
|
||||
<TransferTree {...treeProps} checkedKey={checkedKey} />
|
||||
);
|
||||
}
|
||||
}}
|
||||
</Transfer>
|
||||
<Input className="mb-[10px]" placeholder={searchPlaceholder} onChange={(e)=>setSearchWord(e.target.value)} value={searchWord} />
|
||||
<>{ translatedDataSource && translatedDataSource.length > 0 ? <Tree
|
||||
checkable
|
||||
expandedKeys={expandedKeys}
|
||||
checkedKeys={targetKeys}
|
||||
selectable={false}
|
||||
onCheck={(e)=>{setTargetKeys(e);
|
||||
onSelect(((e as string[])?.filter(x=>disabledData.indexOf(x as string) === -1))||[])}}
|
||||
onExpand={setExpandedKeys}
|
||||
treeData={translatedDataSource}
|
||||
blockNode
|
||||
showIcon
|
||||
/>
|
||||
: <Empty image={Empty.PRESENTED_IMAGE_SIMPLE}/> }</>
|
||||
</Spin>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -39,7 +39,7 @@ const WithPermission = ({access, tooltip, children,disabled, showDisabled = true
|
||||
{ cloneElement(children, {disabled:true})}
|
||||
</Tooltip>}
|
||||
{!editAccess && (children?.type !== Button && children?.type !== Upload && showDisabled) && <Tooltip title={tooltip ?? $t("暂无操作权限,请联系管理员分配。")}>
|
||||
{ cloneElement(children, {disabled:true,okButtonProps:{disabled:true}})}
|
||||
{ cloneElement(children, {disabled:true, onClick:(e)=>e.preventDefault(),okButtonProps:{disabled:true}})}
|
||||
</Tooltip>}
|
||||
|
||||
</>
|
||||
|
||||
@@ -276,252 +276,252 @@ export const PERMISSION_DEFINITION = [
|
||||
},
|
||||
"team.service.api_doc.view": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.service.api_doc.view"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.service.view_all","team.service.api_doc.view"] }]
|
||||
}
|
||||
},
|
||||
"team.service.api_doc.add": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.service.api_doc.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.service.manager_all","team.service.api_doc.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.service.api_doc.edit": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.service.api_doc.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.service.manager_all","team.service.api_doc.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.service.service_intro.view": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.service.service_intro.view"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.service.view_all","team.service.service_intro.view"] }]
|
||||
}
|
||||
},
|
||||
"team.service.service_intro.add": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.service.service_intro.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.service.manager_all","team.service.service_intro.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.service.service_intro.edit": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.service.service_intro.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.service.manager_all","team.service.service_intro.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.service.api_doc.import": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.service.api_doc.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.service.manager_all","team.service.api_doc.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.service.router.view": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.service.api.view"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.service.view_all","team.service.api.view"] }]
|
||||
}
|
||||
},
|
||||
"team.service.router.add": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.service.api.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.service.manager_all","team.service.api.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.service.router.edit": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.service.api.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.service.manager_all","team.service.api.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.service.router.delete": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.service.api.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.service.manager_all","team.service.api.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.service.upstream.view": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.service.upstream.view"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.service.view_all","team.service.upstream.view"] }]
|
||||
}
|
||||
},
|
||||
"team.service.upstream.add": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.service.upstream.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.service.manager_all","team.service.upstream.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.service.upstream.edit": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.service.upstream.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.service.manager_all","team.service.upstream.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.service.upstream.delete": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.service.upstream.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.service.manager_all","team.service.upstream.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.service.release.view": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.service.release.view"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.service.view_all","team.service.release.view"] }]
|
||||
}
|
||||
},
|
||||
"team.service.release.add": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.service.release.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.service.manager_all","team.service.release.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.service.release.online": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.service.release.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.service.manager_all","team.service.release.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.service.release.stop": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.service.release.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.service.manager_all","team.service.release.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.service.release.cancel": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.service.release.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.service.manager_all","team.service.release.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.service.release.rollback": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.service.release.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.service.manager_all","team.service.release.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.service.release.delete": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.service.release.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.service.manager_all","team.service.release.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.service.release.approval": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.service.release.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.service.manager_all","team.service.release.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.service.subscription.view": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.service.subscription.view"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.service.view_all","team.service.subscription.view"] }]
|
||||
}
|
||||
},
|
||||
"team.service.subscription.approval": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.service.subscription.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.service.manager_all","team.service.subscription.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.service.subscription.add": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.service.subscription.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.service.manager_all","team.service.subscription.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.service.subscription.delete": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.service.subscription.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.service.manager_all","team.service.subscription.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.service.service.view": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.team.service.view"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.service.manager_all","system.workspace.service.view_all","team.team.service.view"] }]
|
||||
}
|
||||
},
|
||||
"team.service.service.add": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.team.service.manager","team.service.service.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.service.manager_all","team.team.service.manager","team.service.service.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.service.service.edit": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.team.service.manager","team.service.service.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.service.manager_all","team.team.service.manager","team.service.service.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.service.service.delete": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.team.service.manager","team.service.service.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.service.manager_all","team.team.service.manager","team.service.service.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.application.subscription.view": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.consumer.subscription.view_subscribed_service"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.application.view_all","team.consumer.subscription.view_subscribed_service"] }]
|
||||
}
|
||||
},
|
||||
"team.application.subscription.add": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.consumer.subscription.subscribe"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_al","team.consumer.subscription.subscribe"] }]
|
||||
}
|
||||
},
|
||||
"team.application.subscription.edit": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.consumer.subscription.manager_subscribed_services"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_al","team.consumer.subscription.manager_subscribed_services"] }]
|
||||
}
|
||||
},
|
||||
"team.application.subscription.delete": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.team.consumer.subscription.manager_subscribed_services"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_al","team.team.consumer.subscription.manager_subscribed_services"] }]
|
||||
}
|
||||
},
|
||||
"team.application.application.view": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.team.consumer.view"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.application.view_all","team.team.consumer.view"] }]
|
||||
}
|
||||
},
|
||||
"team.application.application.add": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ['team.team.consumer.manager',"team.consumer.application.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_al",'team.team.consumer.manager',"team.consumer.application.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.application.application.edit": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ['team.team.consumer.manager',"team.consumer.application.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_al",'team.team.consumer.manager',"team.consumer.application.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.application.application.delete": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ['team.team.consumer.manager',"team.consumer.application.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_al",'team.team.consumer.manager',"team.consumer.application.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.consumer.authorization.view": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.consumer.authorization.view"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_al","system.workspace.application.view_all","team.consumer.authorization.view"] }]
|
||||
}
|
||||
},
|
||||
"team.application.authorization.add": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.consumer.authorization.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_al","team.consumer.authorization.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.application.authorization.edit": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.consumer.authorization.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_al","team.consumer.authorization.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.application.authorization.delete": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.consumer.authorization.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_al","team.consumer.authorization.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.application.authorization.cancelSubApply": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.consumer.authorization.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_al","team.consumer.authorization.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.application.authorization.cancelSub": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.consumer.authorization.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_al","team.consumer.authorization.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.team.team.view": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.team.team.view"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.team.view_all","team.team.team.view"] }]
|
||||
}
|
||||
},
|
||||
"team.team.team.edit": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.team.team.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.team.manager","team.team.team.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.team.member.view": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.team.member.view"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.team.view_all","team.team.member.view"] }]
|
||||
}
|
||||
},
|
||||
"team.team.member.add": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.team.member.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.team.manager","team.team.member.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.team.member.edit": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["team.team.member.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.team.manager","team.team.member.manager"] }]
|
||||
}
|
||||
},
|
||||
"project.mySystem.topology.view": {
|
||||
|
||||
@@ -546,7 +546,7 @@
|
||||
"移除成员": "K395acc14",
|
||||
"添加成员": "Kec46a57f",
|
||||
"输入姓名查找": "K48724410",
|
||||
"搜索用户名、邮箱": "Kb9052305",
|
||||
"输入名称查找用户": "Kf5fd27ed",
|
||||
"设置团队和成员,然后你可以在团队内创建服务和消费者、订阅API,成员只能看到所属团队内的服务和消费者。": "K4c72fb6f",
|
||||
"添加团队": "K510cdd27",
|
||||
"输入名称、ID、负责人查找团队": "K9244ae14",
|
||||
|
||||
@@ -319,7 +319,7 @@
|
||||
"Ka46b9b24": "Data Source Type",
|
||||
"Kbb0cdcd0": "Data Source Address",
|
||||
"Kd9dfb884": "Organization",
|
||||
"K3e770a75": "Authentication Token",
|
||||
"K3e770a75": "Credentials Token",
|
||||
"K8ef69ee2": "Key",
|
||||
"Kba3507d6": "Upload Key",
|
||||
"K93ac0f23": "Key file suffix is usually .key",
|
||||
@@ -365,7 +365,7 @@
|
||||
"Kcef64f4d": "Default AI Provider",
|
||||
"Kcab588a9": "No AI model provider set,",
|
||||
"Kb9b56111": "Set Now",
|
||||
"Kcf756b7a": "API Call Prefix",
|
||||
"Kcf756b7a": "API Request Prefix",
|
||||
"K13edc043": "As a prefix for all APIs in the service, e.g., host/{service_name}/{api_path}, cannot be modified once saved.",
|
||||
"Kf52a584d": "Service Category",
|
||||
"K72b21be5": "Set the category in which the service will be displayed in the service marketplace",
|
||||
@@ -391,8 +391,8 @@
|
||||
"K813e1c0a": "Team Name",
|
||||
"K692f5aa6": "Team ID",
|
||||
"K5de0bc2": "Team ID can be used to retrieve the team, cannot be modified once saved.",
|
||||
"Ka63dd985": "Team Leader",
|
||||
"Ka6bcd272": "The leader has management authority over the team, services, and members within the team",
|
||||
"Ka63dd985": "Team Administrator",
|
||||
"Ka6bcd272": "The Administrator has management authority over the team, services, and members within the team",
|
||||
"Ka2012bdd": "Delete Team",
|
||||
"Kbde1f3d": "Service data must be cleared before deletion",
|
||||
"K395acc14": "Remove",
|
||||
@@ -463,7 +463,7 @@
|
||||
"Kd59290a2": "Search Category or Tag",
|
||||
"K6b75bdbc": "No API Data",
|
||||
"K4b15d6f5": "Application Reason",
|
||||
"Kb71b5a13": "Authentication Type",
|
||||
"Kb71b5a13": "Credentials Type",
|
||||
"K4d1465ee": "ISS",
|
||||
"K5dcd7ed8": "Signature Algorithm",
|
||||
"K5b0eedd3": "Secret",
|
||||
@@ -475,10 +475,10 @@
|
||||
"K31418470": "SK",
|
||||
"Kbfeb5297": "API Key",
|
||||
"K1a78e6f0": "Expiration Time",
|
||||
"Ke64e43a": "Hide Authentication Info",
|
||||
"K217cb125": "Authentication Details",
|
||||
"K2bb63eca": "Add Authentication",
|
||||
"Kd74d69b7": "Edit Authentication",
|
||||
"Ke64e43a": "Hide Credentials Info",
|
||||
"K217cb125": "Credentials Details",
|
||||
"K2bb63eca": "Add Credentials",
|
||||
"Kd74d69b7": "Edit Credentials",
|
||||
"K9cbe1e0": "Modify",
|
||||
"Kb6e9328f": "Authorization",
|
||||
"Kd23d1716": "Add Authorization",
|
||||
@@ -678,5 +678,6 @@
|
||||
"K1644b775": "Add",
|
||||
"Kc8ee3e62": "Non-Existence",
|
||||
"K1e97dbd8": "Existence",
|
||||
"Kec91f0db": "Applicant Consumer"
|
||||
"Kec91f0db": "Applicant Consumer",
|
||||
"Kf5fd27ed": "Enter Name to Search User"
|
||||
}
|
||||
|
||||
@@ -700,5 +700,6 @@
|
||||
"K1644b775": "追加",
|
||||
"Kc8ee3e62": "存在しない",
|
||||
"K1e97dbd8": "存在する",
|
||||
"Kec91f0db": "申請側コンシューマー"
|
||||
"Kec91f0db": "申請側コンシューマー",
|
||||
"Kf5fd27ed": "名前を入力してユーザーを検索"
|
||||
}
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
{}
|
||||
{
|
||||
"Kf5fd27ed": "输入名称查找用户"
|
||||
}
|
||||
@@ -1 +1,3 @@
|
||||
{}
|
||||
{
|
||||
"Kf5fd27ed": "输入名称查找用户"
|
||||
}
|
||||
@@ -21,6 +21,7 @@
|
||||
"K78b1ca25": "地址",
|
||||
"K1644b775": "新增",
|
||||
"Kec91f0db": "申请方消费者",
|
||||
"Kf5fd27ed": "输入名称查找用户",
|
||||
"Kc3b7bfa8": "暂无消费者描述",
|
||||
"K3a6f905d": "输入名称、ID 查找消费者"
|
||||
}
|
||||
@@ -1 +1,3 @@
|
||||
{}
|
||||
{
|
||||
"Kf5fd27ed": "输入名称查找用户"
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
{
|
||||
"Kb9052305": "Search Username, Email",
|
||||
"K40a89bd8": "Enter Name, ID to Search Member"
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
"K9bdd8403": "API を安全に呼び出すためには、アプリケーションとトークンを作成する必要があります。",
|
||||
"Kc8239422": "チームにはユーザー、アプリケーション、サービスが含まれ、異なるチームのアプリケーションとサービスのデータは分離されています。企業内の部門/プロジェクトグループ/チームの管理に使用できます。",
|
||||
"Ka0a8840a": "他のアプリケーションのサブスクリプション申請をレビューし、承認後に API リクエストが発行できます。",
|
||||
"Kb9052305": "ユーザー名またはメールを検索",
|
||||
"K5ece3bac": "チームとメンバーを設定してから、チーム内でサービスとアプリケーションを作成し、API をサブスクライブできます。メンバーは所属チーム内のサービスとアプリケーションのみを表示できます。",
|
||||
"K1512e983": "アプリケーション呼び出し統計",
|
||||
"Kb4d2007f": "Application を選択",
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
"K9bdd8403": "为了安全地调用 API,你需要创建一个消费者以及Token。",
|
||||
"Kc8239422": "团队中包含了人员、消费者和服务,不同团队之间的消费者和服务数据是隔离的,可用于管理企业内部不同的部门/项目组/团队。",
|
||||
"Ka0a8840a": "审核其他消费者的订阅申请,审核通过后的才可发起 API 请求。",
|
||||
"Kb9052305": "搜索用户名、邮箱",
|
||||
"K5ece3bac": "设置团队和成员,然后你可以在团队内创建服务和消费者、订阅API,成员只能看到所属团队内的服务和消费者。",
|
||||
"K1512e983": "消费者调用统计",
|
||||
"Kb4d2007f": "请选择消费者",
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
"K9bdd8403": "為了安全地調用 API,你需要創建一個應用以及Token。",
|
||||
"Kc8239422": "團隊中包含了人員、應用程式和服務,不同團隊之間的應用程式和服務數據是隔離的,可用於管理企業內部不同的部門/項目組/團隊。",
|
||||
"Ka0a8840a": "審核其他應用程式的訂閱申請,審核通過後的才可發起 API 請求。",
|
||||
"Kb9052305": "搜索用戶名、電郵",
|
||||
"K5ece3bac": "設置團隊和成員,然後你可以在團隊內創建服務和應用程式、訂閱API,成員只能看到所屬團隊內的服務和應用程式。",
|
||||
"K1512e983": "應用程式調用統計",
|
||||
"Kb4d2007f": "請選擇應用程式",
|
||||
|
||||
@@ -676,5 +676,7 @@
|
||||
"K6e32a344": "订阅服务数量",
|
||||
"Ka701316": "鉴权数量",
|
||||
"K9eaa2eb6": "列表",
|
||||
"Kfaec39e9": "块"
|
||||
"Kfaec39e9": "块",
|
||||
"Kc3b7bfa8": "暂无消费者描述",
|
||||
"K3a6f905d": "输入名称、ID 查找消费者"
|
||||
}
|
||||
@@ -700,5 +700,6 @@
|
||||
"K1644b775": "新增",
|
||||
"Kc8ee3e62": "不存在匹配",
|
||||
"K1e97dbd8": "存在匹配",
|
||||
"Kec91f0db": "申請方消費者"
|
||||
"Kec91f0db": "申請方消費者",
|
||||
"Kf5fd27ed": "輸入名稱查找使用者"
|
||||
}
|
||||
|
||||
@@ -13,10 +13,15 @@ export const checkAccess:(access:AccessDataType, accessData:Map<string,string[]>
|
||||
return false
|
||||
}
|
||||
const neededBackendAccessArr = PERMISSION_DEFINITION[0]?.[access]?.granted?.anyOf[0].backend || []
|
||||
return accessData?.has(accLevel)&& accessData.get(accLevel)!.length > 0 ? hasIntersection(neededBackendAccessArr, accessData.get(accLevel)!) : false
|
||||
let accessSet = new Set(accessData.get('system'))
|
||||
if(accLevel === 'team'){
|
||||
accessSet = new Set(Array.from(accessSet).concat(accessData?.get('team') || []))
|
||||
}
|
||||
return accessSet!.size > 0 ? hasIntersection(neededBackendAccessArr, accessSet) : false
|
||||
}
|
||||
|
||||
const hasIntersection = (arr1:string[], arr2:string[])=> {
|
||||
const hasIntersection = (arr1:string[], set1:Set<string>)=> {
|
||||
const arr2 = Array.from(set1)
|
||||
const set = new Set(arr1.length > arr2.length ? arr2:arr1)
|
||||
const arr = arr1.length > arr2.length ? arr1:arr2
|
||||
for (const item of arr) {
|
||||
|
||||
@@ -1,16 +1,36 @@
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<head id="head">
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/frontend/favicon.ico" />
|
||||
<link id="favicon" rel="icon" type="image/svg+xml" href="/frontend/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>APIPark</title>
|
||||
</head>
|
||||
<body>
|
||||
<body id="eo-body">
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/main.tsx"></script>
|
||||
<script async src="/frontend/iconpark_eolink.js"></script>
|
||||
<script async src="/frontend/iconpark_apinto.js"></script>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const eoBody = document.getElementById('eo-body');
|
||||
const favicon = document.getElementById('favicon');
|
||||
|
||||
const createScript = (id, src) => {
|
||||
const script = document.createElement('script');
|
||||
script.id = id;
|
||||
script.async = true;
|
||||
script.src = src;
|
||||
return script;
|
||||
};
|
||||
|
||||
const iconparkApintoSrc = window.location.hostname === 'localhost' ? '/iconpark_apinto.js' : '/frontend/iconpark_apinto.js';
|
||||
const iconparkEolinkSrc = window.location.hostname === 'localhost' ? '/iconpark_eolink.js' : '/frontend/iconpark_eolink.js';
|
||||
const faviconSrc = window.location.hostname === 'localhost' ? '/favicon.ico' : '/frontend/favicon.ico';
|
||||
|
||||
favicon.href = faviconSrc;
|
||||
|
||||
eoBody.appendChild(createScript('iconpark_apinto', iconparkApintoSrc));
|
||||
eoBody.appendChild(createScript('iconpark_eolink', iconparkEolinkSrc));
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -290,3 +290,13 @@ a{
|
||||
transition: background-color 0s 600000s, color 0s 600000s !important;
|
||||
}
|
||||
}
|
||||
|
||||
.ant-select-selection-overflow-item:first-child {
|
||||
max-width: calc(100% - 60px);
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
a[disabled]:hover {
|
||||
color: #BBB;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
@@ -35,6 +35,7 @@ export type MemberDropdownModalFieldType = {
|
||||
parent?:string
|
||||
email?:string
|
||||
departmentIds?:string[]
|
||||
password:string
|
||||
};
|
||||
|
||||
export type MemberDropdownModalProps = {
|
||||
|
||||
@@ -42,6 +42,7 @@ const AiServiceInsidePage:FC = ()=> {
|
||||
|
||||
|
||||
const getApiDefine = ()=>{
|
||||
console.log('@@@@@@@')
|
||||
setApiPrefix('')
|
||||
setPrefixForce(false)
|
||||
fetchData<BasicResponse<{ prefix:string, force:boolean }>>('service/router/define',{method:'GET',eoParams:{service:serviceId,team:teamId}}).then(response=>{
|
||||
@@ -84,19 +85,22 @@ const AiServiceInsidePage:FC = ()=> {
|
||||
const filterMenu = (menu:MenuItemGroupType<MenuItemType>[])=>{
|
||||
const newMenu = cloneDeep(menu)
|
||||
return newMenu!.filter((m:MenuItemGroupType )=>{
|
||||
if(m.children && m.children.length > 0){
|
||||
if(m&&m.children && m.children.length > 0){
|
||||
m.children = m.children.filter(
|
||||
(c)=>(c&&(c as MenuItemType&{access:string} ).access ?
|
||||
(c)=>{
|
||||
if(!c) return false
|
||||
return (((c as MenuItemType&{access:string} ).access ?
|
||||
checkPermission((c as MenuItemType&{access:string} ).access as keyof typeof PERMISSION_DEFINITION[0]):
|
||||
true))
|
||||
true))})
|
||||
}
|
||||
return m.children && m.children.length > 0
|
||||
})
|
||||
}
|
||||
const filteredMenu = filterMenu(SYSTEM_PAGE_MENU_ITEMS as MenuItemGroupType<MenuItemType>[])
|
||||
setActiveMenu((pre)=>{
|
||||
return pre ?? 'route'
|
||||
})
|
||||
const menu = activeMenu ?? filteredMenu[0]?.children ? filteredMenu[0]?.children?.[0]?.key : filteredMenu[0]?.key
|
||||
if(menu && currentUrl.split('/')[-1] !== menu){
|
||||
navigateTo(`/service/${teamId}/aiInside/${serviceId}/${menu}`)
|
||||
}
|
||||
return filteredMenu || []
|
||||
},[accessData,accessInit, SYSTEM_PAGE_MENU_ITEMS])
|
||||
|
||||
@@ -116,7 +120,7 @@ const AiServiceInsidePage:FC = ()=> {
|
||||
}, [currentUrl]);
|
||||
|
||||
useEffect(()=>{
|
||||
if(accessData && accessData.get('team') && accessData.get('team')?.indexOf('team.service.router.view') !== -1){
|
||||
if(accessData && checkPermission('team.service.router.view')){
|
||||
getApiDefine()
|
||||
}
|
||||
},[accessData])
|
||||
|
||||
@@ -21,22 +21,22 @@ export default function Guide(){
|
||||
{
|
||||
title: $t("配置你的 AI 模型"),
|
||||
description: $t('通过 APIPark 快速接入各种 AI 模型,使用统一的格式来调用API,并且可以随意切换模型。'),
|
||||
link: 'https://docs.apipark.com/docs/quick/pre-work/team'
|
||||
link: 'https://docs.apipark.com/docs/system_setting/ai_model_providers'
|
||||
},
|
||||
{
|
||||
title: $t("创建 AI 服务和 API"),
|
||||
description: $t('创建 AI 类型的服务,并且你可以将 Prompt 提示词设置为一个 API,简化使用 AI 的流程。'),
|
||||
link: 'https://docs.apipark.com/docs/quick/provider/service'
|
||||
link: 'https://docs.apipark.com/docs/services/ai_services'
|
||||
},
|
||||
{
|
||||
title: $t("创建调用 Token"),
|
||||
description: $t('为了安全地调用 API,你需要创建一个消费者以及Token。'),
|
||||
link: 'https://docs.apipark.com/docs/quick/suberscriber/application'
|
||||
link: 'https://docs.apipark.com/docs/consumers'
|
||||
},
|
||||
{
|
||||
title: $t("调用"),
|
||||
description: $t('现在你可以通过 Token 来调用这些 API。'),
|
||||
link: 'https://docs.apipark.com/docs/quick/suberscriber/application'
|
||||
link: 'https://docs.apipark.com/docs/call_api'
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -46,17 +46,17 @@ export default function Guide(){
|
||||
{
|
||||
title: $t("创建 REST 服务和 API"),
|
||||
description: $t('创建 AI 类型的服务,并且你可以将 Prompt 提示词设置为一个 API,简化使用 AI 的流程。'),
|
||||
link: 'https://docs.apipark.com/docs/tutorials/api-market/service'
|
||||
link: 'https://docs.apipark.com/docs/services/rest_services'
|
||||
},
|
||||
{
|
||||
title: $t("创建调用 Token"),
|
||||
description: $t('为了安全地调用 API,你需要创建一个消费者以及Token。'),
|
||||
link: 'https://docs.apipark.com/docs/quick/suberscriber/subscribe'
|
||||
link: 'https://docs.apipark.com/docs/consumers'
|
||||
},
|
||||
{
|
||||
title: $t("调用"),
|
||||
description: $t('现在你可以通过 Token 来调用这些 API。'),
|
||||
link: 'https://docs.apipark.com/docs/quick/provider/approve'
|
||||
link: 'https://docs.apipark.com/docs/call_api'
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -66,7 +66,7 @@ export default function Guide(){
|
||||
{
|
||||
title: $t("统计 API 调用情况"),
|
||||
description: $t('仪表盘中提供了多种统计图表,帮助我们了解 API 的运行情况。'),
|
||||
link: 'https://docs.apipark.com/docs/quick/pre-work/monitor'
|
||||
link: 'https://docs.apipark.com/docs/analysis'
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -78,17 +78,17 @@ export default function Guide(){
|
||||
{
|
||||
title: $t("账号与角色"),
|
||||
description: $t('邀请你的团队成员加入 APIPark,共同管理和调用 API。'),
|
||||
link: 'https://docs.apipark.com/docs/quick/pre-work/team'
|
||||
link: 'https://docs.apipark.com/docs/system_setting/account_role'
|
||||
},
|
||||
{
|
||||
title: $t("团队"),
|
||||
description: $t('团队中包含了人员、消费者和服务,不同团队之间的消费者和服务数据是隔离的,可用于管理企业内部不同的部门/项目组/团队。'),
|
||||
link: 'https://docs.apipark.com/docs/quick/provider/service'
|
||||
link: 'https://docs.apipark.com/docs/teams'
|
||||
},
|
||||
{
|
||||
title: $t("服务"),
|
||||
description: $t('服务内包含一组 API,并且可以发布到 API 市场被其他团队使用。'),
|
||||
link: 'https://docs.apipark.com/docs/quick/suberscriber/application'
|
||||
link: 'https://docs.apipark.com/docs/category/-%E6%9C%8D%E5%8A%A1'
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -98,12 +98,12 @@ export default function Guide(){
|
||||
{
|
||||
title: $t("订阅服务"),
|
||||
description: $t('如果需要调用某个服务的 API,需要先订阅该服务,并且等待提供服务的团队审核后才可发起 API 请求。'),
|
||||
link: 'https://docs.apipark.com/docs/tutorials/api-market/service'
|
||||
link: 'https://docs.apipark.com/docs/developer_portal'
|
||||
},
|
||||
{
|
||||
title: $t("审核订阅申请"),
|
||||
description: $t('提供服务的团队可以审核来自其他团队的订阅申请,审核通过后的消费者才可发起 API 请求。'),
|
||||
link: 'https://docs.apipark.com/docs/quick/suberscriber/subscribe'
|
||||
link: 'https://docs.apipark.com/docs/services/review_consumers'
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -113,7 +113,7 @@ export default function Guide(){
|
||||
{
|
||||
title: $t("日志"),
|
||||
description: $t('APIPark 提供详尽的 API 调用日志,帮助企业监控、分析和审计 API 的运行状况。'),
|
||||
link: 'https://docs.apipark.com/docs/quick/pre-work/monitor'
|
||||
link: 'https://docs.apipark.com/docs/system_setting/log/'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
|
||||
import WithPermission from "@common/components/aoplatform/WithPermission";
|
||||
import { useBreadcrumb } from "@common/contexts/BreadcrumbContext";
|
||||
import { $t } from "@common/locales";
|
||||
import { useEffect } from "react";
|
||||
@@ -24,7 +25,7 @@ export default function LogSettingsInstruction() {
|
||||
<div className="h-[208px] w-[384px] flex flex-col items-center py-[32px] px-[24px] gap-[16px] rounded-DEFAULT bg-MENU_BG mr-[24px]">
|
||||
<p className="text-[20px] font-medium leading-[32px] text-MAIN_TEXT">环境配置</p>
|
||||
<p className="text-[12px] font-normal leading-[20px] text-DESC_TEXT">新增集群的地址、名称、描述和其他相关属性,以确保插件能够正确识别和连接到集群</p>
|
||||
<p><Link to="/cluster">添加集群地址</Link></p>
|
||||
<p><WithPermission access="system.settings.api_gateway.view" ><Link to="/cluster">添加集群地址</Link></WithPermission></p>
|
||||
</div>
|
||||
</div>
|
||||
</div></div>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import {App, Form, Input, TreeSelect} from "antd";
|
||||
import {forwardRef, useEffect, useImperativeHandle, useState} from "react";
|
||||
import {forwardRef, useEffect, useImperativeHandle, useMemo, useState} from "react";
|
||||
import {BasicResponse, PLACEHOLDER, RESPONSE_TIPS, STATUS_CODE, VALIDATE_MESSAGE} from "@common/const/const.tsx";
|
||||
import {useFetch} from "@common/hooks/http.ts";
|
||||
import { MemberDropdownModalHandle, MemberDropdownModalProps, DepartmentListItem, MemberDropdownModalFieldType, MemberTableListItem } from "../../const/member/type.ts";
|
||||
import WithPermission from "@common/components/aoplatform/WithPermission.tsx";
|
||||
import { $t } from "@common/locales/index.ts";
|
||||
import { useGlobalContext } from "@common/contexts/GlobalStateContext.tsx";
|
||||
|
||||
export const MemberDropdownModal = forwardRef<MemberDropdownModalHandle,MemberDropdownModalProps>((props,ref)=>{
|
||||
const { message} = App.useApp()
|
||||
@@ -12,6 +13,7 @@ export const MemberDropdownModal = forwardRef<MemberDropdownModalHandle,MemberDr
|
||||
const {type,entity,selectedMemberGroupId} = props
|
||||
const {fetchData} = useFetch()
|
||||
const [departmentList, setDepartmentList] = useState<DepartmentListItem[]>([])
|
||||
const { state } = useGlobalContext()
|
||||
|
||||
const save:()=>Promise<boolean | string> = ()=>{
|
||||
let url:string
|
||||
@@ -78,6 +80,15 @@ export const MemberDropdownModal = forwardRef<MemberDropdownModalHandle,MemberDr
|
||||
})
|
||||
}
|
||||
|
||||
const generateRandomString = () =>{
|
||||
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
||||
let result = '';
|
||||
for (let i = 0; i < 8; i++) {
|
||||
result += chars.charAt(Math.floor(Math.random() * chars.length));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
switch(type){
|
||||
case 'addChild':
|
||||
@@ -87,7 +98,7 @@ export const MemberDropdownModal = forwardRef<MemberDropdownModalHandle,MemberDr
|
||||
form.setFieldsValue({id:entity!.id,name:entity!.name})
|
||||
break
|
||||
case 'addMember':
|
||||
form.setFieldsValue('-1' === selectedMemberGroupId ? {} : {departmentIds:selectedMemberGroupId})
|
||||
form.setFieldsValue({...('-1' === selectedMemberGroupId ? {} : {departmentIds:selectedMemberGroupId}), password:generateRandomString()})
|
||||
break
|
||||
case 'editMember':
|
||||
form.setFieldsValue({...entity,departmentIds:(entity as MemberTableListItem )?.department?.map(x=>x.id)})
|
||||
@@ -97,6 +108,23 @@ export const MemberDropdownModal = forwardRef<MemberDropdownModalHandle,MemberDr
|
||||
|
||||
}, []);
|
||||
|
||||
|
||||
const treeData = useMemo(() => {
|
||||
const loop = (data: DepartmentListItem[]): unknown[] =>
|
||||
data?.map((item) => {
|
||||
const title = ['unknown','disable'].indexOf(item.id) === -1 ?item.name : $t(item.name) as string;
|
||||
if (item.children) {
|
||||
return {...item,name:title, children:loop(item.children)}
|
||||
}
|
||||
|
||||
return {
|
||||
...item,
|
||||
name: title
|
||||
};
|
||||
});
|
||||
return loop(departmentList);
|
||||
}, [departmentList,state.language]);
|
||||
|
||||
|
||||
return (<WithPermission access="">
|
||||
<Form
|
||||
@@ -163,6 +191,13 @@ export const MemberDropdownModal = forwardRef<MemberDropdownModalHandle,MemberDr
|
||||
>
|
||||
<Input className="w-INPUT_NORMAL" placeholder={$t(PLACEHOLDER.input)}/>
|
||||
</Form.Item>
|
||||
<Form.Item<MemberDropdownModalFieldType>
|
||||
label={$t("密码")}
|
||||
name="password"
|
||||
rules={[{required: type === 'addMember',whitespace:true }]}
|
||||
>
|
||||
<Input className="w-INPUT_NORMAL" placeholder={$t(PLACEHOLDER.input)}/>
|
||||
</Form.Item>
|
||||
<Form.Item<MemberDropdownModalFieldType>
|
||||
label={$t("部门")}
|
||||
name="departmentIds"
|
||||
@@ -175,7 +210,7 @@ export const MemberDropdownModal = forwardRef<MemberDropdownModalHandle,MemberDr
|
||||
placeholder={$t(PLACEHOLDER.select)}
|
||||
allowClear
|
||||
treeDefaultExpandAll
|
||||
treeData={departmentList}
|
||||
treeData={treeData}
|
||||
multiple
|
||||
/>
|
||||
</Form.Item>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import WithPermission from "@common/components/aoplatform/WithPermission";
|
||||
import { useBreadcrumb } from "@common/contexts/BreadcrumbContext";
|
||||
import { useEffect } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
@@ -24,7 +25,7 @@ export default function ResourceSettingsInstruction() {
|
||||
<div className="h-[208px] w-[384px] flex flex-col items-center py-[32px] px-[24px] gap-[16px] rounded-DEFAULT bg-MENU_BG mr-[24px]">
|
||||
<p className="text-[20px] font-medium leading-[32px] text-MAIN_TEXT">集群配置</p>
|
||||
<p className="text-[12px] font-normal leading-[20px] text-DESC_TEXT">新增集群地址、描述和其他相关属性,以确保插件能够正确识别和连接到集群</p>
|
||||
<p><Link to="/cluster">配置集群地址</Link></p>
|
||||
<p><WithPermission access="system.settings.data_source.view" ><Link to="/cluster">配置集群地址</Link></WithPermission></p>
|
||||
</div>
|
||||
</div>
|
||||
</div></div>
|
||||
|
||||
@@ -84,19 +84,20 @@ const SystemInsidePage:FC = ()=> {
|
||||
const filterMenu = (menu:MenuItemGroupType<MenuItemType>[])=>{
|
||||
const newMenu = cloneDeep(menu)
|
||||
return newMenu!.filter((m:MenuItemGroupType )=>{
|
||||
if(m.children && m.children.length > 0){
|
||||
if(m&&m.children && m.children.length > 0){
|
||||
m.children = m.children.filter(
|
||||
(c)=>(c&&(c as MenuItemType&{access:string} ).access ?
|
||||
(c)=>{
|
||||
if(!c) return false
|
||||
return (((c as MenuItemType&{access:string} ).access ?
|
||||
checkPermission((c as MenuItemType&{access:string} ).access as keyof typeof PERMISSION_DEFINITION[0]):
|
||||
true))
|
||||
true))})
|
||||
}
|
||||
return m.children && m.children.length > 0
|
||||
})
|
||||
}
|
||||
const filteredMenu = filterMenu(SYSTEM_PAGE_MENU_ITEMS as MenuItemGroupType<MenuItemType>[])
|
||||
setActiveMenu((pre)=>{
|
||||
return pre ?? 'route'
|
||||
})
|
||||
const menu = activeMenu ?? filteredMenu[0]?.children ? filteredMenu[0]?.children?.[0]?.key : filteredMenu[0]?.key
|
||||
if(menu && currentUrl.split('/')[-1] !== menu) navigateTo(`/service/${teamId}/inside/${serviceId}/${menu}`)
|
||||
return filteredMenu || []
|
||||
},[accessData,accessInit, SYSTEM_PAGE_MENU_ITEMS])
|
||||
|
||||
@@ -116,7 +117,7 @@ const SystemInsidePage:FC = ()=> {
|
||||
}, [currentUrl]);
|
||||
|
||||
useEffect(()=>{
|
||||
if(accessData && accessData.get('team') && accessData.get('team')?.indexOf('team.service.router.view') !== -1){
|
||||
if(accessData && checkPermission('team.service.router.view')){
|
||||
getApiDefine()
|
||||
}
|
||||
},[accessData])
|
||||
|
||||
@@ -34,7 +34,7 @@ const TeamConfig= forwardRef<TeamConfigHandle,TeamConfigProps>((props,ref) => {
|
||||
const [managerOption, setManagerOption] = useState<DefaultOptionType[]>([])
|
||||
const { setBreadcrumb} = useBreadcrumb()
|
||||
const { setTeamInfo } =useTeamContext()
|
||||
const {checkPermission,accessInit} = useGlobalContext()
|
||||
const {checkPermission,accessInit,state} = useGlobalContext()
|
||||
const pageType= useMemo(()=>{
|
||||
if(!accessInit) return 'myteam'
|
||||
return checkPermission('system.workspace.team.view_all') ? 'manage' : 'myteam'
|
||||
@@ -128,7 +128,10 @@ const TeamConfig= forwardRef<TeamConfigHandle,TeamConfigProps>((props,ref) => {
|
||||
getTeamInfo();
|
||||
} else {
|
||||
setOnEdit(false);
|
||||
form.setFieldsValue({id:uuidv4()}); // 清空 initialValues
|
||||
form.setFieldsValue(
|
||||
{id:uuidv4(),
|
||||
master:state?.userData?.uid
|
||||
}); // 清空 initialValues
|
||||
}
|
||||
return (form.setFieldsValue({}))
|
||||
}, [teamId]);
|
||||
|
||||
@@ -20,7 +20,7 @@ import WithPermission from "@common/components/aoplatform/WithPermission.tsx";
|
||||
import { $t } from "@common/locales/index.ts";
|
||||
|
||||
export const getDepartmentWithMember = (department:(DepartmentListItem & {type?:'department'|'member'})[],departmentMap:Map<string, (MemberItem & {type:'department'|'member'})[]>) : (DepartmentWithMemberItem | undefined)[] =>{
|
||||
return department.map((x:DepartmentListItem & {type?:'department'|'member'})=>{
|
||||
return department?.map((x:DepartmentListItem & {type?:'department'|'member'})=>{
|
||||
const res = ({
|
||||
...x,
|
||||
key:x.id,
|
||||
@@ -28,7 +28,7 @@ export const getDepartmentWithMember = (department:(DepartmentListItem & {type?:
|
||||
type: x.type || 'department',
|
||||
children:((x.type === 'member' || (!x.children||x.children.length === 0 )&& (!departmentMap.get(x.id) || departmentMap.get(x.id)!.length === 0))? undefined : [...(x.children && x.children.length > 0 ? getDepartmentWithMember(x.children,departmentMap) : []),...departmentMap.get(x.id) || []])
|
||||
});
|
||||
return res}).filter(node=>node.type === 'member' ||( node.children && node.children.length > 0))
|
||||
return res})?.filter(node=>node.type === 'member' ||( node.children && node.children.length > 0)) || []
|
||||
}
|
||||
|
||||
export const addMemberToDepartment = (departmentMap: Map<string, (MemberItem & {type:'department'|'member'})[]>, departmentId: string, member: MemberItem) => {
|
||||
@@ -84,6 +84,7 @@ const TeamInsideMember:FC = ()=>{
|
||||
addMemberToDepartment(departmentMap, '_withoutDepartment', member);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
const finalData = departmentResponse.data.department
|
||||
? [
|
||||
@@ -93,30 +94,33 @@ const TeamInsideMember:FC = ()=>{
|
||||
name: departmentResponse.data.department.name,
|
||||
title:departmentResponse.data.department.name,
|
||||
children: [
|
||||
...getDepartmentWithMember(departmentResponse.data.department.children, departmentMap),
|
||||
...getDepartmentWithMember(departmentResponse.data.department?.children || [], departmentMap),
|
||||
...departmentMap.get('_withoutDepartment') || []
|
||||
]
|
||||
}
|
||||
]
|
||||
: [...departmentMap.get('_withoutDepartment') || []];
|
||||
|
||||
|
||||
let allMemberSelectedFlag:boolean = true
|
||||
for(const [k,v] of departmentMap){
|
||||
if(k !== '_withoutDepartment' && allMemberIds.length > 0 ){
|
||||
// 筛选出部门内没被勾选的用户,如果不存在没勾选用户,需要将部门id放入ids中
|
||||
if(v.filter(m => allMemberIds.indexOf(m.id) === -1).length === 0){
|
||||
setAllMemberSelectedDepartIds((pre)=>[...pre, k])
|
||||
}else if(['unknown','disable'].indexOf(k) === -1){
|
||||
allMemberSelectedFlag = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!finalData[0].children || finalData[0].children.filter(m => allMemberIds.indexOf(m.id) === -1).length === 0){
|
||||
setAllMemberSelectedDepartIds((pre)=>[...pre, topDepartmentId])
|
||||
|
||||
if(departmentMap.get('_withoutDepartment')?.filter(x=>allMemberIds.indexOf(x)!==-1).length === 0 && allMemberSelectedFlag){
|
||||
setAllMemberSelectedDepartIds((pre)=>[...pre, topDepartmentId])
|
||||
}
|
||||
|
||||
return {data:finalData, success: true}
|
||||
}).catch(()=>({data:[], success:false}))
|
||||
}
|
||||
|
||||
|
||||
const getMemberList = ()=>{
|
||||
return fetchData<BasicResponse<{members:TeamMemberTableListItem}>>('team/members',{method:'GET',eoParams:{keyword:searchWord, team:teamId},eoTransformKeys:['attach_time','is_delete']}).then(response=>{
|
||||
@@ -214,7 +218,6 @@ const TeamInsideMember:FC = ()=>{
|
||||
|
||||
|
||||
const changeMemberInfo = (value:string[],entity:TeamMemberTableListItem )=>{
|
||||
//console.log(value)
|
||||
return new Promise((resolve, reject) => {
|
||||
fetchData<BasicResponse<null>>(`team/member/role`, {method: 'PUT',eoBody:({roles:value, users:[entity.user.id]}), eoParams: {team:teamId}}).then(response => {
|
||||
const {code, msg} = response
|
||||
@@ -273,7 +276,6 @@ const TeamInsideMember:FC = ()=>{
|
||||
},[ state.language,roleList])
|
||||
|
||||
useEffect(() => {
|
||||
getRoleList()
|
||||
setBreadcrumb([
|
||||
{title:<Link to="/team/list">{$t('团队')}</Link>},
|
||||
{title:$t('成员')}
|
||||
@@ -281,6 +283,11 @@ const TeamInsideMember:FC = ()=>{
|
||||
manualReloadTable()
|
||||
}, [teamId]);
|
||||
|
||||
|
||||
useEffect(()=>{
|
||||
getRoleList()
|
||||
},[state.language])
|
||||
|
||||
const treeDisabledData = useMemo(()=>{ return [...allMemberIds,...allMemberSelectedDepartIds]},[allMemberIds,allMemberSelectedDepartIds])
|
||||
|
||||
return (
|
||||
@@ -303,7 +310,7 @@ const TeamInsideMember:FC = ()=>{
|
||||
title={$t("添加成员")}
|
||||
open={modalVisible}
|
||||
destroyOnClose={true}
|
||||
width={900}
|
||||
width={600}
|
||||
onCancel={() => cleanModalData()}
|
||||
maskClosable={false}
|
||||
footer={[
|
||||
@@ -330,7 +337,7 @@ const TeamInsideMember:FC = ()=>{
|
||||
const memberKeyFromModal = Array.from(selectedData)?.filter(x => allMemberIds.indexOf(x) === -1 &&selectableMemberIds.has(x)) || [];
|
||||
setAddMemberBtnDisabled((memberKeyFromModal.length === 0));
|
||||
}}
|
||||
searchPlaceholder={$t("搜索用户名、邮箱")}
|
||||
searchPlaceholder={$t("输入名称查找用户")}
|
||||
/>
|
||||
</Modal>
|
||||
</>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
|
||||
import WithPermission from "@common/components/aoplatform/WithPermission";
|
||||
import { $t } from "@common/locales";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
@@ -15,13 +16,13 @@ export default function DashboardInstruction({showClusterIns, showMonitorIns}:{s
|
||||
{showClusterIns && <div className="h-[208px] w-[50%] max-w-[384px] flex flex-col items-center py-[32px] px-[24px] gap-[16px] rounded-DEFAULT bg-MENU_BG mr-[24px] justify-around">
|
||||
<p className="text-[20px] font-medium leading-[32px] text-MAIN_TEXT">{$t('集群配置')}</p>
|
||||
<p className="text-[12px] font-normal leading-[20px] text-DESC_TEXT">{$t('配置集群地址,以确保监控系统能够正确识别和连接到集群')}</p>
|
||||
<p><a href="/cluster" target="_blank">{$t('配置集群信息')}</a></p>
|
||||
<p><WithPermission access="system.settings.api_gateway.view" ><a href="/cluster" target="_blank">{$t('配置集群信息')}</a></WithPermission></p>
|
||||
</div>}
|
||||
{showMonitorIns &&
|
||||
<div className="h-[208px] w-[50%] max-w-[384px] flex flex-col items-center py-[32px] px-[24px] gap-[16px] rounded-DEFAULT bg-MENU_BG justify-around">
|
||||
<p className="text-[20px] font-medium leading-[32px] text-MAIN_TEXT">{$t('监控设置')}</p>
|
||||
<p className="text-[12px] font-normal leading-[20px] text-DESC_TEXT">{$t('设置监控报表的数据来源,设置完成之后即可获得详细的API调用统计图表。')}</p>
|
||||
<p><a href="/datasourcing" target="_blank">{$t('配置监控信息')}</a></p>
|
||||
<p><WithPermission access="system.settings.data_source.view" ><a href="/datasourcing" target="_blank">{$t('配置监控信息')}</a></WithPermission></p>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
@@ -89,10 +89,10 @@ const ServiceHubDetail = ()=>{
|
||||
|
||||
const getMySelectList = ()=>{
|
||||
setMySystemOptionList([])
|
||||
fetchData<BasicResponse<{ apps: SimpleSystemItem[] }>>('simple/apps/mine',{method:'GET'}).then(response=>{
|
||||
fetchData<BasicResponse<{ app: EntityItem[] }>>('apps/can_subscribe',{method:'GET'}).then(response=>{
|
||||
const {code,data,msg} = response
|
||||
if(code === STATUS_CODE.SUCCESS){
|
||||
setMySystemOptionList(data.apps?.map((x:SimpleSystemItem)=>{return {
|
||||
setMySystemOptionList(data.app?.map((x:EntityItem)=>{return {
|
||||
label:x.name, value:x.id
|
||||
}}))
|
||||
}else{
|
||||
|
||||
@@ -8,6 +8,9 @@ import { useFetch } from "@common/hooks/http";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { useTenantManagementContext } from "@market/contexts/TenantManagementContext";
|
||||
import { $t } from "@common/locales";
|
||||
import Select, { DefaultOptionType } from "antd/es/select";
|
||||
import { useGlobalContext } from "@common/contexts/GlobalStateContext";
|
||||
import { SimpleTeamItem, MemberItem } from "@common/const/type";
|
||||
|
||||
export type ManagementConfigFieldType = {
|
||||
name:string
|
||||
@@ -21,6 +24,7 @@ type ManagementConfigProps = {
|
||||
type:'add'|'edit'
|
||||
teamId:string
|
||||
appId?:string
|
||||
dataShowType?:'block'|'list'
|
||||
}
|
||||
|
||||
export type ManagementConfigHandle = {
|
||||
@@ -30,16 +34,18 @@ export type ManagementConfigHandle = {
|
||||
|
||||
const ManagementConfig = forwardRef<ManagementConfigHandle,ManagementConfigProps>((props, ref) => {
|
||||
const { message,modal } = App.useApp()
|
||||
const {type,teamId,appId} = props
|
||||
const {type,teamId,appId,dataShowType} = props
|
||||
const [form] = Form.useForm();
|
||||
const {fetchData} = useFetch()
|
||||
const [delBtnLoading, setDelBtnLoading] = useState<boolean>(false)
|
||||
const {setAppName} = type === 'edit' ? useTenantManagementContext():{setAppName:()=>{}}
|
||||
const navigate = type === 'edit' ? useNavigate() : ()=>{}
|
||||
const [teamOptionList, setTeamOptionList] = useState<DefaultOptionType[]>()
|
||||
const {checkPermission,accessInit, getGlobalAccessData} = useGlobalContext()
|
||||
const save:()=>Promise<boolean | string> = ()=>{
|
||||
return new Promise((resolve, reject)=>{
|
||||
form.validateFields().then((value)=>{
|
||||
fetchData<BasicResponse<{apps:ManagementConfigFieldType}>>(type === 'add'? 'team/app' : 'app/info',{method:type === 'add'? 'POST' : 'PUT',eoBody:(value), eoParams:type === 'add' ? {team:teamId}:{app:appId,team:teamId}}).then(response=>{
|
||||
fetchData<BasicResponse<{apps:ManagementConfigFieldType}>>(type === 'add'? 'team/app' : 'app/info',{method:type === 'add'? 'POST' : 'PUT',eoBody:(value), eoParams:type === 'add' ? {team:dataShowType === 'list' ? value.team : teamId}:{app:appId,team:teamId}}).then(response=>{
|
||||
const {code,data,msg} = response
|
||||
if(code === STATUS_CODE.SUCCESS){
|
||||
message.success(msg || $t(RESPONSE_TIPS.success))
|
||||
@@ -68,6 +74,24 @@ const ManagementConfig = forwardRef<ManagementConfigHandle,ManagementConfigProps
|
||||
})
|
||||
};
|
||||
|
||||
const getTeamOptionList = ()=>{
|
||||
setTeamOptionList([])
|
||||
|
||||
fetchData<BasicResponse<{ teams: SimpleTeamItem[] }>>(!checkPermission('system.workspace.team.view_all') ?'simple/teams/mine' :'simple/teams',{method:'GET',eoTransformKeys:[]}).then(response=>{
|
||||
const {code,data,msg} = response
|
||||
if(code === STATUS_CODE.SUCCESS){
|
||||
setTeamOptionList(data.teams?.map((x:MemberItem)=>{return {...x,
|
||||
label:x.name, value:x.id
|
||||
}}))
|
||||
if(form.getFieldValue('team') === undefined&&data.teams?.length){
|
||||
form.setFieldValue('team',data.teams[0].id);
|
||||
}
|
||||
}else{
|
||||
message.error(msg || $t(RESPONSE_TIPS.error))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const deleteApplicationModal = async ()=>{
|
||||
setDelBtnLoading(true)
|
||||
modal.confirm({
|
||||
@@ -112,7 +136,17 @@ const ManagementConfig = forwardRef<ManagementConfigHandle,ManagementConfigProps
|
||||
if(type === 'edit'){
|
||||
appId && getApplicationInfo()
|
||||
}else{
|
||||
form.setFieldValue('id',uuidv4())
|
||||
form.setFieldsValue({
|
||||
'id':uuidv4()})
|
||||
}
|
||||
if(type !== 'edit' && dataShowType === 'list'){
|
||||
if(accessInit){
|
||||
getTeamOptionList()
|
||||
}else{
|
||||
getGlobalAccessData()?.then?.(()=>{
|
||||
getTeamOptionList()
|
||||
})
|
||||
}
|
||||
}
|
||||
}, [appId]);
|
||||
|
||||
@@ -146,6 +180,16 @@ const ManagementConfig = forwardRef<ManagementConfigHandle,ManagementConfigProps
|
||||
<Input className="w-INPUT_NORMAL" placeholder={$t(PLACEHOLDER.input)} disabled={type === 'edit'}/>
|
||||
</Form.Item>
|
||||
|
||||
|
||||
{dataShowType === 'list' && <Form.Item<ManagementConfigFieldType>
|
||||
label={$t("所属团队")}
|
||||
name="team"
|
||||
rules={[{ required: true }]}
|
||||
>
|
||||
<Select className="w-INPUT_NORMAL" disabled={type === 'edit'} placeholder={$t(PLACEHOLDER.input)} options={teamOptionList} >
|
||||
</Select>
|
||||
</Form.Item>}
|
||||
|
||||
<Form.Item
|
||||
label={$t("描述")}
|
||||
name="description"
|
||||
|
||||
@@ -14,7 +14,9 @@ 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";
|
||||
import { MenuItemGroupType, MenuItemType } from "antd/es/menu/interface";
|
||||
import { PERMISSION_DEFINITION } from "@common/const/permissions";
|
||||
import { cloneDeep } from "lodash-es";
|
||||
|
||||
export default function ManagementInsidePage(){
|
||||
const { message } = App.useApp()
|
||||
@@ -27,17 +29,29 @@ export default function ManagementInsidePage(){
|
||||
const [openKeys, setOpenKeys] = useState<string[]>([])
|
||||
const [loading, setLoading] = useState<boolean>(false)
|
||||
const {appName,setAppName} = useTenantManagementContext()
|
||||
const {getTeamAccessData,cleanTeamAccessData,state} = useGlobalContext()
|
||||
const {getTeamAccessData,cleanTeamAccessData,state,accessData,checkPermission,accessInit} = useGlobalContext()
|
||||
|
||||
const TENANT_MANAGEMENT_APP_MENU: MenuProps['items'] = useMemo(()=>[
|
||||
getItem($t('订阅的服务'), 'service'),
|
||||
getItem($t('访问授权'), 'authorization'),
|
||||
getItem($t('消费者管理'), 'setting'),
|
||||
getItem($t('订阅的服务'), 'service',undefined, undefined, undefined, 'team.application.subscription.view'),
|
||||
getItem($t('访问授权'), 'authorization',undefined, undefined, undefined, 'team.consumer.authorization.view'),
|
||||
getItem($t('消费者管理'), 'setting',undefined, undefined, undefined, 'team.application.application.view'),
|
||||
],[state.language])
|
||||
|
||||
|
||||
const menuData = useMemo(()=>{
|
||||
return TENANT_MANAGEMENT_APP_MENU
|
||||
},[])
|
||||
const filterMenu = (menu:(MenuItemType&{access:string})[])=>{
|
||||
const newMenu = cloneDeep(menu)
|
||||
return newMenu!.filter((c:MenuItemType&{access:string} )=>{
|
||||
if(!c) return false
|
||||
return (((c as MenuItemType&{access:string} ).access ?
|
||||
checkPermission((c as MenuItemType&{access:string} ).access as keyof typeof PERMISSION_DEFINITION[0]):
|
||||
true))
|
||||
})}
|
||||
const filteredMenu = filterMenu(TENANT_MANAGEMENT_APP_MENU as (MenuItemType&{access:string})[])
|
||||
const menu = activeMenu ?? filteredMenu[0]?.children ? filteredMenu[0]?.children?.[0]?.key : filteredMenu[0]?.key
|
||||
if(menu && currentUrl.split('/')[-1] !== menu) navigateTo(`/consumer/${teamId}/inside/${appId}/${menu}`)
|
||||
return filteredMenu || []
|
||||
},[accessData,accessInit, TENANT_MANAGEMENT_APP_MENU])
|
||||
|
||||
useEffect(()=>{
|
||||
setActiveMenu(currentUrl.split('/').pop() || 'service')
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { MenuProps, Menu, App, Avatar, Card, Tooltip, Empty, Button, Radio } from "antd";
|
||||
import { useState, forwardRef, useEffect, useRef, useMemo, memo } from "react";
|
||||
import { useState, forwardRef, useEffect, useRef, useMemo, memo, Ref, useImperativeHandle } from "react";
|
||||
import { VirtuosoGrid } from "react-virtuoso";
|
||||
import { BasicResponse, DATA_SHOW_TYPE_OPTIONS, RESPONSE_TIPS, STATUS_CODE } from "@common/const/const";
|
||||
import { ServiceHubAppListItem } from "../../../const/serviceHub/type";
|
||||
@@ -17,6 +17,7 @@ import WithPermission from "@common/components/aoplatform/WithPermission";
|
||||
import InsidePage from "@common/components/aoplatform/InsidePage";
|
||||
import PageList from "@common/components/aoplatform/PageList";
|
||||
import { SERVICE_HUB_TABLE_COLUMNS } from "@market/const/serviceHub/const";
|
||||
import { ActionType } from "@ant-design/pro-components";
|
||||
|
||||
export default function ServiceHubManagement() {
|
||||
const { message ,modal} = App.useApp()
|
||||
@@ -36,23 +37,24 @@ export default function ServiceHubManagement() {
|
||||
const [tableHttpReload, setTableHttpReload] = useState(true);
|
||||
const [tableListDataSource, setTableListDataSource] = useState<ServiceHubAppListItem[]>([]);
|
||||
const [tableSearchWord, setTableSearchWord] = useState<string>('')
|
||||
const tableRef = useRef<TableAreaHandle>(null)
|
||||
|
||||
const getServiceList = (dataType?:'block'|'list')=>{
|
||||
dataType = dataType ?? dataShowType
|
||||
if(!accessInit){
|
||||
getGlobalAccessData()?.then?.(()=>{getServiceList(dataType)})
|
||||
return Promise.resolve({data:[], success:false})
|
||||
}
|
||||
const getServiceList = (dataType?:'block'|'list')=>{
|
||||
dataType = dataType ?? dataShowType
|
||||
if(!accessInit){
|
||||
getGlobalAccessData()?.then?.(()=>{getServiceList(dataType)})
|
||||
return Promise.resolve({data:[], success:false})
|
||||
}
|
||||
|
||||
if(dataType === 'list' && !tableHttpReload){
|
||||
setTableHttpReload(true)
|
||||
return Promise.resolve({
|
||||
data: tableListDataSource,
|
||||
success: true,
|
||||
});
|
||||
}
|
||||
|
||||
if(dataType === 'list' && !tableHttpReload){
|
||||
setTableHttpReload(true)
|
||||
return Promise.resolve({
|
||||
data: tableListDataSource,
|
||||
success: true,
|
||||
});
|
||||
}
|
||||
|
||||
setServiceLoading(true)
|
||||
setServiceLoading(true)
|
||||
return fetchData<BasicResponse<{apps:ServiceHubAppListItem}>>(!checkPermission('system.workspace.application.view_all') ? 'my_apps':'apps',{method:'GET',eoParams:{ team: dataType === 'list' ? undefined : teamId,keyword:tableSearchWord},eoTransformKeys:['api_num','subscribe_num','subscribe_verify_num','auth_num','create_time','can_delete']}).then(response=>{
|
||||
const {code,data,msg} = response
|
||||
if(code === STATUS_CODE.SUCCESS){
|
||||
@@ -142,13 +144,12 @@ const getServiceList = (dataType?:'block'|'list')=>{
|
||||
|
||||
|
||||
const openModal = async (type:'add'|'edit'|'delete')=>{
|
||||
|
||||
let title:string = ''
|
||||
let content:string|React.ReactNode = ''
|
||||
switch (type){
|
||||
case 'add':
|
||||
title=$t('添加消费者')
|
||||
content=<ManagementConfig ref={addManagementRef} type={type} teamId={teamId!} />
|
||||
content=<ManagementConfig ref={addManagementRef} dataShowType={dataShowType} type={type} teamId={teamId!} />
|
||||
break;
|
||||
// case 'edit':{
|
||||
// title='配置 Open Api'
|
||||
@@ -174,7 +175,15 @@ const getServiceList = (dataType?:'block'|'list')=>{
|
||||
onOk:()=> {
|
||||
switch (type){
|
||||
case 'add':
|
||||
return addManagementRef.current?.save().then((res)=>{if(res === true) getTeamsList();getServiceList()})
|
||||
return addManagementRef.current?.save().then((res)=>{if(res === true) {
|
||||
getTeamsList();
|
||||
if(dataShowType === 'list'){
|
||||
setTableHttpReload(true)
|
||||
tableRef.current?.manualReloadTable()
|
||||
}else{
|
||||
getServiceList()
|
||||
}
|
||||
}})
|
||||
// case 'edit':
|
||||
// return editManagementRef.current?.save().then((res)=>{if(res === true) manualReloadTable()})
|
||||
// case 'delete':
|
||||
@@ -291,7 +300,7 @@ useEffect(() => {
|
||||
buttonStyle="solid"
|
||||
/>}
|
||||
>{
|
||||
dataShowType === 'block' ? <BlockArea /> : <TableArea language={state.language} getServiceList={()=>getServiceList('list')} addNewApp={()=>openModal('add')} setTableHttpReload={setTableHttpReload} setTableSearchWord={setTableSearchWord} editApp={(row:ServiceHubAppListItem)=>{setAppName(row.name);navigateTo(`/consumer/${row.team.id}/inside/${row.id}/service`)}}/>
|
||||
dataShowType === 'block' ? <BlockArea /> : <TableArea language={state.language} getServiceList={()=>getServiceList('list')} ref={tableRef} addNewApp={()=>openModal('add')} setTableHttpReload={setTableHttpReload} setTableSearchWord={setTableSearchWord} editApp={(row:ServiceHubAppListItem)=>{setAppName(row.name);navigateTo(`/consumer/${row.team.id}/inside/${row.id}/service`)}}/>
|
||||
}
|
||||
</InsidePage> :
|
||||
<Empty className="mt-[100px]" image={Empty.PRESENTED_IMAGE_SIMPLE} />
|
||||
@@ -325,16 +334,31 @@ type TableAreaProps = {
|
||||
editApp:(item:ServiceHubAppListItem)=>void
|
||||
}
|
||||
|
||||
const TableArea = memo(({language, getServiceList, addNewApp, setTableHttpReload, setTableSearchWord, editApp}:TableAreaProps)=>{
|
||||
type TableAreaHandle = {
|
||||
manualReloadTable:()=>void
|
||||
}
|
||||
|
||||
const TableArea = memo(forwardRef((props:TableAreaProps, ref:Ref<TableAreaHandle>)=>{
|
||||
const {language, getServiceList, addNewApp, setTableHttpReload, setTableSearchWord, editApp} = props
|
||||
const pageListRef = useRef<ActionType>(null);
|
||||
const columns = useMemo(()=>{
|
||||
const res = SERVICE_HUB_TABLE_COLUMNS.map(x=>{
|
||||
return {...x,title:typeof x.title === 'string' ? $t(x.title as string) : x.title}})
|
||||
return res
|
||||
},[language])
|
||||
|
||||
const manualReloadTable = ()=>{
|
||||
pageListRef.current?.reload()
|
||||
}
|
||||
|
||||
useImperativeHandle(ref, () =>({
|
||||
manualReloadTable}))
|
||||
|
||||
|
||||
return (
|
||||
<PageList
|
||||
id="service_hub_list"
|
||||
ref={pageListRef}
|
||||
columns={[...columns]}
|
||||
request={()=>getServiceList()}
|
||||
addNewBtnTitle={$t("添加消费者")}
|
||||
@@ -348,4 +372,4 @@ const TableArea = memo(({language, getServiceList, addNewApp, setTableHttpReload
|
||||
}}
|
||||
onRowClick={(row:ServiceHubAppListItem)=>editApp(row)}
|
||||
/>
|
||||
)})
|
||||
)}))
|
||||
@@ -1,44 +1,46 @@
|
||||
{
|
||||
"account": "Account",
|
||||
"ai provider": "AI Provider",
|
||||
"api market": "API Portal",
|
||||
"analysis": "Analysis Report",
|
||||
"api": "API",
|
||||
"api doc": "API Documentation",
|
||||
"application": "Application",
|
||||
"application admin": "Application Administrator",
|
||||
"application developer": "Application Developer",
|
||||
"authorization": "Authorization",
|
||||
"cluster": "Cluster",
|
||||
"dashboard": "Dashboard",
|
||||
"api gateway": "API Gateway",
|
||||
"api portal": "API Portal",
|
||||
"authorization": "Access Authorization",
|
||||
"consumer": "Consumer",
|
||||
"consumer admin": "Consumer Admin",
|
||||
"consumer developer": "Consumer Developer",
|
||||
"create": "Create",
|
||||
"data source": "Data Source",
|
||||
"devops": "DevOps",
|
||||
"devops admin": "DevOps Administrator",
|
||||
"devops admin": "DevOps Admin",
|
||||
"general": "General Settings",
|
||||
"general member": "General Member",
|
||||
"guest": "Guest",
|
||||
"log configuration": "Log Configuration",
|
||||
"manager": "Manager",
|
||||
"manager all consumer": "Manage All Consumers",
|
||||
"manager subscribed services": "Manage Subscribed Services",
|
||||
"member": "Member",
|
||||
"organization": "Organization Management",
|
||||
"release": "Release",
|
||||
"role": "Role",
|
||||
"router": "Router",
|
||||
"run view": "Run View",
|
||||
"service": "Service",
|
||||
"service admin": "Service Administrator",
|
||||
"service classification": "Service Directory",
|
||||
"service admin": "Service Admin",
|
||||
"service developer": "Service Developer",
|
||||
"service intro": "Service Documentation",
|
||||
"ssl certificate": "SSL Certificate",
|
||||
"subscription management": "Subscription Management",
|
||||
"allow subscribe service": "Allow Subscribe Service",
|
||||
"subscription review": "Subscription Review",
|
||||
"subscription service": "Subscription Service",
|
||||
"super admin": "Super Administrator",
|
||||
"super admin": "Super Admin",
|
||||
"system settings": "System Settings",
|
||||
"team": "Team",
|
||||
"team admin": "Team Administrator",
|
||||
"team settings": "Team Settings",
|
||||
"team admin": "Team Admin",
|
||||
"upstream": "Upstream",
|
||||
"view": "View",
|
||||
"view all application": "View All Applications",
|
||||
"view all consumer": "View All Consumers",
|
||||
"view all service": "View All Services",
|
||||
"view all team": "View All Teams",
|
||||
"view system role": "View System Roles",
|
||||
"view team role": "View Team Roles",
|
||||
"view subscribed services": "View Subscribed Services",
|
||||
"workspace": "Workspace"
|
||||
}
|
||||
|
||||
@@ -1,44 +1,46 @@
|
||||
{
|
||||
"account": "アカウント",
|
||||
"ai provider": "AIプロバイダー",
|
||||
"api market": "APIマーケット",
|
||||
"analysis": "分析レポート",
|
||||
"api": "API",
|
||||
"api doc": "APIドキュメント",
|
||||
"application": "アプリケーション",
|
||||
"application admin": "アプリケーション管理者",
|
||||
"application developer": "アプリケーション開発者",
|
||||
"authorization": "認証",
|
||||
"cluster": "クラスター",
|
||||
"dashboard": "ダッシュボード",
|
||||
"api gateway": "APIゲートウェイ",
|
||||
"api portal": "APIポータル",
|
||||
"authorization": "アクセス許可",
|
||||
"consumer": "消費者",
|
||||
"consumer admin": "消費者管理者",
|
||||
"consumer developer": "消費者開発者",
|
||||
"create": "作成",
|
||||
"data source": "データソース",
|
||||
"devops": "DevOps",
|
||||
"devops admin": "DevOps管理者",
|
||||
"general": "一般設定",
|
||||
"general member": "一般メンバー",
|
||||
"guest": "ゲスト",
|
||||
"log configuration": "ログ設定",
|
||||
"manager": "管理者",
|
||||
"manager all consumer": "すべての消費者を管理",
|
||||
"manager subscribed services": "購読したサービスを管理",
|
||||
"member": "メンバー",
|
||||
"organization": "組織管理",
|
||||
"release": "リリース",
|
||||
"role": "役割",
|
||||
"router": "ルーター",
|
||||
"run view": "実行ビュー",
|
||||
"service": "サービス",
|
||||
"service admin": "サービス管理者",
|
||||
"service classification": "サービスディレクトリ",
|
||||
"service developer": "サービス開発者",
|
||||
"service intro": "サービスドキュメント",
|
||||
"ssl certificate": "SSL証明書",
|
||||
"subscription management": "サブスクリプション管理",
|
||||
"subscription service": "サブスクリプションサービス",
|
||||
"allow subscribe service": "サービスの購読を許可",
|
||||
"subscription review": "購読レビュー",
|
||||
"subscription service": "購読サービス",
|
||||
"super admin": "スーパ管理者",
|
||||
"system settings": "システム設定",
|
||||
"team": "チーム",
|
||||
"team settings": "チーム設定",
|
||||
"team admin": "チーム管理者",
|
||||
"upstream": "アップストリーム",
|
||||
"view": "表示",
|
||||
"view all application": "すべてのアプリケーションを表示",
|
||||
"view all consumer": "すべての消費者を表示",
|
||||
"view all service": "すべてのサービスを表示",
|
||||
"view all team": "すべてのチームを表示",
|
||||
"view system role": "システム役割を表示",
|
||||
"view team role": "チーム役割を表示",
|
||||
"view subscribed services": "購読したサービスを表示",
|
||||
"workspace": "ワークスペース"
|
||||
}
|
||||
|
||||
@@ -1,44 +1,46 @@
|
||||
{
|
||||
"ai provider": "AI供應商",
|
||||
"api market": "API市場",
|
||||
"account": "帳號",
|
||||
"ai provider": "AI模型供應商",
|
||||
"analysis": "分析報告",
|
||||
"api": "API",
|
||||
"api doc": "API文檔",
|
||||
"application": "應用",
|
||||
"application admin": "應用管理員",
|
||||
"application developer": "應用開發者",
|
||||
"authorization": "授權",
|
||||
"cluster": "集群",
|
||||
"dashboard": "儀表盤",
|
||||
"api gateway": "API網關",
|
||||
"api portal": "API門戶",
|
||||
"authorization": "訪問授權",
|
||||
"consumer": "消費者",
|
||||
"consumer admin": "消費者管理員",
|
||||
"consumer developer": "消費者開發者",
|
||||
"create": "創建",
|
||||
"data source": "數據源",
|
||||
"devops": "運維",
|
||||
"devops admin": "運維管理員",
|
||||
"general": "常規設置",
|
||||
"general member": "普通成員",
|
||||
"guest": "訪客",
|
||||
"log configuration": "日誌配置",
|
||||
"manager": "管理",
|
||||
"manager all consumer": "管理所有消費者",
|
||||
"manager subscribed services": "管理已訂閱的服務",
|
||||
"member": "成員",
|
||||
"organization": "組織管理",
|
||||
"release": "發布",
|
||||
"role": "角色",
|
||||
"router": "路由",
|
||||
"run view": "運行視圖",
|
||||
"service": "服務",
|
||||
"service admin": "服務管理員",
|
||||
"service classification": "服務目錄",
|
||||
"service developer": "服務開發者",
|
||||
"service intro": "服務文檔",
|
||||
"ssl certificate": "SSL證書",
|
||||
"subscription management": "訂閱方管理",
|
||||
"allow subscribe service": "允許訂閱服務",
|
||||
"subscription review": "訂閱審核",
|
||||
"subscription service": "訂閱服務",
|
||||
"super admin": "超級管理員",
|
||||
"system settings": "系統設置",
|
||||
"team": "團隊",
|
||||
"team settings": "團隊設置",
|
||||
"team admin": "團隊管理員",
|
||||
"upstream": "上游",
|
||||
"view": "查看",
|
||||
"view all application": "查看所有應用",
|
||||
"view all consumer": "查看所有消費者",
|
||||
"view all service": "查看所有服務",
|
||||
"view all team": "查看所有團隊",
|
||||
"view system role": "查看系統角色",
|
||||
"view team role": "查看團隊角色",
|
||||
"view subscribed services": "查看已訂閱的服務",
|
||||
"workspace": "工作空間"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user