Commit e017df3d authored by Robert Schmidt's avatar Robert Schmidt

Better show image info in HTML

- each image in a new line
- only show up to seconds in date
parent 6b9d98f4
......@@ -1113,22 +1113,18 @@ class Containerize():
else:
time.sleep(10)
imagesInfo = ''
html_cell = ''
for newCont in newContainers:
if newCont == 'rfsim4g-db-init':
continue
cmd = 'docker inspect -f "{{.Config.Image}}" ' + newCont
imageInspect = myCmd.run(cmd, timeout=30, silent=True)
imageName = str(imageInspect.stdout).strip()
cmd = 'docker image inspect --format "{{.RepoTags}}\t{{.Size}} bytes\t{{.Created}}\t{{.Id}}" ' + imageName
cmd = 'docker image inspect --format \'{{.RepoTags}}\t{{.Size}} bytes\t{{index (split .Created ".") 0}}\n{{.Id}}\' ' + imageName
imageInspect = myCmd.run(cmd, 30, silent=True)
imagesInfo += imageInspect.stdout.strip()
html_cell += imageInspect.stdout + '\n'
myCmd.close()
html_cell = ''
for imageInfo in imagesInfo.split('\n'):
html_cell += imageInfo[:-11] + '\n'
html_cell += '\n'
for cState in containerStatus:
html_cell += cState + '\n'
if count == 100 and healthy == self.nb_healthy[0]:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment