mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-01-09 17:15:31 +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}`) })"
|
:title="$t('repo.pipeline.status.status', { status: $t(`repo.pipeline.status.${status}`) })"
|
||||||
>
|
>
|
||||||
<Icon
|
<Icon
|
||||||
:name="`status-${status}`"
|
:name="service ? 'settings' : `status-${status}`"
|
||||||
:class="{
|
:class="{
|
||||||
'text-wp-state-error-100': pipelineStatusColors[status] === 'red',
|
'text-wp-state-error-100': pipelineStatusColors[status] === 'red',
|
||||||
'text-wp-state-neutral-100': pipelineStatusColors[status] === 'gray',
|
'text-wp-state-neutral-100': pipelineStatusColors[status] === 'gray',
|
||||||
|
@ -24,5 +24,6 @@ import { pipelineStatusColors } from './pipeline-status';
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
status: PipelineStatus;
|
status: PipelineStatus;
|
||||||
|
service?: boolean;
|
||||||
}>();
|
}>();
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -109,7 +109,7 @@
|
||||||
}"
|
}"
|
||||||
@click="$emit('update:selected-step-id', step.pid)"
|
@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>
|
<span class="truncate">{{ step.name }}</span>
|
||||||
<PipelineStepDuration :step="step" />
|
<PipelineStepDuration :step="step" />
|
||||||
</button>
|
</button>
|
||||||
|
@ -128,7 +128,7 @@ import Icon from '~/components/atomic/Icon.vue';
|
||||||
import PipelineStatusIcon from '~/components/repo/pipeline/PipelineStatusIcon.vue';
|
import PipelineStatusIcon from '~/components/repo/pipeline/PipelineStatusIcon.vue';
|
||||||
import PipelineStepDuration from '~/components/repo/pipeline/PipelineStepDuration.vue';
|
import PipelineStepDuration from '~/components/repo/pipeline/PipelineStepDuration.vue';
|
||||||
import usePipeline from '~/compositions/usePipeline';
|
import usePipeline from '~/compositions/usePipeline';
|
||||||
import { Pipeline, PipelineStep } from '~/lib/api/types';
|
import { Pipeline, PipelineStep, StepType } from '~/lib/api/types';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
pipeline: Pipeline;
|
pipeline: Pipeline;
|
||||||
|
|
|
@ -12,16 +12,3 @@ export const pipelineStatusColors: Record<PipelineStatus, 'green' | 'gray' | 're
|
||||||
started: 'blue',
|
started: 'blue',
|
||||||
success: 'green',
|
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