Skip to content

Feature/1.8 cx #299

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
May 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
65ad765
feature/1.8-Improve system observability
NINGyv179 Apr 25, 2025
3215912
feature/1.8-Improve system observability
NINGyv179 Apr 27, 2025
2e18e1f
feature/1.8-Improve system observability
NINGyv179 Apr 27, 2025
85130ad
feature/1.8-Improve system observability
NINGyv179 Apr 27, 2025
2fe3105
feature/1.8-Improve system observability
NINGyv179 Apr 27, 2025
be658a1
feature/1.8-Improve system observability
NINGyv179 Apr 27, 2025
7d255f4
feature/1.8-Improve system observability
NINGyv179 Apr 27, 2025
acfe5b9
feature/1.8-Improve system observability
NINGyv179 Apr 27, 2025
2f37be4
feature/1.8-Improve system observability
NINGyv179 Apr 29, 2025
d596f1a
feature/1.8-Improve system observability
NINGyv179 Apr 29, 2025
48f46ec
feature/1.8-Improve system observability
NINGyv179 Apr 29, 2025
c45cf6a
feature/1.8-Improve system observability
NINGyv179 Apr 29, 2025
159bcc7
feature/1.8-Improve system observability
NINGyv179 Apr 29, 2025
5e05b21
feature/1.8-Improve system observability
NINGyv179 Apr 29, 2025
71e1ff7
feature/1.8-Improve system observability
NINGyv179 Apr 29, 2025
5384807
feature/1.8-Improve system observability
NINGyv179 Apr 29, 2025
32bc735
feature/1.8-Improve system observability
NINGyv179 Apr 30, 2025
e98908a
feature/1.8-Improve system observability
NINGyv179 Apr 30, 2025
119e03f
feature/1.8-Improve system observability
NINGyv179 Apr 30, 2025
f1e5b29
feature/1.8-Improve system observability
NINGyv179 Apr 30, 2025
12a8317
feature/1.8-Improve system observability
NINGyv179 Apr 30, 2025
18a3516
feature/1.8-Improve system observability
NINGyv179 Apr 30, 2025
d50fbcd
feature/1.8-Improve system observability
NINGyv179 Apr 30, 2025
c0dc5bc
feature/1.8-Improve system observability
NINGyv179 Apr 30, 2025
b91830b
feature/1.8-Improve system observability
NINGyv179 Apr 30, 2025
131a1fa
feature/1.8-Improve system observability
NINGyv179 May 6, 2025
83da8df
feature/1.8-Improve system observability
NINGyv179 May 6, 2025
304239e
feature/1.8-Improve system observability
NINGyv179 May 6, 2025
a0f4ef4
feat: feature/1.8-Improve system observability
NINGyv179 May 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
"vite-tsconfig-paths": "^4.3.2",
"react-json-view": "^1.21.3",
"zod": "^3.23.8",
"@modelcontextprotocol/sdk": "^1.9.0"
"@modelcontextprotocol/sdk": "^1.9.0",
"echarts-for-react": "^3.0.2"
},
"devDependencies": {
"@ant-design/cssinjs": "^1.18.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function BasicLayout({ project = 'core' }: { project: string }) {
const { state, accessData, checkPermission, accessInit, dispatch, resetAccess, getGlobalAccessData, menuList } =
useGlobalContext()
const [pathname, setPathname] = useState(currentUrl)
const mainPage = project === 'core' ? '/service/list' : '/serviceHub/list'
const mainPage = project === 'core' ? '/service/list' : '/portal/list'
const [menuItems, setMenuItems] = useState<MenuProps['items']>()
const pluginSlotHub = usePluginSlotHub()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class InsidePageProps {
scrollInsidePage?: boolean = false
customPadding?: boolean
customBtn?: ReactNode
customBanner?: ReactNode
}

const InsidePage: FC<InsidePageProps> = ({
Expand All @@ -46,7 +47,8 @@ const InsidePage: FC<InsidePageProps> = ({
scrollPage = true,
scrollInsidePage = false,
customPadding = false,
customBtn
customBtn,
customBanner
}) => {
const navigate = useNavigate()

Expand All @@ -61,8 +63,13 @@ const InsidePage: FC<InsidePageProps> = ({
<div
className={`border-[0px] mr-PAGE_INSIDE_X ${showBorder ? 'border-solid border-b-[1px] border-BORDER' : ''} ${headerClassName}`}
>
{!pageTitle && !description && !backUrl && !customBtn ? (
{!pageTitle && !description && !backUrl && !customBtn && !customBanner ? (
<></>
) : customBanner ? (
<div className={customPadding ? '' : 'mb-[15px]'}>
{backUrl && <TopBreadcrumb handleBackCallback={() => goBack()} />}
{customBanner}
</div>
) : (
<div className={customPadding ? '' : 'mb-[30px]'}>
{backUrl && <TopBreadcrumb handleBackCallback={() => goBack()} />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ interface PageListProps<T> extends ProTableProps<T, unknown>, RefAttributes<Acti
delayLoading?: boolean
noScroll?: boolean
/* 前端分页的表格,需要传入该字段以支持后端搜索 */
manualReloadTable?: () => void,
manualReloadTable?: () => void
customEmptyRender?: () => React.ReactNode
}

Expand Down Expand Up @@ -109,6 +109,7 @@ const PageList = <T extends Record<string, unknown>>(
const [allowTableClick, setAllowTableClick] = useState<boolean>(false)
const { accessData, checkPermission, accessInit, state } = useGlobalContext()
const [minTableWidth, setMinTableWidth] = useState<number>(0)
const [enableVirtual, setEnableVirtual] = useState(false)

useImperativeHandle(ref, () => actionRef.current!)

Expand Down Expand Up @@ -301,7 +302,7 @@ const PageList = <T extends Record<string, unknown>>(
<ProTable<T>
actionRef={actionRef}
columns={newColumns}
virtual
virtual={enableVirtual}
scroll={noScroll ? undefined : { x: tableWidth, y: tableHeight }}
size="middle"
rowSelection={rowSelection}
Expand All @@ -328,6 +329,10 @@ const PageList = <T extends Record<string, unknown>>(
}
: false
}}
postData={(data: any) => {
setEnableVirtual(!!data?.length)
return data
}}
showSorterTooltip={false}
columnsState={{ persistenceType: 'localStorage', persistenceKey: id }}
pagination={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ type TimeRangeSelectorProps = {
bindRef?: any
hideBtns?: TimeRangeButton[]
defaultTimeButton?: TimeRangeButton
customClassNames?: string
}
const TimeRangeSelector = (props: TimeRangeSelectorProps) => {
const {
Expand All @@ -38,7 +39,8 @@ const TimeRangeSelector = (props: TimeRangeSelectorProps) => {
labelSize = 'default',
bindRef,
hideBtns = [],
defaultTimeButton = 'hour'
defaultTimeButton = 'hour',
customClassNames = 'pt-btnybase'
} = props
const [timeButton, setTimeButton] = useState(initialTimeButton || '')
const [datePickerValue, setDatePickerValue] = useState<RangeValue>(initialDatePickerValue || [null, null])
Expand Down Expand Up @@ -110,8 +112,12 @@ const TimeRangeSelector = (props: TimeRangeSelectorProps) => {
return current && current.valueOf() > dayjs().startOf('day').valueOf()
}

useEffect(() => {
setTimeButton(initialTimeButton || '')
}, [initialTimeButton])

return (
<div className="flex flex-nowrap items-center pt-btnybase mr-btnybase">
<div className={`flex flex-nowrap items-center ${customClassNames} mr-btnybase`}>
{!hideTitle && <label className={`whitespace-nowrap `}>{$t('时间')}:</label>}
<Radio.Group className="whitespace-nowrap" value={timeButton} onChange={handleRadioChange} buttonStyle="solid">
{hideBtns?.length && hideBtns.includes('hour') ? null : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ export const TranslateWord = () => {
{$t('调用地址')}
{$t('消费者 IP')}
{$t('鉴权名称')}
{$t('日志输出')}
{$t('响应时间')}
{$t('时间戳')}
</>
)
}
Loading