This commit is contained in:
@@ -2,10 +2,12 @@
|
||||
-- Main SCADA Coordinator GUI
|
||||
--
|
||||
|
||||
local core = require("graphics.core")
|
||||
local log = require("scada-common.log")
|
||||
local log = require("scada-common.log")
|
||||
|
||||
local style = require("coordinator.ui.style")
|
||||
local database = require("coordinator.database")
|
||||
local style = require("coordinator.ui.style")
|
||||
|
||||
local core = require("graphics.core")
|
||||
|
||||
local DisplayBox = require("graphics.elements.displaybox")
|
||||
local TextBox = require("graphics.elements.textbox")
|
||||
@@ -20,11 +22,13 @@ local function init(monitor)
|
||||
-- window header message
|
||||
TextBox{parent=main,text="Nuclear Generation Facility SCADA Coordinator",alignment=TEXT_ALIGN.CENTER,height=1,fg_bg=style.header}
|
||||
|
||||
local db = database.get()
|
||||
|
||||
-- unit overviews
|
||||
unit_overview(main, 2, 3, 1)
|
||||
unit_overview(main, 84, 3, 2)
|
||||
unit_overview(main, 2, 29, 3)
|
||||
unit_overview(main, 84, 29, 4)
|
||||
if db.facility.num_units >= 1 then unit_overview(main, 2, 3, db.units[1]) end
|
||||
if db.facility.num_units >= 2 then unit_overview(main, 84, 3, db.units[2]) end
|
||||
if db.facility.num_units >= 3 then unit_overview(main, 2, 29, db.units[3]) end
|
||||
if db.facility.num_units == 4 then unit_overview(main, 84, 29, db.units[4]) end
|
||||
|
||||
return main
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user