From: Samuel Guimarães <sguimaraes943(a)gmail.com>
- Rebased initial checkin for live migration to new-ui;
- Added form validation to optional fields (e.g. disable submit button if username is filled but password is empty, added warn classes to form fields);
- Fixed error messages in modal window;
- Delete VM once Live Migration is finished checkbox is working;
- wok.window.close() destroys modal content when called. Before sending the necessary parameters to perform a migration to Kimchi API, all the input values including the "Delete..." checkbox had to be stored in an array including the VM name and then called a function to keep track of the ongoing tasks and verify if the VM should be deleted based on the checkbox value.
- Rewrote most of the JS in kimchi.guest_livemigration.js
- Fixed asynchronous live migration proccess.
- Fixed some minor issues with Guests main page when Cloning, Creating and Migrating VMs (this wasn't listed as a bug nor enhancement on Github but it had to be fixed in order to show "Migrating..." text on the Action button for List and Gallery views)
- Small change in SCSS and CSS to fix Action button.
- Now when a VM is migrating it is removed from the list and attached to the top just like when it is cloning or creating a new VM. In order to keep the migrating guest in the same position it would require other js libraries or more prototype functions just to handle the arrays in this screen.
- Had to change a line in /models/vms.py because getTasksByFilter() wasn't working when trying to get all the migrating guests by "/plugins/kimchi/vms/.+/migrate"
Socorro Stoppler (1):
Initial checkin for live migration UI support
Live Migration front-end
model/vms.py | 2 +-
ui/css/kimchi.css | 21 +++--
ui/css/src/modules/_guests.scss | 6 +-
ui/js/src/kimchi.api.js | 3 +-
ui/js/src/kimchi.guest_livemigration.js | 136 ++++++++++++++++++++++++++++++++
ui/js/src/kimchi.guest_main.js | 58 +++++++++++---
ui/pages/guest-migration.html.tmpl | 67 ++++++++++++++++
ui/pages/guest.html.tmpl | 16 ++--
ui/pages/i18n.json.tmpl | 2 +
ui/pages/tabs/guests.html.tmpl | 4 +-
10 files changed, 290 insertions(+), 25 deletions(-)
create mode 100644 ui/js/src/kimchi.guest_livemigration.js
create mode 100644 ui/pages/guest-migration.html.tmpl
I would like propose the use of Bootstrap Switch
(https://github.com/nostalgiaz/bootstrap-switch) for showing
checkbox/radio element in form of switch button .This toggle switch can
be used for showing status of certain component in form of switch and
trigger action based on the current state.
Official Github location of Bootstrap Switch implementation is @
https://github.com/nostalgiaz/bootstrap-switch. Bootstrap Switch code is
of license type MIT so I guess it can be used safely.
Please feel free to comment on this topic and have your opinion.
Thanks & Regards,