Ticket #2191 (closed defect: Fixed)

Opened 14 months ago

Last modified 8 weeks ago

Graph Display Error in ThresholdGraphPoint.py

Reported by: zenoss Owned by: edahl
Priority: 3 - Medium Milestone: zenoss-2.2
Component: ZenModel Version: 2.0.93
Keywords: zenoss-2.1.1-patched Cc:
Community Patch Attached: Deployed @ Customer:
Installer: Maintenance Target:
Specific ZenPack: Maintenance Status:
Documentation Note?: Not required Regression:

Description

Apologies if this is completely wrong, just trying to help.

Running latest SVN of zenoss and when trying to view any graphs, ThresholdGraphPoint.py throws up a "temp variable not defined before use" error with this code

def getThreshClass(self, context):
        ''' Get the related threshold class or None if it doesn't exist
        '''

        threshClass = None
        if self.graphDef.rrdTemplate():
            threshClass = temp.thresholds._getOb(self.threshId, None)
        elif self.graphDef.report() and None:
            for temp in context.getRRDTemplates():
                threshClass = temp.thresholds._getOb(self.threshId, None)
                if threshClass:
                    break
        return threshClass

I changed the lines that read threshClass = temp.thresholds._getOb(self.threshId, None) to threshClass = self.graphDef.thresholds._getOb(self.threshId, None) and the graphs display now.

Don't know if this is the correct fix, but through I'd put a ticket in for it.

Change History

Changed 14 months ago by zenoss

  • milestone set to zenoss-2.1

Changed 14 months ago by jstevens

  • status changed from new to closed
  • resolution set to fixed

This was fixed in r7218.

Changed 13 months ago by ecn

  • keywords zenoss-2.1.1-proposed added

Changed 13 months ago by marc

(In [7492]) Patching r7218 to 2.1.x branch

Changed 13 months ago by ecn

  • keywords zenoss-2.1.1-accepted added; zenoss-2.1.1-proposed removed

Changed 13 months ago by marc

  • keywords zenoss-2.1.1-patched added; zenoss-2.1.1-accepted removed

Changed 8 weeks ago by bbibeault

  • documentation set to Not required
  • reviewed set to 1
Note: See TracTickets for help on using tickets.