No metrics to display, as no notifications have been received yet from this topic.
+
+
+
@@ -561,6 +570,12 @@ export default defineComponent({
return `http://${host.value}:${port.value}`;
});
+ // Check if the topic has metrics to display
+ // (If there are no keys, there is no Prometheus data for the topic)
+ const topicHasMetrics = computed(() => {
+ return Object.keys(topicMetrics.value).length > 0;
+ });
+
// Methods
// Load the saved information from the electron API
@@ -946,6 +961,9 @@ export default defineComponent({
// e.g. downloaded files by file type
topicMetrics.value = appendTotals(topicMetrics.value);
+ // Remove redundant metric key for the subscription status
+ delete topicMetrics.value['topic_subscription_status'];
+
// Display the metrics to the user
monitorDialogTitle.value = `Download Metrics of ${selectedTopic}`;
showTopicMonitorDialog.value = true;
@@ -1082,6 +1100,7 @@ export default defineComponent({
// Computed variables
settings,
serverLink,
+ topicHasMetrics,
// Methods
processTopicData,