-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Frank Jogeleit <[email protected]>
- Loading branch information
Frank Jogeleit
committed
Jan 4, 2024
1 parent
5878d37
commit 1f6866c
Showing
12 changed files
with
153 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<template> | ||
<v-chip :color="color" v-bind="$attrs"> | ||
<template v-if="prefix">{{ prefix }} </template>{{ priority ? priority : Priority.DEBUG }} | ||
</v-chip> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { Priority } from "~/modules/core/types"; | ||
import { mapPriority } from "~/modules/core/mapper"; | ||
const props = defineProps<{ priority?: Priority; prefix?: string; }>() | ||
const color = mapPriority(props.priority) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
|
||
<template> | ||
<v-card> | ||
<v-toolbar color="category"> | ||
<v-toolbar-title>{{ capilize(type) }}</v-toolbar-title> | ||
<template #append> | ||
<CollapseBtn v-model="open" /> | ||
</template> | ||
</v-toolbar> | ||
<template v-if="open" v-for="target in targets" :key="target.name"> | ||
<v-toolbar color="secondary"> | ||
<v-toolbar-title>{{ target.name }}</v-toolbar-title> | ||
<template #append> | ||
<chip-priority :priority="target.minimumPriority" variant="flat" /> | ||
</template> | ||
</v-toolbar> | ||
<v-divider /> | ||
<v-list class="mt-0 pt-0" lines="two"> | ||
<v-list-item v-if="target.host" :title="target.host" subtitle="Host" /> | ||
<template v-if="target.useTLS"> | ||
<v-divider /> | ||
<v-list-item title="TLS configured" /> | ||
</template> | ||
<template v-if="target.auth"> | ||
<v-divider /> | ||
<v-list-item title="Uses Authentication" subtitle="Auth method like HTTP Basic, Authorized Header or API Key configured." /> | ||
</template> | ||
<template v-if="target.skipTLS"> | ||
<v-divider /> | ||
<v-list-item title="Skips TLS verification" subtitle="SkipTLS enabled" /> | ||
</template> | ||
<template v-for="(v, k) in target.properties"> | ||
<v-divider /> | ||
<v-list-item :title="v" :subtitle="capilize(k)" /> | ||
</template> | ||
<template v-if="target.secretRef"> | ||
<v-divider /> | ||
<v-list-item :title="`SecretRef: ${target.secretRef}`" subtitle="Secret used to retrieve sensitive target configuration" /> | ||
</template> | ||
<template v-if="target.mountedSecret"> | ||
<v-divider /> | ||
<v-list-item :title="`MountedSecret: ${target.mountedSecret}`" subtitle="Secret mount used to retrieve sensitive target configuration" /> | ||
</template> | ||
</v-list> | ||
<template v-if="target.filter && Object.keys(target.filter).length > 0"> | ||
<v-divider /> | ||
<v-table hover> | ||
<thead> | ||
<tr> | ||
<th>Filter</th> | ||
<th>Included Values</th> | ||
<th>Excluded Values</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr v-for="(values, filter) in target.filter"> | ||
<td>{{ filter }}</td> | ||
<td>{{ values?.include?.join(', ') }}</td> | ||
<td>{{ values?.exclude?.join(', ') }}</td> | ||
</tr> | ||
</tbody> | ||
</v-table> | ||
</template> | ||
</template> | ||
</v-card> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { capilize } from "~/modules/core/layouthHelper"; | ||
import { type Target } from "~/modules/core/types"; | ||
import CollapseBtn from "~/components/CollapseBtn.vue"; | ||
defineProps<{ type: string; targets: Target[]; }>() | ||
const open = ref(true) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<template> | ||
<v-container fluid class="py-4 px-4 main-height" v-if="targets"> | ||
<app-row> | ||
<v-card> | ||
<v-toolbar color="header" elevation="2"> | ||
<v-toolbar-title>Configured Notification Targets</v-toolbar-title> | ||
</v-toolbar> | ||
</v-card> | ||
</app-row> | ||
<app-row v-for="(list, type) in targets" :key="type"> | ||
<target-group :type="type" :targets="list" /> | ||
</app-row> | ||
</v-container> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
const { data: targets } = useAPI((api) => api.targets()) | ||
</script> |