16 lines
605 B
Plaintext
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) |