Esempio n. 1
0
 def _setEaterConnectionItem(self, state, key, value):
     if key == 'feed-id':
         self.labels['eating-from'].set_text(str(value))
     # timestamps
     elif key == 'count-timestamp-discont':
         self.labels['timestamp-discont-count-current'].set_text(str(value))
         if value > 0:
             self._expander_discont_current.show()
     elif key == 'time-timestamp-discont':
         text = formatTimeStamp(time.localtime(value))
         self.labels['timestamp-discont-time-current'].set_text(text)
         if value is not None:
             self._vbox_timestamp_discont_current.show()
     elif key == 'last-timestamp-discont':
         text = formatTime(value, fractional=9)
         self.labels['timestamp-discont-last-current'].set_text(text)
         if value > 0.0:
             self._vbox_timestamp_discont_current.show()
     elif key == 'total-timestamp-discont':
         text = formatTime(value, fractional=9)
         self.labels['timestamp-discont-total-current'].set_text(text)
         if value > 0.0:
             self._vbox_timestamp_discont_current.show()
     elif key == 'timestamp-timestamp-discont':
         if value is None:
             return
         text = formatTime(value, fractional=9)
         self.labels['timestamp-discont-timestamp-current'].set_text(text)
     # offsets
     elif key == 'count-offset-discont':
         self.labels['offset-discont-count-current'].set_text(str(value))
         if value > 0:
             self._expander_discont_current.show()
     elif key == 'time-offset-discont':
         text = formatTimeStamp(time.localtime(value))
         self.labels['offset-discont-time-current'].set_text(text)
         if value is not None:
             self._vbox_offset_discont_current.show()
     elif key == 'last-offset-discont':
         text = _("%d units") % value
         self.labels['offset-discont-last-current'].set_text(text)
         if value > 0:
             self._vbox_offset_discont_current.show()
     elif key == 'total-offset-discont':
         text = _("%d units") % value
         self.labels['offset-discont-total-current'].set_text(text)
         if value > 0:
             self._vbox_offset_discont_current.show()
     elif key == 'offset-offset-discont':
         if value is None:
             return
         text = _("%d units") % value
         self.labels['offset-discont-offset-current'].set_text(text)
         if value > 0:
             self._vbox_offset_discont_current.show()
Esempio n. 2
0
 def _setEaterConnectionItem(self, state, key, value):
     if key == 'feed-id':
         self.labels['eating-from'].set_text(str(value))
     # timestamps
     elif key == 'count-timestamp-discont':
         self.labels['timestamp-discont-count-current'].set_text(str(value))
         if value > 0:
             self._expander_discont_current.show()
     elif key == 'time-timestamp-discont':
         text = formatting.formatTimeStamp(time.localtime(value))
         self.labels['timestamp-discont-time-current'].set_text(text)
         if value is not None:
             self._vbox_timestamp_discont_current.show()
     elif key == 'last-timestamp-discont':
         text = formatting.formatTime(value, fractional=9)
         self.labels['timestamp-discont-last-current'].set_text(text)
         if value > 0.0:
             self._vbox_timestamp_discont_current.show()
     elif key == 'total-timestamp-discont':
         text = formatting.formatTime(value, fractional=9)
         self.labels['timestamp-discont-total-current'].set_text(text)
         if value > 0.0:
             self._vbox_timestamp_discont_current.show()
     elif key == 'timestamp-timestamp-discont':
         if value is None:
             return
         text = formatting.formatTime(value, fractional=9)
         self.labels['timestamp-discont-timestamp-current'].set_text(text)
     # offsets
     elif key == 'count-offset-discont':
         self.labels['offset-discont-count-current'].set_text(str(value))
         if value > 0:
             self._expander_discont_current.show()
     elif key == 'time-offset-discont':
         text = formatting.formatTimeStamp(time.localtime(value))
         self.labels['offset-discont-time-current'].set_text(text)
         if value is not None:
             self._vbox_offset_discont_current.show()
     elif key == 'last-offset-discont':
         text = _("%d units") % value
         self.labels['offset-discont-last-current'].set_text(text)
         if value > 0:
             self._vbox_offset_discont_current.show()
     elif key == 'total-offset-discont':
         text = _("%d units") % value
         self.labels['offset-discont-total-current'].set_text(text)
         if value > 0:
             self._vbox_offset_discont_current.show()
     elif key == 'offset-offset-discont':
         if value is None:
             return
         text = _("%d units") % value
         self.labels['offset-discont-offset-current'].set_text(text)
         if value > 0:
             self._vbox_offset_discont_current.show()
Esempio n. 3
0
 def _setEaterLastConnect(self, state, value):
     if value:
         text = formatTimeStamp(time.localtime(value))
         self.labels['connected-since'].set_text(text)
         self._table_connected.show()
         self._table_disconnected.hide()
         self._lastConnect = value
         self._updateConnectionTime()
Esempio n. 4
0
 def _append(self, item):
     created = formatting.formatTimeStamp(time.localtime(item[0]))
     self._iters[item[0]] = self.store.append([
         str(item[0]),
         os.path.basename(str(item[1])), created,
         str(item[2]),
         str(item[1])
     ])
Esempio n. 5
0
 def _append(self, item):
     created = formatting.formatTimeStamp(time.localtime(item[0]))
     self._iters[item[0]] = self.store.append([str(item[0]),
                                               os.path.basename(
                                                   str(item[1])),
                                               created,
                                               str(item[2]),
                                               str(item[1])])
Esempio n. 6
0
 def _setEaterLastConnect(self, state, value):
     if value:
         text = formatting.formatTimeStamp(time.localtime(value))
         self.labels['connected-since'].set_text(text)
         self._table_connected.show()
         self._table_disconnected.hide()
         self._lastConnect = value
         self._updateConnectionTime()
Esempio n. 7
0
    def __init__(self, when, which, what):
        """
        @param when:  a naive datetime representing UTC
        @type  when:  L{datetime.datetime}
        @type  which: str
        @type  what:  str
        """
        self.when = when
        # when is in UTC, but show it in local timezone instead
        when = when.replace(tzinfo=UTC).astimezone(LOCAL)

        self.whenLocal = formatting.formatTimeStamp(when.timetuple())
        self.which = which
        self.what = what
Esempio n. 8
0
    def __init__(self, when, which, what):
        """
        @param when:  a naive datetime representing UTC
        @type  when:  L{datetime.datetime}
        @type  which: str
        @type  what:  str
        """
        self.when = when
        # when is in UTC, but show it in local timezone instead
        when = when.replace(tzinfo=UTC).astimezone(LOCAL)

        self.whenLocal = formatting.formatTimeStamp(when.timetuple())
        self.which = which
        self.what = what
Esempio n. 9
0
 def setFeederClientLastActivity(self, state, value):
     if value:
         text = formatting.formatTimeStamp(time.localtime(value))
         self.labels['last-activity'].set_text(text)
Esempio n. 10
0
 def setFeederClientLastDisconnect(self, state, value):
     if value:
         text = formatting.formatTimeStamp(time.localtime(value))
         self.labels['disconnected-since'].set_text(text)
         self._lastDisconnect = value
         self.updateDisconnectionTime()
Esempio n. 11
0
 def setFeederClientLastActivity(self, state, value):
     if value:
         text = formatting.formatTimeStamp(time.localtime(value))
         self.labels["last-activity"].set_text(text)
Esempio n. 12
0
 def setFeederClientLastDisconnect(self, state, value):
     if value:
         text = formatting.formatTimeStamp(time.localtime(value))
         self.labels["disconnected-since"].set_text(text)
         self._lastDisconnect = value
         self.updateDisconnectionTime()