Skip to content

Commit b38a02f

Browse files
authored
fix: fixes broken image tag in title bar (#3176)
1 parent db1cccc commit b38a02f

File tree

8 files changed

+6
-16
lines changed

8 files changed

+6
-16
lines changed

internal/agent/client.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ func (c *Client) StreamNewContainers(ctx context.Context, containers chan<- dock
246246
Image: resp.Container.Image,
247247
Labels: resp.Container.Labels,
248248
Group: resp.Container.Group,
249-
ImageID: resp.Container.ImageId,
250249
Created: resp.Container.Created.AsTime(),
251250
State: resp.Container.State,
252251
Health: resp.Container.Health,
@@ -281,7 +280,6 @@ func (c *Client) FindContainer(containerID string) (docker.Container, error) {
281280
Image: response.Container.Image,
282281
Labels: response.Container.Labels,
283282
Group: response.Container.Group,
284-
ImageID: response.Container.ImageId,
285283
Created: response.Container.Created.AsTime(),
286284
State: response.Container.State,
287285
Health: response.Container.Health,
@@ -317,7 +315,6 @@ func (c *Client) ListContainers() ([]docker.Container, error) {
317315
Image: container.Image,
318316
Labels: container.Labels,
319317
Group: container.Group,
320-
ImageID: container.ImageId,
321318
Created: container.Created.AsTime(),
322319
State: container.State,
323320
Health: container.Health,

internal/agent/client_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ func init() {
116116
Name: "test",
117117
Host: "localhost",
118118
Image: "test",
119-
ImageID: "test",
120119
State: "running",
121120
Health: "healthy",
122121
Group: "test",
@@ -149,7 +148,6 @@ func TestFindContainer(t *testing.T) {
149148
Name: "test",
150149
Host: "localhost",
151150
Image: "test",
152-
ImageID: "test",
153151
State: "running",
154152
Health: "healthy",
155153
Group: "test",
@@ -176,7 +174,6 @@ func TestListContainers(t *testing.T) {
176174
Name: "test",
177175
Host: "localhost",
178176
Image: "test",
179-
ImageID: "test",
180177
State: "running",
181178
Health: "healthy",
182179
Group: "test",

internal/agent/pb/rpc.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/agent/pb/rpc_grpc.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/agent/pb/types.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/agent/server.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ func (s *server) FindContainer(ctx context.Context, in *pb.FindContainerRequest)
180180
Id: container.ID,
181181
Name: container.Name,
182182
Image: container.Image,
183-
ImageId: container.ImageID,
184183
Command: container.Command,
185184
Created: timestamppb.New(container.Created),
186185
State: container.State,
@@ -217,7 +216,6 @@ func (s *server) ListContainers(ctx context.Context, in *pb.ListContainersReques
217216
Id: container.ID,
218217
Name: container.Name,
219218
Image: container.Image,
220-
ImageId: container.ImageID,
221219
Created: timestamppb.New(container.Created),
222220
State: container.State,
223221
Health: container.Health,
@@ -263,7 +261,6 @@ func (s *server) StreamContainerStarted(in *pb.StreamContainerStartedRequest, ou
263261
Id: container.ID,
264262
Name: container.Name,
265263
Image: container.Image,
266-
ImageId: container.ImageID,
267264
Created: timestamppb.New(container.Created),
268265
State: container.State,
269266
Health: container.Health,

internal/docker/client.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,6 @@ func newContainer(c types.Container, host string) Container {
368368
ID: c.ID[:12],
369369
Name: name,
370370
Image: c.Image,
371-
ImageID: c.ImageID,
372371
Command: c.Command,
373372
Created: time.Unix(c.Created, 0),
374373
State: c.State,
@@ -390,11 +389,12 @@ func newContainerFromJSON(c types.ContainerJSON, host string) Container {
390389
group = c.Config.Labels["dev.dozzle.group"]
391390
}
392391

392+
log.Debugf("newContainerFromJSON: %s", c.Config.Image)
393+
393394
container := Container{
394395
ID: c.ID[:12],
395396
Name: name,
396-
Image: c.Image,
397-
ImageID: c.Image,
397+
Image: c.Config.Image,
398398
Command: strings.Join(c.Config.Entrypoint, " ") + " " + strings.Join(c.Config.Cmd, " "),
399399
State: c.State.Status,
400400
Host: host,

internal/docker/types.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ type Container struct {
1313
ID string `json:"id"`
1414
Name string `json:"name"`
1515
Image string `json:"image"`
16-
ImageID string `json:"imageId"`
1716
Command string `json:"command"`
1817
Created time.Time `json:"created"`
1918
StartedAt time.Time `json:"startedAt,omitempty"`

0 commit comments

Comments
 (0)