BatchExplorer
BatchExplorer copied to clipboard
Can not use pool created from custom image
Describe the bug
Templates dialogue is not working if there is a pool created from custom image int the list.
Looks like api is not returning offerName
for this machine, however it was set when image was created (field is required anyway), and later template cannot choose correct icon for it. Checking for null argument [here] and some default fall back (https://github.com/Azure/BatchExplorer/blob/master/src/app/utils/pool-utils.ts#L86) will help.
I was able to recreate this issue with multiple different images.
To Reproduce Steps to reproduce the behavior:
- Create pool based on custom vm image (ubuntu 16.04)
- Go to Gallery
- Use custom or predefined template for job
- See error
Expected behavior
Some default image in case if there is no machine type in data:
Screenshots
Messed dialogue:
Missed
offer
in imageReference
(pools request):
Logs(console) core.js:6014 ERROR TypeError: Cannot read property 'toLowerCase' of null at Function.iconForOffer (pool-utils.ts:90) at Function.iconForPool (pool-utils.ts:109) at PoolPickerComponent.iconForPool (pool-picker.component.ts:161) at Object.updateDirectives (pool-picker.html:21) at Object.updateDirectives (core.js:44779) at checkAndUpdateView (core.js:44270) at callViewAction (core.js:44636) at execEmbeddedViewsAction (core.js:44593) at checkAndUpdateView (core.js:44271) at callViewAction (core.js:44636)
Version:
- OS: Windows
- Version 2.7.0-stable.418