11import {
2- ActionIcon ,
32 Badge ,
43 Button ,
54 Card ,
98 Grid ,
109 Group ,
1110 Stack ,
12- Table ,
1311 Text ,
1412 ThemeIcon ,
1513 Title ,
@@ -20,9 +18,6 @@ import {
2018 IconExternalLink ,
2119 IconEye ,
2220 IconFile ,
23- IconFlag ,
24- IconInfoCircle ,
25- IconKey ,
2621 IconPlayerPlay ,
2722 IconTag ,
2823 IconTerminal ,
@@ -34,14 +29,11 @@ import { useEffect, useRef, useState } from "react";
3429import { useNotifier } from "../../../hooks/useNotifier" ;
3530import { useSettings } from "../../../hooks/useSettings" ;
3631import { EnrichedExecutable } from "../../../types/executable" ;
37- import {
38- ExecutableArgument ,
39- ExecutableParameter ,
40- } from "../../../types/generated/flowfile" ;
4132import { NotificationType } from "../../../types/notification" ;
42- import { CodeHighlighter } from "../../CodeHighlighter" ;
4333import { MarkdownRenderer } from "../../MarkdownRenderer" ;
4434import { LogLine , LogViewer } from "../Logs/LogViewer.tsx" ;
35+ import { ExecutableEnvironmentDetails } from "./ExecutableEnvironmentDetails" ;
36+ import { ExecutableTypeDetails } from "./ExecutableTypeDetails" ;
4537import { ExecutionForm , ExecutionFormData } from "./ExecutionForm" ;
4638
4739export type ExecutableInfoProps = {
@@ -338,187 +330,17 @@ export default function ExecutableInfo({ executable }: ExecutableInfoProps) {
338330 </ Card >
339331 </ Grid . Col >
340332 ) }
341-
342- { executable . exec ?. params && executable . exec . params . length > 0 && (
343- < Grid . Col span = { 12 } >
344- < Card withBorder >
345- < Stack gap = "sm" >
346- < Title order = { 4 } >
347- < Group gap = "xs" >
348- < IconKey size = { 16 } />
349- Environment Parameters
350- </ Group >
351- </ Title >
352- < Table >
353- < Table . Thead >
354- < Table . Tr >
355- < Table . Th > Variable</ Table . Th >
356- < Table . Th > Type</ Table . Th >
357- < Table . Th > Source</ Table . Th >
358- </ Table . Tr >
359- </ Table . Thead >
360- < Table . Tbody >
361- { executable . exec . params . map (
362- ( param : ExecutableParameter , index : number ) => {
363- const type = param . text
364- ? "static"
365- : param . secretRef
366- ? "secret"
367- : "prompt" ;
368- const source =
369- param . text || param . secretRef || param . prompt ;
370-
371- return (
372- < Table . Tr key = { index } >
373- < Table . Td >
374- < Code > { param . envKey } </ Code >
375- </ Table . Td >
376- < Table . Td >
377- < Badge
378- size = "sm"
379- variant = "light"
380- color = {
381- type === "secret"
382- ? "red"
383- : type === "prompt"
384- ? "blue"
385- : "gray"
386- }
387- >
388- { type }
389- </ Badge >
390- </ Table . Td >
391- < Table . Td >
392- < Text size = "sm" style = { { maxWidth : 200 } } >
393- { source }
394- </ Text >
395- </ Table . Td >
396- </ Table . Tr >
397- ) ;
398- }
399- ) }
400- </ Table . Tbody >
401- </ Table >
402- </ Stack >
403- </ Card >
404- </ Grid . Col >
405- ) }
406-
407- { executable . exec ?. args && executable . exec . args . length > 0 && (
408- < Grid . Col span = { 12 } >
409- < Card withBorder >
410- < Stack gap = "sm" >
411- < Title order = { 4 } >
412- < Group gap = "xs" >
413- < IconFlag size = { 16 } />
414- Command Arguments
415- </ Group >
416- </ Title >
417- < Table >
418- < Table . Thead >
419- < Table . Tr >
420- < Table . Th > Variable</ Table . Th >
421- < Table . Th > Input</ Table . Th >
422- < Table . Th > Type</ Table . Th >
423- < Table . Th > Required</ Table . Th >
424- </ Table . Tr >
425- </ Table . Thead >
426- < Table . Tbody >
427- { executable . exec . args . map (
428- ( arg : ExecutableArgument , index : number ) => (
429- < Table . Tr key = { index } >
430- < Table . Td >
431- < Code > { arg . envKey } </ Code >
432- </ Table . Td >
433- < Table . Td >
434- < Group gap = "xs" >
435- < Badge size = "sm" variant = "light" >
436- { arg . pos ? `pos-${ arg . pos } ` : `--${ arg . flag } ` }
437- </ Badge >
438- { arg . default && (
439- < Tooltip label = { `Default: ${ arg . default } ` } >
440- < ActionIcon variant = "subtle" size = "xs" >
441- < IconInfoCircle size = { 12 } />
442- </ ActionIcon >
443- </ Tooltip >
444- ) }
445- </ Group >
446- </ Table . Td >
447- < Table . Td >
448- < Text size = "sm" > { arg . type || "string" } </ Text >
449- </ Table . Td >
450- < Table . Td >
451- < Badge
452- size = "sm"
453- variant = "light"
454- color = { arg . required ? "red" : "green" }
455- >
456- { arg . required ? "Yes" : "No" }
457- </ Badge >
458- </ Table . Td >
459- </ Table . Tr >
460- )
461- ) }
462- </ Table . Tbody >
463- </ Table >
464- </ Stack >
465- </ Card >
466- </ Grid . Col >
467- ) }
468-
469- { executable . exec && (
470- < Grid . Col span = { 12 } >
471- < Card withBorder >
472- < Stack gap = "sm" >
473- < Title order = { 4 } >
474- < Group gap = "xs" >
475- < IconTerminal size = { 16 } />
476- Execution Details
477- </ Group >
478- </ Title >
479- < Stack gap = "xs" >
480- { executable . exec . cmd && (
481- < div >
482- < Title order = { 5 } > Command:</ Title >
483- < CodeHighlighter
484- theme = { settings . theme }
485- copyButton = { false }
486- >
487- { executable . exec . cmd }
488- </ CodeHighlighter >
489- </ div >
490- ) }
491- { executable . exec . file && (
492- < div >
493- < Title order = { 5 } > File:</ Title >
494- < Code > { executable . exec . file } </ Code >
495- </ div >
496- ) }
497- { executable . exec . dir && (
498- < div >
499- < Title order = { 5 } > Directory:</ Title >
500- < Code > { executable . exec . dir } </ Code >
501- </ div >
502- ) }
503- { executable . exec . logMode && (
504- < div >
505- < Title order = { 5 } > Log Mode:</ Title >
506- < Badge variant = "light" > { executable . exec . logMode } </ Badge >
507- </ div >
508- ) }
509- </ Stack >
510- </ Stack >
511- </ Card >
512- </ Grid . Col >
513- ) }
514333 </ Grid >
515334
335+ < ExecutableEnvironmentDetails executable = { executable } />
336+ < ExecutableTypeDetails executable = { executable } />
337+
516338 { output . length > 0 && (
517339 < Drawer
518340 opened = { true }
519341 onClose = { ( ) => setOutput ( [ ] ) }
520342 title = "Execution Output"
521- // scrollAreaComponent={ScrollArea.Autosize}
343+ size = "33%"
522344 position = "bottom"
523345 >
524346 < LogViewer logs = { output } formatted = { true } fontSize = { 12 } />
0 commit comments