flamenco/web/app/src/components/LinkWorkerTask.vue
Francesco Siddi d6f419a683 Web: Rename link components
No functional change, just name the components with their type first,
so that all 'link' related components are more discoverable and next
to each other.
2022-07-26 16:33:05 +02:00

22 lines
601 B
Vue

<template>
<span>
<router-link v-if="workerTask" :to="{ name: 'jobs', params: { jobID: workerTask.job_id, taskID: workerTask.id } }">
{{ workerTask.name }}
(<span class="status-label" :class="'status-' + workerTask.status">{{ workerTask.status }}</span>)
</router-link>
<span v-else>-</span>
</span>
</template>
<script setup>
// 'workerTask' should be a WorkerTask object (see schema defined in `flamenco-openapi.yaml`).
const props = defineProps(['workerTask']);
</script>
<style scoped>
.status-label {
color: var(--indicator-color);
font-weight: bold;
}
</style>