|
@@ -19,6 +19,7 @@ import (
|
|
"runtime"
|
|
"runtime"
|
|
"strings"
|
|
"strings"
|
|
"sync"
|
|
"sync"
|
|
|
|
+ "time"
|
|
)
|
|
)
|
|
|
|
|
|
func (srv *Server) DockerVersion() APIVersion {
|
|
func (srv *Server) DockerVersion() APIVersion {
|
|
@@ -953,7 +954,7 @@ func (srv *Server) deleteImage(img *Image, repoName, tag string) ([]APIRmi, erro
|
|
}
|
|
}
|
|
if tagDeleted {
|
|
if tagDeleted {
|
|
imgs = append(imgs, APIRmi{Untagged: img.ShortID()})
|
|
imgs = append(imgs, APIRmi{Untagged: img.ShortID()})
|
|
- srv.SendEvent("untagged", img.ShortID())
|
|
|
|
|
|
+ srv.SendEvent("untag", img.ShortID())
|
|
}
|
|
}
|
|
if len(srv.runtime.repositories.ByID()[img.ID]) == 0 {
|
|
if len(srv.runtime.repositories.ByID()[img.ID]) == 0 {
|
|
if err := srv.deleteImageAndChildren(img.ID, &imgs); err != nil {
|
|
if err := srv.deleteImageAndChildren(img.ID, &imgs); err != nil {
|
|
@@ -1180,7 +1181,7 @@ func NewServer(flGraphPath string, autoRestart, enableCors bool, dns ListOpts) (
|
|
|
|
|
|
func (srv *Server) SendEvent(action, id string) {
|
|
func (srv *Server) SendEvent(action, id string) {
|
|
for _, c := range srv.events {
|
|
for _, c := range srv.events {
|
|
- c <- utils.JSONMessage{Status: action, ID: id}
|
|
|
|
|
|
+ c <- utils.JSONMessage{Status: action, ID: id, Time: time.Now().Unix()}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|