diff --git a/app/sovran_systemsos_web/static/app.js b/app/sovran_systemsos_web/static/app.js index 36a6943..ff246ce 100644 --- a/app/sovran_systemsos_web/static/app.js +++ b/app/sovran_systemsos_web/static/app.js @@ -401,8 +401,14 @@ async function openServiceDetailModal(unit, name) { } // Section B: Status - var sc = statusClass(data.health || data.status); - var st = statusText(data.health || data.status, data.enabled); + // When a feature override is present, use the feature's enabled state so the + // modal matches what the dashboard tile shows (feature toggle is authoritative). + var effectiveEnabled = data.feature ? data.feature.enabled : data.enabled; + var effectiveHealth = data.feature && !data.feature.enabled + ? "disabled" + : (data.health || data.status); + var sc = statusClass(effectiveHealth); + var st = statusText(effectiveHealth, effectiveEnabled); html += '
This is an optional addon feature. You can enable or disable it at any time.
' + + '' + escHtml(addonDesc) + '
' + + conflictsHtml + '