diff --git a/net/avahi-reflector/src/opnsense/www/js/widgets/AvahiReflector.js b/net/avahi-reflector/src/opnsense/www/js/widgets/AvahiReflector.js
index 70631b89f..384fb8a5d 100644
--- a/net/avahi-reflector/src/opnsense/www/js/widgets/AvahiReflector.js
+++ b/net/avahi-reflector/src/opnsense/www/js/widgets/AvahiReflector.js
@@ -55,23 +55,26 @@ export default class AvahiReflector extends BaseTableWidget {
const rows = [];
- const statusBadge = response.running
- ? `${this.translations['running']}`
- : `${this.translations['stopped']}`;
- rows.push([this.translations['status'], statusBadge]);
+ // Status + Health on one line with colored circle indicator
+ let statusColor = 'text-success';
+ let statusText = `${this.translations['running']} / ${this.translations['healthy']}`;
+ if (!response.running) {
+ statusColor = 'text-danger';
+ statusText = this.translations['stopped'];
+ } else if (response.health && response.health.status === 'degraded') {
+ statusColor = 'text-danger';
+ statusText = `${this.translations['running']} / ${this.translations['degraded']}`;
+ } else if (response.health && response.health.status === 'warning') {
+ statusColor = 'text-warning';
+ statusText = `${this.translations['running']} / ${this.translations['warning']}`;
+ }
+ rows.push([
+ `
${this.translations['status']}
`,
+ `${statusText}
`
+ ]);
if (response.health) {
const h = response.health;
- let healthBadge;
- if (h.status === 'healthy') {
- healthBadge = `${this.translations['healthy']}`;
- } else if (h.status === 'degraded') {
- healthBadge = `${this.translations['degraded']}`;
- } else {
- healthBadge = `${this.translations['warning']}`;
- }
- rows.push([this.translations['health'], healthBadge]);
-
if (h.slot_errors_today > 0) {
rows.push([this.translations['slot_errors_today'], h.slot_errors_today]);
}
@@ -83,20 +86,15 @@ export default class AvahiReflector extends BaseTableWidget {
}
}
- if (response.running && response.uptime !== null) {
- rows.push([this.translations['uptime'], response.uptime]);
- }
-
rows.push([this.translations['domain'], response.domain || '-']);
if (response.interfaces) {
rows.push([this.translations['interfaces'], response.interfaces]);
}
- const reflectorLabel = response.reflector_enabled
- ? `${this.translations['enabled']}`
- : `${this.translations['disabled']}`;
- rows.push([this.translations['reflector'], reflectorLabel]);
+ rows.push([this.translations['reflector'], response.reflector_enabled
+ ? this.translations['enabled']
+ : this.translations['disabled']]);
if (response.reflect_filters) {
rows.push([this.translations['reflect_filters'], response.reflect_filters]);