File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed
lib/lightning_web/live/workflow_live Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -411,9 +411,18 @@ const openRunPanelAction = (_e: KeyboardEvent, _el: HTMLElement) => {
411
411
foundButton . click ( ) ;
412
412
}
413
413
} else {
414
- // Panel is not open, open it by clicking the run link
415
- const runButton = document . querySelector ( 'a[href*="m=workflow_input"]' ) as HTMLAnchorElement ;
416
- runButton ?. click ( ) ;
414
+ // Check if a step is already selected by looking at the URL
415
+ const isStepSelected = window . location . href . includes ( 's=' ) ;
416
+
417
+ if ( isStepSelected ) {
418
+ // Step is selected, click the "Run" button on the step panel
419
+ const stepRunButton = document . querySelector ( '[id^="run-from-step-"]' ) as HTMLAnchorElement ;
420
+ stepRunButton ?. click ( ) ;
421
+ } else {
422
+ // No step selected, open it by clicking the run link
423
+ const runButton = document . querySelector ( 'a[href*="m=workflow_input"]' ) as HTMLAnchorElement ;
424
+ runButton ?. click ( ) ;
425
+ }
417
426
}
418
427
} ;
419
428
Original file line number Diff line number Diff line change @@ -506,6 +506,7 @@ defmodule LightningWeb.WorkflowLive.Edit do
506
506
patch = { "#{ @ base_url } ?s=#{ @ selected_job . id } &m=workflow_input" }
507
507
type = "button "
508
508
theme = "primary "
509
+ id = { "run-from-step-#{ @ selected_job . id } " }
509
510
>
510
511
Run
511
512
</ . button_link >
@@ -2857,10 +2858,14 @@ defmodule LightningWeb.WorkflowLive.Edit do
2857
2858
2858
2859
patches =
2859
2860
WorkflowParams . to_patches ( initial_params , next_params )
2861
+
2860
2862
inverse_patches = WorkflowParams . to_patches ( next_params , initial_params )
2861
2863
2862
2864
socket
2863
- |> push_event ( "patches-applied" , % { patches: patches , inverse: inverse_patches } )
2865
+ |> push_event ( "patches-applied" , % {
2866
+ patches: patches ,
2867
+ inverse: inverse_patches
2868
+ } )
2864
2869
end
2865
2870
2866
2871
defp maybe_push_workflow_created ( socket , workflow ) do
You can’t perform that action at this time.
0 commit comments