Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "# Containers" column to container images as children #919

Merged
merged 1 commit into from
Feb 5, 2016

Conversation

paulbellamy
Copy link
Contributor

Side effect of the way it's implemented is that it also adds it to the container image details panel. Could fix, but adds a bit of work to the implementation.

Fixes #821

The column when container images are children:
screen shot 2016-02-05 at 09 26 50

The container count listed in metadata:
screen shot 2016-02-05 at 09 27 07

@tomwilkie wdyt?

@tomwilkie
Copy link
Contributor

I quite like that.

Could you move the container images table down to the bottom as well pls?

On Friday, 5 February 2016, Paul Bellamy [email protected] wrote:

Side effect of the way it's implemented is that it also adds it to the
container image details panel. Could fix, but adds a bit of work to the
implementation.

Fixes #821 #821

The column when container images are children:
[image: screen shot 2016-02-05 at 09 26 50]
https://cloud.githubusercontent.com/assets/250199/12842507/26727be8-cbeb-11e5-8a0a-ee0e86dd8ad0.png

The container count listed in metadata:
[image: screen shot 2016-02-05 at 09 27 07]
https://cloud.githubusercontent.com/assets/250199/12842484/1164cda0-cbeb-11e5-90b4-81a6df9070b7.png

@tomwilkie https://github.com/tomwilkie wdyt?

You can view, comment on, or merge this pull request online at:

#919
Commit Summary

  • Add "# Containers" column to container images as children

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#919.

@paulbellamy paulbellamy force-pushed the num-containers-column branch from 8770d56 to dad1243 Compare February 5, 2016 10:28
@paulbellamy
Copy link
Contributor Author

Could you move the container images table down to the bottom as well pls?

#923

@tomwilkie
Copy link
Contributor

The TestMakeDetailedHostNode failure looks legitimate:

