提交 aef7f257 编写于 作者: B Batikan Urcan 提交者: Piotr Bryk

commands and args added to containers (#1185)

* commands and args added to containers
上级 f4407b33
......@@ -666,4 +666,8 @@
<translation id="6981942795420750041" key="MSG_PERSISTENT_VOLUME_LIST_HEADER_AGE" source="/home/urcan/wlm/dashboard/.tmp/serve/app-dev.js" desc="Persistent volume list header: age.">Age</translation>
<translation id="7869718532150162176" key="MSG_PERSISTENT_VOLUME_LIST_CREATED_AT_TOOLTIP" source="/home/urcan/wlm/dashboard/.tmp/serve/app-dev.js" desc="Tooltip 'Created at [some date]' showing the exact creation time of persistent volume.">Created at <ph name="CREATION_DATE" /></translation>
<translation id="1281408704476700057" key="MSG_PERSISTENT_VOLUME_LIST_PERSISTENT_VOLUME_LABEL" source="/home/urcan/wlm/dashboard/.tmp/serve/app-dev.js" desc="Label 'Persistent Volume' which will appear in the persistent volume delete dialog opened from a persistentvolume card on the list page.">Persistent Volume</translation>
<translation id="2848492051051488731" key="MSG_CONTAINER_DETAILS_COMMANDS" source="/home/urcan/wlm/dashboard/.tmp/serve/app-dev.js" desc="Label for container commands.">Commands</translation>
<translation id="3519937684574926798" key="MSG_CONTAINER_DETAILS_NO_COMMANDS" source="/home/urcan/wlm/dashboard/.tmp/serve/app-dev.js" desc="Label when there is no container commands.">-</translation>
<translation id="4028583304388361707" key="MSG_CONTAINER_DETAILS_ARGS" source="/home/urcan/wlm/dashboard/.tmp/serve/app-dev.js" desc="Label for container args.">Args</translation>
<translation id="3375312067672399373" key="MSG_CONTAINER_DETAILS_NO_ARGS" source="/home/urcan/wlm/dashboard/.tmp/serve/app-dev.js" desc="Label when there is no container arguments.">-</translation>
</translationbundle>
\ No newline at end of file
......@@ -855,4 +855,8 @@
<translation id="6981942795420750041" key="MSG_PERSISTENT_VOLUME_LIST_HEADER_AGE" source="/home/urcan/wlm/dashboard/.tmp/serve/app-dev.js" desc="Persistent volume list header: age.">Age</translation>
<translation id="7869718532150162176" key="MSG_PERSISTENT_VOLUME_LIST_CREATED_AT_TOOLTIP" source="/home/urcan/wlm/dashboard/.tmp/serve/app-dev.js" desc="Tooltip 'Created at [some date]' showing the exact creation time of persistent volume.">Created at <ph name="CREATION_DATE" /></translation>
<translation id="1281408704476700057" key="MSG_PERSISTENT_VOLUME_LIST_PERSISTENT_VOLUME_LABEL" source="/home/urcan/wlm/dashboard/.tmp/serve/app-dev.js" desc="Label 'Persistent Volume' which will appear in the persistent volume delete dialog opened from a persistentvolume card on the list page.">Persistent Volume</translation>
<translation id="2848492051051488731" key="MSG_CONTAINER_DETAILS_COMMANDS" source="/home/urcan/wlm/dashboard/.tmp/serve/app-dev.js" desc="Label for container commands.">Commands</translation>
<translation id="3519937684574926798" key="MSG_CONTAINER_DETAILS_NO_COMMANDS" source="/home/urcan/wlm/dashboard/.tmp/serve/app-dev.js" desc="Label when there is no container commands.">-</translation>
<translation id="4028583304388361707" key="MSG_CONTAINER_DETAILS_ARGS" source="/home/urcan/wlm/dashboard/.tmp/serve/app-dev.js" desc="Label for container args.">Args</translation>
<translation id="3375312067672399373" key="MSG_CONTAINER_DETAILS_NO_ARGS" source="/home/urcan/wlm/dashboard/.tmp/serve/app-dev.js" desc="Label when there is no container arguments.">-</translation>
</translationbundle>
\ No newline at end of file
......@@ -60,6 +60,12 @@ type Container struct {
// List of environment variables.
Env []EnvVar `json:"env"`
// Commands of the container
Commands []string `json:"commands"`
// Command arguments
Args []string `json:"args"`
}
// EnvVar represents an environment variable of a container.
......@@ -127,6 +133,8 @@ func ToPodDetail(pod *api.Pod, metrics *common.MetricsByPod, configMaps *api.Con
Name: container.Name,
Image: container.Image,
Env: vars,
Commands: container.Command,
Args: container.Args,
})
}
podDetail := PodDetail{
......
......@@ -587,7 +587,9 @@ backendApi.ReplicationControllerDetail;
* @typedef {{
* name: string,
* image: string,
* env: !Array<!backendApi.EnvVar>
* env: !Array<!backendApi.EnvVar>,
* commands: Array<string>,
* args: Array<string>
* }}
*/
backendApi.Container;
......@@ -646,7 +648,7 @@ backendApi.Pod;
* @typedef {{
* objectMeta: !backendApi.ObjectMeta,
* typeMeta: !backendApi.TypeMeta,
* containerImages: !Array<string>,
* containers: !Array<!backendApi.Container>,
* podPhase: string,
* podIP: string,
* nodeName: string,
......
......@@ -36,5 +36,25 @@ limitations under the License.
{{::$ctrl.i18n.MSG_CONTAINER_DETAILS_NO_ENV_VARS}}
</div>
</kd-info-card-entry>
<kd-info-card-entry title="{{::$ctrl.i18n.MSG_CONTAINER_DETAILS_COMMANDS}}">
<div ng-if="::container.commands.length">
<div ng-repeat="(key, value) in ::container.commands" layout="row">
<kd-middle-ellipsis display-string="{{::value}}" flex="shrink"><kd-middle-ellipsis>
</div>
</div>
<div ng-if="::!container.commands.length">
{{::$ctrl.i18n.MSG_CONTAINER_DETAILS_NO_COMMANDS}}
</div>
</kd-info-card-entry>
<kd-info-card-entry title="{{::$ctrl.i18n.MSG_CONTAINER_DETAILS_ARGS}}">
<div ng-if="::container.args.length">
<div ng-repeat="(key, value) in ::container.args" layout="row">
<kd-middle-ellipsis display-string="{{::value}}" flex="shrink"><kd-middle-ellipsis>
</div>
</div>
<div ng-if="::!container.args.length">
{{::$ctrl.i18n.MSG_CONTAINER_DETAILS_NO_ARGS}}
</div>
</kd-info-card-entry>
</kd-info-card-section>
</kd-info-card>
......@@ -73,6 +73,14 @@ const i18n = {
MSG_CONTAINER_DETAILS_ENV_VARS: goog.getMsg('Environment variables'),
/** @export {string} @desc Label when there is no container environment variables. */
MSG_CONTAINER_DETAILS_NO_ENV_VARS: goog.getMsg('-'),
/** @export {string} @desc Label for container commands. */
MSG_CONTAINER_DETAILS_COMMANDS: goog.getMsg('Commands'),
/** @export {string} @desc Label when there is no container commands. */
MSG_CONTAINER_DETAILS_NO_COMMANDS: goog.getMsg('-'),
/** @export {string} @desc Label for container args. */
MSG_CONTAINER_DETAILS_ARGS: goog.getMsg('Args'),
/** @export {string} @desc Label when there is no container arguments. */
MSG_CONTAINER_DETAILS_NO_ARGS: goog.getMsg('-'),
/**
* @param {!backendApi.ConfigMapKeyRef} configMapKeyRef
* @return {string}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册