Skip to content

Commit 99f41e2

Browse files
committed
Improvement based on feedback
1 parent 65a79fa commit 99f41e2

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/Frontend/src/views/throughputreport/setup/ConnectionSetupView.vue

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
import { onMounted, ref } from "vue";
2+
import { computed, onMounted, ref } from "vue";
33
import ThroughputConnectionSettings from "@/resources/ThroughputConnectionSettings";
44
import throughputClient from "@/views/throughputreport/throughputClient";
55
import { useIsMonitoringEnabled } from "@/composables/serviceServiceControlUrls";
@@ -16,11 +16,18 @@ const settingsInfo = ref<ThroughputConnectionSettings | null>(null);
1616
onMounted(async () => {
1717
settingsInfo.value = await throughputClient.setting();
1818
});
19+
20+
const needsConfiguration = computed(() => {
21+
const broker = settingsInfo.value?.broker_settings?.length ?? 0;
22+
const monitoring = settingsInfo.value?.monitoring_settings?.length ?? 0;
23+
const serviceControl = settingsInfo.value?.service_control_settings?.length ?? 0;
24+
return broker > 0 || (monitoring > 0 && useIsMonitoringEnabled()) || serviceControl > 0;
25+
});
1926
</script>
2027

2128
<template>
2229
<div class="row">
23-
<p v-if="(settingsInfo?.broker_settings.length ?? 0 > 0) || ((settingsInfo?.monitoring_settings.length ?? 0 > 0) && useIsMonitoringEnabled()) || (settingsInfo?.service_control_settings.length ?? 0 > 0)">
30+
<p v-if="needsConfiguration">
2431
In order for ServicePulse to collect usage data from {{ store.transportNameForInstructions() }} you need to configure the below settings.<br />
2532
There are two configuration options, as environment variables or directly in the
2633
<a href="https://docs.particular.net/servicecontrol/creating-config-file"><code>ServiceControl.exe.config</code></a> file.

0 commit comments

Comments
 (0)