Device select
Example#
Code-example#
<measmatic-card highlight-header>
<measmatic-device-select data-id=control1Id1 filter=ClAsS1 icon=device label=Switch></measmatic-device-select>
<measmatic-device-select data-id=control1Id2 filter=ClAsS1 label=Switch></measmatic-device-select>
<measmatic-device-select data-id=control1Id3 filter=ClAsS1 icon=device-alternative></measmatic-device-select>
<measmatic-device-select data-id=control1Id4></measmatic-device-select>
<measmatic-device-select data-id=control1Id5 label=disabled disabled></measmatic-device-select>
</measmatic-card>
Description#
This custom-element creates a control to select devices which were set in the Device Manager under Test site configuration.
The selectable values are read from window.deviceList.deviceList. Update the list by calling DeviceListUpdated(deviceList).
Usage#
Attributes#
Necessary#
<measmatic-device-select data-id='control1Id'>
Optional#
<measmatic-device-select data-id='control1Id' filter='Switch'>
filter='Switch' you can filter the selectable devices.
<measmatic-device-select data-id='control1Id' label='Switch'>
label='Switches'.
<measmatic-device-select data-id='control1Id' icon='world'>
<measmatic-device-select data-id='control1Id' disabled>
disabled the selection is disabled. The attribute can be added or removed at any time.
Properties of interest
devicegets name of the selected deviceguidgets guid of the selected devicedeviceObjectgets/sets Object containingnameandguidof selected devicedisabledgets/sets if the selection is disabled
Export
- exports
device,guidandclass classis derived from thefilterattribute and written in lowercase