41 Commits

Author SHA1 Message Date
Shu Muto
9f45851859 Add Cloud Shell feature
Screen Shot:
https://drive.google.com/file/d/0B1UFZO9xX8eweERNX2FWVGRrMXM/view
Short Video:
https://youtu.be/lYt2U7qZG38

This patch realizes the Cloud Shell feature as following manner:

1. Add 'Cloud Shell' menu on the top menu bar.
2. When 'Cloud Shell' menu clicked, create console area on
   the bottom of window.
3. If cloud shell container does not exists for the user,
   create the container.
4. If cloud shell container exists, attach the console area
   to the container.
5. Each time when attach to the container, clouds.yaml will be
   exported into the container.
6. Password will be not imported into the container,
   so user should set manually 'OS_PASSWORD' into envirinment
   variables or 'password' into clouds.yaml.

Change-Id: Ia26be196758e5f3617b31750702a6c54436efb93
Depends-On: Ie4bc4d7302ce80ed9925db4156ff52f928460aca
2017-10-30 17:08:59 +09:00
jiangpch
0b0aceb5c8 Show actions according to container status
Now the ui will show all of the actions regardless of container's
status, while the zun_api will check it and return a 409 code if
status is not valid, we should filter the actions just like what
nova instances do

Change-Id: Id87ec80238b407f1475c83303f6a5cab57e07385
2017-08-09 05:35:18 -04:00
Andreas Jaeger
58b554daf2 Fix invalid UTF-8
Current translation sync fail with:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 3:
ordinal not in range(128)

Example:
http://logs.openstack.org/periodic/zun-ui-propose-translation-update/2f95b23/

The problem are two wrong " " UTF-8 characters, replace them with ASCII
ones.

Note that the diff will not show this as real difference. But comparing files before and
after using "file" shows before: UTF-8 Unicode text
And now: ASCII text.

This was introduced with change I2eba1ac77deec797342fc1adff60f45e8ea0a70f.

See
http://status.openstack.org/openstack-health/#/job/zun-ui-upstream-translation-update
for when the failures start.

Change-Id: Idd443c3a432c78374f6d10d48f759ff5787e439c
2017-07-30 10:05:59 +02:00
Shu Muto
51c16f5695 Fix help string for network setting
This patch fixes help string for network setting on create
container dialog.

Change-Id: Ic9672c53243c4fc01adbbc0e39c91d44e2fdaca7
2017-07-28 13:37:16 +09:00
Shu Muto
45750bc889 Add Networks and Ports step for creation dialog
To specify nets option when create container, this patch adds
Networks and Ports steps into the creation dialog.

The Networks and Ports steps are not shown in update dialog.

Change-Id: I686e603d43b67648df08af398a550069f5087415
Implements: bluepring add-network-step
2017-07-28 09:43:01 +09:00
Shu Muto
88cca7d35d Add Scheduler Hints step into creation dialog
To specify scheduler hints options when create container,
this patch adds Scheduler Hints step into the creation dialog.

The Scheduler Hints step is not shown in update dialog.

For now, only Label Filter is available. So there are no
scheduler hint definitions in the left column.

Change-Id: I2eba1ac77deec797342fc1adff60f45e8ea0a70f
Implements: blueprint add-scheduler-hints-step
2017-07-26 14:23:33 +09:00
Shu Muto
edfb81d7cf Add Security Groups steps into creation dialog
To specify security groups options when create container,
this patch adds Security Groups step into the creation dialog.

The Security Groups step is not shown in update dialog.

Also, security group infomations are shown in table view
and details view.

Change-Id: Ic67baa367eb1210dde8e6d7610fe2c5332631aa7
Implements: bluepring add-security-groups
2017-07-26 14:22:42 +09:00
Shu Muto
055f8f71ea Fix translate tag
This patch fixes translation tag properly.

Change-Id: Iecc6bd58d6bcc9e704d78358c03f5598d3d31517
2017-06-26 11:38:25 +09:00
Shu Muto
f42c24e1e8 Enable to rename container in update action
This patch enables to rename container in update action.

Change-Id: I2c58d65355965f512ff89ba0b689d735b7f36522
2017-06-15 16:04:01 +09:00
Shu Muto
6ab8f75e59 Add update action for container
This patch adds update action for container as item action.

Change-Id: Ie80a1f447e218213adaff2253a1ec1afd7fe5672
2017-06-15 15:55:48 +09:00
Shu Muto
2fe0d61529 Use Angular-Schema-Form for container creation
To modify dialog easily, this patch uses Angular-Schema-Form
for container creation dialog.
This also makes easier to implement update dialog in the future.

