Performance self_service portal service dailogs

euwe

#1

Hi, we implemented some ruby code from this book: https://pemcg.gitbooks.io/mastering-automation-in-cloudforms-4-2-and-manage/content/service_dialogs/chapter.html. Some of the fields in the dialog are automatically filled by ruby code. This is not performing at all, in the admin console it is slow but in the self_service portal it is not working at all. We have very basic code like this:

dialog_field = $evm.object
#Set virtual machine name
dialog_field[“value”] = “vmid#{$evm.root[‘dialog_seq’]}”

Some code is little more advanced but it is not very time consuming. We have eleven different fields that are filled based on the refesh of one field (a name) that is filled by the user.

@pemcg can you help us, how can we speed up things?


#2

Check your automation.log to see if any of the methods are running twice (under some circumstances they run when the dialog initially loads). If so you can put the following as a first line to stop the main bulk of code running:

exit MIQ_OK unless $evm.root['vmdb_object_type']

11 auto-refreshed dynamic elements in a service dialog is quite a lot however. How many are set to ‘Auto Refresh other fields when modified’?

To troubleshoot I’d start off by changing some of the auto-refreshed elements to have refresh buttons and not auto-refresh.

pemcg