| { |
| "context": ["ui", "cam"], |
| "ui": { |
| "group": "Project X", |
| "update_ui_command": "update_ui_status", |
| "display": { |
| "template": "<b>Report</b><ul><li>Version: {{:version}}</li><li>Status: {{:status}}</li></ul>", |
| "data": [ |
| {"id": "version", "init_cmd": "get_version"}, |
| {"id": "status", "poll": {"cmd": "get_status", "interval": 2000}} |
| ] |
| }, |
| "lights": [ |
| {"id": "ccd", "label": "CCD", "light": "light-toggle-off", |
| "command": "case_close_debug", |
| "init_cmd": "case_close_debug status"}, |
| {"id": "battery", "label": "Battery", "light": "light-toggle-off", |
| "command": "battery_switch", |
| "poll": {"cmd": "battery_switch status", "interval": 20000}}, |
| {"id": "dut-lid", "label": "DUT LID", "light": "light-toggle-off", |
| "poll": {"cmd": "check_dut_exists -t lid", "interval": 20000}}, |
| {"id": "dut-base", "label": "DUT BASE", "light": "light-toggle-off", |
| "poll": {"cmd": "check_dut_exists -t base", "interval": 20000}} |
| ], |
| "terminals": [ |
| {"name": "NUC"}, |
| {"name": "AP", |
| "path_cmd": "ls /dev/google/Ryu_debug-*/serial/AP 2>/dev/null"}, |
| {"name": "EC_PD", |
| "path_cmd": "ls /dev/google/Ryu_debug-*/serial/EC_PD 2>/dev/null"} |
| ], |
| "controls": [ |
| {"name": "Factory Restart", "command": "factory_restart"}, |
| {"name": "Voltage Measurement", "type": "toggle", |
| "on_command": "measure voltage", "off_command": "measure off"}, |
| {"name": "Upgrade Toolkit", "type": "upload", |
| "dest": "/tmp/install_factory_toolkit.run", |
| "command": "rm -rf /usr/local/factory && sh /tmp/install_factory_toolkit.run -- -y && factory_restart"}, |
| {"name": "Download Log", "type": "download", |
| "command": "dmesg > /tmp/dmesg.log", |
| "filename": "/tmp/dmesg.log"}, |
| {"name": "VNC", "type": "link", |
| "url": "/third_party/noVNC/vnc_auto.html?host={{:host}}&port={{:port}}&path=api/agent/forward/{{:client.mid}}%3fport=5901"}, |
| {"name": "Fixture control", "group": [ |
| {"name": "whale close", "command": "whale close"}, |
| {"name": "whale open", "command": "whale open"}, |
| {"name": "io insertion", "command": "whale insert"}, |
| {"name": "charging", "command": "whale charge"} |
| ]} |
| ], |
| "logs": ["/var/log/factory.log"] |
| }, |
| "camera": { |
| "command": "/usr/local/factory/py/tools/stream_camera.py --size 640x480", |
| "width": 640, |
| "height": 480 |
| } |
| } |