|
@@ -1,11 +1,21 @@
|
|
|
module.exports.dashCard = function dashCard(data) {
|
|
|
|
|
|
- let { name, service, id, state, image, external_port, internal_port, ports, volumes, environment_variables, labels, IPv4 } = data;
|
|
|
+ let { name, service, id, state, image, external_port, internal_port, ports, volumes, environment_variables, labels, IPv4, style } = data;
|
|
|
+
|
|
|
|
|
|
+ if (style = "Large") {
|
|
|
+ //Large cards
|
|
|
+ } else if (style = "Compact") {
|
|
|
+ //Compact cards
|
|
|
+ } else if (style = "Row") {
|
|
|
+ //Row cards
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
//disable controls for a docker container depending on its name
|
|
|
- let enabled = "";
|
|
|
- if (name.startsWith('Dweeb')) {
|
|
|
- enabled = 'disabled=""';
|
|
|
+ let actions = "";
|
|
|
+ if (name.startsWith('dweebui')) {
|
|
|
+ actions = 'disabled=""';
|
|
|
}
|
|
|
|
|
|
if ( external_port == undefined ) { external_port = 0; }
|
|
@@ -122,16 +132,16 @@ module.exports.dashCard = function dashCard(data) {
|
|
|
<div class="ms-auto lh-1">
|
|
|
<div class="card-actions btn-actions">
|
|
|
<div class="card-actions btn-actions">
|
|
|
- <button onclick="buttonAction(this)" name="${name}" value="start" id="${state}" class="btn-action" title="Start" ${enabled}><!-- player-play -->
|
|
|
+ <button onclick="buttonAction(this)" name="${name}" value="start" id="${state}" class="btn-action" title="Start" ${actions}><!-- player-play -->
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" class="icon-tabler icon-tabler-player-play" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M7 4v16l13 -8z"></path></svg>
|
|
|
</button>
|
|
|
- <button onclick="buttonAction(this)" name="${name}" value="stop" id="${state}" class="btn-action" title="Stop" ${enabled}><!-- player-stop -->
|
|
|
+ <button onclick="buttonAction(this)" name="${name}" value="stop" id="${state}" class="btn-action" title="Stop" ${actions}><!-- player-stop -->
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" class="icon-tabler icon-tabler-player-stop" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M5 5m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z"></path></svg>
|
|
|
</button>
|
|
|
- <button onclick="buttonAction(this)" name="${name}" value="pause" id="${state}" class="btn-action" title="Pause" ${enabled}><!-- player-pause -->
|
|
|
+ <button onclick="buttonAction(this)" name="${name}" value="pause" id="${state}" class="btn-action" title="Pause" ${actions}><!-- player-pause -->
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" class="icon-tabler icon-tabler-player-pause" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M6 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"></path><path d="M14 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"></path></svg>
|
|
|
</button>
|
|
|
- <button onclick="buttonAction(this)" name="${name}" value="restart" id="${state}" class="btn-action" title="Restart" ${enabled}><!-- reload -->
|
|
|
+ <button onclick="buttonAction(this)" name="${name}" value="restart" id="${state}" class="btn-action" title="Restart" ${actions}><!-- reload -->
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" class="icon-tabler icon-tabler-reload" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M19.933 13.041a8 8 0 1 1 -9.925 -8.788c3.899 -1 7.935 1.007 9.425 4.747"></path><path d="M20 4v5h-5"></path></svg>
|
|
|
</button>
|
|
|
<div class="dropdown">
|
|
@@ -160,7 +170,7 @@ module.exports.dashCard = function dashCard(data) {
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="d-flex align-items-baseline">
|
|
|
- <div class="h1 me-2" title="${name}">
|
|
|
+ <div class="h1 me-2" title="${name}" style="margin-bottom: 0;">
|
|
|
<a href="http://${IPv4}:${external_port}" target="_blank">
|
|
|
${shortened_name}
|
|
|
</a>
|