BNA8/.resources/d7708674a0c68b2602557b8792d5b1cce48ee495b3a66292b3625e8132a46730
2025-08-18 15:23:02 +04:00

16 lines
605 B
Plaintext

DEVICE_WINDOW = "Popups/DeviceWrapper"
def openDevice(params, title, isMobile=False):
params["tabs"] = ["Status"]
# Add alarm history tab:
if params["deviceType"] not in ["beacon"]:
params["tabs"].append("Alarm History")
# Add devices tab:
if params["deviceType"] in ["conveyor", "conveyorcurve", "gaylord", "mcp"]:
params["tabs"].append("Devices")
# Open window, if one is specified:
id = params["props"]["status"]["tagPath"]
if isMobile:
system.perspective.navigate(view=DEVICE_WINDOW, params=params)
else:
system.perspective.openPopup(id, DEVICE_WINDOW, params, title, resizable=True)