Change-Id: Id369ec6650931433e3e5fd4569838c3ff420e504
2017-06-14 15:27:37 +09:00
Shu Muto
fa57cda20c Add parameters for cluster creation
This patch adds 'image_driver', 'image_pull_policy' and
'restart_policy' parameters into cluster creation action.

Change-Id: I479e85787b0a2518968e8bb774159073b1573162
2017-06-14 10:44:15 +09:00
Hongbin Lu
e9c497df63 Make console work with zun-wsproxy
Zun server is switching to websockify library for streaming.
This requires client to set sub-protocols manually.

New WebSocket connection manner is completely same as of
serial console for the instance.
So it's enough to use django template for the instance.

Change-Id: I7ebd0893ea4db0149fade4f32d6b70ee8b55147c
2017-05-19 15:25:29 +00:00
Feng Shengqin
2a522bec9f Combine tty and stdin_open
Change-Id: I6b01c35260671ac0c45c5bb188aa07f637fb7eac
Closes-Bug: #1683951
2017-04-20 06:18:28 +00:00
Hongbin Lu
c8983de015 Rename 'reboot' to 'restart'
Change-Id: I5d821303f9e5efb80efeeb3b0d7b3c7c330fa13b
Depends-On: I412fdb2123feb57b9fd5bcdb47ab389271d0d7e0
Closes-Bug: #1682679
2017-04-14 23:58:00 +00:00
Shu Muto
daa20b5483 Handle 400/500 error on execute dialog
If a 'exec' request returned 400/500, the UI doesn't handle it.
This causes spinner remaining. This patch fixes the issue.
Also, to ease to see status of exit code for command,
change its container from readonly input text box to label.

Change-Id: I833d5f448f5294ae8b537476e53643e35f25e7a2
Closes-Bug: #1682173
2017-04-13 14:17:20 +09:00
Shu Muto
6644b6be77 Increase the height of output area.
It is better to increase the height of output area
since the output couldn't fit into the box at majority cases.

Change-Id: Ia8dbb2c3985eca7125575de803f7c5fa749558b2
2017-04-12 15:40:30 +09:00
Jenkins
34c5b80f06 Merge "Display output of command for execute action" 2017-04-12 01:23:08 +00:00
Shu Muto
526d4424a6 Display output of command for execute action
This patch adds fields for output, exit code and message into Execute
action dialog. To display output of command, this also modifies dialog
not to be close by clicking submit button. To close this dialog, click
cancel or type Esc key.

Change-Id: I6f753387f4e8fa833b5081b4f11fa5c89927b6d0
2017-04-11 20:41:48 +09:00
Shu Muto
9d61096c2c Add dialogs for stop/reboot actions
This patch adds dialogs for stop and reboot actions
to specify timeout attribute.

Change-Id: I4d7e92441dd976d6974c7b8ad84a5338b420c9d6
2017-04-11 12:42:38 +09:00
Jenkins
5160eaddf4 Merge "Don't get container's logs if it is creating" 2017-04-07 08:27:57 +00:00
Hongbin Lu
f8730d79bd Don't get container's logs if it is creating
Server might return a 400 error on getting logs on container with
"Creating" state.

Change-Id: I0bc16c15ca91698713a98368d3263ac8b8764536
2017-04-05 20:30:58 +00:00
Shu Muto
3ed91caa43 Refresh views after actions
This patch fixes to refresh views after actions,
also adds refresh action as item action for manual refreshing.

Adding refresh action is trivial fix. Ideally, refresh action
should be implemented by Horizon framework.

Change-Id: I1b0b5084a7a3a3df96e04200add8f3843587cb76
2017-04-05 15:37:46 +09:00
Shu Muto
328eca4a68 Add console tab into details view
This patch adds console tab into details view. Console view
gets console_url using attach method and access from browser
via websocket using console_url.

Change-Id: I273e83eb114e93371a23b9a1e9d26ceacb6b71d5
Implements: blueprint interactive-mode
2017-04-03 11:52:08 +09:00
Shu Muto
5e68fcc086 Add 'interaction' attribute into creation dialog
To enable Web console for container, this patch adds
'interaction' attribute into creation dialog

Change-Id: Ia941afad48c5f83594972f6f83d9267e36c04501
Partial-Impements: blueprint interactive-mode
2017-04-03 11:51:33 +09:00
Shu Muto
dc4ed360f8 Add 'run' attribute to create action
To corresponse 'run' command of python-zunclient,
this patch adds 'run' attribute to creation action.

Change-Id: I80d478951c019284441093fa50f2d41bd970c473
2017-04-03 11:11:11 +09:00
Shu Muto
f44f68aa9f Use detailRoute constant for path of details view
This patch replaces hard coded "project/ngdetails/" for path of
details view to constant using "horizon.app.core.detailRoute".

