diff --git a/.changelog/24133.txt b/.changelog/24133.txt new file mode 100644 index 00000000000..cf3ab07f80c --- /dev/null +++ b/.changelog/24133.txt @@ -0,0 +1,3 @@ +```release-note:improvement +ui: Indicates prestart/poststart tasks by running/failed/pending status +``` diff --git a/ui/app/components/lifecycle-chart-row.js b/ui/app/components/lifecycle-chart-row.js index 81285c0a14a..71b367e4492 100644 --- a/ui/app/components/lifecycle-chart-row.js +++ b/ui/app/components/lifecycle-chart-row.js @@ -11,6 +11,48 @@ import classic from 'ember-classic-decorator'; @classic @tagName('') export default class LifecycleChartRow extends Component { + @computed('taskState.{failed,state}') + get taskColor() { + let color = 'neutral'; + if (this.taskState?.state === 'running') { + color = 'success'; + } + if (this.taskState?.state === 'pending') { + color = 'neutral'; + } + if (this.taskState?.state === 'dead') { + if (this.taskState?.failed) { + color = 'critical'; + } else { + color = 'neutral'; + } + } + return color; + } + + get taskIcon() { + let icon; + if (this.taskState?.state === 'running') { + icon = 'running'; + } + if (this.taskState?.state === 'pending') { + icon = 'test'; + } + if (this.taskState?.state === 'dead') { + if (this.taskState?.failed) { + icon = 'alert-circle'; + } else { + if (this.taskState?.startedAt) { + icon = 'check-circle'; + } else { + icon = 'minus-circle'; + } + } + } + + return icon; + } + @computed('taskState.state') get activeClass() { if (this.taskState && this.taskState.state === 'running') { diff --git a/ui/app/styles/components/lifecycle-chart.scss b/ui/app/styles/components/lifecycle-chart.scss index 7ae11cc8d0d..1434658ea0c 100644 --- a/ui/app/styles/components/lifecycle-chart.scss +++ b/ui/app/styles/components/lifecycle-chart.scss @@ -84,52 +84,35 @@ .lifecycle-chart-row { position: relative; - - .task { - margin: 0.55em 0.9em; - padding: 0.3em 0.55em; - border: 1px solid $grey-blue; - border-radius: $radius; - background: white; - - .name { - font-weight: $weight-semibold; - - a { - color: inherit; - text-decoration: none; - } - } - - &:hover { - .name a { - text-decoration: underline; - } - } - - .lifecycle { - font-size: $size-7; - color: $ui-gray-400; - } - } - - &.is-active { - .task { - border-color: $nomad-green; - background: lighten($nomad-green, 50%); - - .lifecycle { - color: $ui-gray-500; + padding: 0.25rem 0.5rem; + + $pending-mid: rgba(255, 255, 255, 0.5); + .hds-alert { + padding: 4px 8px; + + &.pending { + position: relative; + overflow: hidden; + border-style: dashed; + + &:before { + content: ''; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: linear-gradient( + -60deg, + transparent, + $pending-mid, + transparent + ); + animation: shimmer 2s ease-in-out infinite; } } } - &.is-finished { - .task { - color: $ui-gray-400; - } - } - &.main { margin-left: 25%; margin-right: 25%; @@ -159,9 +142,5 @@ &.poststop { margin-left: 75%; } - - &:last-child .task { - margin-bottom: 0.9em; - } } } diff --git a/ui/app/templates/components/lifecycle-chart-row.hbs b/ui/app/templates/components/lifecycle-chart-row.hbs index 82eb679f7b8..184f260072f 100644 --- a/ui/app/templates/components/lifecycle-chart-row.hbs +++ b/ui/app/templates/components/lifecycle-chart-row.hbs @@ -3,19 +3,23 @@ SPDX-License-Identifier: BUSL-1.1 ~}} -