REF don't use F as a module name
This commit is contained in:
parent
da32ac31f3
commit
7112878934
2
core
2
core
|
@ -1 +1 @@
|
||||||
Subproject commit 0390516cf112b4e239de4efd8f7a5e0d238acf8d
|
Subproject commit aed6053cb838fc9a5d8cda8d355ea61f03e32c3f
|
|
@ -1,6 +1,6 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
local F = require 'geom'
|
local geom = require 'geom'
|
||||||
local format = require 'format'
|
local format = require 'format'
|
||||||
local theme = require 'theme'
|
local theme = require 'theme'
|
||||||
local dial = require 'dial'
|
local dial = require 'dial'
|
||||||
|
@ -56,7 +56,7 @@ local DIAL_THETA1 = 360
|
||||||
-- line helper functions
|
-- line helper functions
|
||||||
|
|
||||||
local _make_horizontal_line = function(x, y, w)
|
local _make_horizontal_line = function(x, y, w)
|
||||||
return F.make_line(F.make_point(x, y), F.make_point(x + w, y))
|
return geom.make_line(geom.make_point(x, y), geom.make_point(x + w, y))
|
||||||
end
|
end
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
@ -126,7 +126,7 @@ local _percent_label_config = timeseries.label_config(
|
||||||
|
|
||||||
local _make_timeseries = function(x, y, w, h, label_config, update_freq)
|
local _make_timeseries = function(x, y, w, h, label_config, update_freq)
|
||||||
return timeseries.make(
|
return timeseries.make(
|
||||||
F.make_box(x, y, w, h),
|
geom.make_box(x, y, w, h),
|
||||||
update_freq,
|
update_freq,
|
||||||
_default_plot_config,
|
_default_plot_config,
|
||||||
label_config
|
label_config
|
||||||
|
@ -135,9 +135,9 @@ end
|
||||||
|
|
||||||
local _make_tagged_percent_timeseries = function(x, y, w, h, spacing, label, update_freq, format)
|
local _make_tagged_percent_timeseries = function(x, y, w, h, spacing, label, update_freq, format)
|
||||||
return {
|
return {
|
||||||
label = _left_text(F.make_point(x, y), label),
|
label = _left_text(geom.make_point(x, y), label),
|
||||||
value = thresholdtext.make_formatted(
|
value = thresholdtext.make_formatted(
|
||||||
F.make_point(x + w, y),
|
geom.make_point(x + w, y),
|
||||||
nil,
|
nil,
|
||||||
_right_text_style,
|
_right_text_style,
|
||||||
format,
|
format,
|
||||||
|
@ -162,7 +162,7 @@ end
|
||||||
|
|
||||||
local _make_scaled_timeseries = function(x, y, w, h, f, min_domain, update_freq)
|
local _make_scaled_timeseries = function(x, y, w, h, f, min_domain, update_freq)
|
||||||
return scaledtimeseries.make(
|
return scaledtimeseries.make(
|
||||||
F.make_box(x, y, w, h),
|
geom.make_box(x, y, w, h),
|
||||||
update_freq,
|
update_freq,
|
||||||
_default_plot_config,
|
_default_plot_config,
|
||||||
timeseries.label_config(theme.INACTIVE_TEXT_FG, label_font_spec, f),
|
timeseries.label_config(theme.INACTIVE_TEXT_FG, label_font_spec, f),
|
||||||
|
@ -178,7 +178,7 @@ M.make_header = function(x, y, w, _text)
|
||||||
local underline_y = y + HEADER_UNDERLINE_OFFSET
|
local underline_y = y + HEADER_UNDERLINE_OFFSET
|
||||||
return {
|
return {
|
||||||
text = text.make_plain(
|
text = text.make_plain(
|
||||||
F.make_point(x, y),
|
geom.make_point(x, y),
|
||||||
_text,
|
_text,
|
||||||
text.config(
|
text.config(
|
||||||
make_font_spec(FONT, HEADER_FONT_SIZE, true),
|
make_font_spec(FONT, HEADER_FONT_SIZE, true),
|
||||||
|
@ -288,9 +288,9 @@ M.make_tagged_scaled_timeseries = function(x, y, w, h, format_fun, label_fun,
|
||||||
spacing, label, min_domain,
|
spacing, label, min_domain,
|
||||||
update_freq)
|
update_freq)
|
||||||
return {
|
return {
|
||||||
label = _left_text(F.make_point(x, y), label),
|
label = _left_text(geom.make_point(x, y), label),
|
||||||
value = text.make_formatted(
|
value = text.make_formatted(
|
||||||
F.make_point(x + w, y),
|
geom.make_point(x + w, y),
|
||||||
0,
|
0,
|
||||||
_right_text_style,
|
_right_text_style,
|
||||||
format_fun
|
format_fun
|
||||||
|
@ -330,9 +330,9 @@ end
|
||||||
M.make_rate_timeseries = function(x, y, w, h, format_fun, label_fun, spacing,
|
M.make_rate_timeseries = function(x, y, w, h, format_fun, label_fun, spacing,
|
||||||
label, min_domain, update_freq, init)
|
label, min_domain, update_freq, init)
|
||||||
return {
|
return {
|
||||||
label = _left_text(F.make_point(x, y), label),
|
label = _left_text(geom.make_point(x, y), label),
|
||||||
value = text.make_formatted(
|
value = text.make_formatted(
|
||||||
F.make_point(x + w, y),
|
geom.make_point(x + w, y),
|
||||||
0,
|
0,
|
||||||
_right_text_style,
|
_right_text_style,
|
||||||
format_fun
|
format_fun
|
||||||
|
@ -355,7 +355,7 @@ end
|
||||||
|
|
||||||
M.make_circle = function(x, y, r)
|
M.make_circle = function(x, y, r)
|
||||||
return circle.make(
|
return circle.make(
|
||||||
F.make_circle(x, y, r),
|
geom.make_circle(x, y, r),
|
||||||
circle.config(style.line(ARC_WIDTH, CAIRO_LINE_CAP_BUTT), theme.BORDER_FG)
|
circle.config(style.line(ARC_WIDTH, CAIRO_LINE_CAP_BUTT), theme.BORDER_FG)
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
@ -367,7 +367,7 @@ M.make_text_circle = function(x, y, r, fmt, limit)
|
||||||
return {
|
return {
|
||||||
ring = M.make_circle(x, y, r),
|
ring = M.make_circle(x, y, r),
|
||||||
value = thresholdtext.make_formatted(
|
value = thresholdtext.make_formatted(
|
||||||
F.make_point(x, y),
|
geom.make_point(x, y),
|
||||||
0,
|
0,
|
||||||
text.config(normal_font_spec, theme.PRIMARY_FG, 'center', 'center'),
|
text.config(normal_font_spec, theme.PRIMARY_FG, 'center', 'center'),
|
||||||
fmt,
|
fmt,
|
||||||
|
@ -402,7 +402,7 @@ end
|
||||||
M.make_dial = function(x, y, radius, thickness, threshold, format)
|
M.make_dial = function(x, y, radius, thickness, threshold, format)
|
||||||
return {
|
return {
|
||||||
dial = dial.make(
|
dial = dial.make(
|
||||||
F.make_arc(x, y, radius, DIAL_THETA0, DIAL_THETA1),
|
geom.make_arc(x, y, radius, DIAL_THETA0, DIAL_THETA1),
|
||||||
arc.config(style.line(thickness, CAIRO_LINE_CAP_BUTT), theme.INDICATOR_BG),
|
arc.config(style.line(thickness, CAIRO_LINE_CAP_BUTT), theme.INDICATOR_BG),
|
||||||
threshold_indicator(threshold)
|
threshold_indicator(threshold)
|
||||||
),
|
),
|
||||||
|
@ -431,7 +431,7 @@ end
|
||||||
M.make_compound_dial = function(x, y, outer_radius, inner_radius, thickness,
|
M.make_compound_dial = function(x, y, outer_radius, inner_radius, thickness,
|
||||||
threshold, num_dials)
|
threshold, num_dials)
|
||||||
return compounddial.make(
|
return compounddial.make(
|
||||||
F.make_arc(x, y, outer_radius, DIAL_THETA0, DIAL_THETA1),
|
geom.make_arc(x, y, outer_radius, DIAL_THETA0, DIAL_THETA1),
|
||||||
arc.config(style.line(thickness, CAIRO_LINE_CAP_BUTT), theme.INDICATOR_BG),
|
arc.config(style.line(thickness, CAIRO_LINE_CAP_BUTT), theme.INDICATOR_BG),
|
||||||
threshold_indicator(threshold),
|
threshold_indicator(threshold),
|
||||||
inner_radius,
|
inner_radius,
|
||||||
|
@ -445,14 +445,14 @@ end
|
||||||
M.make_compound_bar = function(x, y, w, pad, labels, spacing, thickness, threshold)
|
M.make_compound_bar = function(x, y, w, pad, labels, spacing, thickness, threshold)
|
||||||
return {
|
return {
|
||||||
labels = textcolumn.make(
|
labels = textcolumn.make(
|
||||||
F.make_point(x, y),
|
geom.make_point(x, y),
|
||||||
labels,
|
labels,
|
||||||
_left_text_style,
|
_left_text_style,
|
||||||
nil,
|
nil,
|
||||||
spacing
|
spacing
|
||||||
),
|
),
|
||||||
bars = compoundbar.make(
|
bars = compoundbar.make(
|
||||||
F.make_point(x + pad, y),
|
geom.make_point(x + pad, y),
|
||||||
w - pad,
|
w - pad,
|
||||||
line.config(
|
line.config(
|
||||||
style.line(thickness, CAIRO_LINE_CAP_BUTT),
|
style.line(thickness, CAIRO_LINE_CAP_BUTT),
|
||||||
|
@ -499,8 +499,8 @@ end
|
||||||
|
|
||||||
M.make_text_row = function(x, y, w, label)
|
M.make_text_row = function(x, y, w, label)
|
||||||
return {
|
return {
|
||||||
label = _left_text(F.make_point(x, y), label),
|
label = _left_text(geom.make_point(x, y), label),
|
||||||
value = _right_text(F.make_point(x + w, y), nil),
|
value = _right_text(geom.make_point(x + w, y), nil),
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -521,9 +521,9 @@ end
|
||||||
|
|
||||||
M.make_threshold_text_row = function(x, y, w, label, append_end, limit)
|
M.make_threshold_text_row = function(x, y, w, label, append_end, limit)
|
||||||
return{
|
return{
|
||||||
label = _left_text(F.make_point(x, y), label),
|
label = _left_text(geom.make_point(x, y), label),
|
||||||
value = thresholdtext.make_formatted(
|
value = thresholdtext.make_formatted(
|
||||||
F.make_point(x + w, y),
|
geom.make_point(x + w, y),
|
||||||
nil,
|
nil,
|
||||||
_right_text_style,
|
_right_text_style,
|
||||||
append_end,
|
append_end,
|
||||||
|
@ -548,14 +548,14 @@ end
|
||||||
M.make_text_rows_formatted = function(x, y, w, spacing, labels, format)
|
M.make_text_rows_formatted = function(x, y, w, spacing, labels, format)
|
||||||
return {
|
return {
|
||||||
labels = textcolumn.make(
|
labels = textcolumn.make(
|
||||||
F.make_point(x, y),
|
geom.make_point(x, y),
|
||||||
labels,
|
labels,
|
||||||
_left_text_style,
|
_left_text_style,
|
||||||
nil,
|
nil,
|
||||||
spacing
|
spacing
|
||||||
),
|
),
|
||||||
values = textcolumn.make_n(
|
values = textcolumn.make_n(
|
||||||
F.make_point(x + w, y),
|
geom.make_point(x + w, y),
|
||||||
#labels,
|
#labels,
|
||||||
_right_text_style,
|
_right_text_style,
|
||||||
format,
|
format,
|
||||||
|
@ -612,7 +612,6 @@ local default_table_config = function(label)
|
||||||
tbl.body_config(
|
tbl.body_config(
|
||||||
default_table_font_spec,
|
default_table_font_spec,
|
||||||
theme.INACTIVE_TEXT_FG,
|
theme.INACTIVE_TEXT_FG,
|
||||||
-- TABLE_BODY_FORMAT,
|
|
||||||
{
|
{
|
||||||
tbl.column_config('Name', TABLE_BODY_FORMAT),
|
tbl.column_config('Name', TABLE_BODY_FORMAT),
|
||||||
tbl.column_config('PID', false),
|
tbl.column_config('PID', false),
|
||||||
|
@ -630,9 +629,8 @@ end
|
||||||
|
|
||||||
M.make_text_table = function(x, y, w, h, n, label)
|
M.make_text_table = function(x, y, w, h, n, label)
|
||||||
return tbl.make(
|
return tbl.make(
|
||||||
F.make_box(x, y, w, h),
|
geom.make_box(x, y, w, h),
|
||||||
n,
|
n,
|
||||||
-- labels,
|
|
||||||
default_table_config(label)
|
default_table_config(label)
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
@ -642,7 +640,7 @@ end
|
||||||
|
|
||||||
M.make_panel = function(x, y, w, h, thickness)
|
M.make_panel = function(x, y, w, h, thickness)
|
||||||
return fillrect.make(
|
return fillrect.make(
|
||||||
F.make_box(x, y, w, h),
|
geom.make_box(x, y, w, h),
|
||||||
rect.config(
|
rect.config(
|
||||||
style.closed_poly(thickness, CAIRO_LINE_JOIN_MITER),
|
style.closed_poly(thickness, CAIRO_LINE_JOIN_MITER),
|
||||||
theme.BORDER_FG
|
theme.BORDER_FG
|
||||||
|
|
Loading…
Reference in New Issue