mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-23 18:10:39 +00:00
d2dbbba139 converted scyllatop's interperter to Python 3, but neglected to do
the actual conversion. This patch does so, by running 2to3 over allfiles and adding
an additional bytes->string decode step in prometheus.py. Superfluous 2to3 changes
to print() calls were removed.
Message-Id: <20190117124121.7409-1-avi@scylladb.com>
20 lines
565 B
Python
20 lines
565 B
Python
from . import base
|
|
from . import helpers
|
|
from . import table
|
|
|
|
|
|
class Simple(base.Base):
|
|
def update(self, liveData):
|
|
self.clearScreen()
|
|
self.writeStatusLine(liveData.measurements)
|
|
tableForm = self._prepareTable(liveData.measurements)
|
|
for row in tableForm.rows():
|
|
self.writeLine(row)
|
|
self.refresh()
|
|
|
|
def _prepareTable(self, measurements):
|
|
result = table.Table('lr')
|
|
for metric in measurements:
|
|
result.add(metric.symbol, helpers.formatValues(metric.status))
|
|
return result
|