fix: cluster worker config issues

This commit is contained in:
jialin
2025-12-18 17:29:07 +08:00
parent e83bff6923
commit 78368e9979
21 changed files with 112 additions and 43 deletions
+1 -1
View File
@@ -95,7 +95,7 @@ const LogsViewer: React.FC<LogsViewerProps> = forwardRef((props, ref) => {
const createChunkConnection = async () => {
chunkRequedtRef.current?.current?.cancel?.();
chunkRequedtRef.current = await setChunkRequest({
chunkRequedtRef.current = setChunkRequest({
url,
params: {
...props.params,
+14 -11
View File
@@ -3,6 +3,7 @@ import useOverlayScroller from '@/hooks/use-overlay-scroller';
import { Modal, type ModalProps } from 'antd';
import React from 'react';
import styled from 'styled-components';
import { ScrollerContext } from './use-scroller-context';
const Wrapper = styled.div<{ $maxHeight?: number | string }>`
max-height: ${({ $maxHeight }) =>
@@ -16,7 +17,7 @@ const ScrollerModal = (
) => {
const scroller = React.useRef<any>(null);
const { saveScrollHeight, restoreScrollHeight } = useBodyScroll();
const { initialize, destroyInstance } = useOverlayScroller();
const { initialize, destroyInstance, scrollToBottom } = useOverlayScroller();
React.useEffect(() => {
if (props.open) {
@@ -68,16 +69,18 @@ const ScrollerModal = (
: {}
}}
>
<Wrapper
ref={scroller}
data-overlayscrollbars-initialize
className="overlay-scroller-wrapper"
$maxHeight={props.maxContentHeight || 500}
hidden={false}
style={{ paddingInline: 24, paddingBlockEnd: 0 }}
>
{props.children}
</Wrapper>
<ScrollerContext.Provider value={{ scrollToBottom }}>
<Wrapper
ref={scroller}
data-overlayscrollbars-initialize
className="overlay-scroller-wrapper"
$maxHeight={props.maxContentHeight || 500}
hidden={false}
style={{ paddingInline: 24, paddingBlockEnd: 0 }}
>
{props.children}
</Wrapper>
</ScrollerContext.Provider>
</Modal>
);
};
@@ -0,0 +1,11 @@
import { createContext, useContext } from 'react';
interface ScrollerContextProps {
scrollToBottom: () => void;
}
export const ScrollerContext = createContext<ScrollerContextProps>({
scrollToBottom: () => {}
});
export const useScrollerContext = () => useContext(ScrollerContext);