style: keep the logs pagination visible

This commit is contained in:
jialin
2025-06-27 10:15:11 +08:00
parent e2d79a6802
commit cbeea23295
14 changed files with 116 additions and 132 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
export const controlSeqRegex = /\x1b\[(\d*);?(\d*)?([A-DJKHfm])/g;
export const replaceLineRegex = /\r\n/g;
export const PageSize = 500;
export const PageSize = 1000;
export const throttle = <T extends (...args: any[]) => void>(
func: T,
@@ -106,4 +106,4 @@ const LogsPagination: React.FC<LogsPaginationProps> = (props) => {
);
};
export default React.memo(LogsPagination);
export default LogsPagination;
+1 -1
View File
@@ -17,7 +17,7 @@
top: 0;
bottom: 0;
right: -18px;
width: 80px;
// width: 80px;
height: 185px;
&:hover {
@@ -15,6 +15,7 @@
.text {
min-height: 22px;
padding-inline-end: 80px;
&.numable {
position: relative;
@@ -12,7 +12,7 @@
}
.ant-btn {
background-color: rgba(71, 71, 71, 100%) !important;
background-color: rgba(71, 71, 71, 70%) !important;
}
.pages {
@@ -11,7 +11,6 @@ import React, {
useRef,
useState
} from 'react';
import styled from 'styled-components';
import LogsList from './logs-list';
import LogsPagination from './logs-pagination';
import './styles/index.less';
@@ -28,12 +27,6 @@ interface LogsViewerProps {
diffHeight?: number;
}
const PaginationWrapper = styled.div`
position: absolute;
right: 50px;
top: 30px;
`;
const LogsViewer: React.FC<LogsViewerProps> = forwardRef((props, ref) => {
const { diffHeight, url, tail: defaultTail, enableScorllLoad = true } = props;
const { pageSize, page, setPage, setTotalPage, totalPage } =
@@ -302,16 +295,6 @@ const LogsViewer: React.FC<LogsViewerProps> = forwardRef((props, ref) => {
return (
<div className="logs-viewer-wrap-w2">
{/* <PaginationWrapper>
<Pagination
simple={{ readOnly: true }}
total={totalPage}
current={page}
pageSize={pageSize}
showSizeChanger={false}
hideOnSinglePage={false}
></Pagination>
</PaginationWrapper> */}
<div className="wrap">
<div>
<LogsList
@@ -331,7 +314,7 @@ const LogsViewer: React.FC<LogsViewerProps> = forwardRef((props, ref) => {
<div className="pg">
<div
className={classNames('pg-inner', {
'at-top': isAtTop
'at-top': true
})}
>
<LogsPagination