[Users] UI Plugin issue when switching main tabs

René Koch r.koch at ovido.at
Mon Jan 21 16:05:47 UTC 2013


When switching back to vm main tab changing the selection doesn't work.

No matter which VM I select the VirtualMachineSelectionChange function isn't called again (as my debug alert window doesn't appear), but the last vm I selected before switching to another main tab is cached in variable vmName...
It works again after restarting engine-service.

I just tested your foreman plugin and it seems that this one is working as expected.


Regards,
René
 
 
-----Original message-----
> From:Oved Ourfalli <ovedo at redhat.com>
> Sent: Monday 21st January 2013 14:56
> To: René Koch <r.koch at ovido.at>
> Cc: users at ovirt.org; Vojtech Szocs <vszocs at redhat.com>
> Subject: Re: [Users] UI Plugin issue when switching main tabs
> 
> I'll let Vojtech (cc-ed) to give a more accurate answer, but, trying to narrow down the issue: when you switch to a different main tab and then back to the VM main tab, and change the selection in there, does it work?
> (Trying to understand if the problem is only when doing the switch, and it works afterwards, or not).
> 
> Thank you,
> Oved
> ----- Original Message -----
> > From: "René Koch" <r.koch at ovido.at>
> > To: users at ovirt.org
> > Sent: Sunday, January 20, 2013 11:07:13 PM
> > Subject: [Users] UI Plugin issue when switching main tabs
> > 
> > Hi,
> > 
> > I'm working on an UI plugin to integrate Nagios/Icinga into oVirt
> > Engine and made some progress, but have an issue when switching the
> > main tabs.
> > 
> > I use VirtualMachineSelectionChange to create URL with name of vm
> > (and HostSelectionChange for hosts).
> > Name is used in my backend code (Perl) for fetching monitoring
> > status.
> > 
> > Here's the code of VirtualMachineSelectionChange:
> > 
> >     VirtualMachineSelectionChange: function() {
> >         var vmName = arguments[0].name;
> >         alert(vmName);
> >         // Reload VM Sub Tab
> >         api.setTabContentUrl('vms-monitoring', conf.url +
> >         '?subtab=vms&name=' + encodeURIComponent(vmName));
> >     }
> > 
> > Everything works fine as long as I stay in Virtual Machine main tab.
> > When switching to e.g. Disks and back to Virtual Machines again the
> > JavaScript code of start.html isn't processed anymore (or cached (?)
> > as the my generated URL with last vm name will still be sent back to
> > my Perl backend) - added alert() to test this.
> > 
> > oVirt Engine version:
> > ovirt-engine-3.2.0-1.20130118.gitd102d6f.fc18.noarch
> > 
> > Full code of start.hml: http://pastebin.com/iEY6dA6F
> > 
> > 
> > Thanks a lot for your help,
> > René
> > 
> > 
> > _______________________________________________
> > Users mailing list
> > Users at ovirt.org
> > http://lists.ovirt.org/mailman/listinfo/users
> > 
> 



More information about the Users mailing list