Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indicate if step is service #3078

Merged
merged 3 commits into from
Dec 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: '',
};