mirror of
https://github.com/APIParkLab/APIPark.git
synced 2026-06-04 10:13:53 +08:00
前端代码更新
This commit is contained in:
@@ -28,6 +28,6 @@
|
||||
"@businessEntry/*": ["./src/*"],
|
||||
},
|
||||
},
|
||||
"include": ["src", "public/iconpark_eolink.js", "public/iconpark_apinto.js", "../common/src/component/aoplatform/EditableTableWithModal.tsx", "../common/src/components/aoplatform/TransferTable.tsx", "../common/src/components/aoplatform/TreeWithMore.tsx", "../common/src/components/aoplatform/DatePicker.tsx", "../common/src/components/aoplatform/TimeRangeSelector.tsx", "../common/src/components/aoplatform/TimePicker.tsx", "../common/src/components/aoplatform/MemberTransfer.tsx", "../common/src/components/aoplatform/Navigation.tsx", "../common/src/components/aoplatform/PageList.tsx", "../common/src/components/aoplatform/GroupTree.tsx", "../common/src/components/aoplatform/ErrorBoundary.tsx", "../common/src/components/aoplatform/ScrollableSection.tsx", "../common/src/utils/postcat.tsx", "../common/src/utils/curl.ts", "../common/src/components/aoplatform/ResetPsw.tsx", "../common/src/components/aoplatform/SubscribeApprovalModalContent.tsx", "../common/src/components/aoplatform/InsidePageForHub.tsx", "src/components/aoplatform/RenderRoutes.tsx", "../common/src/components/aoplatform/PublishApprovalModalContent.tsx", "../common/src/components/aoplatform/InsidePage.tsx", "../common/src/const/type.ts", "../common/src/components/aoplatform/intelligent-plugin", "../common/src/const/domain"],
|
||||
"include": ["src", "public/iconpark_eolink.js", "public/iconpark_apinto.js", "../common/src/component/aoplatform/EditableTableWithModal.tsx", "../common/src/components/aoplatform/TransferTable.tsx", "../common/src/components/aoplatform/TreeWithMore.tsx", "../common/src/components/aoplatform/DatePicker.tsx", "../common/src/components/aoplatform/TimeRangeSelector.tsx", "../common/src/components/aoplatform/TimePicker.tsx", "../common/src/components/aoplatform/MemberTransfer.tsx", "../common/src/components/aoplatform/Navigation.tsx", "../common/src/components/aoplatform/PageList.tsx", "../common/src/components/aoplatform/GroupTree.tsx", "../common/src/components/aoplatform/ErrorBoundary.tsx", "../common/src/components/aoplatform/ScrollableSection.tsx", "../common/src/utils/postcat.tsx", "../common/src/utils/curl.ts", "../common/src/components/aoplatform/ResetPsw.tsx", "../common/src/components/aoplatform/SubscribeApprovalModalContent.tsx", "src/components/aoplatform/RenderRoutes.tsx", "../common/src/components/aoplatform/PublishApprovalModalContent.tsx", "../common/src/components/aoplatform/InsidePage.tsx", "../common/src/const/type.ts", "../common/src/components/aoplatform/intelligent-plugin", "../common/src/const/domain"],
|
||||
"references": [{ "path": "./tsconfig.node.json" }]
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ const themeToken = {
|
||||
{
|
||||
key: '3',
|
||||
label: (
|
||||
<a className="block px-btnbase leading-[32px]" target="_blank" rel="noopener noreferrer" onClick={logOut}>
|
||||
<a className="block leading-[32px]" target="_blank" rel="noopener noreferrer" onClick={logOut}>
|
||||
退出登录
|
||||
</a>
|
||||
),
|
||||
@@ -259,7 +259,7 @@ const themeToken = {
|
||||
collapsed={false}
|
||||
collapsedButtonRender={false}
|
||||
>
|
||||
<div className={`w-full h-calc-100vh-minus-navbar px-[40px] pt-[30px] ${currentUrl.startsWith('/role/list') ? 'overflow-auto' : 'overflow-hidden' }`}>
|
||||
<div className={`w-full h-calc-100vh-minus-navbar px-PAGE_INSIDE_X pt-PAGE_INSIDE_T ${currentUrl.startsWith('/role/list') ? 'overflow-auto' : 'overflow-hidden' }`}>
|
||||
<Outlet />
|
||||
</div>
|
||||
</ProLayout>
|
||||
|
||||
@@ -34,8 +34,11 @@ export function DrawerWithFooter(props:DrawerWithFooterProps){
|
||||
width="60%"
|
||||
destroyOnClose={true}
|
||||
maskClosable={false}
|
||||
classNames={
|
||||
{footer:'text-right'}
|
||||
}
|
||||
footer={
|
||||
<Space >
|
||||
<Space className="flex flex-end" style={{justifyContent:'flex-end'}}>
|
||||
{showOkBtn && <WithPermission access={submitAccess}>
|
||||
<Button onClick={handlerSubmit} type="primary" loading={submitLoading} disabled={submitDisabled}>
|
||||
{okBtnTitle}
|
||||
|
||||
@@ -17,9 +17,14 @@ class InsidePageProps {
|
||||
onBtnClick?:()=>void
|
||||
backUrl?:string = '/'
|
||||
btnAccess?:string
|
||||
showBorder?:boolean = true
|
||||
className?:string = ''
|
||||
contentClassName?:string=''
|
||||
/** 整个页面滚动 */
|
||||
scrollPage?:boolean = true
|
||||
}
|
||||
|
||||
const InsidePage:FC<InsidePageProps> = ({showBanner=true,pageTitle,tagList,showBtn,btnTitle,btnAccess,description,children,onBtnClick,backUrl})=>{
|
||||
const InsidePage:FC<InsidePageProps> = ({showBanner=true,pageTitle,tagList,showBtn,btnTitle,btnAccess,description,children,onBtnClick,backUrl,showBorder=true,className='',scrollPage=true})=>{
|
||||
const navigate = useNavigate();
|
||||
|
||||
const goBack = () => {
|
||||
@@ -27,27 +32,29 @@ const InsidePage:FC<InsidePageProps> = ({showBanner=true,pageTitle,tagList,showB
|
||||
};
|
||||
return (
|
||||
// <div className="h-full flex flex-col flex-1 overflow-hidden bg-[#f7f8fa]">
|
||||
<div className="h-full flex flex-col flex-1 overflow-hidden ">
|
||||
{ showBanner && <div className=" mx-[4px] border-[0px] border-b-[1px] border-solid border-BORDER">
|
||||
{backUrl &&<div className="text-[18px] leading-[25px] pb-[12px]">
|
||||
<Button type="text" onClick={goBack}><ArrowLeftOutlined className="max-h-[14px]" />返回</Button>
|
||||
</div>}
|
||||
<div className="flex justify-between">
|
||||
<div className="flex items-center">
|
||||
<p className="text-theme text-[26px] pr-[10px]">{pageTitle}</p>
|
||||
{tagList && tagList?.length > 0 && tagList?.map((tag)=>{
|
||||
return ( <Tag className="" key={tag.label as string} bordered={false} >{tag.label}</Tag>)
|
||||
})}
|
||||
<div className={`h-full flex flex-col flex-1 overflow-hidden ${className}`}>
|
||||
{ showBanner && <div className={`border-[0px] ${showBorder ? 'border-b-[1px] border-solid border-BORDER' : ''}`}>
|
||||
<div className="mb-[30px]">
|
||||
{backUrl &&<div className="text-[18px] leading-[25px] mb-[12px]">
|
||||
<Button type="text" onClick={goBack}><ArrowLeftOutlined className="max-h-[14px]" />返回</Button>
|
||||
</div>}
|
||||
<div className="flex justify-between mb-[20px] items-center ">
|
||||
<div className="flex items-center gap-TAG_LEFT ">
|
||||
<p className="text-theme text-[26px] ">{pageTitle}</p>
|
||||
{tagList && tagList?.length > 0 && tagList?.map((tag)=>{
|
||||
return ( <Tag key={tag.label as string} bordered={false} >{tag.label}</Tag>)
|
||||
})}
|
||||
</div>
|
||||
{showBtn && <WithPermission access={btnAccess}><Button type="primary" onClick={()=> {
|
||||
onBtnClick&&onBtnClick()
|
||||
}}>{btnTitle}</Button></WithPermission>}
|
||||
</div>
|
||||
{showBtn && <WithPermission access={btnAccess}><Button type="primary" onClick={()=> {
|
||||
onBtnClick&&onBtnClick()
|
||||
}}>{btnTitle}</Button></WithPermission>}
|
||||
<p >
|
||||
{description}
|
||||
</p>
|
||||
</div>
|
||||
<p className="mb-[30px]">
|
||||
{description}
|
||||
</p>
|
||||
</div>}
|
||||
<div className="h-full overflow-y-hidden">{children}</div>
|
||||
<div className={`h-full ${scrollPage ? 'overflow-hidden' : 'overflow-auto'}`}>{children}</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
|
||||
import { Button, Tag } from "antd"
|
||||
import {useNavigate} from "react-router-dom";
|
||||
import WithPermission from "@common/components/aoplatform/WithPermission";
|
||||
import { FC, ReactNode } from "react";
|
||||
import { ArrowLeftOutlined } from "@ant-design/icons";
|
||||
|
||||
|
||||
class InsidePageProps {
|
||||
showBanner?:boolean = true
|
||||
pageTitle:string = ''
|
||||
tagList?:Array<{label:string|ReactNode}> = []
|
||||
children:React.ReactNode
|
||||
showBtn?:boolean = false
|
||||
btnTitle?:string = ''
|
||||
description?:string = ''
|
||||
onBtnClick?:()=>void
|
||||
backUrl:string = '/'
|
||||
btnAccess?:string
|
||||
}
|
||||
|
||||
const InsidePageForHub:FC<InsidePageProps> = ({showBanner=true,pageTitle,tagList,showBtn,btnTitle,btnAccess,description,children,onBtnClick,backUrl})=>{
|
||||
const navigate = useNavigate();
|
||||
|
||||
const goBack = () => {
|
||||
navigate(backUrl);
|
||||
};
|
||||
return (
|
||||
<div className="h-full flex flex-col flex-1 overflow-hidden max-w-[1500px] m-auto">
|
||||
{ showBanner && <div className="p-btnbase mx-[4px]">
|
||||
<div className="text-[18px] leading-[25px] pb-[12px]">
|
||||
<Button type="text" onClick={goBack}><ArrowLeftOutlined className="max-h-[14px]" />返回</Button>
|
||||
</div>
|
||||
<div className="flex justify-between">
|
||||
<div className="">
|
||||
<span className="text-[26px] text-theme">{pageTitle}</span>
|
||||
{tagList && tagList?.length > 0 && tagList?.map((tag)=>{
|
||||
return ( <Tag key={tag.label as string} bordered={false}>{tag.label}</Tag>)
|
||||
})}
|
||||
</div>
|
||||
{showBtn && <WithPermission access={btnAccess}><Button type="primary" onClick={()=> {
|
||||
onBtnClick&&onBtnClick()
|
||||
}}>{btnTitle}</Button></WithPermission>}
|
||||
</div>
|
||||
<p className="mb-[30px]">
|
||||
{description}
|
||||
</p>
|
||||
</div>}
|
||||
<div className="h-full overflow-y-hidden">{children}</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default InsidePageForHub
|
||||
@@ -4,7 +4,6 @@
|
||||
}
|
||||
|
||||
:global .eo_page_list .ant-pro-table-list-toolbar-container{
|
||||
padding:10px 20px 10px 10px !important;
|
||||
|
||||
.ant-pro-table-list-toolbar-right{
|
||||
justify-content: flex-start;
|
||||
|
||||
@@ -77,7 +77,7 @@ const PageList = <T extends Record<string, unknown>>(props: React.PropsWithChild
|
||||
const handleResize = () => {
|
||||
if (parentRef.current && !noScroll) {
|
||||
const res = parentRef.current.getBoundingClientRect();
|
||||
const height = res.height - ((noTop ? 0 : 52) + 40 + (showPagination && !dragSortKey ? 52 : 0) +( besidesTableHeight ?? 0)); // 减去顶部按钮、底部分页、表头高度
|
||||
const height = res.height - ((noTop ? 0 : 59) + 54 + (showPagination && !dragSortKey ? 52 : 0) +( besidesTableHeight ?? 0) + 1); // 减去顶部按钮、底部分页、表头高度
|
||||
setTableWidth(minTableWidth > res.width ? minTableWidth : undefined);
|
||||
height && setTableHeight(minVirtualHeight === undefined ? height : (height > minVirtualHeight ? height : minVirtualHeight));
|
||||
}
|
||||
@@ -112,11 +112,11 @@ const PageList = <T extends Record<string, unknown>>(props: React.PropsWithChild
|
||||
const newColumns = useMemo(()=>{
|
||||
let width:number = 0
|
||||
const res = columns?.map(
|
||||
(x)=>{
|
||||
(x, index)=>{
|
||||
width += Number(x.width ?? ((x.filters || x.sorter) ? 120 : 100))
|
||||
x.copyable = x.copyable === false? false: true
|
||||
const sorter = localStorage.getItem(`${id}_sorter`)
|
||||
const filters = localStorage.getItem(`${id}_filters`)
|
||||
x.copyable = x.copyable ?? (index === 0 || x.dataIndex === 'id' || x.dataIndex === 'email')
|
||||
if(sorter && x.sorter){
|
||||
const sorterObj = JSON.parse(sorter)
|
||||
const xName = Array.isArray(x.dataIndex) ? x.dataIndex.join(','):x.dataIndex
|
||||
@@ -137,7 +137,7 @@ const PageList = <T extends Record<string, unknown>>(props: React.PropsWithChild
|
||||
return (
|
||||
<>{
|
||||
tableTitle ? <span className={`text-[30px] leading-[42px] my-mbase pl-[20px] ${tableTitleClass}`}>{tableTitle}</span> : (
|
||||
addNewBtnTitle ? <WithPermission access={addNewBtnAccess} ><Button type="primary" className={`mr-btnbase ${addNewBtnWrapperClass}`} onClick={onAddNewBtnClick}>{addNewBtnTitle}</Button></WithPermission> : undefined
|
||||
addNewBtnTitle ? <WithPermission access={addNewBtnAccess} ><Button type="primary" className={`mr-btnrbase my-btnbase ${addNewBtnWrapperClass}`} onClick={onAddNewBtnClick}>{addNewBtnTitle}</Button></WithPermission> : undefined
|
||||
)
|
||||
|
||||
}
|
||||
@@ -191,7 +191,7 @@ const PageList = <T extends Record<string, unknown>>(props: React.PropsWithChild
|
||||
</Dropdown>):null,
|
||||
]}
|
||||
toolbar={{
|
||||
actions:[...[beforeSearchNode],...[searchPlaceholder?<Input className="" onChange={ onSearchWordChange ? (e) => debounce(onSearchWordChange, 100)(e) : undefined } onPressEnter={()=>manualReloadTable ? manualReloadTable():actionRef.current?.reload?.()} allowClear placeholder={searchPlaceholder} prefix={<SearchOutlined className="cursor-pointer" onClick={()=>{actionRef.current?.reload?.()}}/>}/>:null]],
|
||||
actions:[...[beforeSearchNode],...[searchPlaceholder?<Input className="my-btnbase ml-btnbase" onChange={ onSearchWordChange ? (e) => debounce(onSearchWordChange, 100)(e) : undefined } onPressEnter={()=>manualReloadTable ? manualReloadTable():actionRef.current?.reload?.()} allowClear placeholder={searchPlaceholder} prefix={<SearchOutlined className="cursor-pointer" onClick={()=>{actionRef.current?.reload?.()}}/>}/>:null]],
|
||||
}}
|
||||
options={{
|
||||
reload: false,
|
||||
|
||||
@@ -26,19 +26,16 @@ const apiColumns = [
|
||||
{
|
||||
title:'API 名称',
|
||||
dataIndex:'name',
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title:'请求方式',
|
||||
dataIndex:'method',
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title:'路径',
|
||||
dataIndex:'path',
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
@@ -77,7 +74,6 @@ const upstreamColumns = [
|
||||
title:'地址',
|
||||
dataIndex:'addr',
|
||||
render:(text:string[])=>(<>{text.join(',')}</>),
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
@@ -265,7 +261,7 @@ export const PublishApprovalModalContent = forwardRef<PublishApprovalModalHandle
|
||||
>
|
||||
<Input.TextArea className="w-INPUT_NORMAL" disabled={type !== 'add' && type !== 'publish'} placeholder="请输入" />
|
||||
</Form.Item>
|
||||
|
||||
{/*
|
||||
{type !== 'add' && type !== 'publish' && <Form.Item
|
||||
label="审批意见"
|
||||
name="opinion"
|
||||
@@ -277,7 +273,7 @@ export const PublishApprovalModalContent = forwardRef<PublishApprovalModalHandle
|
||||
errors: [], // 设置为空数组来移除错误信息
|
||||
},
|
||||
]);}}/>
|
||||
</Form.Item>}
|
||||
</Form.Item>} */}
|
||||
|
||||
{['error','done'].indexOf(data.status) !== -1 && data.clusterPublishStatus &&data.clusterPublishStatus.length > 0 && <> <Row className="text-left h-[32px] mb-8px]" span={3}><span>上线情况:</span></Row>
|
||||
<Row span={24} className="mb-mbase">
|
||||
|
||||
@@ -70,7 +70,7 @@ const UserAvatar: FC = () => {
|
||||
{
|
||||
key: '3',
|
||||
label: (
|
||||
<a className="block px-btnbase leading-[32px]" target="_blank" rel="noopener noreferrer" onClick={logOut}>
|
||||
<a className="block leading-[32px]" target="_blank" rel="noopener noreferrer" onClick={logOut}>
|
||||
退出登录
|
||||
</a>
|
||||
),
|
||||
|
||||
@@ -27,13 +27,13 @@ const WithPermission = ({access, tooltip, children,disabled}:WithPermissionProps
|
||||
disabled && setEditAccess(false)
|
||||
},[lastAccess,disabled])
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
{editAccess ? cloneElement(children):
|
||||
<Tooltip title={tooltip ?? "暂无操作权限,请联系管理员分配。"}>
|
||||
{ cloneElement(children, {disabled:true})}
|
||||
</Tooltip>
|
||||
}
|
||||
{editAccess ? cloneElement(children): children?.type?.displayName !== 'Button' && <Tooltip title={tooltip ?? "暂无操作权限,请联系管理员分配。"}>
|
||||
{ cloneElement(children, {disabled:true})}
|
||||
</Tooltip>
|
||||
}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
+3
-2
@@ -46,6 +46,7 @@ import {createSchemaField, FormProvider, RecursionField, useField, useForm} from
|
||||
import {BasicResponse, STATUS_CODE} from "@common/const/const.ts";
|
||||
import {useFetch} from "@common/hooks/http.ts";
|
||||
import {App} from "antd";
|
||||
import { config } from "process";
|
||||
|
||||
|
||||
|
||||
@@ -218,8 +219,8 @@ export const IntelligentPluginConfig = forwardRef<IntelligentPluginConfigHandle
|
||||
placeholder: '请输入描述',
|
||||
}
|
||||
},
|
||||
container: {
|
||||
type: 'void',
|
||||
config: {
|
||||
type: 'object',
|
||||
'x-component': 'DynamicRender',
|
||||
'x-component-props': {
|
||||
schema: JSON.stringify(renderSchema),
|
||||
|
||||
+3
-7
@@ -130,10 +130,9 @@ export default function IntelligentPluginList(){
|
||||
message.destroy();
|
||||
if(res.code === STATUS_CODE.SUCCESS){
|
||||
getConfig(res.data)
|
||||
setColumns(res.data.basic.fields.map((field:DynamicTableField)=>({
|
||||
setColumns(res.data.basic.fields.map((field:DynamicTableField, index:number)=>({
|
||||
title:field.title,
|
||||
dataIndex:field.name,
|
||||
copyable: true,
|
||||
fixed:field.name === 'title' ? 'left' : undefined,
|
||||
ellipsis:true,
|
||||
width:field.name === 'title' ? 150 : undefined,
|
||||
@@ -227,7 +226,7 @@ export default function IntelligentPluginList(){
|
||||
const openDrawer = async (type:'add'|'edit', entity?:DynamicTableItem)=>{
|
||||
switch (type){
|
||||
case 'add':
|
||||
setCurDetail({driver:driverOptions[0].value || '',config:{'c3ebd745-f7d5-45cd-8d3e-e0e43099d20e':{scopes:[]},'550e2537-8436-48e4-ab84-f9f58faf1b18':{scopes:[]}}})
|
||||
setCurDetail({driver:driverOptions[0].value || '',config:{}})
|
||||
break;
|
||||
case 'edit':{
|
||||
setDrawerLoading(true)
|
||||
@@ -237,9 +236,6 @@ export default function IntelligentPluginList(){
|
||||
const {code, data, msg } = res
|
||||
if(code === STATUS_CODE.SUCCESS){
|
||||
if(data.info.config){
|
||||
for (const tab in data.info.config) {
|
||||
data.info.config[tab]._apinto_show = true
|
||||
}
|
||||
}
|
||||
setCurDetail(data.info)
|
||||
}else{
|
||||
@@ -276,7 +272,7 @@ export default function IntelligentPluginList(){
|
||||
return;}
|
||||
case 'delete':
|
||||
title='删除'
|
||||
content=<span>确定删除成员<span className="text-status_fail"></span>?此操作无法恢复,确认操作?</span>
|
||||
content=<span>确定删除<span className="text-status_fail"></span>?此操作无法恢复,确认操作?</span>
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,25 +19,21 @@ export const SUBSCRIBE_APPROVAL_TABLE_COLUMN : ProColumns<ApprovalTableListItem>
|
||||
{
|
||||
title: '申请方-应用',
|
||||
dataIndex: ['application','name'],
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title: '申请服务',
|
||||
dataIndex: ['service','name'],
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title: '服务所属系统',
|
||||
dataIndex: ['service','name'],
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title: '服务所属团队',
|
||||
dataIndex: ['team','name'],
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
@@ -74,7 +70,6 @@ export const SUBSCRIBE_APPROVAL_INNER_TODO_TABLE_COLUMN : ProColumns<SubscribeAp
|
||||
title: '申请时间',
|
||||
dataIndex: 'applyTime',
|
||||
// sorter: true,
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
width:182,
|
||||
fixed:'left',
|
||||
@@ -85,7 +80,6 @@ export const SUBSCRIBE_APPROVAL_INNER_TODO_TABLE_COLUMN : ProColumns<SubscribeAp
|
||||
{
|
||||
title: '申请方-应用',
|
||||
dataIndex: ['application','name'],
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
@@ -101,7 +95,6 @@ export const SUBSCRIBE_APPROVAL_INNER_TODO_TABLE_COLUMN : ProColumns<SubscribeAp
|
||||
{
|
||||
title: '申请服务',
|
||||
dataIndex: ['service','name'],
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
];
|
||||
@@ -112,7 +105,6 @@ export const SUBSCRIBE_APPROVAL_INNER_DONE_TABLE_COLUMN : ProColumns<SubscribeAp
|
||||
title: '申请时间',
|
||||
dataIndex: 'applyTime',
|
||||
// sorter: true,
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
width:182,
|
||||
fixed:'left',
|
||||
@@ -123,7 +115,6 @@ export const SUBSCRIBE_APPROVAL_INNER_DONE_TABLE_COLUMN : ProColumns<SubscribeAp
|
||||
{
|
||||
title: '申请方-应用',
|
||||
dataIndex: ['application','name'],
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
@@ -139,7 +130,6 @@ export const SUBSCRIBE_APPROVAL_INNER_DONE_TABLE_COLUMN : ProColumns<SubscribeAp
|
||||
{
|
||||
title: '申请服务',
|
||||
dataIndex: ['service','name'],
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
@@ -235,7 +225,6 @@ export const PUBLISH_APPROVAL_VERSION_INNER_TABLE_COLUMN : ProColumns<PublishTab
|
||||
{
|
||||
title: '发布版本',
|
||||
dataIndex: 'version',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
fixed:'left'
|
||||
@@ -243,7 +232,6 @@ export const PUBLISH_APPROVAL_VERSION_INNER_TABLE_COLUMN : ProColumns<PublishTab
|
||||
{
|
||||
title: '版本说明',
|
||||
dataIndex: 'remark',
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
@@ -287,7 +275,6 @@ export const PUBLISH_APPROVAL_RECORD_INNER_TABLE_COLUMN : ProColumns<PublishTabl
|
||||
{
|
||||
title: '申请时间',
|
||||
dataIndex: 'applyTime',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
width:182,
|
||||
fixed:'left',
|
||||
@@ -295,20 +282,17 @@ export const PUBLISH_APPROVAL_RECORD_INNER_TABLE_COLUMN : ProColumns<PublishTabl
|
||||
{
|
||||
title: '审核时间',
|
||||
dataIndex: 'approveTime',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
width:182,
|
||||
},
|
||||
{
|
||||
title: '版本号',
|
||||
dataIndex: 'version',
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title: '版本说明',
|
||||
dataIndex: 'remark',
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
@@ -357,7 +341,6 @@ export const PUBLISH_APPROVAL_TABLE_COLUMN : ProColumns<ApprovalTableListItem>[]
|
||||
{
|
||||
title: '申请时间',
|
||||
dataIndex: 'applyTime',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
width:182,
|
||||
fixed:'left',
|
||||
@@ -368,13 +351,11 @@ export const PUBLISH_APPROVAL_TABLE_COLUMN : ProColumns<ApprovalTableListItem>[]
|
||||
{
|
||||
title: '申请系统',
|
||||
dataIndex: ['service','name'],
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title: '所属团队',
|
||||
dataIndex: ['team','name'],
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
|
||||
@@ -75,6 +75,10 @@ module.exports = {
|
||||
DEFAULT_BORDER_RADIUS: 'var(--border-radius)',
|
||||
TREE_TITLE:'var(--small-padding) var(--LAYOUT_PADDING);',
|
||||
'navbar-height': 'var(--layout-header-height)',
|
||||
TAG_LEFT:'10px',
|
||||
PAGE_INSIDE_X:'40px',
|
||||
PAGE_INSIDE_T:'30px',
|
||||
PAGE_INSIDE_B:'20px',
|
||||
},
|
||||
borderColor: {
|
||||
'color-base': 'var(--border-color)'
|
||||
|
||||
@@ -7,7 +7,6 @@ export const MEMBER_TABLE_COLUMNS: ProColumns<MemberTableListItem>[] = [
|
||||
{
|
||||
title: '用户名',
|
||||
dataIndex: 'name',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
fixed:'left',
|
||||
@@ -18,13 +17,11 @@ export const MEMBER_TABLE_COLUMNS: ProColumns<MemberTableListItem>[] = [
|
||||
{
|
||||
title: '邮箱',
|
||||
dataIndex: 'email',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
},
|
||||
{
|
||||
title: '部门',
|
||||
dataIndex: 'department',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
filterMode:'tree',
|
||||
renderText:(_,entity:MemberTableListItem)=>(entity.department?.map(x=>x.name).join(',') || '-'),
|
||||
@@ -36,7 +33,6 @@ export const MEMBER_TABLE_COLUMNS: ProColumns<MemberTableListItem>[] = [
|
||||
{
|
||||
title: '角色',
|
||||
dataIndex: 'roles',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
width:200
|
||||
},
|
||||
|
||||
@@ -8,7 +8,6 @@ export const PARTITION_CERT_TABLE_COLUMNS: ProColumns<PartitionCertTableListItem
|
||||
{
|
||||
title: '证书',
|
||||
dataIndex: 'name',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
fixed:'left',
|
||||
@@ -22,17 +21,16 @@ export const PARTITION_CERT_TABLE_COLUMNS: ProColumns<PartitionCertTableListItem
|
||||
renderText:(_,entity) =>(
|
||||
entity.domains.join(',')
|
||||
),
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title: '证书有效期',
|
||||
title: '过期日期',
|
||||
ellipsis: true,
|
||||
dataIndex: 'notAfter',
|
||||
copyable: true,
|
||||
width:320,
|
||||
renderText: (value:string,entity:PartitionCertTableListItem) => {
|
||||
return `${entity.notBefore} - ${entity.notAfter}`
|
||||
width:100,
|
||||
renderText: (value: string) => value ? value.split(' ')?.[0] : '-',
|
||||
sorter: (a,b)=> {
|
||||
return a.notAfter.localeCompare(b.notAfter)
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -60,7 +58,6 @@ export const PARTITION_CLUSTER_TABLE_COLUMNS : ProColumns<PartitionClusterTableL
|
||||
{
|
||||
title: '集群名称',
|
||||
dataIndex: 'name',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
fixed:'left',
|
||||
@@ -72,7 +69,6 @@ export const PARTITION_CLUSTER_TABLE_COLUMNS : ProColumns<PartitionClusterTableL
|
||||
title: '集群 ID',
|
||||
dataIndex: 'id',
|
||||
width: 140,
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
@@ -90,7 +86,6 @@ export const PARTITION_CLUSTER_TABLE_COLUMNS : ProColumns<PartitionClusterTableL
|
||||
{
|
||||
title: '描述',
|
||||
dataIndex: 'description',
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
}
|
||||
];
|
||||
@@ -100,7 +95,6 @@ export const PARTITION_CLUSTER_NODE_COLUMNS: ProColumns<PartitionClusterNodeTabl
|
||||
{
|
||||
title: '节点名称',
|
||||
dataIndex: 'name',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
fixed:'left',
|
||||
sorter: (a,b)=> {
|
||||
@@ -159,7 +153,6 @@ export const PARTITION_LIST_COLUMNS: ProColumns<PartitionTableListItem>[] = [
|
||||
{
|
||||
title: '环境名称',
|
||||
dataIndex: 'name',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
fixed:'left',
|
||||
sorter: (a,b)=> {
|
||||
@@ -169,7 +162,6 @@ export const PARTITION_LIST_COLUMNS: ProColumns<PartitionTableListItem>[] = [
|
||||
{
|
||||
title: 'ID',
|
||||
dataIndex: 'id',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
width:140,
|
||||
},
|
||||
|
||||
@@ -3,7 +3,6 @@ export const ROLE_TABLE_COLUMNS = [
|
||||
{
|
||||
title: '角色名称',
|
||||
dataIndex: 'name',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
fixed:'left',
|
||||
sorter: (a,b)=> {
|
||||
|
||||
@@ -74,7 +74,6 @@ export const SYSTEM_TABLE_COLUMNS: ProColumns<SystemTableListItem>[] = [
|
||||
{
|
||||
title: '服务名称',
|
||||
dataIndex: 'name',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
fixed:'left',
|
||||
@@ -86,13 +85,11 @@ export const SYSTEM_TABLE_COLUMNS: ProColumns<SystemTableListItem>[] = [
|
||||
title: '服务 ID',
|
||||
dataIndex: 'id',
|
||||
width: 140,
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
},
|
||||
{
|
||||
title: '所属团队',
|
||||
dataIndex: ['team','name'],
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
// filters: true,
|
||||
// onFilter: true,
|
||||
@@ -134,7 +131,6 @@ export const SYSTEM_SUBSERVICE_TABLE_COLUMNS: ProColumns<SystemSubServiceTableLi
|
||||
{
|
||||
title: '服务名称',
|
||||
dataIndex: ['service','name'],
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
fixed:'left',
|
||||
@@ -146,7 +142,6 @@ export const SYSTEM_SUBSERVICE_TABLE_COLUMNS: ProColumns<SystemSubServiceTableLi
|
||||
title: '服务 ID',
|
||||
dataIndex: ['service','name'],
|
||||
width: 140,
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
@@ -170,13 +165,11 @@ export const SYSTEM_SUBSERVICE_TABLE_COLUMNS: ProColumns<SystemSubServiceTableLi
|
||||
{
|
||||
title: '所属服务',
|
||||
dataIndex: ['project','name'],
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title: '所属团队',
|
||||
dataIndex: ['team','name'],
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
@@ -217,7 +210,6 @@ export const SYSTEM_SUBSCRIBER_TABLE_COLUMNS: ProColumns<SystemSubscriberTableLi
|
||||
{
|
||||
title: '服务名称',
|
||||
dataIndex: ['service','name'],
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
fixed:'left',
|
||||
@@ -229,19 +221,16 @@ export const SYSTEM_SUBSCRIBER_TABLE_COLUMNS: ProColumns<SystemSubscriberTableLi
|
||||
title: '服务 ID',
|
||||
dataIndex: 'id',
|
||||
width: 140,
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title: '订阅方',
|
||||
dataIndex: ['subscriber','name'],
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title: '所属团队',
|
||||
dataIndex: ['team','name'],
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
// {
|
||||
@@ -307,7 +296,6 @@ export const SYSTEM_MEMBER_TABLE_COLUMN: ProColumns<SystemMemberTableListItem>[]
|
||||
{
|
||||
title: '用户名',
|
||||
dataIndex: ['user','name'],
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
fixed:'left',
|
||||
@@ -318,13 +306,11 @@ export const SYSTEM_MEMBER_TABLE_COLUMN: ProColumns<SystemMemberTableListItem>[]
|
||||
{
|
||||
title: '邮箱',
|
||||
dataIndex: 'email',
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title: '角色',
|
||||
dataIndex: ['roles','name'],
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
|
||||
}
|
||||
@@ -374,7 +360,6 @@ export const SYSTEM_API_TABLE_COLUMNS: ProColumns<SystemApiTableListItem>[] = [
|
||||
{
|
||||
title: '名称',
|
||||
dataIndex: 'name',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
fixed:'left',
|
||||
@@ -401,7 +386,6 @@ export const SYSTEM_API_TABLE_COLUMNS: ProColumns<SystemApiTableListItem>[] = [
|
||||
{
|
||||
title: 'URL',
|
||||
dataIndex: 'requestPath',
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
@@ -429,7 +413,6 @@ export const SYSTEM_UPSTREAM_TABLE_COLUMNS: ProColumns<SystemUpstreamTableListIt
|
||||
{
|
||||
title: '名称',
|
||||
dataIndex: 'name',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
fixed:'left',
|
||||
@@ -441,7 +424,6 @@ export const SYSTEM_UPSTREAM_TABLE_COLUMNS: ProColumns<SystemUpstreamTableListIt
|
||||
title: '上游 ID',
|
||||
dataIndex: 'id',
|
||||
width: 140,
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
@@ -583,7 +565,6 @@ export const SYSTEM_MYSERVICE_API_TABLE_COLUMNS: ProColumns<ServiceApiTableListI
|
||||
{
|
||||
title: '名称',
|
||||
dataIndex: 'name',
|
||||
copyable: true,
|
||||
width:160,
|
||||
fixed:'left',
|
||||
ellipsis:true
|
||||
@@ -596,13 +577,11 @@ export const SYSTEM_MYSERVICE_API_TABLE_COLUMNS: ProColumns<ServiceApiTableListI
|
||||
{
|
||||
title: '请求路径',
|
||||
dataIndex: 'path',
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title: '描述',
|
||||
dataIndex: 'description',
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
}
|
||||
];
|
||||
@@ -625,7 +604,6 @@ export const SYSTEM_AUTHORITY_TABLE_COLUMNS: ProColumns<SystemAuthorityTableList
|
||||
{
|
||||
title: '名称',
|
||||
dataIndex: 'name',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
fixed:'left',
|
||||
@@ -702,7 +680,6 @@ export const SYSTEM_MYSERVICE_TABLE_COLUMNS: ProColumns<MyServiceTableListItem>[
|
||||
{
|
||||
title: '服务名称',
|
||||
dataIndex: 'name',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
fixed:'left',
|
||||
@@ -714,7 +691,6 @@ export const SYSTEM_MYSERVICE_TABLE_COLUMNS: ProColumns<MyServiceTableListItem>[
|
||||
title: '服务ID',
|
||||
dataIndex: 'id',
|
||||
width: 140,
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
@@ -796,7 +772,6 @@ export const SYSTEM_UPSTREAM_GLOBAL_CONFIG_TABLE_COLUMNS: ProColumns<GlobalNodeI
|
||||
},
|
||||
],
|
||||
},
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
@@ -928,7 +903,7 @@ const APP_MODE = import.meta.env.VITE_APP_MODE;
|
||||
|
||||
|
||||
export const SYSTEM_PAGE_MENU_ITEMS: MenuProps['items'] = [
|
||||
getItem('内部数据服务', 'assets', null,
|
||||
getItem('服务', 'assets', null,
|
||||
[
|
||||
getItem(<Link to="./api">API</Link>, 'api',undefined,undefined,undefined,'team.service.api.view'),
|
||||
getItem(<Link to="./upstream">上游</Link>, 'upstream',undefined,undefined,undefined,'team.service.upstream.view'),
|
||||
@@ -936,7 +911,7 @@ const APP_MODE = import.meta.env.VITE_APP_MODE;
|
||||
getItem(<Link to="./publish">发布</Link>, 'publish',undefined,undefined,undefined,'team.service.release.view'),
|
||||
],
|
||||
'group'),
|
||||
getItem('提供服务', 'provideSer', null,
|
||||
getItem('订阅管理', 'provideSer', null,
|
||||
[
|
||||
getItem(<Link to="./approval">订阅审批</Link>, 'approval',undefined,undefined,undefined,'team.service.subscription.view'),
|
||||
getItem(<Link to="./subscriber">订阅方管理</Link>, 'subscriber',undefined,undefined,undefined,'team.service.subscription.view'),
|
||||
|
||||
@@ -56,8 +56,7 @@ export type SystemSubscriberTableListItem = {
|
||||
};
|
||||
|
||||
export type SystemSubscriberConfigFieldType = {
|
||||
service:string
|
||||
subscriber:string
|
||||
application:string
|
||||
applier:string
|
||||
};
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ export const TEAM_TABLE_COLUMNS: ProColumns<TeamTableListItem>[] = [
|
||||
{
|
||||
title: '名称',
|
||||
dataIndex: 'name',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
fixed:'left',
|
||||
@@ -24,13 +23,11 @@ export const TEAM_TABLE_COLUMNS: ProColumns<TeamTableListItem>[] = [
|
||||
title: 'ID',
|
||||
dataIndex: 'id',
|
||||
width: 140,
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title: '描述',
|
||||
dataIndex: 'description',
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
@@ -67,7 +64,6 @@ export const TEAM_SYSTEM_TABLE_COLUMNS: ProColumns<SystemTableListItem>[] = [
|
||||
{
|
||||
title: '服务名称',
|
||||
dataIndex: 'name',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
fixed:'left',
|
||||
@@ -79,13 +75,11 @@ export const TEAM_SYSTEM_TABLE_COLUMNS: ProColumns<SystemTableListItem>[] = [
|
||||
title: '服务 ID',
|
||||
dataIndex: 'id',
|
||||
width: 140,
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title: '所属团队',
|
||||
dataIndex: ['team','name'],
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
@@ -128,7 +122,6 @@ export const TEAM_MEMBER_TABLE_COLUMNS: ProColumns<TeamMemberTableListItem>[] =
|
||||
{
|
||||
title: '姓名',
|
||||
dataIndex: ['user','name'],
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
fixed:'left',
|
||||
@@ -139,7 +132,6 @@ export const TEAM_MEMBER_TABLE_COLUMNS: ProColumns<TeamMemberTableListItem>[] =
|
||||
{
|
||||
title: '团队角色',
|
||||
dataIndex: 'roles',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -8,7 +8,6 @@ export const USER_LIST_COLUMNS: ProColumns<MemberItem>[]= [
|
||||
{
|
||||
title: '用户名',
|
||||
dataIndex: 'name',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
fixed:'left',
|
||||
@@ -19,7 +18,6 @@ export const USER_LIST_COLUMNS: ProColumns<MemberItem>[]= [
|
||||
{
|
||||
title: '邮箱',
|
||||
dataIndex: 'email',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -754,12 +754,22 @@ p{
|
||||
height:10px !important;
|
||||
}
|
||||
|
||||
/* 生产环境无法获取到下列样式,先写在这里 */
|
||||
.eo_page_list .ant-pro-card{
|
||||
margin-top: -1px;
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
|
||||
.eo_page_list .ant-pro-card .ant-pro-card-body{
|
||||
padding:0 !important;
|
||||
}
|
||||
.eo_page_list .ant-pro-table-list-toolbar-container{
|
||||
padding:12px 20px 12px 12px !important;
|
||||
/* padding:12px 20px 12px 12px !important; */
|
||||
padding-block:0px !important;
|
||||
flex-direction: row-reverse;
|
||||
|
||||
.ant-pro-table-list-toolbar-left{
|
||||
justify-content: flex-end !important;
|
||||
}
|
||||
|
||||
.ant-pro-table-list-toolbar-right{
|
||||
flex:unset !important;
|
||||
@@ -1161,11 +1171,6 @@ p{
|
||||
padding-bottom:60px !important;
|
||||
}
|
||||
|
||||
/* .padding-top-20 .virtuoso-grid-list{
|
||||
padding-bottom:60px !important;
|
||||
padding:20px 40px 40px !important;
|
||||
} */
|
||||
|
||||
.ant-form-item-control-input-content{
|
||||
.ant-pro-card-body{
|
||||
padding-bottom: 0px !important;
|
||||
|
||||
@@ -27,7 +27,6 @@ const AUDIT_LOG_COLUMNS_CONFIG: ProColumns<AuditLogTableListItem, 'multipleSelec
|
||||
dataIndex: 'operateTime',
|
||||
valueType: 'dateTimeRange',
|
||||
order:1,
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
fixed:'left',
|
||||
width:182
|
||||
|
||||
@@ -232,7 +232,7 @@ const MemberList = ()=>{
|
||||
return !checkAccess(permission, accessData);
|
||||
};
|
||||
|
||||
const openModal = (type:'addMember'|'editMember'|'removeFromDep'|'addToDep'|'blocked'|'activate'|'delete',entity?:MemberTableListItem)=>{
|
||||
const openModal = (type:'addMember'|'editMember'|'addToDep'|'delete',entity?:MemberTableListItem)=>{
|
||||
let title:string = ''
|
||||
let content:string|React.ReactNode = ''
|
||||
switch (type){
|
||||
@@ -244,10 +244,6 @@ const MemberList = ()=>{
|
||||
title='编辑成员信息'
|
||||
content=<MemberDropdownModal topGroupId={topGroupId} ref={EditMemberRef} type={type} entity={entity} />
|
||||
break;
|
||||
case 'removeFromDep':
|
||||
title='移出当前部门'
|
||||
content=<span>确定将成员<span className="text-status_fail"></span>从当前部门中移除?此操作无法恢复,确认操作?</span>
|
||||
break;
|
||||
case 'addToDep':
|
||||
title='加入部门'
|
||||
content=<AddToDepartment ref={AddToDepRef} selectedUserIds={selectedRowKeys as string[]} />
|
||||
@@ -256,14 +252,6 @@ const MemberList = ()=>{
|
||||
title='删除'
|
||||
content=<span>确定删除成员<span className="text-status_fail"></span>?此操作无法恢复,确认操作?</span>
|
||||
break;
|
||||
case 'blocked':
|
||||
title='禁用成员'
|
||||
content=<span>确定禁用成员<span className="text-status_fail"></span>?此操作无法恢复,确认操作?</span>
|
||||
break;
|
||||
case 'activate':
|
||||
title='启用成员'
|
||||
content=<span>确定启用成员<span className="text-status_fail"></span>?此操作无法恢复,确认操作?</span>
|
||||
break;
|
||||
}
|
||||
|
||||
modal.confirm({
|
||||
@@ -274,18 +262,9 @@ const MemberList = ()=>{
|
||||
case 'addMember':
|
||||
return AddMemberRef.current?.save().then((res)=>{if(res === true) {refreshGroup && refreshGroup();manualReloadTable()}})
|
||||
case 'editMember':
|
||||
//console.log('addChild')
|
||||
return EditMemberRef.current?.save().then((res)=>{if(res === true){refreshGroup && refreshGroup();manualReloadTable()}})
|
||||
case 'removeFromDep':
|
||||
//console.log('addChild')
|
||||
return handleMemberAction('removeFromDep').then((res)=>{if(res === true){refreshGroup && refreshGroup();manualReloadTable()}})
|
||||
case 'addToDep':
|
||||
//console.log('addToDep')
|
||||
return AddToDepRef.current?.save().then((res)=>{if(res === true) {refreshGroup && refreshGroup();manualReloadTable()}})
|
||||
case 'activate':
|
||||
return handleMemberAction('activate').then((res)=>{if(res === true){refreshGroup && refreshGroup();manualReloadTable()}})
|
||||
case 'blocked':
|
||||
return handleMemberAction('blocked').then((res)=>{if(res === true){refreshGroup && refreshGroup();manualReloadTable()}})
|
||||
case 'delete':
|
||||
return handleMemberAction('delete').then((res)=>{if(res === true){refreshGroup && refreshGroup();manualReloadTable()}})
|
||||
}
|
||||
@@ -400,11 +379,11 @@ const MemberList = ()=>{
|
||||
onRowClick={handleRowClick}
|
||||
tableClickAccess="system.organization.member.edit"
|
||||
afterNewBtn={[
|
||||
memberGroupId &&<WithPermission key="removeFromDepPermission" access="system.organization.member.edit"><Button className="mr-btnbase" disabled={selectedRowKeys.length === 0} key="removeFromDep" onClick={()=>openModal('removeFromDep')}>移出当前部门</Button></WithPermission>,
|
||||
memberGroupId &&<WithPermission key="addToDepPermission" access="system.organization.member.edit"><Button className="mr-btnbase" disabled={selectedRowKeys.length === 0} key="addToDep" onClick={()=>openModal('addToDep')}>加入部门</Button></WithPermission>,
|
||||
memberGroupId !== 'disable' &&<WithPermission key="blockedPermission" access="system.organization.member.block"><Button className="mr-btnbase" disabled={selectedRowKeys.length === 0 || memberGroupId === 'unknown'} key="blocked" onClick={()=>openModal('blocked')}>禁用成员</Button></WithPermission>,
|
||||
<WithPermission key="activatePermission" access="system.organization.member.block"><Button className="mr-btnbase" disabled={selectedRowKeys.length === 0} key="activate" onClick={()=>openModal('activate')}>启用成员</Button></WithPermission>,
|
||||
<WithPermission key="deletePermission" access="system.organization.member.delete"><Button className="mr-btnbase" disabled={selectedRowKeys.length === 0} key="delete" onClick={()=>openModal('delete')}>删除成员</Button></WithPermission>,
|
||||
selectedRowKeys.length > 0 && memberGroupId &&<WithPermission key="removeFromDepPermission" access="system.organization.member.edit"><Button className="mr-btnbase" key="removeFromDep" onClick={()=>handleMemberAction('removeFromDep').then((res)=>{if(res === true){refreshGroup && refreshGroup();manualReloadTable()}})}>移出当前部门</Button></WithPermission>,
|
||||
selectedRowKeys.length > 0 && memberGroupId &&<WithPermission key="addToDepPermission" access="system.organization.member.edit"><Button className="mr-btnbase" key="addToDep" onClick={()=>openModal('addToDep')}>加入部门</Button></WithPermission>,
|
||||
selectedRowKeys.length > 0 && memberGroupId !== 'disable' &&<WithPermission key="blockedPermission" access="system.organization.member.block"><Button className="mr-btnbase" key="blocked" onClick={()=>handleMemberAction('blocked').then((res)=>{if(res === true){refreshGroup && refreshGroup();manualReloadTable()}})}>禁用成员</Button></WithPermission>,
|
||||
selectedRowKeys.length > 0 && <WithPermission key="activatePermission" access="system.organization.member.block"><Button className="mr-btnbase" key="activate" onClick={()=>handleMemberAction('activate').then((res)=>{if(res === true){refreshGroup && refreshGroup();manualReloadTable()}})}>启用成员</Button></WithPermission>,
|
||||
selectedRowKeys.length > 0 &&<WithPermission key="deletePermission" access="system.organization.member.delete"><Button className="mr-btnbase" key="delete" onClick={()=>openModal('delete')}>删除成员</Button></WithPermission>,
|
||||
]}
|
||||
onSearchWordChange={(e) => {
|
||||
setSearchWord(e.target.value)
|
||||
|
||||
@@ -17,6 +17,7 @@ import { checkAccess } from "@common/utils/permission.ts";
|
||||
import { RenameDepModal } from "./Modal/RenameDepModal.tsx";
|
||||
import { AddDepModal } from "./Modal/AddDepModal.tsx";
|
||||
import { EditMemberModal } from "./Modal/EditMember.tsx";
|
||||
import InsidePage from "@common/components/aoplatform/InsidePage.tsx";
|
||||
|
||||
const MemberPage = ()=>{
|
||||
const [searchWord, setSearchWord] = useState<string>('')
|
||||
@@ -244,56 +245,41 @@ const MemberPage = ()=>{
|
||||
},[memberGroupId])
|
||||
|
||||
return (
|
||||
|
||||
<div className="flex flex-1 h-full flex-col ">
|
||||
<div className="pb-[30px] border-0 border-b-[1px] border-solid border-BORDER">
|
||||
<p className="text-theme text-[26px] mb-[20px]">成员</p>
|
||||
<p>设置成员和对应的角色,成员只能够看到权限范围内的功能和数据。</p>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-1">
|
||||
<div className="w-[200px] border-0 border-solid border-r-[1px] border-r-BORDER">
|
||||
<div className="px-btnbase pb-[0px]">
|
||||
<Input className=" my-btnybase" onChange={(e) => debounce(onSearchWordChange, 100)(e.target.value)}
|
||||
allowClear placeholder="搜索部门"
|
||||
prefix={<SearchOutlined className="cursor-pointer"/>}/>
|
||||
</div>
|
||||
<div className="h-[calc(100%-52px)] overflow-auto">
|
||||
<div className="h-[calc(100%-30px)] overflow-y-auto pl-[5px] pr-[10px]">
|
||||
<Tree
|
||||
showLine
|
||||
switcherIcon={<DownOutlined />}
|
||||
blockNode={true}
|
||||
treeData={treeData}
|
||||
selectedKeys={[selectedDepartmentId]}
|
||||
expandedKeys={expandedKeys}
|
||||
onExpand={(expandedKeys:Key[])=>{setExpandedKeys(expandedKeys)}}
|
||||
onSelect={(selectedKeys,selectedRow) => {
|
||||
if(selectedKeys.length > 0 ){
|
||||
setSelectedDepartmentIds((selectedRow.node as unknown).departmentIds || [])
|
||||
navigate(`/member/list${selectedKeys[0] === '-1'? '' : `/${selectedKeys[0]}`}`)
|
||||
}
|
||||
}}
|
||||
/>
|
||||
{/* <DirectoryTree
|
||||
icon={<></>}
|
||||
<InsidePage
|
||||
pageTitle='成员'
|
||||
description="设置成员和对应的角色,成员只能够看到权限范围内的功能和数据。"
|
||||
>
|
||||
<div className="flex flex-1 h-full">
|
||||
<div className="w-[200px] border-0 border-solid border-r-[1px] border-r-BORDER">
|
||||
<div className="px-btnbase pb-[0px]">
|
||||
<Input className=" my-btnybase" onChange={(e) => debounce(onSearchWordChange, 100)(e.target.value)}
|
||||
allowClear placeholder="搜索部门"
|
||||
prefix={<SearchOutlined className="cursor-pointer"/>}/>
|
||||
</div>
|
||||
<div className="h-[calc(100%-52px)] overflow-auto">
|
||||
<div className="h-[calc(100%-30px)] overflow-y-auto pl-[5px] pr-[10px]">
|
||||
<Tree
|
||||
showLine
|
||||
switcherIcon={<DownOutlined />}
|
||||
blockNode={true}
|
||||
treeData={treeData}
|
||||
selectedKeys={[selectedDepartmentId]}
|
||||
expandedKeys={expandedKeys}
|
||||
onExpand={(expandedKeys:string[])=>{setExpandedKeys(expandedKeys)}}
|
||||
onExpand={(expandedKeys:Key[])=>{setExpandedKeys(expandedKeys)}}
|
||||
onSelect={(selectedKeys,selectedRow) => {
|
||||
if(selectedKeys.length > 0 ){
|
||||
setSelectedDepartmentIds((selectedRow.node as unknown).departmentIds || [])
|
||||
navigate(`/member/list${selectedKeys[0] === '-1' ? '' : `/${selectedKeys[0]}`}`)
|
||||
navigate(`/member/list${selectedKeys[0] === '-1'? '' : `/${selectedKeys[0]}`}`)
|
||||
}
|
||||
}}
|
||||
/> */}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex-1 p-btnbase pr-0">
|
||||
<Outlet context={{refreshMemberCount, selectedDepartmentIds,refreshGroup:()=>getDepartmentList()}}/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="w-[calc(100%-200px)] pl-btnbase pt-btnbase">
|
||||
<Outlet context={{refreshMemberCount, selectedDepartmentIds,refreshGroup:()=>getDepartmentList()}}/>
|
||||
</div>
|
||||
</div>
|
||||
</div>);
|
||||
</InsidePage>);
|
||||
}
|
||||
export default MemberPage;
|
||||
@@ -16,6 +16,7 @@ import TableBtnWithPermission from "@common/components/aoplatform/TableBtnWithPe
|
||||
import { useGlobalContext } from "@common/contexts/GlobalStateContext.tsx";
|
||||
import { checkAccess } from "@common/utils/permission.ts";
|
||||
import { PERMISSION_DEFINITION } from "@common/const/permissions.ts";
|
||||
import InsidePage from "@common/components/aoplatform/InsidePage.tsx";
|
||||
|
||||
const CertConfigModal = forwardRef<PartitionCertConfigHandle,PartitionCertConfigProps>((props, ref) => {
|
||||
const { message } = App.useApp()
|
||||
@@ -282,11 +283,11 @@ const PartitionInsideCert:FC = ()=>{
|
||||
},[memberValueEnum])
|
||||
|
||||
return (
|
||||
<div className="flex flex-col flex-1 h-full">
|
||||
<div className="pb-[30px] pt-0">
|
||||
<p className="text-theme text-[26px] mb-[20px]">证书</p>
|
||||
<p>通过为 API 服务配置和管理 SSL 证书,企业可以加密数据传输,防止敏感信息被窃取或篡改。 </p>
|
||||
</div>
|
||||
<InsidePage
|
||||
pageTitle='证书'
|
||||
description="通过为 API 服务配置和管理 SSL 证书,企业可以加密数据传输,防止敏感信息被窃取或篡改。"
|
||||
showBorder={false}
|
||||
>
|
||||
<PageList
|
||||
id="global_partition_cert"
|
||||
ref={pageListRef}
|
||||
@@ -299,7 +300,7 @@ const PartitionInsideCert:FC = ()=>{
|
||||
onRowClick={(row:PartitionCertTableListItem)=>openModal('edit',row)}
|
||||
tableClickAccess="system.devops.ssl_certificate.edit"
|
||||
/>
|
||||
</div>
|
||||
</InsidePage>
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import { useGlobalContext } from "@common/contexts/GlobalStateContext.tsx";
|
||||
import { ClusterNodeModal } from "./PartitionInsideClusterNode.tsx";
|
||||
import { DownOutlined, LoadingOutlined, UpOutlined } from "@ant-design/icons";
|
||||
import { checkAccess } from "@common/utils/permission.ts";
|
||||
import InsidePage from "@common/components/aoplatform/InsidePage.tsx";
|
||||
|
||||
const PartitionInsideCluster:FC = ()=> {
|
||||
const {setBreadcrumb} = useBreadcrumb()
|
||||
@@ -79,37 +80,38 @@ const PartitionInsideCluster:FC = ()=> {
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className=" overflow-auto h-full">
|
||||
|
||||
<div className="pb-[30px] pt-0">
|
||||
<p className="text-theme text-[26px] mb-[20px]">集群</p>
|
||||
<p>设置访问 API 的集群,让 API 在分布式环境中稳定运行,并且能够根据业务需求进行灵活扩展和优化。</p>
|
||||
<InsidePage
|
||||
pageTitle='集群'
|
||||
description="设置访问 API 的集群,让 API 在分布式环境中稳定运行,并且能够根据业务需求进行灵活扩展和优化。"
|
||||
showBorder={false}
|
||||
scrollPage={true}
|
||||
>
|
||||
<div className="flex flex-col h-full overflow-auto pb-PAGE_INSIDE_B">
|
||||
<div className="pb-btnbase"> <WithPermission access="system.devops.cluster.edit" key="changeClusterConfig"><Button type="primary" onClick={() => openModal('editNode')}>修改集群配置</Button></WithPermission></div>
|
||||
<Spin wrapperClassName=" flex-1" indicator={<LoadingOutlined style={{ fontSize: 24 }} spin/>} spinning={loading}>
|
||||
<div className="h-full overflow-auto">
|
||||
{nodesList && nodesList.length > 0 ?
|
||||
<Collapse className={``}
|
||||
expandIcon={({isActive})=>(isActive? <UpOutlined className="w-[23px] text-MAIN_TEXT hover:text-MAIN_HOVER_TEXT"/>:<DownOutlined className="w-[23px] text-MAIN_TEXT hover:text-MAIN_HOVER_TEXT"/> )}
|
||||
items={nodesList?.map(x=>{
|
||||
return {
|
||||
label:<div ><Tag color={x.status === 1 ? '#87d068' : '#f50'}>{x.status === 1 ? '正常' : '异常'}</Tag><span className="text-MAIN_TEXT my-btnybase mr-btnbase" id={`${x.id}`}>{x.managerAddress.join(',')}</span></div>,
|
||||
key:x.id,
|
||||
children:<div className="p-btnbase">
|
||||
<Row className="mb-[4px]"><Col className="font-bold text-right pr-[4px]" span="3">管理地址:</Col><Col>{x.managerAddress.map(m=>(<p className="leading-[22px]">{m}</p>))}</Col></Row>
|
||||
<Row className="mb-[4px]"><Col className="font-bold text-right pr-[4px]" span="3">服务地址:</Col><Col>{x.serviceAddress.map(m=>(<p className="leading-[22px]">{m}</p>))}</Col></Row>
|
||||
<Row className="mb-[4px]"><Col className="font-bold text-right pr-[4px]" span="3">同步地址:</Col><Col><p className="leading-[22px]">{x.peerAddress}</p></Col></Row>
|
||||
</div>
|
||||
}
|
||||
})}
|
||||
activeKey={activeKey}
|
||||
onChange={(val)=>{setActiveKey(val as string[])}}
|
||||
/>:<Empty className="mt-[10%]" image={Empty.PRESENTED_IMAGE_SIMPLE}/>
|
||||
}
|
||||
</div>
|
||||
</Spin>
|
||||
</div>
|
||||
|
||||
<div className="pb-btnbase"> <WithPermission access="system.devops.cluster.edit" key="changeClusterConfig"><Button type="primary" onClick={() => openModal('editNode')}>修改集群配置</Button></WithPermission></div>
|
||||
<Spin wrapperClassName=" h-[calc(100%-44px)] flex-1 overflow-auto" indicator={<LoadingOutlined style={{ fontSize: 24 }} spin/>} spinning={loading}>
|
||||
<div className="h-full overflow-auto ">
|
||||
{nodesList && nodesList.length > 0 ?
|
||||
<Collapse className={` p-[0px] mb-btnybase`}
|
||||
expandIcon={({isActive})=>(isActive? <UpOutlined className="w-[23px] text-MAIN_TEXT hover:text-MAIN_HOVER_TEXT"/>:<DownOutlined className="w-[23px] text-MAIN_TEXT hover:text-MAIN_HOVER_TEXT"/> )}
|
||||
items={nodesList?.map(x=>{
|
||||
return {
|
||||
label:<div ><Tag color={x.status === 1 ? '#87d068' : '#f50'}>{x.status === 1 ? '正常' : '异常'}</Tag><span className="text-MAIN_TEXT my-btnybase mr-btnbase" id={`${x.id}`}>{x.managerAddress.join(',')}</span></div>,
|
||||
key:x.id,
|
||||
children:<div className="p-btnbase">
|
||||
<Row className="mb-[4px]"><Col className="font-bold text-right pr-[4px]" span="3">管理地址:</Col><Col>{x.managerAddress.map(m=>(<p className="leading-[22px]">{m}</p>))}</Col></Row>
|
||||
<Row className="mb-[4px]"><Col className="font-bold text-right pr-[4px]" span="3">服务地址:</Col><Col>{x.serviceAddress.map(m=>(<p className="leading-[22px]">{m}</p>))}</Col></Row>
|
||||
<Row className="mb-[4px]"><Col className="font-bold text-right pr-[4px]" span="3">同步地址:</Col><Col><p className="leading-[22px]">{x.peerAddress}</p></Col></Row>
|
||||
</div>
|
||||
}
|
||||
})}
|
||||
activeKey={activeKey}
|
||||
onChange={(val)=>{setActiveKey(val as string[])}}
|
||||
/>:<Empty className="mt-[10%]" image={Empty.PRESENTED_IMAGE_SIMPLE}/>
|
||||
}
|
||||
</div>
|
||||
</Spin>
|
||||
</div>
|
||||
</InsidePage>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -152,9 +152,7 @@ const RoleConfig = ()=>{
|
||||
const newPermits = generateNewPermit(data.permits)
|
||||
generateDependenciesMap(newPermits)
|
||||
setPermissionTemplate(newPermits)
|
||||
console.log(newPermits)
|
||||
}else{
|
||||
console.log(message)
|
||||
message.error(msg || '获取权限模板失败')
|
||||
}
|
||||
})
|
||||
|
||||
@@ -12,6 +12,7 @@ import { useGlobalContext } from "@common/contexts/GlobalStateContext.tsx";
|
||||
import { checkAccess } from "@common/utils/permission.ts";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { RoleTableListItem } from "@core/const/role/type.ts";
|
||||
import InsidePage from "@common/components/aoplatform/InsidePage.tsx";
|
||||
|
||||
|
||||
const RoleList = ()=>{
|
||||
@@ -116,46 +117,49 @@ const RoleList = ()=>{
|
||||
}, []);
|
||||
|
||||
return (<>
|
||||
<div className="flex flex-col pb-[20px]">
|
||||
<div className="pb-[30px] ">
|
||||
<p className="text-theme text-[26px] mb-[20px]">角色</p>
|
||||
<p>设置角色的权限范围。</p>
|
||||
</div>
|
||||
<h3 className="p ">系统级别角色</h3>
|
||||
<PageList
|
||||
id="global_role"
|
||||
tableClass="role_table mb-btnrbase"
|
||||
ref={pageListRef}
|
||||
columns={[...ROLE_TABLE_COLUMNS as ProColumns<RoleTableListItem, "text">[], ...operation('system')]}
|
||||
request={()=>getRoleList('system')}
|
||||
addNewBtnTitle="添加角色"
|
||||
showPagination={false}
|
||||
onAddNewBtnClick={() => {
|
||||
navigateTo(`/role/system/config`)
|
||||
}}
|
||||
noScroll={true}
|
||||
addNewBtnAccess="system.organization.role.system.add"
|
||||
onRowClick={(row:RoleTableListItem)=> navigateTo(`/role/system/config/${row.id}`)}
|
||||
tableClickAccess="system.organization.role.system.edit"
|
||||
/>
|
||||
<h3 className=" pt-btnbase ">团队级别角色</h3>
|
||||
<PageList
|
||||
id="global_role"
|
||||
ref={pageListRef}
|
||||
tableClass="role_table "
|
||||
columns={[...ROLE_TABLE_COLUMNS as ProColumns<RoleTableListItem, "text">[], ...operation('team')]}
|
||||
request={()=>getRoleList('team')}
|
||||
showPagination={false}
|
||||
addNewBtnTitle="添加角色"
|
||||
onAddNewBtnClick={() => {
|
||||
navigateTo(`/role/team/config`)
|
||||
}}
|
||||
noScroll={true}
|
||||
addNewBtnAccess="system.organization.role.team.add"
|
||||
onRowClick={(row:RoleTableListItem)=> navigateTo(`/role/team/config/${row.id}`)}
|
||||
tableClickAccess="system.organization.role.team.edit"
|
||||
/>
|
||||
</div>
|
||||
<InsidePage
|
||||
className="pb-PAGE_INSIDE_B overflow-y-auto"
|
||||
pageTitle='角色'
|
||||
description="设置角色的权限范围。"
|
||||
showBorder={false}
|
||||
>
|
||||
<div className="overflow-auto h-full">
|
||||
<h3 className="p ">系统级别角色</h3>
|
||||
<PageList
|
||||
id="global_role"
|
||||
tableClass="role_table mb-btnrbase"
|
||||
ref={pageListRef}
|
||||
columns={[...ROLE_TABLE_COLUMNS as ProColumns<RoleTableListItem, "text">[], ...operation('system')]}
|
||||
request={()=>getRoleList('system')}
|
||||
addNewBtnTitle="添加角色"
|
||||
showPagination={false}
|
||||
onAddNewBtnClick={() => {
|
||||
navigateTo(`/role/system/config`)
|
||||
}}
|
||||
noScroll={true}
|
||||
addNewBtnAccess="system.organization.role.system.add"
|
||||
onRowClick={(row:RoleTableListItem)=> navigateTo(`/role/system/config/${row.id}`)}
|
||||
tableClickAccess="system.organization.role.system.edit"
|
||||
/>
|
||||
<h3 className=" pt-btnbase ">团队级别角色</h3>
|
||||
<PageList
|
||||
id="global_role"
|
||||
ref={pageListRef}
|
||||
tableClass="role_table "
|
||||
columns={[...ROLE_TABLE_COLUMNS as ProColumns<RoleTableListItem, "text">[], ...operation('team')]}
|
||||
request={()=>getRoleList('team')}
|
||||
showPagination={false}
|
||||
addNewBtnTitle="添加角色"
|
||||
onAddNewBtnClick={() => {
|
||||
navigateTo(`/role/team/config`)
|
||||
}}
|
||||
noScroll={true}
|
||||
addNewBtnAccess="system.organization.role.team.add"
|
||||
onRowClick={(row:RoleTableListItem)=> navigateTo(`/role/team/config/${row.id}`)}
|
||||
tableClickAccess="system.organization.role.team.edit"
|
||||
/>
|
||||
</div>
|
||||
</InsidePage>
|
||||
</>)
|
||||
}
|
||||
export default RoleList;
|
||||
@@ -5,7 +5,7 @@ import { PERMISSION_DEFINITION } from "@common/const/permissions";
|
||||
import { useFetch } from "@common/hooks/http";
|
||||
import { checkAccess } from "@common/utils/permission";
|
||||
import { CategorizesType, ServiceHubCategoryConfigHandle } from "@market/const/serviceHub/type";
|
||||
import { App, Button, Spin, TagType, Tree, TreeDataNode, TreeProps } from "antd";
|
||||
import { App, Button, Spin, Tree, TreeDataNode, TreeProps } from "antd";
|
||||
import { DataNode } from "antd/es/tree";
|
||||
import { Key, useEffect, useMemo, useRef, useState } from "react";
|
||||
import { ServiceHubCategoryConfig } from "./ServiceHubCategoryConfig";
|
||||
@@ -14,6 +14,8 @@ import { useBreadcrumb } from "@common/contexts/BreadcrumbContext";
|
||||
import { LoadingOutlined } from "@ant-design/icons";
|
||||
import { cloneDeep } from "lodash-es";
|
||||
import { Icon } from "@iconify/react/dist/iconify.js";
|
||||
import InsidePage from "@common/components/aoplatform/InsidePage";
|
||||
import { EntityItem } from "@common/const/type";
|
||||
|
||||
export default function ServiceCategory(){
|
||||
const [gData, setGData] = useState<CategorizesType[]>([]);
|
||||
@@ -227,7 +229,7 @@ export default function ServiceCategory(){
|
||||
|
||||
const getCategoryList = ()=>{
|
||||
setLoading(true)
|
||||
fetchData<BasicResponse<{ catalogues:CategorizesType[],tags:TagType[]}>>('catalogues',{method:'GET'}).then(response=>{
|
||||
fetchData<BasicResponse<{ catalogues:CategorizesType[],tags:EntityItem[]}>>('catalogues',{method:'GET'}).then(response=>{
|
||||
const {code,data,msg} = response
|
||||
if(code === STATUS_CODE.SUCCESS){
|
||||
setGData(data.catalogues)
|
||||
@@ -246,11 +248,11 @@ export default function ServiceCategory(){
|
||||
},[])
|
||||
|
||||
return (
|
||||
<div className=" mx-auto h-full">
|
||||
<div className="pb-[30px] pt-0">
|
||||
<p className="text-theme text-[26px] mb-[20px]">服务分类管理</p>
|
||||
<p>设置服务可选择的分类,方便团队成员快速找到API。</p>
|
||||
</div>
|
||||
<InsidePage
|
||||
pageTitle='服务分类管理'
|
||||
description="设置服务可选择的分类,方便团队成员快速找到API。"
|
||||
showBorder={false}
|
||||
>
|
||||
<div className="max-h-[calc(100%-75px)] border border-solid border-BORDER p-[20px] rounded-[10px]">
|
||||
<Spin indicator={<LoadingOutlined style={{ fontSize: 24 }} spin />} spinning={loading} className=''>
|
||||
<Tree
|
||||
@@ -267,6 +269,6 @@ export default function ServiceCategory(){
|
||||
</WithPermission>
|
||||
</Spin>
|
||||
</div>
|
||||
</div>
|
||||
</InsidePage>
|
||||
)
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
import {forwardRef, useEffect, useImperativeHandle, useState} from "react";
|
||||
import {App, Button, Divider, Form, Input, Radio, Row, Select, TagType, TreeSelect, Upload} from "antd";
|
||||
import {App, Button, Form, Input, Radio, Row, Select, TreeSelect, Upload} from "antd";
|
||||
import { Link, useNavigate, useParams} from "react-router-dom";
|
||||
import {RouterParams} from "@core/components/aoplatform/RenderRoutes.tsx";
|
||||
import {BasicResponse, STATUS_CODE} from "@common/const/const.ts";
|
||||
@@ -93,11 +93,11 @@ const SystemConfig = forwardRef<SystemConfigHandle>((_,ref) => {
|
||||
const getTagAndServiceClassifyList = ()=>{
|
||||
setTagOptionList([])
|
||||
setServiceClassifyOptionList([])
|
||||
fetchData<BasicResponse<{ catalogues:CategorizesType[],tags:TagType[]}>>('catalogues',{method:'GET'}).then(response=>{
|
||||
fetchData<BasicResponse<{ catalogues:CategorizesType[],tags:EntityItem[]}>>('catalogues',{method:'GET'}).then(response=>{
|
||||
const {code,data,msg} = response
|
||||
if(code === STATUS_CODE.SUCCESS){
|
||||
setTagOptionList(data.tags?.map((x:TagType)=>{return {
|
||||
label:x.name, value:x.name
|
||||
setTagOptionList(data.tags?.map((x:EntityItem)=>{return {
|
||||
label:x.name, value:x.id
|
||||
}})||[])
|
||||
setServiceClassifyOptionList(data.catalogues)
|
||||
|
||||
@@ -127,19 +127,6 @@ const SystemConfig = forwardRef<SystemConfigHandle>((_,ref) => {
|
||||
}
|
||||
]
|
||||
})
|
||||
console.log({
|
||||
...data.service,
|
||||
team:data.service.team.id,
|
||||
catalogue:data.service.catalogue?.id,
|
||||
logoFile:[
|
||||
{
|
||||
uid: '-1', // 文件唯一标识
|
||||
name: 'image.png', // 文件名
|
||||
status: 'done', // 状态有:uploading, done, error, removed
|
||||
url: data.service?.logo || '', // 图片 Base64 数据
|
||||
}
|
||||
]
|
||||
})
|
||||
setImageBase64(data.service.logo)
|
||||
setShowClassify(data.service.serviceType === 'public')
|
||||
},0)
|
||||
@@ -202,7 +189,7 @@ const SystemConfig = forwardRef<SystemConfigHandle>((_,ref) => {
|
||||
getSystemInfo();
|
||||
setBreadcrumb([
|
||||
{
|
||||
title: <Link to={`/service/list`}>内部数据服务</Link>
|
||||
title: <Link to={`/service/list`}>服务</Link>
|
||||
},
|
||||
{
|
||||
title: '设置'
|
||||
@@ -245,7 +232,7 @@ const SystemConfig = forwardRef<SystemConfigHandle>((_,ref) => {
|
||||
labelAlign='left'
|
||||
scrollToFirstError
|
||||
form={form}
|
||||
className="mx-auto pb-[20px] "
|
||||
className="mx-auto pb-PAGE_INSIDE_B "
|
||||
name="systemConfig"
|
||||
onFinish={onFinish}
|
||||
autoComplete="off"
|
||||
|
||||
@@ -76,7 +76,6 @@ const SystemInsidePage:FC = ()=> {
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
console.log(apiId, serviceId, currentUrl)
|
||||
if(apiId !== undefined){
|
||||
setActiveMenu('api')
|
||||
}else if(serviceId !== currentUrl.split('/')[currentUrl.split('/').length - 1]){
|
||||
@@ -84,7 +83,6 @@ const SystemInsidePage:FC = ()=> {
|
||||
}else{
|
||||
setActiveMenu('api')
|
||||
}
|
||||
console.log(activeMenu)
|
||||
}, [currentUrl]);
|
||||
|
||||
useEffect(()=>{
|
||||
@@ -119,7 +117,7 @@ const SystemInsidePage:FC = ()=> {
|
||||
mode="inline"
|
||||
items={menuData as unknown as ItemType<MenuItemType>[] }
|
||||
/>
|
||||
<div className={` ${['setting', 'upstream'].indexOf(activeMenu!) !== -1 ? 'pr-btnrbase' :''} w-full h-full flex flex-1 flex-col overflow-auto bg-MAIN_BG pt-[20px] pl-[20px] pb-[20px] ` }>
|
||||
<div className={` ${['setting', 'upstream'].indexOf(activeMenu!) !== -1 ? 'pr-btnrbase' :''} w-full h-full flex flex-1 flex-col overflow-auto bg-MAIN_BG pt-[20px] pl-[20px] pb-PAGE_INSIDE_B ` }>
|
||||
<Outlet/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -126,7 +126,7 @@ const SystemInsideSubscriber:FC = ()=>{
|
||||
useEffect(() => {
|
||||
setBreadcrumb([
|
||||
{
|
||||
title:<Link to={`/service/list`}>内部数据服务</Link>
|
||||
title:<Link to={`/service/list`}>服务</Link>
|
||||
},
|
||||
{
|
||||
title:'订阅方管理'
|
||||
@@ -160,16 +160,17 @@ export default SystemInsideSubscriber
|
||||
|
||||
export const SystemSubscriberConfig = forwardRef<SystemSubscriberConfigHandle,SystemSubscriberConfigProps>((props, ref) => {
|
||||
const { message } = App.useApp()
|
||||
const { serviceId, teamId} = props
|
||||
const { serviceId, teamId,appId} = props
|
||||
const [form] = Form.useForm();
|
||||
const {fetchData} = useFetch()
|
||||
const [systemOptionList, setSystemOptionList] = useState<DefaultOptionType[]>()
|
||||
const [memberOptionList, setMemberOptionList] = useState<DefaultOptionType[]>()
|
||||
const [subscriberTeamId, setSubscriberTeamId] = useState<string>()
|
||||
const [appsList, setAppsList] = useState<SimpleSystemItem[]>()
|
||||
const save:()=>Promise<boolean | string> = ()=>{
|
||||
return new Promise((resolve, reject)=>{
|
||||
form.validateFields().then((value)=>{
|
||||
fetchData<BasicResponse<null>>('service/subscriber',{method:'POST',eoBody:({...value,service:serviceId}), eoParams:{service:serviceId,team:teamId}}).then(response=>{
|
||||
fetchData<BasicResponse<null>>('service/subscriber',{method:'POST',eoBody:({...value}), eoParams:{service:serviceId,team:teamId}}).then(response=>{
|
||||
const {code,msg} = response
|
||||
if(code === STATUS_CODE.SUCCESS){
|
||||
message.success(msg || '操作成功!')
|
||||
@@ -195,7 +196,7 @@ export const SystemSubscriberConfig = forwardRef<SystemSubscriberConfigHandle,Sy
|
||||
const {code,data,msg} = response
|
||||
if(code === STATUS_CODE.SUCCESS){
|
||||
const teamMap = new Map<string, unknown>();
|
||||
|
||||
setAppsList(data.apps)
|
||||
data.apps
|
||||
.filter((x:SimpleSystemItem)=>x.id !== serviceId)
|
||||
.forEach((item:SimpleSystemItem) => {
|
||||
@@ -232,10 +233,10 @@ export const SystemSubscriberConfig = forwardRef<SystemSubscriberConfigHandle,Sy
|
||||
|
||||
const getMemberList = ()=>{
|
||||
setMemberOptionList([])
|
||||
fetchData<BasicResponse<{ members: NewSimpleMemberItem[] }>>('team/members/simple',{method:'GET',eoParams:{team:subscriberTeamId}}).then(response=>{
|
||||
fetchData<BasicResponse<{ teams: NewSimpleMemberItem[] }>>('team/members/simple',{method:'GET',eoParams:{team:subscriberTeamId}}).then(response=>{
|
||||
const {code,data,msg} = response
|
||||
if(code === STATUS_CODE.SUCCESS){
|
||||
setMemberOptionList(data.members?.map((x:NewSimpleMemberItem)=>{return {
|
||||
setMemberOptionList(data.teams?.map((x:NewSimpleMemberItem)=>{return {
|
||||
label:x.user.name, value:x.user.id
|
||||
}}))
|
||||
}else{
|
||||
@@ -262,7 +263,7 @@ export const SystemSubscriberConfig = forwardRef<SystemSubscriberConfigHandle,Sy
|
||||
>
|
||||
<Form.Item<SystemSubscriberConfigFieldType>
|
||||
label="订阅方"
|
||||
name="subscriber"
|
||||
name="application"
|
||||
rules={[{ required: true, message: '必填项' }]}
|
||||
>
|
||||
<TreeSelect
|
||||
@@ -271,7 +272,7 @@ export const SystemSubscriberConfig = forwardRef<SystemSubscriberConfigHandle,Sy
|
||||
treeData={systemOptionList}
|
||||
placeholder="请选择"
|
||||
treeDefaultExpandAll
|
||||
onSelect={(_:unknown)=>{setSubscriberTeamId(_)}}
|
||||
onSelect={(_:unknown)=>{ setSubscriberTeamId(appsList?.filter(x=>x.id === _)?.[0]?.team.id)}}
|
||||
/>
|
||||
</Form.Item>
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ const SystemList:FC = ()=>{
|
||||
getMemberList()
|
||||
setBreadcrumb([
|
||||
{
|
||||
title: '内部数据服务'
|
||||
title: '服务'
|
||||
}])
|
||||
}, []);
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ export default function SystemTopology() {
|
||||
getNodeData()
|
||||
setBreadcrumb([
|
||||
{
|
||||
title: <Link to={`/service/list`}>内部数据服务</Link>
|
||||
title: <Link to={`/service/list`}>服务</Link>
|
||||
},
|
||||
{
|
||||
title: '调用拓扑图'
|
||||
|
||||
@@ -176,7 +176,7 @@ const SystemInsideApiList:FC = ()=>{
|
||||
useEffect(() => {
|
||||
setBreadcrumb([
|
||||
{
|
||||
title:<Link to={`/service/list`}>内部数据服务</Link>
|
||||
title:<Link to={`/service/list`}>服务</Link>
|
||||
},
|
||||
{
|
||||
title:'API'
|
||||
|
||||
@@ -148,7 +148,7 @@ const SystemInsideApprovalList:FC = ()=>{
|
||||
useEffect(() => {
|
||||
setBreadcrumb([
|
||||
{
|
||||
title:<Link to={`/service/list`}>内部数据服务</Link>
|
||||
title:<Link to={`/service/list`}>服务</Link>
|
||||
},
|
||||
{
|
||||
title:'订阅审批'
|
||||
|
||||
@@ -27,7 +27,7 @@ const SystemInsidePublic:FC = ()=>{
|
||||
useEffect(() => {
|
||||
setBreadcrumb([
|
||||
{
|
||||
title:<Link to={`/service/list`}>内部数据服务</Link>
|
||||
title:<Link to={`/service/list`}>服务</Link>
|
||||
},
|
||||
{
|
||||
title:'发布'
|
||||
|
||||
@@ -354,7 +354,7 @@ const SystemInsidePublicList:FC = ()=>{
|
||||
useEffect(() => {
|
||||
setBreadcrumb([
|
||||
{
|
||||
title:<Link to={`/service/list`}>内部数据服务</Link>
|
||||
title:<Link to={`/service/list`}>服务</Link>
|
||||
},
|
||||
{
|
||||
title:'发布'
|
||||
@@ -444,7 +444,6 @@ const SystemInsidePublicList:FC = ()=>{
|
||||
onChange={() => {
|
||||
setTableHttpReload(false)
|
||||
}}
|
||||
besidesTableHeight={58}
|
||||
onRowClick={(row:PublishTableListItem|PublishVersionTableListItem)=>openDrawer('view',row)}
|
||||
tableClickAccess="team.service.release.view"
|
||||
/>
|
||||
|
||||
@@ -20,7 +20,7 @@ const DEFAULT_FORM_VALUE = {
|
||||
balance:'round-robin',
|
||||
limitPeerSecond:10000,
|
||||
retry:3,
|
||||
timeout:3,
|
||||
timeout:10000,
|
||||
}
|
||||
|
||||
const SystemInsideUpstreamContent= forwardRef<SystemInsideUpstreamContentHandle>((props,ref) => {
|
||||
@@ -107,7 +107,7 @@ const globalConfigNodesRule: FormItemProps['rules'] = [
|
||||
useEffect(() => {
|
||||
setBreadcrumb([
|
||||
{
|
||||
title: <Link to={`/service/list`}>内部数据服务</Link>
|
||||
title: <Link to={`/service/list`}>服务</Link>
|
||||
},
|
||||
{
|
||||
title: '上游'
|
||||
|
||||
@@ -94,7 +94,8 @@ const TeamInsidePage:FC = ()=> {
|
||||
tagList={[{label:
|
||||
<Paragraph className="mb-0" copyable={teamId ? { text: teamId } : false}>团队 ID:{teamId || '-'}</Paragraph>
|
||||
}]}
|
||||
backUrl="/team/list">
|
||||
backUrl="/team/list"
|
||||
>
|
||||
<div className="flex h-full">
|
||||
<Menu
|
||||
style={{ width: 220 }}
|
||||
@@ -103,7 +104,7 @@ const TeamInsidePage:FC = ()=> {
|
||||
onClick={onMenuClick}
|
||||
selectedKeys={[activeMenu || '']}
|
||||
/>
|
||||
<div className={`flex flex-1 flex-col h-full overflow-auto bg-MAIN_BG pb-[20px] pt-[20px] pl-[10px] ${activeMenu === 'setting' ? ' pr-btnrbase ':''}`}>
|
||||
<div className={`flex flex-1 flex-col h-full overflow-auto bg-MAIN_BG pb-PAGE_INSIDE_B pt-[20px] pl-[10px] ${activeMenu === 'setting' ? ' pr-btnrbase ':''}`}>
|
||||
<Outlet />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -14,6 +14,7 @@ import TableBtnWithPermission from "@common/components/aoplatform/TableBtnWithPe
|
||||
import { useGlobalContext } from "@common/contexts/GlobalStateContext.tsx";
|
||||
import { checkAccess } from "@common/utils/permission.ts";
|
||||
import TeamConfig from "./TeamConfig.tsx";
|
||||
import InsidePage from "@common/components/aoplatform/InsidePage.tsx";
|
||||
|
||||
const TeamList:FC = ()=>{
|
||||
const [searchWord, setSearchWord] = useState<string>('')
|
||||
@@ -158,11 +159,11 @@ const TeamList:FC = ()=>{
|
||||
|
||||
|
||||
return (
|
||||
<div className="flex flex-col flex-1 h-full">
|
||||
<div className="pb-[30px] pt-0">
|
||||
<p className="text-theme text-[26px] mb-[20px]">团队</p>
|
||||
<p>设置团队和成员,然后你可以在团队内创建服务和应用、订阅API,成员只能看到所属团队内的服务和应用。</p>
|
||||
</div>
|
||||
<InsidePage
|
||||
pageTitle='团队'
|
||||
description="设置团队和成员,然后你可以在团队内创建服务和应用、订阅API,成员只能看到所属团队内的服务和应用。"
|
||||
showBorder={false}
|
||||
>
|
||||
<PageList
|
||||
id="global_team"
|
||||
className="pl-btnbase"
|
||||
@@ -203,7 +204,7 @@ const TeamList:FC = ()=>{
|
||||
>
|
||||
<TeamConfig ref={teamConfigRef} inModal entity={modalType === 'add' ? undefined : curTeam} />
|
||||
</Modal>
|
||||
</div>
|
||||
</InsidePage>
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,6 @@
|
||||
"@market/*": ["../market/src/*"],
|
||||
},
|
||||
},
|
||||
"include": ["src", "public/iconpark_eolink.js", "public/iconpark_apinto.js", "../common/src/component/aoplatform/EditableTableWithModal.tsx", "../common/src/components/aoplatform/TransferTable.tsx", "../common/src/components/aoplatform/TreeWithMore.tsx", "../common/src/components/aoplatform/DatePicker.tsx", "../common/src/components/aoplatform/TimeRangeSelector.tsx", "../common/src/components/aoplatform/TimePicker.tsx", "../common/src/components/aoplatform/MemberTransfer.tsx", "../common/src/components/aoplatform/Navigation.tsx", "../common/src/components/aoplatform/PageList.tsx", "../common/src/components/aoplatform/GroupTree.tsx", "../common/src/components/aoplatform/ErrorBoundary.tsx", "../common/src/components/aoplatform/ScrollableSection.tsx", "../common/src/utils/postcat.tsx", "../common/src/utils/curl.ts", "../common/src/components/aoplatform/ResetPsw.tsx", "../common/src/components/aoplatform/SubscribeApprovalModalContent.tsx", "../common/src/components/aoplatform/InsidePageForHub.tsx", "src/components/aoplatform/RenderRoutes.tsx", "../common/src/components/aoplatform/PublishApprovalModalContent.tsx", "../common/src/components/aoplatform/InsidePage.tsx", "../common/src/const/type.ts", "../common/src/components/aoplatform/intelligent-plugin", "../common/src/const/domain"],
|
||||
"include": ["src", "public/iconpark_eolink.js", "public/iconpark_apinto.js", "../common/src/component/aoplatform/EditableTableWithModal.tsx", "../common/src/components/aoplatform/TransferTable.tsx", "../common/src/components/aoplatform/TreeWithMore.tsx", "../common/src/components/aoplatform/DatePicker.tsx", "../common/src/components/aoplatform/TimeRangeSelector.tsx", "../common/src/components/aoplatform/TimePicker.tsx", "../common/src/components/aoplatform/MemberTransfer.tsx", "../common/src/components/aoplatform/Navigation.tsx", "../common/src/components/aoplatform/PageList.tsx", "../common/src/components/aoplatform/GroupTree.tsx", "../common/src/components/aoplatform/ErrorBoundary.tsx", "../common/src/components/aoplatform/ScrollableSection.tsx", "../common/src/utils/postcat.tsx", "../common/src/utils/curl.ts", "../common/src/components/aoplatform/ResetPsw.tsx", "../common/src/components/aoplatform/SubscribeApprovalModalContent.tsx", "src/components/aoplatform/RenderRoutes.tsx", "../common/src/components/aoplatform/PublishApprovalModalContent.tsx", "../common/src/components/aoplatform/InsidePage.tsx", "../common/src/const/type.ts", "../common/src/components/aoplatform/intelligent-plugin", "../common/src/const/domain"],
|
||||
"references": [{ "path": "./tsconfig.node.json" }]
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ export const DASHBOARD_BASE_COLUMNS_CONFIG:(ProColumns<MonitorData>&{eoTitle:str
|
||||
dataIndex: 'requestSuccess',
|
||||
width: 106,
|
||||
ellipsis:true,
|
||||
copyable: true,
|
||||
sorter: (a,b)=> {
|
||||
return a.requestSuccess - b.requestSuccess
|
||||
},
|
||||
@@ -33,7 +32,6 @@ export const DASHBOARD_BASE_COLUMNS_CONFIG:(ProColumns<MonitorData>&{eoTitle:str
|
||||
eoTitle:'请求成功率',
|
||||
dataIndex: 'requestRate',
|
||||
valueType:'percent',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
sorter: (a,b)=> {
|
||||
return a.requestRate - b.requestRate
|
||||
@@ -45,7 +43,6 @@ export const DASHBOARD_BASE_COLUMNS_CONFIG:(ProColumns<MonitorData>&{eoTitle:str
|
||||
eoTitle:'转发总数',
|
||||
width: 96,
|
||||
dataIndex: 'proxyTotal',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
sorter: (a,b)=> {
|
||||
return a.proxyTotal - b.proxyTotal
|
||||
@@ -57,7 +54,6 @@ export const DASHBOARD_BASE_COLUMNS_CONFIG:(ProColumns<MonitorData>&{eoTitle:str
|
||||
eoTitle:'转发成功数',
|
||||
width: 106,
|
||||
dataIndex: 'proxySuccess',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
sorter: (a,b)=> {
|
||||
return a.proxySuccess - b.proxySuccess
|
||||
@@ -70,7 +66,6 @@ export const DASHBOARD_BASE_COLUMNS_CONFIG:(ProColumns<MonitorData>&{eoTitle:str
|
||||
width: 106,
|
||||
dataIndex: 'proxyRate',
|
||||
valueType:'percent',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
sorter: (a,b)=> {
|
||||
return a.proxyRate - b.proxyRate
|
||||
@@ -82,7 +77,6 @@ export const DASHBOARD_BASE_COLUMNS_CONFIG:(ProColumns<MonitorData>&{eoTitle:str
|
||||
eoTitle:'失败状态码数',
|
||||
width: 120,
|
||||
dataIndex: 'statusFail',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
sorter: (a,b)=> {
|
||||
return a.statusFail - b.statusFail
|
||||
@@ -95,7 +89,6 @@ export const DASHBOARD_BASE_COLUMNS_CONFIG:(ProColumns<MonitorData>&{eoTitle:str
|
||||
width: 148,
|
||||
dataIndex: 'avgResp',
|
||||
valueType:'digit',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
sorter: (a,b)=> {
|
||||
return a.avgResp - b.avgResp
|
||||
@@ -108,7 +101,6 @@ export const DASHBOARD_BASE_COLUMNS_CONFIG:(ProColumns<MonitorData>&{eoTitle:str
|
||||
width: 148,
|
||||
dataIndex: 'maxResp',
|
||||
valueType:'digit',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
sorter: (a,b)=> {
|
||||
return a.maxResp - b.maxResp
|
||||
@@ -121,7 +113,6 @@ export const DASHBOARD_BASE_COLUMNS_CONFIG:(ProColumns<MonitorData>&{eoTitle:str
|
||||
width: 148,
|
||||
dataIndex: 'minResp',
|
||||
valueType:'digit',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
sorter: (a,b)=> {
|
||||
return a.minResp - b.minResp
|
||||
@@ -134,7 +125,6 @@ export const DASHBOARD_BASE_COLUMNS_CONFIG:(ProColumns<MonitorData>&{eoTitle:str
|
||||
width: 148,
|
||||
dataIndex: 'avgTraffic',
|
||||
valueType:'digit',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
sorter: (a,b)=> {
|
||||
return a.avgTraffic - b.avgTraffic
|
||||
@@ -147,7 +137,6 @@ export const DASHBOARD_BASE_COLUMNS_CONFIG:(ProColumns<MonitorData>&{eoTitle:str
|
||||
width: 148,
|
||||
dataIndex: 'maxTraffic',
|
||||
valueType:'digit',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
sorter: (a,b)=> {
|
||||
return a.maxTraffic - b.maxTraffic
|
||||
@@ -160,7 +149,6 @@ export const DASHBOARD_BASE_COLUMNS_CONFIG:(ProColumns<MonitorData>&{eoTitle:str
|
||||
width: 148,
|
||||
dataIndex: 'minTraffic',
|
||||
valueType:'digit',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
sorter: (a,b)=> {
|
||||
return a.minTraffic - b.minTraffic
|
||||
@@ -176,7 +164,6 @@ export const DASHBOARD_BASE_COLUMNS_CONFIG:(ProColumns<MonitorData>&{eoTitle:str
|
||||
dataIndex: 'name',
|
||||
width:120,
|
||||
ellipsis:true,
|
||||
copyable:true,
|
||||
fixed: 'left',
|
||||
disable:true
|
||||
},
|
||||
@@ -185,7 +172,6 @@ export const DASHBOARD_BASE_COLUMNS_CONFIG:(ProColumns<MonitorData>&{eoTitle:str
|
||||
eoTitle:'请求路径',
|
||||
dataIndex: 'path',
|
||||
ellipsis:true,
|
||||
copyable:true,
|
||||
width: 80
|
||||
},
|
||||
{
|
||||
@@ -208,7 +194,6 @@ export const DASHBOARD_BASE_COLUMNS_CONFIG:(ProColumns<MonitorData>&{eoTitle:str
|
||||
dataIndex: 'name',
|
||||
width:160,
|
||||
ellipsis:true,
|
||||
copyable:true,
|
||||
fixed: 'left',
|
||||
disable:true
|
||||
},
|
||||
@@ -218,7 +203,6 @@ export const DASHBOARD_BASE_COLUMNS_CONFIG:(ProColumns<MonitorData>&{eoTitle:str
|
||||
dataIndex: 'id',
|
||||
width: 140,
|
||||
ellipsis:true,
|
||||
copyable:true,
|
||||
fixed: 'left'
|
||||
},
|
||||
...DASHBOARD_BASE_COLUMNS_CONFIG as (ProColumns<MonitorApiData>&{eoTitle:string})[]
|
||||
@@ -232,7 +216,6 @@ export const DASHBOARD_BASE_COLUMNS_CONFIG:(ProColumns<MonitorData>&{eoTitle:str
|
||||
dataIndex: 'name',
|
||||
width:160,
|
||||
ellipsis:true,
|
||||
copyable:true,
|
||||
fixed: 'left',
|
||||
disable:true
|
||||
},
|
||||
@@ -242,7 +225,6 @@ export const DASHBOARD_BASE_COLUMNS_CONFIG:(ProColumns<MonitorData>&{eoTitle:str
|
||||
dataIndex: 'id',
|
||||
width: 140,
|
||||
ellipsis:true,
|
||||
copyable:true,
|
||||
fixed: 'left'
|
||||
},
|
||||
...DASHBOARD_BASE_COLUMNS_CONFIG as (ProColumns<MonitorApiData>&{eoTitle:string})[]
|
||||
|
||||
@@ -8,7 +8,6 @@ export const SERVICE_HUB_TABLE_COLUMNS: ProColumns<ServiceHubTableListItem>[] =
|
||||
{
|
||||
title: '服务名称',
|
||||
dataIndex: 'name',
|
||||
copyable: true,
|
||||
ellipsis:true,
|
||||
width:160,
|
||||
fixed:'left',
|
||||
@@ -20,7 +19,6 @@ export const SERVICE_HUB_TABLE_COLUMNS: ProColumns<ServiceHubTableListItem>[] =
|
||||
title: '服务ID',
|
||||
dataIndex: 'id',
|
||||
width: 140,
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
@@ -32,19 +30,16 @@ export const SERVICE_HUB_TABLE_COLUMNS: ProColumns<ServiceHubTableListItem>[] =
|
||||
{
|
||||
title: '所属系统',
|
||||
dataIndex: ['app','name'],
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title: '所属团队',
|
||||
dataIndex: ['team','name'],
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title: '服务分类',
|
||||
dataIndex: ['catalogue','name'],
|
||||
copyable: true,
|
||||
ellipsis:true
|
||||
}
|
||||
];
|
||||
|
||||
@@ -49,10 +49,6 @@ export type CategorizesType = {
|
||||
children:CategorizesType[]
|
||||
}
|
||||
|
||||
export type TagType = {
|
||||
id:string
|
||||
name:string
|
||||
}
|
||||
|
||||
|
||||
export type ServiceHubTableListItem = {
|
||||
|
||||
@@ -5,8 +5,9 @@ import {useCallback, useEffect, useState} from "react";
|
||||
import Tree, {DataNode} from "antd/es/tree";
|
||||
import {BasicResponse, STATUS_CODE} from "@common/const/const.ts";
|
||||
import {useFetch} from "@common/hooks/http.ts";
|
||||
import { CategorizesType, TagType } from "../../const/serviceHub/type.ts";
|
||||
import { CategorizesType } from "../../const/serviceHub/type.ts";
|
||||
import { filterServiceList, initialServiceHubListState, SERVICE_HUB_LIST_ACTIONS, ServiceHubListActionType } from "./ServiceHubList.tsx";
|
||||
import { EntityItem } from "@common/const/type.ts";
|
||||
|
||||
type ServiceHubGroup = {
|
||||
children:JSX.Element
|
||||
@@ -30,21 +31,21 @@ export const ServiceHubGroup = ({children,filterOption,dispatch}:ServiceHubGroup
|
||||
}
|
||||
|
||||
const getTagAndServiceClassifyList = ()=>{
|
||||
fetchData<BasicResponse<{ catalogues:CategorizesType[],tags:TagType[]}>>('catalogues',{method:'GET'}).then(response=>{
|
||||
fetchData<BasicResponse<{ catalogues:CategorizesType[],tags:EntityItem[]}>>('catalogues',{method:'GET'}).then(response=>{
|
||||
const {code,data,msg} = response
|
||||
if(code === STATUS_CODE.SUCCESS){
|
||||
dispatch({type:SERVICE_HUB_LIST_ACTIONS.GET_CATEGORIES,payload:data.catalogues})
|
||||
dispatch({type:SERVICE_HUB_LIST_ACTIONS.GET_TAGS,payload:[...data.tags,{id:'empty',name:'无标签'}]})
|
||||
dispatch({type:SERVICE_HUB_LIST_ACTIONS.SET_SELECTED_CATE,payload:[...data.catalogues.map((x:CategorizesType)=>x.id)]})
|
||||
dispatch({type:SERVICE_HUB_LIST_ACTIONS.SET_SELECTED_TAG,payload:[...data.tags.map((x:TagType)=>x.id),'empty']})
|
||||
dispatch({type:SERVICE_HUB_LIST_ACTIONS.SET_SELECTED_TAG,payload:[...data.tags.map((x:EntityItem)=>x.id),'empty']})
|
||||
}else{
|
||||
message.error(msg || '操作失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const transferToTreeData = useCallback((data:CategorizesType[] | TagType[] ):TreeDataNode[]=>{
|
||||
const loop = (data: CategorizesType[] | TagType[] ): DataNode[] =>
|
||||
const transferToTreeData = useCallback((data:CategorizesType[] | EntityItem[] ):TreeDataNode[]=>{
|
||||
const loop = (data: CategorizesType[] | EntityItem[] ): DataNode[] =>
|
||||
data?.map((item) => {
|
||||
if ((item as CategorizesType).children) {
|
||||
return {
|
||||
|
||||
@@ -6,11 +6,11 @@ import {useBreadcrumb} from "@common/contexts/BreadcrumbContext.tsx";
|
||||
import {BasicResponse, STATUS_CODE} from "@common/const/const.ts";
|
||||
import {useFetch} from "@common/hooks/http.ts";
|
||||
import {RouterParams} from "@core/components/aoplatform/RenderRoutes.tsx";
|
||||
import { CategorizesType, ServiceHubTableListItem, TagType } from "../../const/serviceHub/type.ts";
|
||||
import { CategorizesType, ServiceHubTableListItem } from "../../const/serviceHub/type.ts";
|
||||
import { VirtuosoGrid } from 'react-virtuoso';
|
||||
import { ApiOutlined,LoadingOutlined } from "@ant-design/icons";
|
||||
import ServiceHubGroup from "./ServiceHubGroup.tsx";
|
||||
import { unset } from "lodash-es";
|
||||
import { EntityItem } from "@common/const/type.ts";
|
||||
|
||||
export enum SERVICE_HUB_LIST_ACTIONS {
|
||||
GET_CATEGORIES = 'GET_CATEGORIES',
|
||||
@@ -26,7 +26,7 @@ export enum SERVICE_HUB_LIST_ACTIONS {
|
||||
|
||||
export type ServiceHubListActionType =
|
||||
| { type: SERVICE_HUB_LIST_ACTIONS.GET_CATEGORIES, payload: CategorizesType[] }
|
||||
| { type: SERVICE_HUB_LIST_ACTIONS.GET_TAGS, payload: TagType[] }
|
||||
| { type: SERVICE_HUB_LIST_ACTIONS.GET_TAGS, payload: EntityItem[] }
|
||||
| { type: SERVICE_HUB_LIST_ACTIONS.GET_SERVICES, payload: ServiceHubTableListItem[] }
|
||||
| { type: SERVICE_HUB_LIST_ACTIONS.SET_SERVICES, payload: ServiceHubTableListItem[] }
|
||||
| { type: SERVICE_HUB_LIST_ACTIONS.SET_SELECTED_CATE, payload: string[] }
|
||||
@@ -37,7 +37,7 @@ export type ServiceHubListActionType =
|
||||
|
||||
export const initialServiceHubListState = {
|
||||
categoriesList: [] as CategorizesType[],
|
||||
tagsList: [] as TagType[],
|
||||
tagsList: [] as EntityItem[],
|
||||
servicesList: [] as ServiceHubTableListItem[],
|
||||
showServicesList: [] as ServiceHubTableListItem[],
|
||||
selectedCate: [] as string[],
|
||||
|
||||
@@ -19,9 +19,9 @@ export default function SystemRunningInstruction() {
|
||||
</p> */}
|
||||
<div className="flex mt-[28px]">
|
||||
<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-[20px] font-medium leading-[32px] text-MAIN_TEXT">服务设置</p>
|
||||
<p className="text-[12px] font-normal leading-[20px] text-DESC_TEXT">支持根据权限,拆分人员对 API 添加 、上游设置、鉴权设置等信息发布及管理;同时支持管理 API 调用服务(包含第三方调用)及订阅;</p>
|
||||
<p><Link to="/service/list">添加内部数据服务信息</Link></p>
|
||||
<p><Link to="/service/list">添加服务信息</Link></p>
|
||||
</div>
|
||||
</div>
|
||||
</div></div>
|
||||
|
||||
@@ -66,4 +66,7 @@ require (
|
||||
gorm.io/driver/mysql v1.5.2 // indirect
|
||||
)
|
||||
|
||||
//replace github.com/eolinker/ap-account => ../../eolinker/ap-account
|
||||
//replace (
|
||||
// github.com/eolinker/ap-account => ../../eolinker/ap-account
|
||||
// github.com/eolinker/go-common => ../../eolinker/go-common
|
||||
//)
|
||||
|
||||
@@ -5,9 +5,8 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
SystemGroup = "system"
|
||||
TeamGroup = "team"
|
||||
ProjectGroup = "project"
|
||||
SystemGroup = "system"
|
||||
TeamGroup = "team"
|
||||
)
|
||||
|
||||
type IdentityTeamService interface {
|
||||
|
||||
@@ -51,6 +51,7 @@ func (p *PermitMiddleware) Check(method string, path string) (bool, []gin.Handle
|
||||
func(ginCtx *gin.Context) {
|
||||
userId := utils.UserId(ginCtx)
|
||||
if userId == "" {
|
||||
// 未开启游客模式
|
||||
ginCtx.AbortWithStatusJSON(http.StatusForbidden, gin.H{"code": http.StatusForbidden, "msg": "not login", "success": "fail"})
|
||||
ginCtx.Abort()
|
||||
return
|
||||
@@ -67,6 +68,7 @@ func (p *PermitMiddleware) Check(method string, path string) (bool, []gin.Handle
|
||||
// 当前分组没有配置权限
|
||||
continue
|
||||
}
|
||||
|
||||
domainHandler, has := permit.SelectDomain(group)
|
||||
if !has {
|
||||
// 当前分组没有配置身份handler
|
||||
|
||||
@@ -10,6 +10,7 @@ system:
|
||||
- name: view
|
||||
cname: '查看'
|
||||
value: 'view'
|
||||
guest_allow: true
|
||||
apis:
|
||||
- "GET:/api/v1/user/accounts"
|
||||
- "GET:/api/v1/user/departments"
|
||||
@@ -38,6 +39,7 @@ system:
|
||||
- name: view
|
||||
cname: '查看'
|
||||
value: 'view'
|
||||
guest_allow: true
|
||||
apis:
|
||||
- "GET:/api/v1/manager/teams"
|
||||
- "GET:/api/v1/manager/team"
|
||||
@@ -56,12 +58,14 @@ system:
|
||||
children:
|
||||
- name: view system role
|
||||
cname: '查看系统角色'
|
||||
guest_allow: true
|
||||
value: 'view_system_role'
|
||||
apis:
|
||||
- "GET:/api/v1/system/roles"
|
||||
- "GET:/api/v1/system/role"
|
||||
- name: view team role
|
||||
cname: '查看团队角色'
|
||||
guest_allow: true
|
||||
value: 'view_team_role'
|
||||
apis:
|
||||
- "GET:/api/v1/team/roles"
|
||||
@@ -77,6 +81,7 @@ system:
|
||||
- name: view
|
||||
cname: '查看'
|
||||
value: 'view'
|
||||
guest_allow: true
|
||||
# apis:
|
||||
# - "GET:/api/v1/catalogues"
|
||||
- name: manager
|
||||
@@ -100,6 +105,7 @@ system:
|
||||
- name: view
|
||||
cname: 查看
|
||||
value: 'view'
|
||||
guest_allow: true
|
||||
apis:
|
||||
- "GET:/api/v1/cluster/nodes"
|
||||
- name: manager
|
||||
@@ -115,6 +121,7 @@ system:
|
||||
- name: view
|
||||
cname: 查看
|
||||
value: 'view'
|
||||
guest_allow: true
|
||||
apis:
|
||||
- "GET:/api/v1/certificates"
|
||||
- "GET:/api/v1/certificate"
|
||||
@@ -133,6 +140,7 @@ system:
|
||||
- name: view
|
||||
cname: 查看
|
||||
value: 'view'
|
||||
guest_allow: true
|
||||
apis:
|
||||
- "GET:/api/v1/dynamic/{name}/info"
|
||||
- "GET:/api/v1/dynamic/{name}/list"
|
||||
@@ -157,6 +165,7 @@ system:
|
||||
- name: view all
|
||||
cname: 查看所有应用
|
||||
value: 'view_all'
|
||||
guest_allow: true
|
||||
apis:
|
||||
- "GET:/api/v1/apps"
|
||||
- name: service
|
||||
@@ -166,6 +175,7 @@ system:
|
||||
- name: view all
|
||||
cname: 查看所有服务
|
||||
value: 'view_all'
|
||||
guest_allow: true
|
||||
apis:
|
||||
- "GET:/api/v1/services"
|
||||
- name: team
|
||||
@@ -175,6 +185,7 @@ system:
|
||||
- name: view all
|
||||
cname: 查看所有团队
|
||||
value: 'view_all'
|
||||
guest_allow: true
|
||||
apis:
|
||||
- "GET:/api/v1/manager/teams"
|
||||
- name: api market
|
||||
@@ -184,6 +195,7 @@ system:
|
||||
- name: view
|
||||
cname: 查看
|
||||
value: 'view'
|
||||
guest_allow: true
|
||||
apis:
|
||||
- "GET:/api/v1/catalogue/services"
|
||||
- "GET:/api/v1/catalogue/service"
|
||||
@@ -199,6 +211,7 @@ team:
|
||||
- name: view
|
||||
cname: 查看
|
||||
value: 'view'
|
||||
guest_allow: true
|
||||
apis:
|
||||
- "GET:/api/v1/service/apis"
|
||||
- "GET:/api/v1/service/api/detail"
|
||||
@@ -220,6 +233,7 @@ team:
|
||||
- name: view
|
||||
cname: 查看
|
||||
value: 'view'
|
||||
guest_allow: true
|
||||
apis:
|
||||
- "GET:/api/v1/service/upstream"
|
||||
- name: manager
|
||||
@@ -234,6 +248,7 @@ team:
|
||||
- name: view
|
||||
cname: 查看
|
||||
value: 'view'
|
||||
guest_allow: true
|
||||
apis:
|
||||
- "GET:/api/v1/service/releases"
|
||||
- "GET:/api/v1/service/release"
|
||||
@@ -255,6 +270,7 @@ team:
|
||||
- name: view
|
||||
cname: 查看
|
||||
value: 'view'
|
||||
guest_allow: true
|
||||
apis:
|
||||
- "GET:/api/v1/service/approval/subscribes"
|
||||
- "GET:/api/v1/service/approval/subscribe"
|
||||
@@ -289,6 +305,7 @@ team:
|
||||
- name: view
|
||||
cname: 查看
|
||||
value: 'view'
|
||||
guest_allow: true
|
||||
apis:
|
||||
- "GET:/api/v1/application/subscriptions"
|
||||
- name: manager
|
||||
@@ -305,6 +322,7 @@ team:
|
||||
- name: view
|
||||
cname: 查看
|
||||
value: 'view'
|
||||
guest_allow: true
|
||||
apis:
|
||||
- "GET:/api/v1/app/authorization"
|
||||
- "GET:/api/v1/app/authorizations"
|
||||
@@ -339,6 +357,7 @@ team:
|
||||
- name: view
|
||||
cname: 查看
|
||||
value: 'view'
|
||||
guest_allow: true
|
||||
apis:
|
||||
- "GET:/api/v1/team/members"
|
||||
- "GET:/api/v1/team/members/toadd"
|
||||
@@ -356,6 +375,7 @@ team:
|
||||
- name: view
|
||||
cname: '查看'
|
||||
value: 'view'
|
||||
guest_allow: true
|
||||
apis:
|
||||
- "GET:/api/v1/manager/teams"
|
||||
- "GET:/api/v1/manager/team"
|
||||
|
||||
@@ -51,6 +51,21 @@ system:
|
||||
permits:
|
||||
- system.workspace.api_market.view
|
||||
default: true
|
||||
- name: guest
|
||||
cname: 只读成员
|
||||
permits:
|
||||
- system.api_market.service_classification.view
|
||||
- system.devops.cluster.view
|
||||
- system.devops.log_configuration.view
|
||||
- system.devops.ssl_certificate.view
|
||||
- system.organization.member.view
|
||||
- system.organization.role.view_system_role
|
||||
- system.organization.role.view_team_role
|
||||
- system.organization.team.view
|
||||
- system.workspace.api_market.view
|
||||
- system.workspace.application.view_all
|
||||
- system.workspace.service.view_all
|
||||
- system.workspace.team.view_all
|
||||
team:
|
||||
- name: team_admin
|
||||
cname: 团队管理员
|
||||
@@ -113,4 +128,15 @@ team:
|
||||
- team.application.subscription.manager
|
||||
- team.application.subscription.view
|
||||
- team.team.member.view
|
||||
default: true
|
||||
default: true
|
||||
- name: guest
|
||||
cname: 只读成员
|
||||
permits:
|
||||
- team.application.authorization.view
|
||||
- team.application.subscription.view
|
||||
- team.service.api.view
|
||||
- team.service.release.view
|
||||
- team.service.subscription.view
|
||||
- team.service.upstream.view
|
||||
- team.team.member.view
|
||||
- team.team.team.view
|
||||
Reference in New Issue
Block a user