-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If there is only one VM, the list of VMs remains stuck on "Loading…" #5
Comments
Issue only happens when the host has one VM - if there's more that one VM the list is fine Issue appears to be data.childEntity.ManagedObjectReference when there's more that one VM it's an array of objects but when there's only one VM it's an object rather than an array with one object. When there's only one VM the code below iterates over the object properties rather than over the objects in the array and so doesn't 'find' the VM. https://github.com/weikinhuang/esxi-simple-web/blob/master/web/js/controllers.js#L99
|
Looks like transforming the data from XML to JSON doesn't account for single entry arrays
https://github.com/weikinhuang/esxi-simple-web/blob/master/web/js/services.js#L49 removes e.g. from
to
But removing this line causes breakage elsewhere and doesn't fix the issue anyway! |
See #6 for a fix, might be a more elegant way of achieving same result. |
This is the first time I've installed esxi-simple-web so I can't tell whether this is a general problem or just particular to me.
The host is running ESXi 5.5u2 main page appears OK but when I switch to the list of VMs it get's stuck on loading.
The AJAX call to /mob/?moid=ha-folder-vm returns the following response
Raw content of the response is https://gist.github.com/andydavies/1ed8a11158bae8656b61
The text was updated successfully, but these errors were encountered: