コード例 #1
0
    def zmanage_editProperties(self, REQUEST=None, redirect=False):
        """Edit a ZenModel object and return its proper page template
        """
        unused(redirect)
        if REQUEST:
            msgs = []
            for optional in 'rrdmin', 'rrdmax':
                v = REQUEST.form.get(optional, None)
                if v:
                    try:
                        REQUEST.form[optional] = long(v)
                    except ValueError:
                        msgs.append('Unable to convert "%s" to a number' % v)
            msgs = ', '.join(msgs)
            if msgs:
                messaging.IMessageSender(self).sendToBrowser(
                    'Properties Saved', msgs[0].capitalize() + msgs[1:])
                return self.callZenScreen(REQUEST, False)

        return ZenModelRM.zmanage_editProperties(self, REQUEST)
コード例 #2
0
ファイル: RRDDataPoint.py プロジェクト: bbc/zenoss-prodbin
    def zmanage_editProperties(self, REQUEST=None, redirect=False):
        """Edit a ZenModel object and return its proper page template
        """
        unused(redirect)
        if REQUEST:
            msgs = []
            for optional in 'rrdmin', 'rrdmax':
                v = REQUEST.form.get(optional, None)
                if v:
                    try:
                        REQUEST.form[optional] = long(v)
                    except ValueError:
                        msgs.append('Unable to convert "%s" to a number' % v)
            msgs = ', '.join(msgs)
            if msgs:
                messaging.IMessageSender(self).sendToBrowser(
                    'Properties Saved',
                    msgs[0].capitalize() + msgs[1:]
                )
                return self.callZenScreen(REQUEST, False)

        return ZenModelRM.zmanage_editProperties(self, REQUEST)
コード例 #3
0
 def zmanage_editProperties(self, REQUEST=None, ignored=None):
     return ZenModelRM.zmanage_editProperties(self, REQUEST)
コード例 #4
0
ファイル: RRDDataSource.py プロジェクト: bbc/zenoss-prodbin
 def zmanage_editProperties(self, REQUEST=None, ignored=None):
     return ZenModelRM.zmanage_editProperties(self, REQUEST)