summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiran Tal <liran.tal@gmail.com>2023-02-02 00:54:08 +0200
committerLiran Tal <liran.tal@gmail.com>2023-02-02 00:54:08 +0200
commit0f75552581f3620eabe0a1e55837471b4c3cde24 (patch)
treea8e8aa20f0984758960f882d467fd0ab376628b3
parentcae94f10cb6de300a1319c969f28c67c57a33a3d (diff)
-rw-r--r--widgets/containers/containerList.widget.js28
1 files changed, 14 insertions, 14 deletions
diff --git a/widgets/containers/containerList.widget.js b/widgets/containers/containerList.widget.js
index 6038360..c5d2d02 100644
--- a/widgets/containers/containerList.widget.js
+++ b/widgets/containers/containerList.widget.js
@@ -60,20 +60,20 @@ class myWidget extends ListWidget {
const containerList = {}
if (containers) {
containers.forEach((container) => {
- let containerPortPublic = (container.Ports[0] && container.Ports[0].PublicPort) ? String(container.Ports[0].PublicPort) : ''
- let containerPortPrivate = (container.Ports[0] && container.Ports[0].PrivatePort) ? String(container.Ports[0].PrivatePort) : ''
- let containerPort = containerPortPrivate + ':' + containerPortPublic
-
- containerList[container.Id] = [
- container.Id.substring(0, 5),
- container.Names[0].substring(0, 40),
- container.Image.substring(0, 35),
- // remove any new lines or carriage return line feed from the string in container.Command
- container.Command.substring(0, 30).replace(/(\r\n|\n|\r)/gm, ''),
- container.State,
- container.Status,
- containerPort
- ]
+ let containerPortPublic = (container.Ports[0] && container.Ports[0].PublicPort) ? String(container.Ports[0].PublicPort) : ''
+ let containerPortPrivate = (container.Ports[0] && container.Ports[0].PrivatePort) ? String(container.Ports[0].PrivatePort) : ''
+ let containerPort = containerPortPrivate + ':' + containerPortPublic
+
+ containerList[container.Id] = [
+ container.Id.substring(0, 5),
+ container.Names[0].substring(0, 40),
+ container.Image.substring(0, 35),
+ // remove any new lines or carriage return line feed from the string in container.Command
+ container.Command.substring(0, 30).replace(/(\r\n|\n|\r)/gm, ''),
+ container.State,
+ container.Status,
+ containerPort
+ ]
})
}