From 1971153daeccba0b6ac1ad87b92c3d70849b09e2 Mon Sep 17 00:00:00 2001 From: Mikayla Fischler Date: Wed, 26 Feb 2025 18:38:21 -0500 Subject: [PATCH] configurator summary enhancements --- coordinator/config/system.lua | 2 +- coordinator/startup.lua | 2 +- pocket/config/system.lua | 2 +- pocket/startup.lua | 2 +- reactor-plc/config/system.lua | 2 +- reactor-plc/startup.lua | 2 +- rtu/config/system.lua | 2 +- rtu/startup.lua | 2 +- supervisor/config/system.lua | 20 +++++++++++++++++--- supervisor/startup.lua | 2 +- 10 files changed, 26 insertions(+), 12 deletions(-) diff --git a/coordinator/config/system.lua b/coordinator/config/system.lua index 3925114..bc78cb0 100644 --- a/coordinator/config/system.lua +++ b/coordinator/config/system.lua @@ -550,7 +550,7 @@ function system.create(tool_ctl, main_pane, cfg_sys, divs, ext, style) local c = util.trinary(alternate, g_lg_fg_bg, cpair(colors.gray,colors.white)) alternate = not alternate - if string.len(val) > val_max_w then + if (string.len(val) > val_max_w) or string.find(val, "\n") then local lines = util.strwrap(val, inner_width) height = #lines + 1 end diff --git a/coordinator/startup.lua b/coordinator/startup.lua index 72fdef4..3618e2b 100644 --- a/coordinator/startup.lua +++ b/coordinator/startup.lua @@ -19,7 +19,7 @@ local renderer = require("coordinator.renderer") local sounder = require("coordinator.sounder") local threads = require("coordinator.threads") -local COORDINATOR_VERSION = "v1.6.10" +local COORDINATOR_VERSION = "v1.6.11" local CHUNK_LOAD_DELAY_S = 30.0 diff --git a/pocket/config/system.lua b/pocket/config/system.lua index 4c195ff..321ef59 100644 --- a/pocket/config/system.lua +++ b/pocket/config/system.lua @@ -385,7 +385,7 @@ function system.create(tool_ctl, main_pane, cfg_sys, divs, style, exit) local c = tri(alternate, g_lg_fg_bg, cpair(colors.gray,colors.white)) alternate = not alternate - if string.len(val) > val_max_w then + if (string.len(val) > val_max_w) or string.find(val, "\n") then local lines = util.strwrap(val, inner_width) height = #lines + 1 end diff --git a/pocket/startup.lua b/pocket/startup.lua index 636c6ef..4d72797 100644 --- a/pocket/startup.lua +++ b/pocket/startup.lua @@ -20,7 +20,7 @@ local pocket = require("pocket.pocket") local renderer = require("pocket.renderer") local threads = require("pocket.threads") -local POCKET_VERSION = "v0.13.0-beta" +local POCKET_VERSION = "v0.13.1-beta" local println = util.println local println_ts = util.println_ts diff --git a/reactor-plc/config/system.lua b/reactor-plc/config/system.lua index d6bd734..909dda7 100644 --- a/reactor-plc/config/system.lua +++ b/reactor-plc/config/system.lua @@ -592,7 +592,7 @@ function system.create(tool_ctl, main_pane, cfg_sys, divs, style, exit) local c = util.trinary(alternate, g_lg_fg_bg, cpair(colors.gray,colors.white)) alternate = not alternate - if string.len(val) > val_max_w then + if (string.len(val) > val_max_w) or string.find(val, "\n") then local lines = util.strwrap(val, inner_width) height = #lines + 1 end diff --git a/reactor-plc/startup.lua b/reactor-plc/startup.lua index acfed61..49d60a5 100644 --- a/reactor-plc/startup.lua +++ b/reactor-plc/startup.lua @@ -18,7 +18,7 @@ local plc = require("reactor-plc.plc") local renderer = require("reactor-plc.renderer") local threads = require("reactor-plc.threads") -local R_PLC_VERSION = "v1.8.18" +local R_PLC_VERSION = "v1.8.19" local println = util.println local println_ts = util.println_ts diff --git a/rtu/config/system.lua b/rtu/config/system.lua index 5b572e4..d29b1ec 100644 --- a/rtu/config/system.lua +++ b/rtu/config/system.lua @@ -646,7 +646,7 @@ function system.create(tool_ctl, main_pane, cfg_sys, divs, ext, style) local c = tri(alternate, g_lg_fg_bg, cpair(colors.gray,colors.white)) alternate = not alternate - if string.len(val) > val_max_w then + if (string.len(val) > val_max_w) or string.find(val, "\n") then local lines = util.strwrap(val, inner_width) height = #lines + 1 end diff --git a/rtu/startup.lua b/rtu/startup.lua index f13c877..dfef1b7 100644 --- a/rtu/startup.lua +++ b/rtu/startup.lua @@ -31,7 +31,7 @@ local sna_rtu = require("rtu.dev.sna_rtu") local sps_rtu = require("rtu.dev.sps_rtu") local turbinev_rtu = require("rtu.dev.turbinev_rtu") -local RTU_VERSION = "v1.11.5" +local RTU_VERSION = "v1.11.6" local RTU_UNIT_TYPE = types.RTU_UNIT_TYPE local RTU_HW_STATE = databus.RTU_HW_STATE diff --git a/supervisor/config/system.lua b/supervisor/config/system.lua index 600c35d..48867f5 100644 --- a/supervisor/config/system.lua +++ b/supervisor/config/system.lua @@ -629,6 +629,13 @@ function system.create(tool_ctl, main_pane, cfg_sys, divs, fac_pane, style, exit val = "" + local count = 0 + for idx = 1, #tank_list do + if tank_list[idx] > 0 then count = count + 1 end + end + + local bullet = tri(count < 2, "", " \x07 ") + for idx = 1, #tank_list do local prefix = "?" local fluid = "water" @@ -646,7 +653,7 @@ function system.create(tool_ctl, main_pane, cfg_sys, divs, fac_pane, style, exit fluid = "sodium" end - val = val .. tri(val == "", "", "\n") .. util.sprintf(" \x07 tank %s - %s", prefix, fluid) + val = val .. tri(val == "", "", "\n") .. util.sprintf(bullet .. "tank %s - %s", prefix, fluid) end end @@ -654,9 +661,16 @@ function system.create(tool_ctl, main_pane, cfg_sys, divs, fac_pane, style, exit elseif f[1] == "AuxiliaryCoolant" then val = "" + local count = 0 + for idx = 1, #cfg.AuxiliaryCoolant do + if cfg.AuxiliaryCoolant[idx] then count = count + 1 end + end + + local bullet = tri(count < 2, "", " \x07 ") + for idx = 1, #cfg.AuxiliaryCoolant do if cfg.AuxiliaryCoolant[idx] then - val = val .. tri(val == "", "", "\n") .. util.sprintf(" \x07 auxiliary coolant for unit %d", idx) + val = val .. tri(val == "", "", "\n") .. util.sprintf(bullet .. "unit %d", idx) end end @@ -669,7 +683,7 @@ function system.create(tool_ctl, main_pane, cfg_sys, divs, fac_pane, style, exit local c = tri(alternate, g_lg_fg_bg, cpair(colors.gray,colors.white)) alternate = not alternate - if string.len(val) > val_max_w then + if (string.len(val) > val_max_w) or string.find(val, "\n") then local lines = util.strwrap(val, inner_width) height = #lines + 1 end diff --git a/supervisor/startup.lua b/supervisor/startup.lua index 9234211..d1ee16d 100644 --- a/supervisor/startup.lua +++ b/supervisor/startup.lua @@ -23,7 +23,7 @@ local supervisor = require("supervisor.supervisor") local svsessions = require("supervisor.session.svsessions") -local SUPERVISOR_VERSION = "v1.6.7" +local SUPERVISOR_VERSION = "v1.6.8" local println = util.println local println_ts = util.println_ts