feat: add expand all rows

This commit is contained in:
jialin
2025-03-05 14:05:12 +08:00
parent 3fdde5f8c4
commit fd7ce9027a
12 changed files with 92 additions and 33 deletions
@@ -15,15 +15,10 @@ type ViewModalProps = {
onCancel: () => void;
};
const ViewCodeModal: React.FC<ViewModalProps> = (props) => {
const viewportHeight = window.innerHeight;
const ViewLogsModal: React.FC<ViewModalProps> = (props) => {
const intl = useIntl();
const { setChunkRequest } = useSetChunkRequest();
const { open, url, onCancel, tail } = props || {};
const [modalSize] = useState<any>({
width: '100%',
height: viewportHeight - 86
});
const [enableScorllLoad, setEnableScorllLoad] = useState(true);
const logsViewerRef = React.useRef<any>(null);
const requestRef = React.useRef<any>(null);
@@ -106,13 +101,12 @@ const ViewCodeModal: React.FC<ViewModalProps> = (props) => {
borderRadius: 0
}
}}
width={modalSize.width}
width="100%"
footer={null}
>
<div className="viewer-wrapper" ref={contentRef}>
<LogsViewer
ref={logsViewerRef}
height={modalSize.height}
diffHeight={93}
url={url}
tail={tail}
@@ -126,4 +120,4 @@ const ViewCodeModal: React.FC<ViewModalProps> = (props) => {
);
};
export default React.memo(ViewCodeModal);
export default ViewLogsModal;