Change-Id: Ia238f0a4b6df45f08673e4d41b24c6005d22ef00
Closes-Bug: #1641250
2017-03-21 15:34:09 +09:00
Shu Muto
c2042f873a Fix eslint errors
This patch fixes lint errors for JavaScript except "FIXME" warnings.

Change-Id: Iefa0868365eb08c3a5383885dc1a747808751318
Needed-By: Idb8b9064c1e465db8284e287bcf56949ab1de5e6
2017-03-14 19:44:36 +09:00
Shu Muto
b56de185aa Add Delete Container Force action
This patch adds "Delete Container Forcely" action for each containers.
This action is too dangerous for batch action, so implemented as only
item action.

Change-Id: Id839f2ce4beb17d7c4280cecf31b29e63f59197f
2017-03-14 18:41:00 +09:00
Shu Muto
21f79085d8 Refresh table view and detail view
This patch refreshes columns for table view and
properties for details view.
Also, use hz-resource-property-list for them.

Change-Id: I512de5bb76b1ea3d47ff4b5712bc9078e4f5e753
2017-03-10 16:23:40 +09:00
Shu Muto
4797b3027b Hotfix creation dialog
This patch removes hostname and ports attributes, and modifies
memory_size as MiB from create dialog.
Also, merge environment tab into miscellaneous tab.

Since create dialog will be changed widely in following patch,
so this patch is provided as hotfix.

Change-Id: I63920f7792655cce06d3bcf531ecdce6591cdd44
2017-03-09 17:48:23 +09:00
Shu Muto
7e1829e4b6 Add exec/kill action
This patch adds execute and kill action as item action
in table view and details view.

Change-Id: I782c893c3ad4847ac80b6e5282c2811f70e28929
Partial-Implements: blueprint add-container-operations
2016-12-26 09:48:00 +09:00
Kenji Ishii
cb3eb2e16b Use initAction() instead initScope()
initScope() for actions is deprecated in Ocata.[1]
This patch use initAction() instead initScope().
New scope is now provided as the second argument of perform().

[1]:https://review.openstack.org/#/c/345145/

Change-Id: Ie96f24fe7a892da29e4e2d80cfb100d2f3105c49
2016-12-02 13:17:12 +09:00
Jenkins
340c4d98be Merge "Add container operations 'reboot', 'pause' and 'unpause'" 2016-10-13 14:21:46 +00:00
Jenkins
45d81f4e33 Merge "Fix a duplicate request called when a user open a container panel" 2016-10-13 14:14:35 +00:00
Kenji Ishii
57bdae42d6 Add container operations 'reboot', 'pause' and 'unpause'
As a item action, this patch add three operations.
'reboot', 'pause' and 'unpause'.

Change-Id: I38534505568f4d363bc6e77cb8b5466292997d5f
Partial-Implements: blueprint add-container-operations
2016-10-12 11:30:16 +09:00
Kenji Ishii
ca85c1d979 Fix a duplicate request called when a user open a container panel
Change-Id: Ide0010f1dc5d252767e172c5371d1d9b21b8216a
Closes-Bug: #1632217
2016-10-11 16:12:39 +09:00
Shu Muto
78620bef27 Add parameters for container
This patch adds following parameters for container creation.

* cpu
* hostname
* workdir
* ports
* labels

Also, classify all params for creation dialog and details view.

And 'task_state' is added for views.

Change-Id: I647c8d6b06b9b573b45f804f55d4e2154e8c1f4a
Depends-On: Ief55b52317c0a97dd7175556755e460522959789
2016-10-08 09:38:31 +09:00
Shu Muto
c16e7a4b3d Add container operations
This patch adds 'start', 'stop' and 'logs' operations
for each container.

'start' and 'stop' operations are added as item action
in each row on table view and details view.
'logs' are called while loading details view, then
logs are shown in 'Logs' tab.

Change-Id: I878728a2b05265d29a4d73918146083d90bec749
Partial-Implements: blueprint add-container-operations
2016-10-06 01:35:04 +00:00
Shu Muto
543a2a02f4 Use zunclient instead of stub
Use python-zunclient instead of stub client in skeleton.
Then Zun-UI interacts with Zun API.

This patch enable CRUD operation of containers.

Change-Id: Idc869c0d4d40895e42ccf941f7fcb9d6d1dfb662
Implements: blueprint use-zunclient
2016-10-06 10:21:38 +09:00
Shu Muto
73c2bcf7af first commit 2016-07-22 13:06:25 +09:00