diff --git a/demo/db.json b/demo/db.json index 51b333d..de66322 100644 --- a/demo/db.json +++ b/demo/db.json @@ -47,6 +47,30 @@ "invalid": true, "functional_group": "Vacuum", "location_group": "S 2" + }, + "TV5L0-VGC-1": { + "_id": "TV1L0-VGC-1", + "active": true, + "args": [], + "beamline": "DEMO_BEAMLINE", + "creation": "Tue Feb 27 10:41:25 2018", + "device_class": "ophyd.sim.SynAxis", + "kwargs": { + "name": "{{name}}" + }, + "last_edit": "Thu Apr 12 14:40:08 2018", + "macros": null, + "name": "tv1l0_vgc_1", + "parent": null, + "prefix": "TV1L0-VGC-1", + "screen": null, + "stand": "ST1", + "system": "Device", + "type": "pcdsdevices.happi.containers.LCLSItem", + "z": 1035.5, + "invalid": true, + "functional_group": "Vacuum", + "location_group": "S 3" } } diff --git a/lucid/launcher.py b/lucid/launcher.py index 79f92fd..0b5ef3a 100644 --- a/lucid/launcher.py +++ b/lucid/launcher.py @@ -45,7 +45,8 @@ def get_parser(): parser.add_argument( 'beamline', help='Specify the beamline name to compose the home screen.', - type=str + type=str, + nargs='+' ) parser.add_argument( '--toolbar', @@ -103,9 +104,9 @@ def __init__(self, *args, beamline, group_keys, callbacks, **kwargs): def _load_from_happi(self, row_group_key, col_group_key): '''Fill with Data from Happi''' cli = lucid.utils.get_happi_client() - results = (cli.search(beamline=self.beamline, - active=True) - or []) + results = [] + for line in self.beamline: + results += cli.search(beamline=line, active=True) dev_groups = collections.defaultdict(list)