Updated openstack/openstack
Project: openstack/horizon  8162a4264dd7081d088efd80542b5234fbe01695

Fixed issue of progress bars in resize instance

When user resizes instance there are 4 issues for the progress
(graphic) bars:

1.It adds 1 instance even there is no new instance to add.
2.It adds the vcpu of the selected flavor when it should have
used the difference between the old flavor and new flavor.
3. It adds the ram of the selected flavor when it should have
used the difference of the old flavor and new flavor.
4. When select no falvor, the new flavor detail doesn't get updated.

Added logics to deal with flavor quota for instance_resize:

1. Set a flag resize_instance in resize_instance.py where it passes
the context back to _flavors_and_quotas.html.
2. Seperate the instance progress bars using different ids based
on the resize_instance flag.
3. Updated horizon.quota.js to capture the old_flavor. When old_flavor
and selected_flavor are both available, use the difference to caculate
the update_amount for vcpu and ram.
4. Instance update_amount is always 0 for resize instance case.
5. When nothing selected in flavor choice, update the flavor detail to
reflect that.

What to expect now:

When change to the flavor of size bigger, the instance bar should not
change. The vCPU bar will be updated based on the new flavor. The RAM
bar will be updated based on the new flavor.

When change to the same flavor, the progress bars should not be updated.

When user tries to resize to be smaller size, the progress bars
will not change.

Closes-Bug: #1288954
Change-Id: Ie5bb47a4ea416864ed88b80b1c1c539c76f4bc49