|
1 | 1 | import LoadingIcon from '@/components/LoadingIcon'; |
2 | 2 | import {Button} from '@/components/ui/button'; |
3 | 3 | import {Select, SelectContent, SelectItem, SelectTrigger, SelectValue} from '@/components/ui/select'; |
4 | | -import {Skeleton} from '@/components/ui/skeleton'; |
5 | 4 | import {Tooltip, TooltipContent, TooltipTrigger} from '@/components/ui/tooltip'; |
6 | 5 | import Properties from '@/pages/platform/workflow-editor/components/Properties/Properties'; |
7 | 6 | import DataStreamComponentsTab from '@/pages/platform/workflow-editor/components/node-details-tabs/DataStreamComponentsTab'; |
8 | 7 | import { |
9 | 8 | ActionDefinitionApi, |
10 | | - ComponentDefinition, |
11 | 9 | ComponentDefinitionBasic, |
12 | 10 | GetComponentActionDefinitionRequest, |
13 | 11 | GetComponentTriggerDefinitionRequest, |
@@ -448,9 +446,6 @@ const WorkflowNodeDetailsPanel = ({ |
448 | 446 | }, [componentActions, currentNode?.name]); |
449 | 447 |
|
450 | 448 | const currentTaskData = currentComponentDefinition || currentTaskDispatcherDefinition; |
451 | | - const currentOperationFetcher = currentActionFetched || currentTriggerFetched; |
452 | | - |
453 | | - const actionDataMissing = currentComponent?.operationName && (!matchingOperation?.name || !currentOperationFetcher); |
454 | 449 |
|
455 | 450 | if (!workflowNodeDetailsPanelOpen || !currentNode?.name || !currentTaskData) { |
456 | 451 | return <></>; |
@@ -501,32 +496,21 @@ const WorkflowNodeDetailsPanel = ({ |
501 | 496 | </header> |
502 | 497 |
|
503 | 498 | <main className="flex h-full flex-col"> |
504 | | - {actionDataMissing && ( |
505 | | - <div className="flex flex-col border-b border-muted p-4"> |
506 | | - <span className="text-sm leading-6">Actions</span> |
507 | | - |
508 | | - <Skeleton className="h-9 w-full" /> |
509 | | - </div> |
510 | | - )} |
511 | | - |
512 | | - {(!!(currentTaskData as ComponentDefinition).actions?.length || |
513 | | - !!(currentTaskData as ComponentDefinition).triggers?.length) && ( |
514 | | - <CurrentOperationSelect |
515 | | - description={ |
516 | | - currentNode?.trigger |
517 | | - ? currentTriggerDefinition?.description |
518 | | - : currentActionDefinition?.description |
519 | | - } |
520 | | - handleValueChange={handleOperationSelectChange} |
521 | | - operations={ |
522 | | - (currentNode?.trigger |
523 | | - ? currentComponentDefinition?.triggers |
524 | | - : currentComponentDefinition?.actions)! |
525 | | - } |
526 | | - triggerSelect={currentNode?.trigger} |
527 | | - value={currentOperationName} |
528 | | - /> |
529 | | - )} |
| 499 | + <CurrentOperationSelect |
| 500 | + description={ |
| 501 | + currentNode?.trigger |
| 502 | + ? currentTriggerDefinition?.description |
| 503 | + : currentActionDefinition?.description |
| 504 | + } |
| 505 | + handleValueChange={handleOperationSelectChange} |
| 506 | + operations={ |
| 507 | + (currentNode?.trigger |
| 508 | + ? currentComponentDefinition?.triggers |
| 509 | + : currentComponentDefinition?.actions)! |
| 510 | + } |
| 511 | + triggerSelect={currentNode?.trigger} |
| 512 | + value={currentOperationName} |
| 513 | + /> |
530 | 514 |
|
531 | 515 | {((!currentNode?.trigger && !currentNode?.taskDispatcher && currentActionFetched) || |
532 | 516 | currentNode?.taskDispatcher || |
|
0 commit comments