@@ -5,14 +5,14 @@ import { getWorkflowJobStatusOptions, getWorkflowJobStatusQueryKey } from '@app/
5
5
import { PermissionService } from '@app/core/services/permission.service' ;
6
6
import { injectQuery } from '@tanstack/angular-query-experimental' ;
7
7
import { provideTablerIcons , TablerIconComponent } from 'angular-tabler-icons' ;
8
- import { IconBrandGithub , IconCircleCheck , IconCircleMinus , IconCircleX , IconClock , IconProgress } from 'angular-tabler-icons/icons' ;
8
+ import { IconBrandGithub , IconCircleCheck , IconCircleMinus , IconCircleX , IconClock , IconExternalLink , IconProgress } from 'angular-tabler-icons/icons' ;
9
9
import { Button } from 'primeng/button' ;
10
10
11
11
@Component ( {
12
12
selector : 'app-workflow-jobs-status' ,
13
13
standalone : true ,
14
14
imports : [ CommonModule , TablerIconComponent , Button ] ,
15
- providers : [ DatePipe , provideTablerIcons ( { IconClock, IconProgress, IconCircleMinus, IconCircleCheck, IconCircleX, IconBrandGithub } ) ] ,
15
+ providers : [ DatePipe , provideTablerIcons ( { IconClock, IconProgress, IconCircleMinus, IconCircleCheck, IconCircleX, IconBrandGithub, IconExternalLink } ) ] ,
16
16
templateUrl : './workflow-jobs-status.component.html' ,
17
17
} )
18
18
export class WorkflowJobsStatusComponent {
@@ -44,6 +44,7 @@ export class WorkflowJobsStatusComponent {
44
44
45
45
return false ;
46
46
} ) ;
47
+
47
48
workflowJobsQuery = injectQuery ( ( ) => ( {
48
49
...getWorkflowJobStatusOptions ( { path : { runId : this . workflowRunId ( ) } } ) ,
49
50
queryKey : getWorkflowJobStatusQueryKey ( { path : { runId : this . workflowRunId ( ) } } ) ,
@@ -106,13 +107,13 @@ export class WorkflowJobsStatusComponent {
106
107
}
107
108
// Get CSS class for job status
108
109
getStatusClass ( status : string | null | undefined , conclusion : string | null | undefined ) : string {
109
- if ( conclusion === 'success' ) return 'text-green-600 bg-green-50 dark:text-green-400 dark:bg-green-900/30' ;
110
- if ( conclusion === 'failure' ) return 'text-red-600 bg-red-50 dark:text-red-400 dark:bg-red-900/30' ;
111
- if ( conclusion === 'skipped' ) return 'text-gray-600 bg-gray-50 dark:text-gray-400 dark:bg-gray-800 ' ;
110
+ if ( conclusion === 'success' ) return 'text-green-600 bg-green-100 dark:text-green-400 dark:bg-green-900/30' ;
111
+ if ( conclusion === 'failure' ) return 'text-red-600 bg-red-100 dark:text-red-400 dark:bg-red-900/30' ;
112
+ if ( conclusion === 'skipped' ) return 'text-gray-600 bg-gray-100 dark:text-gray-400 dark:bg-gray-900 ' ;
112
113
if ( conclusion === 'cancelled' ) return 'text-orange-600 bg-orange-50 dark:text-orange-400 dark:bg-orange-900/30' ;
113
114
114
115
if ( status === 'in_progress' ) return 'text-blue-600 bg-blue-50 dark:text-blue-400 dark:bg-blue-900/30' ;
115
- if ( status === 'queued' || status === 'waiting' ) return 'text-gray-600 bg-gray-100 dark:text-gray-400 dark:bg-gray-800 ' ;
116
+ if ( status === 'queued' || status === 'waiting' ) return 'text-gray-600 bg-gray-100 dark:text-gray-400 dark:bg-gray-900 ' ;
116
117
117
118
return 'text-gray-600 dark:text-gray-400' ;
118
119
}
@@ -141,6 +142,18 @@ export class WorkflowJobsStatusComponent {
141
142
return 'help' ;
142
143
}
143
144
145
+ getIconColorClass ( status : string | null | undefined , conclusion : string | null | undefined ) : string {
146
+ if ( conclusion === 'success' ) return 'text-green-600 dark:text-green-400' ;
147
+ if ( conclusion === 'failure' ) return 'text-red-600 dark:text-red-400' ;
148
+ if ( conclusion === 'skipped' ) return 'text-gray-600 dark:text-gray-400' ;
149
+ if ( conclusion === 'cancelled' ) return 'text-orange-600 dark:text-orange-400' ;
150
+
151
+ if ( status === 'in_progress' ) return 'text-blue-600 dark:text-blue-400 animate-spin' ;
152
+ if ( status === 'queued' || status === 'waiting' ) return 'text-gray-600 dark:text-gray-400' ;
153
+
154
+ return 'text-gray-600 dark:text-gray-400' ;
155
+ }
156
+
144
157
// Get status text for display
145
158
getStatusText ( status : string | null | undefined , conclusion : string | null | undefined ) : string {
146
159
return conclusion || status || 'Unknown' ;
0 commit comments