Remove container created time

This commit is contained in:
Svilen Markov 2024-12-03 20:13:23 +00:00
parent 82490ef5dd
commit 217c6f2ed0
2 changed files with 5 additions and 9 deletions

View File

@ -19,7 +19,6 @@
{{ end }} {{ end }}
</ul> </ul>
{{ end }} {{ end }}
<div class="margin-top-10">created <span {{ .Created | dynamicRelativeTimeAttrs }}></span> ago</div>
</div> </div>
</div> </div>

View File

@ -71,12 +71,11 @@ var dockerContainerStateIconPriorities = map[string]int{
} }
type dockerContainerJsonResponse struct { type dockerContainerJsonResponse struct {
Names []string `json:"Names"` Names []string `json:"Names"`
Image string `json:"Image"` Image string `json:"Image"`
State string `json:"State"` State string `json:"State"`
Status string `json:"Status"` Status string `json:"Status"`
Labels dockerContainerLabels `json:"Labels"` Labels dockerContainerLabels `json:"Labels"`
Created int64 `json:"Created"`
} }
type dockerContainerLabels map[string]string type dockerContainerLabels map[string]string
@ -109,7 +108,6 @@ type dockerContainer struct {
Description string Description string
Icon customIconField Icon customIconField
Children dockerContainerList Children dockerContainerList
Created time.Time
} }
type dockerContainerList []dockerContainer type dockerContainerList []dockerContainer
@ -159,7 +157,6 @@ func fetchDockerContainers(socketPath string, hideByDefault bool) (dockerContain
State: strings.ToLower(container.State), State: strings.ToLower(container.State),
StateText: strings.ToLower(container.Status), StateText: strings.ToLower(container.Status),
Icon: newCustomIconField(container.Labels.getOrDefault(dockerContainerLabelIcon, "si:docker")), Icon: newCustomIconField(container.Labels.getOrDefault(dockerContainerLabelIcon, "si:docker")),
Created: time.Unix(container.Created, 0),
} }
if idValue := container.Labels.getOrDefault(dockerContainerLabelID, ""); idValue != "" { if idValue := container.Labels.getOrDefault(dockerContainerLabelID, ""); idValue != "" {