main
vue 27 lines 797 Bytes
Raw
1 <template>
2 <div class="flex items-center gap-1 leading-[1.1]" :class="{ 'text-warning': isWarning }">
3 <n-tooltip v-if="isWarning" placement="top-start" trigger="hover">
4 <template #trigger>
5 <Icon :name="DangerIcon" :size="18" />
6 </template>
7 Open Info dialog to see errors
8 </n-tooltip>
9 <span>{{ pipeline?.title }}</span>
10 </div>
11 </template>
12
13 <script setup lang="ts">
14 import type { Pipeline } from "@/types/graylog/pipelines.d"
15 import { NTooltip } from "naive-ui"
16 import { computed, toRefs } from "vue"
17 import Icon from "@/components/common/Icon.vue"
18
19 const props = defineProps<{ pipeline: Pipeline }>()
20 const { pipeline } = toRefs(props)
21
22 const DangerIcon = "majesticons:exclamation-line"
23
24 const isWarning = computed<boolean>(() => {
25 return !!pipeline.value.errors
26 })
27 </script>