mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-20 11:02:05 +00:00
Indicate if step is service (#3078)
closes https://github.com/woodpecker-ci/woodpecker/issues/269 Icons in step list:   
This commit is contained in:
@@ -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: '',
|
|
||||||
};
|
|
||||||
|
Reference in New Issue
Block a user