diff --git a/controllers/dashboard.js b/controllers/dashboard.js index 477f1d7..51b0e97 100644 --- a/controllers/dashboard.js +++ b/controllers/dashboard.js @@ -386,11 +386,16 @@ async function createCard (details) { card = card.replace(/AppState/g, state); card = card.replace(/StateColor/g, state_color); card = card.replace(/AppLink/g, links.value); - card = card.replace(/ExternalPort/g, details.external_port); - card = card.replace(/InternalPort/g, details.internal_port); card = card.replace(/ChartName/g, details.name.replace(/-/g, '')); card = card.replace(/AppNameState/g, `${details.name}State`); card = card.replace(/data-trigger=""/, trigger); + + // Show nothing if there are no ports exposed + if ((details.external_port == 0) && (details.internal_port == 0)) { + card = card.replace(/AppPorts/g, ''); + } else { + card = card.replace(/AppPorts/g, `${details.external_port}:${details.internal_port}`); + } return card; } diff --git a/views/partials/containerFull.html b/views/partials/containerFull.html index 2330fee..aad1771 100644 --- a/views/partials/containerFull.html +++ b/views/partials/containerFull.html @@ -5,7 +5,7 @@