Trees | Indices | Help |
|
---|
|
1 ############################################################################## 2 # 3 # Copyright (C) Zenoss, Inc. 2007, all rights reserved. 4 # 5 # This content is made available according to terms specified in 6 # License.zenoss under the directory where your Zenoss product is installed. 7 # 8 ############################################################################## 9 10 11 import Globals 12 import zope.interface 13 14 from collections import defaultdict 15 from Products.ZenUtils.Utils import convToUnits 16 17 UNAVAILABLE = 'N/A' 1820 if partial is None or total is None: 21 return None 22 if not total: 23 return None 24 return partial * 100 / total25 26 31 3234 zope.interface.implements( zope.interface.Interface ) 35 __allow_access_to_unprotected_subobjects__ = 1 3674 75 8438 self.values = kw.copy()3941 return str(self.values)42 4345 return repr(self.values)46 47 50 5355 return percent(partial, total)5658 return percentString(n, decimals)59 6466 if value is None: 67 return UNAVAILABLE 68 return convToUnits(value * scale, 1000, unitstr=unitstr)69
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1.1812 on Mon Jul 30 17:11:27 2012 | http://epydoc.sourceforge.net |