提交 25dac017 编写于 作者: P Piotr Bryk

Merge pull request #784 from digitalfishpond/pods-status-icons

Status icons for Pods visible on list and resources pages
......@@ -67,6 +67,8 @@
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
......
......@@ -67,6 +67,8 @@
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
......
......@@ -31,6 +31,19 @@ limitations under the License.
<kd-resource-card ng-repeat="pod in $ctrl.podList.pods"
type-meta="pod.typeMeta" object-meta="pod.objectMeta">
<kd-resource-card-status layout="row">
<md-icon class="material-icons kd-error" ng-if="::pod.podPhase=='Failed'">
error
<md-tooltip md-direction="right">{{::$ctrl.i18n.MSG_POD_IS_FAILED_TOOLTIP}}</md-tooltip>
</md-icon>
<md-icon class="material-icons" ng-if="::pod.podPhase=='Pending'">
timelapse
<md-tooltip md-direction="right">{{::$ctrl.i18n.MSG_POD_IS_PENDING_TOOLTIP}}</md-tooltip>
</md-icon>
<md-icon class="material-icons kd-success" ng-if="::pod.podPhase=='Running'">
beenhere
</md-icon>
</kd-resource-card-status>
<kd-resource-card-columns>
<kd-resource-card-column>
<div>
......
......@@ -38,6 +38,11 @@ export class PodCardListController {
/** @private {!ui.router.$state} */
this.state_ = $state;
/**
* @export
*/
this.i18n = i18n;
}
/**
......@@ -77,3 +82,11 @@ export const podCardListComponent = {
'withStatuses': '<',
},
};
const i18n = {
/** @export {string} @desc tooltip for failed pod card icon */
MSG_POD_IS_FAILED_TOOLTIP: goog.getMsg('This pod has errors.'),
/** @export {string} @desc tooltip for pending pod card icon */
MSG_POD_IS_PENDING_TOOLTIP: goog.getMsg('This pod is in a pending state.'),
};
......@@ -15,7 +15,7 @@ limitations under the License.
-->
<kd-content-card>
<kd-content>
<kd-pod-card-list pod-list="$ctrl.podList">
<kd-pod-card-list pod-list="$ctrl.podList" with-statuses="true">
</kd-pod-card-list>
</kd-content>
</kd-content-card>
......@@ -24,7 +24,7 @@ limitations under the License.
<kd-title>Pods</kd-title>
<kd-content>
<kd-pod-card-list pod-list="::ctrl.replicaSetDetail.podList"
logs-href-fn="::ctrl.getPodLogsHref(pod)">
logs-href-fn="::ctrl.getPodLogsHref(pod)" with-statuses="true">
</kd-pod-card-list>
</kd-content>
</kd-content-card>
......
......@@ -34,7 +34,7 @@ limitations under the License.
<kd-title>Pods</kd-title>
<kd-content>
<kd-pod-card-list pod-list="::ctrl.replicationControllerDetail.pods"
logs-href-fn="::ctrl.getPodLogsHref(pod)">
logs-href-fn="::ctrl.getPodLogsHref(pod)" with-statuses="true">
</kd-pod-card-list>
</kd-content>
</kd-content-card>
......
......@@ -19,6 +19,6 @@ limitations under the License.
<kd-content-card ng-if="ctrl.serviceDetail.podList.pods.length">
<kd-title>Pods</kd-title>
<kd-content>
<kd-pod-card-list pod-list="ctrl.serviceDetail.podList"></kd-pod-card-list>
<kd-pod-card-list pod-list="ctrl.serviceDetail.podList" with-statuses="true"></kd-pod-card-list>
</kd-content>
</kd-content-card>
......@@ -70,7 +70,7 @@ limitations under the License.
</a>
</kd-title>
<kd-content>
<kd-pod-card-list pod-list="$ctrl.workloads.podList">
<kd-pod-card-list pod-list="$ctrl.workloads.podList" with-statuses="true">
</kd-pod-card-list>
</kd-content>
</kd-content-card>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册