Skip to content

Commit aad21fa

Browse files
committed
Refactor MassTransitConnector to use new components
1 parent 061eebb commit aad21fa

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/Frontend/src/components/configuration/MassTransitConnector.vue

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
<script setup lang="ts">
22
import { useConfiguration } from "@/composables/configuration";
3-
import moment from "moment";
4-
import FAIcon from "@/components/FAIcon.vue";
5-
import { faCheck, faTimes } from "@fortawesome/free-solid-svg-icons";
3+
import { useDateFormatter } from "@/composables/dateFormatter";
4+
import StatusIcon from "@/components/StatusIcon.vue";
65
76
const configuration = useConfiguration();
8-
9-
function formatDate(date: string) {
10-
return moment(date).local().format("LLLL");
11-
}
7+
const { formatDate } = useDateFormatter();
128
</script>
139

1410
<template>
@@ -22,8 +18,7 @@ function formatDate(date: string) {
2218
<h4>List of error queues configured in the connector.</h4>
2319
<div class="queues-container">
2420
<div class="margin-gap hover-highlight" v-for="queue in configuration.mass_transit_connector.error_queues" :key="queue.name">
25-
<FAIcon v-if="queue.ingesting" :icon="faCheck" class="info-color" />
26-
<FAIcon v-else :icon="faTimes" class="error-color" v-tippy="`Not ingesting from this queue. Check the logs below for more information.`" />
21+
<StatusIcon :status="queue.ingesting ? 'success' : 'error'" :message="queue.ingesting ? '' : 'Not ingesting from this queue. Check the logs below for more information.'" :show-message="false" />
2722
<span>{{ queue.name }}</span>
2823
</div>
2924
</div>

0 commit comments

Comments
 (0)