Skip to content

Commit 3cfd3a4

Browse files
Status icons for Pods visible on list and resources pages
1 parent b5263fc commit 3cfd3a4

File tree

9 files changed

+35
-5
lines changed

9 files changed

+35
-5
lines changed

i18n/messages-en.xtb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@
6767
<translation id="4426583640675024823" key="MSG_DEPLOY_SETTINGS_RUN_PRIVILEGED_USER_HELP" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="User help for the &quot;Run as privileged&quot; checkbox input on the deploy from settings page.">Processes in privileged containers are equivalent to processes running as root on the host.</translation>
6868
<translation id="7560440547757208994" key="MSG_DEPLOY_SETTINGS_ENV_VARIABLES_USER_HELP" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="User help for the &quot;Environment variables&quot; section on the deploy from settings page.">Environment variables available for use in the container. Values can reference other variables using $(VAR_NAME) syntax.</translation>
6969
<translation id="7026295428726247109" key="MSG_DEPLOY_SETTINGS_NUMBER_OF_PODS_INT_WARNING" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Appears to tell the user that the number of pods on the deploy from settings page must be non-negative or integer.">Number of pods must be a positive integer</translation>
70+
<translation id="3664340326455185585" key="MSG_POD_IS_FAILED_TOOLTIP" source="/home/denis/Projects/dashboard/.tmp/serve/app-dev.js" desc="tooltip for failed pod card icon">This pod has errors.</translation>
71+
<translation id="6223633459559529643" key="MSG_POD_IS_PENDING_TOOLTIP" source="/home/denis/Projects/dashboard/.tmp/serve/app-dev.js" desc="tooltip for pending pod card icon">This pod is in a pending state.</translation>
7072
<translation id="750172492346654392" key="MSG_DEPLOY_PAGE_TITLE" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Title text which appears on top of the deploy page.">Deploy a Containerized App</translation>
7173
<translation id="4849906879961443302" key="MSG_DEPLOY_SPECIFY_APP_DETAILS_ACTION" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Text for a selection option, which the user must click to manually enter the app details on the deploy page.">Specify app details below</translation>
7274
<translation id="6920937028819232874" key="MSG_DEPLOY_FILE_UPLOAD_ACTION" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Text for a selection option, which the user must click to upload a YAML/JSON file to deploy from on the deploy page.">Upload a YAML or JSON file</translation>

i18n/messages-ja.xtb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@
6767
<translation id="4426583640675024823" key="MSG_DEPLOY_SETTINGS_RUN_PRIVILEGED_USER_HELP" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="User help for the &quot;Run as privileged&quot; checkbox input on the deploy from settings page.">Processes in privileged containers are equivalent to processes running as root on the host.</translation>
6868
<translation id="7560440547757208994" key="MSG_DEPLOY_SETTINGS_ENV_VARIABLES_USER_HELP" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="User help for the &quot;Environment variables&quot; section on the deploy from settings page.">Environment variables available for use in the container. Values can reference other variables using $(VAR_NAME) syntax.</translation>
6969
<translation id="7026295428726247109" key="MSG_DEPLOY_SETTINGS_NUMBER_OF_PODS_INT_WARNING" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Appears to tell the user that the number of pods on the deploy from settings page must be non-negative or integer.">Number of pods must be a positive integer</translation>
70+
<translation id="3664340326455185585" key="MSG_POD_IS_FAILED_TOOLTIP" source="/home/denis/Projects/dashboard/.tmp/serve/app-dev.js" desc="tooltip for failed pod card icon">This pod has errors.</translation>
71+
<translation id="6223633459559529643" key="MSG_POD_IS_PENDING_TOOLTIP" source="/home/denis/Projects/dashboard/.tmp/serve/app-dev.js" desc="tooltip for pending pod card icon">This pod is in a pending state.</translation>
7072
<translation id="750172492346654392" key="MSG_DEPLOY_PAGE_TITLE" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Title text which appears on top of the deploy page.">Deploy a Containerized App</translation>
7173
<translation id="4849906879961443302" key="MSG_DEPLOY_SPECIFY_APP_DETAILS_ACTION" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Text for a selection option, which the user must click to manually enter the app details on the deploy page.">Specify app details below</translation>
7274
<translation id="6920937028819232874" key="MSG_DEPLOY_FILE_UPLOAD_ACTION" source="/home/mirchev/go_workspace/src/github.com/kubernetes/dashboard/.tmp/serve/app-dev.js" desc="Text for a selection option, which the user must click to upload a YAML/JSON file to deploy from on the deploy page.">Upload a YAML or JSON file</translation>

