epacke / BigIPReport

Overview of your loadbalancer configuration
https://loadbalancing.se
8 stars 2 forks source link

Failed device indexing makes Device list not load #191

Closed epacke closed 4 years ago

epacke commented 4 years ago

I have not been able to figure out why the device is failing with Rest, but we should probably have a safe guard against this anyway.

jquery.min.js:2 jQuery.Deferred exception: Cannot read property 'toUpperCase' of null TypeError: Cannot read property 'toUpperCase' of null
    at showDeviceOverview (https://bigipreport.domain.com/b2/js/bigipreport.js:2303:48)
    at populateSearchParameters (https://bigipreport.domain.com/b2/js/bigipreport.js:1028:21)
    at Array.<anonymous> (https://bigipreport.domain.com/b2/js/bigipreport.js:201:9)
    at l (https://bigipreport.domain.com/b2/js/jquery.min.js:2:29375)
    at c (https://bigipreport.domain.com/b2/js/jquery.min.js:2:29677) undefined
timriker commented 4 years ago

The code is:

            if (loadbalancer.success) {
                var model = loadbalancer.model.toUpperCase();
                var deviceData = siteData.knownDevices[model] || false;
                successFound = true;

                if (deviceData) {
                    icon = deviceData.icon;
                    break;
                }
            }

So you have a load balancer without a model?

epacke commented 4 years ago

The load balancer was not indexed at all for some reason. The fix is just a safe guard.