Skip to content

Commit

Permalink
Indicate if step is service (#3078)
Browse files Browse the repository at this point in the history
  • Loading branch information
qwerty287 authored Dec 30, 2023
1 parent f100a21 commit ab1927f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
3 changes: 2 additions & 1 deletion web/src/components/repo/pipeline/PipelineStatusIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
:title="$t('repo.pipeline.status.status', { status: $t(`repo.pipeline.status.${status}`) })"
>
<Icon
:name="`status-${status}`"
:name="service ? 'settings' : `status-${status}`"
:class="{
'text-wp-state-error-100': pipelineStatusColors[status] === 'red',
'text-wp-state-neutral-100': pipelineStatusColors[status] === 'gray',
Expand All @@ -24,5 +24,6 @@ import { pipelineStatusColors } from './pipeline-status';
defineProps<{
status: PipelineStatus;
service?: boolean;
}>();
</script>
4 changes: 2 additions & 2 deletions web/src/components/repo/pipeline/PipelineStepList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
}"
@click="$emit('update:selected-step-id', step.pid)"
>
<PipelineStatusIcon :status="step.state" class="!h-4 !w-4" />
<PipelineStatusIcon :service="step.type == StepType.Service" :status="step.state" class="!h-4 !w-4" />
<span class="truncate">{{ step.name }}</span>
<PipelineStepDuration :step="step" />
</button>
Expand All @@ -128,7 +128,7 @@ import Icon from '~/components/atomic/Icon.vue';
import PipelineStatusIcon from '~/components/repo/pipeline/PipelineStatusIcon.vue';
import PipelineStepDuration from '~/components/repo/pipeline/PipelineStepDuration.vue';
import usePipeline from '~/compositions/usePipeline';
import { Pipeline, PipelineStep } from '~/lib/api/types';
import { Pipeline, PipelineStep, StepType } from '~/lib/api/types';
const props = defineProps<{
pipeline: Pipeline;
Expand Down
13 changes: 0 additions & 13 deletions web/src/components/repo/pipeline/pipeline-status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,3 @@ export const pipelineStatusColors: Record<PipelineStatus, 'green' | 'gray' | 're
started: 'blue',
success: 'green',
};

export const pipelineStatusAnimations: Record<PipelineStatus, string> = {
blocked: '',
declined: '',
error: '',
failure: '',
killed: '',
pending: '',
skipped: '',
running: 'animate-spin animate-slow',
started: 'animate-spin animate-slow',
success: '',
};

0 comments on commit ab1927f

Please sign in to comment.