Skip to content

Commit

Permalink
Pamper pod list view: a few usability fixes (#1479)
Browse files Browse the repository at this point in the history
* Pamper pod list view: a few usability fixes

1. Removed cluster IP colum - it is little useful there
2. Made status column ellipsable
3. Adjusted default widths and scaling factors for all columns - now age and restarts are small and no grow, others grow as needed
4. Made sparklines 80px wide - we don't need anything more for 15 points of data anyway
  • Loading branch information
bryk authored and rf232 committed Nov 25, 2016
1 parent db42226 commit a67af3e
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 20 deletions.
1 change: 0 additions & 1 deletion src/app/backend/resource/pod/podcommon.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ func ToPod(pod *api.Pod, metrics *common.MetricsByPod) Pod {
ObjectMeta: common.NewObjectMeta(pod.ObjectMeta),
TypeMeta: common.NewTypeMeta(common.ResourceKindPod),
PodStatus: getPodStatus(*pod),
PodIP: pod.Status.PodIP,
RestartCount: getRestartCount(*pod),
}

Expand Down
3 changes: 0 additions & 3 deletions src/app/backend/resource/pod/podlist.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ type Pod struct {
// More info on pod status
PodStatus PodStatus `json:"podStatus"`

// IP address of the Pod.
PodIP string `json:"podIP"`

// Count of containers restarts.
RestartCount int32 `json:"restartCount"`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ kd-resource-card-column {
align-items: center;
display: flex;
flex-direction: row;
word-break: break-all;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
background-color: $body;
height: 2.5 * $baseline-grid;
vertical-align: -$baseline-grid / 2; // 20% below baseline, to flow with text
width: 12.5 * $baseline-grid;
width: 8 * $baseline-grid;
}

.kd-sparkline-series {
Expand Down
11 changes: 6 additions & 5 deletions src/app/frontend/podlist/podcard.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@
</kd-middle-ellipsis>
</div>
</kd-resource-card-column>
<kd-resource-card-column>{{::$ctrl.getDisplayStatus()}}</kd-resource-card-column>
<kd-resource-card-column>
<div>
<kd-middle-ellipsis display-string="{{::$ctrl.getDisplayStatus()}}">
</kd-middle-ellipsis>
</div>
</kd-resource-card-column>
<kd-resource-card-column>{{::$ctrl.pod.restartCount}}</kd-resource-card-column>
<kd-resource-card-column>
<div ng-if="::$ctrl.pod.objectMeta.creationTimestamp">
Expand All @@ -58,10 +63,6 @@
</div>
<div ng-if="::!$ctrl.pod.objectMeta.creationTimestamp">-</div>
</kd-resource-card-column>
<kd-resource-card-column>
<div ng-if="::$ctrl.pod.podIP">{{::$ctrl.pod.podIP}}</div>
<div ng-if="::!$ctrl.pod.podIP">-</div>
</kd-resource-card-column>
<kd-resource-card-column ng-if="::$ctrl.showMetrics">
<div ng-if="::$ctrl.hasCpuUsage(pod)">
<kd-sparkline timeseries="::$ctrl.pod.metrics.cpuUsageHistory"
Expand Down
18 changes: 8 additions & 10 deletions src/app/frontend/podlist/podcardlist.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,22 @@
<kd-resource-card-header-column size="small" grow="2">
[[Name|Title of a column]]
</kd-resource-card-header-column>
<kd-resource-card-header-column size="small" grow="2"
ng-if="::$ctrl.areMultipleNamespacesSelected()">
<kd-resource-card-header-column size="small" grow="1" ng-if="$ctrl.areMultipleNamespacesSelected()">
[[Namespace|Title of a column]]
</kd-resource-card-header-column>
<kd-resource-card-header-column size="small" grow="1">[[Status|Title of a pod status column]]
</kd-resource-card-header-column>
<kd-resource-card-header-column size="small" grow="1">
[[Restarts|Title of a restarts column for a pod]]
[[Status|Title of a pod status column]]
</kd-resource-card-header-column>
<kd-resource-card-header-column size="small" grow="1">[[Age|Title of a column for the age of a
pod]]
<kd-resource-card-header-column size="small" grow="nogrow">
[[Restarts|Title of a restarts column for a pod]]
</kd-resource-card-header-column>
<kd-resource-card-header-column size="small" grow="1">[[Cluster IP|Title of a column]]
<kd-resource-card-header-column size="small" grow="nogrow">
[[Age|Title of a column for the age of a pod]]
</kd-resource-card-header-column>
<kd-resource-card-header-column ng-if="::$ctrl.showMetrics()">
<kd-resource-card-header-column size="small" grow="1" ng-if="::$ctrl.showMetrics()">
[[CPU (cores)|Title of a column]]
</kd-resource-card-header-column>
<kd-resource-card-header-column ng-if="::$ctrl.showMetrics()">
<kd-resource-card-header-column size="small" grow="1" ng-if="::$ctrl.showMetrics()">
[[Memory (bytes)|Title of a column]]
</kd-resource-card-header-column>
<kd-resource-card-header-column size="small" grow="nogrow">
Expand Down

0 comments on commit a67af3e

Please sign in to comment.