Skip to content

Commit 65a79fa

Browse files
committed
Improving the connection setup instructions
This improves the rendering of the instructions so that it support empty list of instructions.
1 parent f4c4c4e commit 65a79fa

File tree

1 file changed

+40
-36
lines changed

1 file changed

+40
-36
lines changed

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

Lines changed: 40 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ onMounted(async () => {
2020

2121
<template>
2222
<div class="row">
23-
<p v-if="(settingsInfo?.broker_settings.length ?? 0 > 0) || (!isBrokerTransport && useIsMonitoringEnabled())">
23+
<p v-if="(settingsInfo?.broker_settings.length ?? 0 > 0) || ((settingsInfo?.monitoring_settings.length ?? 0 > 0) && useIsMonitoringEnabled()) || (settingsInfo?.service_control_settings.length ?? 0 > 0)">
2424
In order for ServicePulse to collect usage data from {{ store.transportNameForInstructions() }} you need to configure the below settings.<br />
2525
There are two configuration options, as environment variables or directly in the
2626
<a href="https://docs.particular.net/servicecontrol/creating-config-file"><code>ServiceControl.exe.config</code></a> file.
@@ -48,45 +48,49 @@ onMounted(async () => {
4848
</div>
4949
</div>
5050
</template>
51-
<template v-if="!isBrokerTransport && useIsMonitoringEnabled()">
52-
<div class="row configuration">
53-
<div class="col-12">
54-
<h4>ServiceControl Settings</h4>
55-
<p class="nogap">
56-
For more information read the
57-
<a href="https://docs.particular.net/servicecontrol/creating-config-file#usage-reporting-when-using-servicecontrol-licensingcomponentservicecontrolthroughputdataqueue">LicensingComponent/ServiceControlThroughputDataQueue</a> settings
58-
documentation.
59-
</p>
60-
<ConfigurationCode :settings="settingsInfo?.service_control_settings ?? []">
61-
<template #configInstructions>
62-
<div>Paste the settings above into the <code>ServiceControl.exe.config</code> file of the ServiceControl Error instance.</div>
63-
</template>
64-
<template #environmentVariableInstructions>
65-
<div>Execute the above instructions in a terminal to set the environment variables , these variables need to be set for the account under which the ServiceControl Error instance is running.</div>
66-
</template>
67-
</ConfigurationCode>
51+
<template v-if="!isBrokerTransport">
52+
<template v-if="settingsInfo?.service_control_settings.length ?? 0 > 0">
53+
<div class="row configuration">
54+
<div class="col-12">
55+
<h4>ServiceControl Settings</h4>
56+
<p class="nogap">
57+
For more information read the
58+
<a href="https://docs.particular.net/servicecontrol/creating-config-file#usage-reporting-when-using-servicecontrol-licensingcomponentservicecontrolthroughputdataqueue">LicensingComponent/ServiceControlThroughputDataQueue</a> settings
59+
documentation.
60+
</p>
61+
<ConfigurationCode :settings="settingsInfo?.service_control_settings ?? []">
62+
<template #configInstructions>
63+
<div>Paste the settings above into the <code>ServiceControl.exe.config</code> file of the ServiceControl Error instance.</div>
64+
</template>
65+
<template #environmentVariableInstructions>
66+
<div>Execute the above instructions in a terminal to set the environment variables , these variables need to be set for the account under which the ServiceControl Error instance is running.</div>
67+
</template>
68+
</ConfigurationCode>
69+
</div>
6870
</div>
69-
</div>
70-
<div class="row configuration">
71-
<div class="col-12">
72-
<h4>Monitoring Settings</h4>
73-
<p class="nogap">
74-
For more information read the
75-
<a href="https://docs.particular.net/servicecontrol/monitoring-instances/installation/creating-config-file#usage-reporting-monitoringservicecontrolthroughputdataqueue">Monitoring/ServiceControlThroughputDataQueue</a> settings documentation.
76-
</p>
77-
<ConfigurationCode :settings="settingsInfo?.monitoring_settings ?? []" configFileName="ServiceControl.Monitoring.exe.config">
78-
<template #configInstructions>
79-
<div>Paste the settings above into the <code>ServiceControl.Monitoring.exe.config</code> file of the ServiceControl Monitoring instance.</div>
80-
</template>
81-
<template #environmentVariableInstructions>
82-
<div>Execute the above instructions in a terminal to set the environment variables, these variables need to be set for the account under which the ServiceControl Monitoring instance is running.</div>
83-
</template>
84-
</ConfigurationCode>
71+
</template>
72+
<template v-if="useIsMonitoringEnabled() && (settingsInfo?.monitoring_settings.length ?? 0 > 0)">
73+
<div class="row configuration">
74+
<div class="col-12">
75+
<h4>Monitoring Settings</h4>
76+
<p class="nogap">
77+
For more information read the
78+
<a href="https://docs.particular.net/servicecontrol/monitoring-instances/installation/creating-config-file#usage-reporting-monitoringservicecontrolthroughputdataqueue">Monitoring/ServiceControlThroughputDataQueue</a> settings
79+
documentation.
80+
</p>
81+
<ConfigurationCode :settings="settingsInfo?.monitoring_settings ?? []" configFileName="ServiceControl.Monitoring.exe.config">
82+
<template #configInstructions>
83+
<div>Paste the settings above into the <code>ServiceControl.Monitoring.exe.config</code> file of the ServiceControl Monitoring instance.</div>
84+
</template>
85+
<template #environmentVariableInstructions>
86+
<div>Execute the above instructions in a terminal to set the environment variables, these variables need to be set for the account under which the ServiceControl Monitoring instance is running.</div>
87+
</template>
88+
</ConfigurationCode>
89+
</div>
8590
</div>
86-
</div>
91+
</template>
8792
</template>
8893
</template>
89-
9094
<style scoped>
9195
.configuration {
9296
margin-bottom: 15px;

0 commit comments

Comments
 (0)