mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-01-09 09:05:26 +00:00
Indicate if step is service (#3078)
closes https://github.com/woodpecker-ci/woodpecker/issues/269 Icons in step list: ![Screenshot 2023-12-30 at 12-05-48 Woodpecker](https://github.com/woodpecker-ci/woodpecker/assets/80460567/5f682cc6-8dad-4edb-ab15-b8ae93078c7c) ![Screenshot 2023-12-30 at 12-06-06 Woodpecker](https://github.com/woodpecker-ci/woodpecker/assets/80460567/67782571-438e-4937-a7c6-ab2b378aa0c7) ![Screenshot 2023-12-30 at 12-07-49 Woodpecker](https://github.com/woodpecker-ci/woodpecker/assets/80460567/b3841e10-ac85-4c2b-a46b-663c2db8f59e)
This commit is contained in:
parent
f100a21cc7
commit
ab1927fca1
3 changed files with 4 additions and 16 deletions
|
@ -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',
|
||||
|
@ -24,5 +24,6 @@ import { pipelineStatusColors } from './pipeline-status';
|
|||
|
||||
defineProps<{
|
||||
status: PipelineStatus;
|
||||
service?: boolean;
|
||||
}>();
|
||||
</script>
|
||||
|
|
|
@ -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>
|
||||
|
@ -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;
|
||||
|
|
|
@ -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: '',
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue