| 1 | <template> |
| 2 | <div v-if="sourceConfiguration" class="flex flex-col gap-3"> |
| 3 | <CardKV v-if="showSource"> |
| 4 | <template #key>Source</template> |
| 5 | <template #value> |
| 6 | {{ sourceConfiguration.source }} |
| 7 | </template> |
| 8 | </CardKV> |
| 9 | <CardKV> |
| 10 | <template #key>Field names</template> |
| 11 | <template #value> |
| 12 | <div class="flex flex-wrap gap-2"> |
| 13 | <Badge v-for="field of sourceConfiguration.field_names" :key="field" type="splitted" fluid> |
| 14 | <template #value> |
| 15 | {{ field }} |
| 16 | </template> |
| 17 | </Badge> |
| 18 | </div> |
| 19 | </template> |
| 20 | </CardKV> |
| 21 | <CardKV> |
| 22 | <template #key>IOC Field names</template> |
| 23 | <template #value> |
| 24 | <div v-if="sourceConfiguration.ioc_field_names?.length" class="flex flex-wrap gap-2"> |
| 25 | <Badge v-for="field of sourceConfiguration.ioc_field_names" :key="field" type="splitted" fluid> |
| 26 | <template #value> |
| 27 | {{ field }} |
| 28 | </template> |
| 29 | </Badge> |
| 30 | </div> |
| 31 | <span v-else>-</span> |
| 32 | </template> |
| 33 | </CardKV> |
| 34 | <CardKV> |
| 35 | <template #key>Asset name</template> |
| 36 | <template #value> |
| 37 | {{ sourceConfiguration.asset_name }} |
| 38 | </template> |
| 39 | </CardKV> |
| 40 | <CardKV> |
| 41 | <template #key>Timefield name</template> |
| 42 | <template #value> |
| 43 | {{ sourceConfiguration.timefield_name }} |
| 44 | </template> |
| 45 | </CardKV> |
| 46 | <CardKV> |
| 47 | <template #key>Alert title name</template> |
| 48 | <template #value> |
| 49 | {{ sourceConfiguration.alert_title_name }} |
| 50 | </template> |
| 51 | </CardKV> |
| 52 | </div> |
| 53 | </template> |
| 54 | |
| 55 | <script setup lang="ts"> |
| 56 | import type { SourceConfiguration } from "@/types/incidentManagement/sources.d" |
| 57 | import Badge from "@/components/common/Badge.vue" |
| 58 | import CardKV from "@/components/common/cards/CardKV.vue" |
| 59 | |
| 60 | const { sourceConfiguration, showSource } = defineProps<{ |
| 61 | sourceConfiguration: SourceConfiguration |
| 62 | showSource?: boolean |
| 63 | }>() |
| 64 | </script> |