ENH remove cr dep in set/update

This commit is contained in:
Nathan Dwarshuis 2021-07-23 00:16:18 -04:00
parent 6d4cfd33d8
commit 1fb0ebe60b
4 changed files with 16 additions and 16 deletions

2
core

@ -1 +1 @@
Subproject commit d062e16c73238f43d8849add97f38b9c125b456e
Subproject commit d10599afc4b851673cdb788a7184361816822656

View File

@ -198,7 +198,7 @@ M.percent_plot_set = function(pp, cr, value)
t = math.floor(value)
p = value * 0.01
end
Text.set(pp.value, cr, t)
Text.set(pp.value, t)
Timeseries.update(pp.plot, p)
end
@ -278,8 +278,8 @@ M.annotated_scale_plot_draw_dynamic = function(asp, cr)
end
M.annotated_scale_plot_set = function(asp, cr, value)
Text.set(asp.value, cr, value)
ScaledTimeseries.update(asp.plot, cr, value)
Text.set(asp.value, value)
ScaledTimeseries.update(asp.plot, value)
end
--------------------------------------------------------------------------------
@ -323,8 +323,8 @@ end
M.update_rate_timeseries = function(obj, cr, value)
local rate = obj.derive(obj.prev_value, value)
Text.set(obj.value, cr, rate)
ScaledTimeseries.update(obj.plot, cr, rate)
Text.set(obj.value, rate)
ScaledTimeseries.update(obj.plot, rate)
obj.prev_value = value
end
@ -381,7 +381,7 @@ M.text_ring_draw_dynamic = function(tr, cr)
end
M.text_ring_set = function(tr, cr, value)
ThresholdText.set(tr.value, cr, value)
ThresholdText.set(tr.value, value)
end
--------------------------------------------------------------------------------
@ -511,7 +511,7 @@ M.text_row_draw_dynamic = function(row, cr)
end
M.text_row_set = function(row, cr, value)
Text.set(row.value, cr, value)
Text.set(row.value, value)
end
--------------------------------------------------------------------------------
@ -542,7 +542,7 @@ M.text_row_crit_draw_dynamic = function(row, cr)
end
M.text_row_crit_set = function(row, cr, value)
ThresholdText.set(row.value, cr, value)
ThresholdText.set(row.value, value)
end
--------------------------------------------------------------------------------
@ -613,7 +613,7 @@ M.text_rows_draw_dynamic = function(rows, cr)
end
M.text_rows_set = function(rows, cr, i, value)
TextColumn.set(rows.values, cr, i, value)
TextColumn.set(rows.values, i, value)
end
--------------------------------------------------------------------------------

View File

@ -162,9 +162,9 @@ return function(update_freq)
Timeseries.update(plot, used_percent)
for r = 1, NUM_ROWS do
Table.set(tbl, cr, 1, r, conky(TABLE_CONKY[r].comm, '(%S+)'))
Table.set(tbl, cr, 2, r, conky(TABLE_CONKY[r].pid))
Table.set(tbl, cr, 3, r, conky(TABLE_CONKY[r].mem))
Table.set(tbl, 1, r, conky(TABLE_CONKY[r].comm, '(%S+)'))
Table.set(tbl, 2, r, conky(TABLE_CONKY[r].pid))
Table.set(tbl, 3, r, conky(TABLE_CONKY[r].mem))
end
end

View File

@ -165,9 +165,9 @@ return function(update_freq)
for r = 1, NUM_ROWS do
local pid = conky(TABLE_CONKY[r].pid, '(%d+)') -- may have leading spaces
if pid ~= '' then
Table.set(tbl, cr, 1, r, Util.read_file('/proc/'..pid..'/comm', '(%C+)'))
Table.set(tbl, cr, 2, r, pid)
Table.set(tbl, cr, 3, r, conky(TABLE_CONKY[r].cpu))
Table.set(tbl, 1, r, Util.read_file('/proc/'..pid..'/comm', '(%C+)'))
Table.set(tbl, 2, r, pid)
Table.set(tbl, 3, r, conky(TABLE_CONKY[r].cpu))
end
end
end