@@ -11,6 +11,8 @@ export function useRelaunchOptions(): IPageAction<UnifiedJob>[] {
1111 const relaunchJob = useRelaunchJob ( ) ;
1212 const relaunchAllHosts = useRelaunchJob ( { hosts : 'all' } ) ;
1313 const relaunchFailedHosts = useRelaunchJob ( { hosts : 'failed' } ) ;
14+ const relaunchRunJobType = useRelaunchJob ( { job_type : 'run' } ) ;
15+ const relaunchCheckJobType = useRelaunchJob ( { job_type : 'check' } ) ;
1416 return useMemo (
1517 ( ) => [
1618 {
@@ -22,9 +24,31 @@ export function useRelaunchOptions(): IPageAction<UnifiedJob>[] {
2224 label : t ( `Relaunch job` ) ,
2325 isHidden : ( job : UnifiedJob ) =>
2426 ! ( job . type !== 'system_job' && job . summary_fields ?. user_capabilities ?. start ) ||
25- ( job . status === 'failed' && job . type === 'job' ) ,
27+ job . type === 'job' ,
2628 onClick : ( job : UnifiedJob ) => void relaunchJob ( job ) ,
2729 } ,
30+ {
31+ type : PageActionType . Dropdown ,
32+ selection : PageActionSelection . Single ,
33+ isPinned : true ,
34+ icon : RocketIcon ,
35+ label : t ( `Relaunch job with` ) ,
36+ isHidden : ( job : UnifiedJob ) => job . type !== 'job' || job . status === 'failed' ,
37+ actions : [
38+ {
39+ type : PageActionType . Button ,
40+ selection : PageActionSelection . Single ,
41+ label : t ( `Job type run` ) ,
42+ onClick : ( job : UnifiedJob ) => void relaunchRunJobType ( job ) ,
43+ } ,
44+ {
45+ type : PageActionType . Button ,
46+ selection : PageActionSelection . Single ,
47+ label : t ( `Job type check` ) ,
48+ onClick : ( job : UnifiedJob ) => void relaunchCheckJobType ( job ) ,
49+ } ,
50+ ] ,
51+ } ,
2852 {
2953 type : PageActionType . Dropdown ,
3054 selection : PageActionSelection . Single ,
@@ -50,6 +74,13 @@ export function useRelaunchOptions(): IPageAction<UnifiedJob>[] {
5074 ] ,
5175 } ,
5276 ] ,
53- [ t , relaunchAllHosts , relaunchFailedHosts , relaunchJob ]
77+ [
78+ t ,
79+ relaunchRunJobType ,
80+ relaunchCheckJobType ,
81+ relaunchAllHosts ,
82+ relaunchFailedHosts ,
83+ relaunchJob ,
84+ ]
5485 ) ;
5586}
0 commit comments