Skip to content

Commit e911a0d

Browse files
author
Kama Huang
committed
last function check. works well
Signed-off-by: Kama Huang <kamahuan@amazon.com>
1 parent 74d40e5 commit e911a0d

File tree

3 files changed

+9
-28
lines changed

3 files changed

+9
-28
lines changed

public/pages/workflow_detail/left_nav/left_nav.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ import {
5959
reduceToTemplate,
6060
sleep,
6161
uiConfigToFormik,
62-
USE_NEW_HOME_PAGE,
6362
useDataSourceVersion,
6463
useMissingDataSourceVersion,
6564
} from '../../../utils';
@@ -699,6 +698,7 @@ export function LeftNav(props: LeftNavProps) {
699698
.unwrap()
700699
.then((resp: SimulateIngestPipelineResponseVerbose) => {
701700
const ingestPipelineErrors = getIngestPipelineErrors(resp);
701+
702702
// The errors map may be empty; in which case, this dispatch will clear
703703
// any older errors.
704704
dispatch(

public/pages/workflow_detail/resizable_workspace.tsx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ import {
3535
} from '../../../common';
3636
import {
3737
aggregateConsoleErrors,
38-
formatProcessorError,
3938
isValidUiWorkflow,
4039
reduceToTemplate,
4140
} from '../../utils';
@@ -80,21 +79,9 @@ export function ResizableWorkspace(props: ResizableWorkspaceProps) {
8079
}
8180
}, [props.uiConfig?.ingest?.enabled]);
8281

83-
// const [currentWorkflowId, setCurrentWorkflowId] = useState<
84-
// string | undefined
85-
// >(props.workflow?.id);
86-
8782
// Always start with console closed when workflow changes
8883
const [isConsolePanelOpen, setIsConsolePanelOpen] = useState<boolean>(false);
8984

90-
// Reset console state when workflow changes - ensure it's always closed initially
91-
// useEffect(() => {
92-
// if (props.workflow?.id !== currentWorkflowId) {
93-
// setCurrentWorkflowId(props.workflow?.id);
94-
// setIsConsolePanelOpen(false); // Always close on workflow change
95-
// }
96-
// }, [props.workflow?.id, currentWorkflowId]);
97-
9885
useEffect(() => {
9986
setIsConsolePanelOpen(false);
10087
}, [props.workflow?.id]);

public/pages/workflow_detail/tools/console/console.tsx

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ export function Console(props: ConsoleProps) {
3232
const bodyColor = window.getComputedStyle(document.body).color;
3333
const colorValues = bodyColor.match(/\d+/g);
3434
const isDarkMode = colorValues && parseInt(colorValues[0]) > 150;
35-
35+
3636
return {
3737
backgroundColor: isDarkMode ? '#1a1a1a' : '#ffffff',
3838
textColor: isDarkMode ? '#ffffff' : '#000000',
39-
isDarkMode
39+
isDarkMode,
4040
};
4141
};
4242

@@ -56,7 +56,9 @@ export function Console(props: ConsoleProps) {
5656
};
5757

5858
const showHeader = () => {
59-
const injectedStyle = document.getElementById('console-fullscreen-hide-header');
59+
const injectedStyle = document.getElementById(
60+
'console-fullscreen-hide-header'
61+
);
6062
if (injectedStyle) {
6163
injectedStyle.remove();
6264
}
@@ -276,10 +278,8 @@ export function Console(props: ConsoleProps) {
276278
</EuiFlexGroup>
277279
</div>
278280

279-
{/* Simple Fullscreen for Responses */}
280281
{fullscreenMode === 'responses' && (
281282
<>
282-
{/* Main fullscreen container */}
283283
<div
284284
style={{
285285
position: 'fixed',
@@ -296,7 +296,6 @@ export function Console(props: ConsoleProps) {
296296
}}
297297
onClick={(e) => e.stopPropagation()}
298298
>
299-
{/* Pure text only */}
300299
<pre
301300
style={{
302301
marginTop: '0px',
@@ -316,8 +315,7 @@ export function Console(props: ConsoleProps) {
316315
{props.ingestResponse}
317316
</pre>
318317
</div>
319-
320-
{/* Separate close button overlay */}
318+
321319
<div
322320
style={{
323321
position: 'fixed',
@@ -343,10 +341,8 @@ export function Console(props: ConsoleProps) {
343341
</>
344342
)}
345343

346-
{/* Simple Fullscreen for Errors */}
347344
{fullscreenMode === 'errors' && (
348345
<>
349-
{/* Main fullscreen container */}
350346
<div
351347
style={{
352348
position: 'fixed',
@@ -363,7 +359,6 @@ export function Console(props: ConsoleProps) {
363359
}}
364360
onClick={(e) => e.stopPropagation()}
365361
>
366-
{/* Pure text only */}
367362
<div style={{ marginTop: '0px' }}>
368363
{props.errorMessages.map((errorMessage, idx) => (
369364
<pre
@@ -387,8 +382,7 @@ export function Console(props: ConsoleProps) {
387382
))}
388383
</div>
389384
</div>
390-
391-
{/* Separate close button overlay */}
385+
392386
<div
393387
style={{
394388
position: 'fixed',
@@ -415,4 +409,4 @@ export function Console(props: ConsoleProps) {
415409
)}
416410
</>
417411
);
418-
}
412+
}

0 commit comments

Comments
 (0)