BNA8/.resources/d2a8ffe09596962609d66cbde4f85af4e4b3d4ee61a02d88641091f9a6ff559b

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)