| 1 | <template> |
| 2 | <n-tabs type="line" animated :tabs-padding="24"> |
| 3 | <n-tab-pane name="info" tab="Info" display-directive="show"> |
| 4 | <div class="p-6 pt-3"> |
| 5 | <div class="mb-2"> |
| 6 | Id : |
| 7 | <code>{{ pipeline?.id }}</code> |
| 8 | </div> |
| 9 | <div class="mb-2"> |
| 10 | Created: |
| 11 | <code> |
| 12 | {{ pipeline?.created_at ? formatDate(pipeline.created_at, dFormats.datetimesec) : "-" }} |
| 13 | </code> |
| 14 | </div> |
| 15 | <div class="mb-2"> |
| 16 | Modified: |
| 17 | <code> |
| 18 | {{ pipeline?.modified_at ? formatDate(pipeline.modified_at, dFormats.datetimesec) : "-" }} |
| 19 | </code> |
| 20 | </div> |
| 21 | <div class="mb-2"> |
| 22 | Errors : |
| 23 | <code>{{ pipeline?.errors || "-" }}</code> |
| 24 | </div> |
| 25 | </div> |
| 26 | </n-tab-pane> |
| 27 | <n-tab-pane name="source" tab="Source" display-directive="show"> |
| 28 | <div class="p-6 pt-3"> |
| 29 | <n-input |
| 30 | :value="pipeline?.source" |
| 31 | type="textarea" |
| 32 | readonly |
| 33 | placeholder="Empty" |
| 34 | size="large" |
| 35 | :autosize="{ |
| 36 | minRows: 3, |
| 37 | maxRows: 10 |
| 38 | }" |
| 39 | /> |
| 40 | </div> |
| 41 | </n-tab-pane> |
| 42 | </n-tabs> |
| 43 | </template> |
| 44 | |
| 45 | <script setup lang="ts"> |
| 46 | import type { Pipeline } from "@/types/graylog/pipelines.d" |
| 47 | import { NInput, NTabPane, NTabs } from "naive-ui" |
| 48 | import { toRefs } from "vue" |
| 49 | import { useSettingsStore } from "@/stores/settings" |
| 50 | import { formatDate } from "@/utils/format" |
| 51 | |
| 52 | const props = defineProps<{ pipeline?: Pipeline }>() |
| 53 | const { pipeline } = toRefs(props) |
| 54 | const dFormats = useSettingsStore().dateFormat |
| 55 | </script> |