src/app/frontend/podlist/podcardlist.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,19 @@
3131

3232
<kd-resource-card ng-repeat="pod in $ctrl.podList.pods"
3333
type-meta="pod.typeMeta" object-meta="pod.objectMeta">
34+
<kd-resource-card-status layout="row">
35+
<md-icon class="material-icons kd-error" ng-if="::pod.podPhase=='Failed'">
36+
error
37+
<md-tooltip md-direction="right">{{::$ctrl.i18n.MSG_POD_IS_FAILED_TOOLTIP}}</md-tooltip>
38+
</md-icon>
39+
<md-icon class="material-icons" ng-if="::pod.podPhase=='Pending'">
40+
timelapse
41+
<md-tooltip md-direction="right">{{::$ctrl.i18n.MSG_POD_IS_PENDING_TOOLTIP}}</md-tooltip>
42+
</md-icon>
43+
<md-icon class="material-icons kd-success" ng-if="::pod.podPhase=='Running'">
44+
beenhere
45+
</md-icon>
46+
</kd-resource-card-status>
3447
<kd-resource-card-columns>
3548
<kd-resource-card-column>
3649
<div>

src/app/frontend/podlist/podcardlist_component.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ export class PodCardListController {
3838

3939
/** @private {!ui.router.$state} */
4040
this.state_ = $state;
41+
42+
/**
43+
* @export
44+
*/
45+
this.i18n = i18n;
4146
}
4247

4348
/**
@@ -77,3 +82,11 @@ export const podCardListComponent = {
7782
'withStatuses': '<',
7883
},
7984
};
85+
86+
const i18n = {
87+
/** @export {string} @desc tooltip for failed pod card icon */
88+
MSG_POD_IS_FAILED_TOOLTIP: goog.getMsg('This pod has errors.'),
89+
90+
/** @export {string} @desc tooltip for pending pod card icon */
91+
MSG_POD_IS_PENDING_TOOLTIP: goog.getMsg('This pod is in a pending state.'),
92+
};

src/app/frontend/podlist/podlist.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
-->
1616
<kd-content-card>
1717
<kd-content>
18-
<kd-pod-card-list pod-list="$ctrl.podList">
18+
<kd-pod-card-list pod-list="$ctrl.podList" with-statuses="true">
1919
</kd-pod-card-list>
2020
</kd-content>
2121
</kd-content-card>

src/app/frontend/replicasetdetail/replicasetdetail.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<kd-title>Pods</kd-title>
2525
<kd-content>
2626
<kd-pod-card-list pod-list="::ctrl.replicaSetDetail.podList"
27-
logs-href-fn="::ctrl.getPodLogsHref(pod)">
27+
logs-href-fn="::ctrl.getPodLogsHref(pod)" with-statuses="true">
2828
</kd-pod-card-list>
2929
</kd-content>
3030
</kd-content-card>

src/app/frontend/replicationcontrollerdetail/replicationcontrollerdetail.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<kd-title>Pods</kd-title>
3535
<kd-content>
3636
<kd-pod-card-list pod-list="::ctrl.replicationControllerDetail.pods"
37-
logs-href-fn="::ctrl.getPodLogsHref(pod)">
37+
logs-href-fn="::ctrl.getPodLogsHref(pod)" with-statuses="true">
3838
</kd-pod-card-list>
3939
</kd-content>
4040
</kd-content-card>

src/app/frontend/servicedetail/servicedetail.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
<kd-content-card ng-if="ctrl.serviceDetail.podList.pods.length">
2020
<kd-title>Pods</kd-title>
2121
<kd-content>
22-
<kd-pod-card-list pod-list="ctrl.serviceDetail.podList"></kd-pod-card-list>
22+
<kd-pod-card-list pod-list="ctrl.serviceDetail.podList" with-statuses="true"></kd-pod-card-list>
2323
</kd-content>
2424
</kd-content-card>

src/app/frontend/workloads/workloads.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
</a>
7171
</kd-title>
7272
<kd-content>
73-
<kd-pod-card-list pod-list="$ctrl.workloads.podList">
73+
<kd-pod-card-list pod-list="$ctrl.workloads.podList" with-statuses="true">
7474
</kd-pod-card-list>
7575
</kd-content>
7676
</kd-content-card>

0 commit comments

Comments
 (0)