From 2a522bec9fb76d877ce525f89bd5f58e9ffbd4d3 Mon Sep 17 00:00:00 2001
From: Feng Shengqin
Date: Thu, 20 Apr 2017 13:57:27 +0800
Subject: [PATCH] Combine tty and stdin_open
Change-Id: I6b01c35260671ac0c45c5bb188aa07f637fb7eac
Closes-Bug: #1683951
---
zun_ui/api/client.py | 3 +--
.../static/dashboard/container/containers/containers.module.js | 3 +--
.../container/containers/details/console.controller.js | 2 +-
.../dashboard/container/containers/details/overview.html | 2 +-
4 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/zun_ui/api/client.py b/zun_ui/api/client.py
index bdefbb6..3ec3a08 100644
--- a/zun_ui/api/client.py
+++ b/zun_ui/api/client.py
@@ -49,8 +49,7 @@ def container_create(request, **kwargs):
run = value
continue
elif key == "interactive":
- args["tty"] = value
- args["stdin_open"] = value
+ args["interactive"] = value
continue
if key in CONTAINER_CREATE_ATTRS:
diff --git a/zun_ui/static/dashboard/container/containers/containers.module.js b/zun_ui/static/dashboard/container/containers/containers.module.js
index d50bbdc..52d7ee8 100644
--- a/zun_ui/static/dashboard/container/containers/containers.module.js
+++ b/zun_ui/static/dashboard/container/containers/containers.module.js
@@ -137,9 +137,8 @@
'status': {label: gettext('Status'), filters: ['noValue'] },
'status_detail': {label: gettext('Status Detail'), filters: ['noValue'] },
'status_reason': {label: gettext('Status Reason'), filters: ['noValue'] },
- 'stdin_open': {label: gettext('Stdin Open'), filters: ['yesno'] },
+ 'interactive': {label: gettext('Interactive'), filters: ['yesno'] },
'task_state': {label: gettext('Task State'), filters: ['noValue'] },
- 'tty': {label: gettext('TTY'), filters: ['yesno'] },
'workdir': {label: gettext('Workdir'), filters: ['noValue'] }
};
}
diff --git a/zun_ui/static/dashboard/container/containers/details/console.controller.js b/zun_ui/static/dashboard/container/containers/details/console.controller.js
index fa19816..5b54675 100644
--- a/zun_ui/static/dashboard/container/containers/details/console.controller.js
+++ b/zun_ui/static/dashboard/container/containers/details/console.controller.js
@@ -39,7 +39,7 @@
"when this container was created.
");
if (ctrl.container.status !== "Running") {
console = $("Container is not running.
");
- } else if (ctrl.container.tty && ctrl.container.stdin_open) {
+ } else if (ctrl.container.interactive) {
console = $("");
}
diff --git a/zun_ui/static/dashboard/container/containers/details/overview.html b/zun_ui/static/dashboard/container/containers/details/overview.html
index 4780221..e58dee0 100644
--- a/zun_ui/static/dashboard/container/containers/details/overview.html
+++ b/zun_ui/static/dashboard/container/containers/details/overview.html
@@ -32,7 +32,7 @@
resource-type-name="OS::Zun::Container"
cls="dl-horizontal"
item="ctrl.container"
- property-groups="[['host', 'workdir', 'environment', 'stdin_open', 'tty',
+ property-groups="[['host', 'workdir', 'environment', 'interactive',
'labels','links']]">