--- FAIL: TestMakeDetailedHostNode (0.01s)
    node_test.go:114: 
        --- want
        +++ have
        @@ -3,7 +3,7 @@
           ID: (string) (len=24) "host:client.hostname.com",
           Label: (string) (len=6) "client",
           Linkable: (bool) true,
        -  Metadata: ([]detailed.MetadataRow) (len=3 cap=3) {
        +  Metadata: ([]detailed.MetadataRow) (len=3 cap=4) {
            (detailed.MetadataRow) {
             ID: (string) (len=9) "host_name",
             Value: (string) (len=19) "client.hostname.com"
        @@ -17,23 +17,14 @@
             Value: (string) (len=13) "10.10.10.0/24"
            }
           },
        -  DockerLabels: ([]detailed.MetadataRow) (len=2 cap=2) {
        -   (detailed.MetadataRow) {
        -    ID: (string) (len=10) "containers",
        -    Value: (string) (len=1) "1"
        -   },
        -   (detailed.MetadataRow) {
        -    ID: (string) (len=28) "label_io.kubernetes.pod.name",
        -    Value: (string) (len=11) "ping/pong-a"
        -   }
        -  },
        -  Metrics: ([]detailed.MetricRow) (len=5 cap=5) {
        +  DockerLabels: ([]detailed.MetadataRow) <nil>,
        +  Metrics: ([]detailed.MetricRow) (len=5 cap=8) {
            (detailed.MetricRow) {
             ID: (string) (len=22) "host_cpu_usage_percent",
             Format: (string) (len=7) "percent",
             Group: (string) "",
             Value: (float64) 0.07,
        -    Metric: (*report.Metric)(0x1a78f80)({
        +    Metric: (*report.Metric)(0xc82032a000)({
              Samples: (*ps.list)(0xc82035dca0)({
               depth: (int) 1,
               value: (report.Sample) {
        @@ -57,7 +48,7 @@
             Format: (string) (len=8) "filesize",
             Group: (string) "",
             Value: (float64) 0.08,
        -    Metric: (*report.Metric)(0x1a79100)({
        +    Metric: (*report.Metric)(0xc82032a050)({
              Samples: (*ps.list)(0xc82035dd00)({
               depth: (int) 1,
               value: (report.Sample) {
        @@ -81,7 +72,7 @@
             Format: (string) "",
             Group: (string) (len=4) "load",
             Value: (float64) 0.09,
        -    Metric: (*report.Metric)(0x1a79040)({
        +    Metric: (*report.Metric)(0xc82032a0a0)({
              Samples: (*ps.list)(0xc82035dd60)({
               depth: (int) 1,
               value: (report.Sample) {
        @@ -105,7 +96,7 @@
             Format: (string) "",
             Group: (string) (len=4) "load",
             Value: (float64) 0.1,
        -    Metric: (*report.Metric)(0x1a790a0)({
        +    Metric: (*report.Metric)(0xc82032a0f0)({
              Samples: (*ps.list)(0xc82035dde0)({
               depth: (int) 1,
               value: (report.Sample) {
        @@ -129,7 +120,7 @@
             Format: (string) "",
             Group: (string) (len=4) "load",
             Value: (float64) 0.11,
        -    Metric: (*report.Metric)(0x1a78fe0)({
        +    Metric: (*report.Metric)(0xc82032a140)({
              Samples: (*ps.list)(0xc82035de40)({
               depth: (int) 1,
               value: (report.Sample) {
        @@ -154,7 +145,7 @@
          Pseudo: (bool) false,
          Controls: ([]detailed.ControlInstance) {
          },
        - Children: ([]detailed.NodeSummaryGroup) (len=3 cap=3) {
        + Children: ([]detailed.NodeSummaryGroup) (len=3 cap=4) {
           (detailed.NodeSummaryGroup) {
            Label: (string) (len=16) "Container Images",
            Nodes: ([]detailed.NodeSummary) (len=1 cap=1) {
        @@ -162,13 +153,22 @@
              ID: (string) (len=28) "container_image:image/client",
              Label: (string) (len=12) "image/client",
              Linkable: (bool) true,
        -     Metadata: ([]detailed.MetadataRow) (len=1 cap=1) {
        +     Metadata: ([]detailed.MetadataRow) (len=2 cap=2) {
               (detailed.MetadataRow) {
                ID: (string) (len=15) "docker_image_id",
                Value: (string) (len=10) "imageid123"
        -      }
        -     },
        -     DockerLabels: ([]detailed.MetadataRow) <nil>,
        +      },
        +      (detailed.MetadataRow) {
        +       ID: (string) (len=10) "containers",
        +       Value: (string) (len=1) "1"
        +      }
        +     },
        +     DockerLabels: ([]detailed.MetadataRow) (len=1 cap=1) {
        +      (detailed.MetadataRow) {
        +       ID: (string) (len=28) "label_io.kubernetes.pod.name",
        +       Value: (string) (len=11) "ping/pong-a"
        +      }
        +     },
              Metrics: ([]detailed.MetricRow) <nil>
             }
            },
        @@ -210,7 +210,7 @@
                Format: (string) (len=7) "percent",
                Group: (string) "",
                Value: (float64) 0.03,
        -       Metric: (*report.Metric)(0xc82032a410)({
        +       Metric: (*report.Metric)(0xc82032a1e0)({
                 Samples: (*ps.list)(0xc82035dac0)({
                  depth: (int) 1,
                  value: (report.Sample) {
        @@ -230,7 +230,7 @@
                Format: (string) (len=8) "filesize",
                Group: (string) "",
                Value: (float64) 0.04,
        -       Metric: (*report.Metric)(0xc82032a460)({
        +       Metric: (*report.Metric)(0xc82032a230)({
                 Samples: (*ps.list)(0xc82035db60)({
                  depth: (int) 1,
                  value: (report.Sample) {
        @@ -274,7 +274,7 @@
                Format: (string) (len=7) "percent",
                Group: (string) "",
                Value: (float64) 0.01,
        -       Metric: (*report.Metric)(0xc82032a4b0)({
        +       Metric: (*report.Metric)(0xc82032a280)({
                 Samples: (*ps.list)(0xc82035d9e0)({
                  depth: (int) 1,
                  value: (report.Sample) {
        @@ -294,7 +294,7 @@
                Format: (string) (len=8) "filesize",
                Group: (string) "",
                Value: (float64) 0.02,
        -       Metric: (*report.Metric)(0xc82032a500)({
        +       Metric: (*report.Metric)(0xc82032a2d0)({
                 Samples: (*ps.list)(0xc82035da60)({
                  depth: (int) 1,
                  value: (report.Sample) {
FAIL
FAIL    github.com/weaveworks/scope/render/detailed 0.067s

Side effect is that it also adds it to the container image details panel
@paulbellamy paulbellamy force-pushed the num-containers-column branch from dad1243 to a403917 Compare February 5, 2016 11:13
@paulbellamy
Copy link
Contributor Author

Forgot to update the tests, should be good now, d'oh!

tomwilkie added a commit that referenced this pull request Feb 5, 2016
Add "# Containers" column to container images as children
@tomwilkie tomwilkie merged commit afaaab3 into master Feb 5, 2016
@tomwilkie tomwilkie deleted the num-containers-column branch February 5, 2016 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Container images in the host view should have a column of the number of containers
2 participants