Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ce-deploy-ui
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ccce
dev
ce-deploy-ui
Commits
bfed108b
Commit
bfed108b
authored
6 months ago
by
Johanna Szepanski
Browse files
Options
Downloads
Patches
Plain Diff
use StepperIcons object to decide Step
parent
f3e138c7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!612
Release 5.0.0
,
!545
CE-2825: Default stepper to custom
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/Job/JobDetails.tsx
+6
-2
6 additions, 2 deletions
src/components/Job/JobDetails.tsx
src/components/Job/JobStatus.tsx
+6
-6
6 additions, 6 deletions
src/components/Job/JobStatus.tsx
with
12 additions
and
8 deletions
src/components/Job/JobDetails.tsx
+
6
−
2
View file @
bfed108b
...
...
@@ -10,7 +10,8 @@ import {
formatDateAndTime
,
EmptyValue
,
Duration
,
Step
,
StepperComponents
,
STEPPER_STATES
,
AccessControl
}
from
"
@ess-ics/ce-ui-common
"
;
import
{
JobBadge
}
from
"
./JobBadge
"
;
...
...
@@ -103,6 +104,9 @@ export const JobDetails = ({ operation, job }: JobDetailsProps) => {
const
[
alerts
,
setAlerts
]
=
useState
<
{
type
?:
Status
;
message
?:
string
;
link
?:
string
}[]
>
(
operation
.
alerts
??
[]);
const
StepIcon
=
operation
?.
status
?
StepperComponents
[
operation
.
status
.
toLowerCase
()]
:
StepperComponents
[
STEPPER_STATES
.
unknown
];
const
awxJob
=
useMemo
(
()
=>
new
AWXJobDetails
(
operation
,
operation
.
type
),
...
...
@@ -144,7 +148,7 @@ export const JobDetails = ({ operation, job }: JobDetailsProps) => {
>
Job log stream
</
Typography
>
<
Step
<
Step
Icon
showToolTip
step
=
{
{
state
:
operation
?.
status
?.
toLowerCase
(),
...
...
This diff is collapsed.
Click to expand it.
src/components/Job/JobStatus.tsx
+
6
−
6
View file @
bfed108b
import
{
S
tepperEvents
,
S
TEPPER_STATES
,
LabeledIcon
,
IconRunning
,
IconSuccessful
,
...
...
@@ -14,22 +14,22 @@ interface JobStatusProps {
const
getStatus
=
(
status
:
string
)
=>
{
switch
(
status
.
toLowerCase
())
{
case
S
tepperEvents
.
queued
:
case
S
TEPPER_STATES
.
queued
:
return
{
label
:
"
Queued
"
,
icon
:
IconRunning
};
case
S
tepperEvents
.
running
:
case
S
TEPPER_STATES
.
running
:
return
{
label
:
"
Running
"
,
icon
:
IconRunning
};
case
S
tepperEvents
.
successful
:
case
S
TEPPER_STATES
.
successful
:
return
{
label
:
"
Successful
"
,
icon
:
IconSuccessful
};
case
S
tepperEvents
.
failed
:
case
S
TEPPER_STATES
.
failed
:
return
{
label
:
"
Failed
"
,
icon
:
IconFailed
...
...
@@ -54,7 +54,7 @@ export const JobStatus = ({ status }: JobStatusProps) => {
labelPosition
=
"right"
LabelProps
=
{
{
color
:
convertedStatus
===
S
tepperEvents
.
failed
convertedStatus
===
S
TEPPER_STATES
.
failed
?
theme
.
palette
.
status
.
fail
.
main
:
"
inherit
"
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment