diff --git a/interface/src/project/DashboardData.tsx b/interface/src/project/DashboardData.tsx index a67b05c9c..21cf4072c 100644 --- a/interface/src/project/DashboardData.tsx +++ b/interface/src/project/DashboardData.tsx @@ -158,6 +158,8 @@ const DashboardData: FC = () => { } }; + const isCmdOnly = (dv: DeviceValue) => dv.v === undefined && dv.c; + function formatValue(value: any, uom: number) { if (value === undefined) { return ''; @@ -218,7 +220,7 @@ const DashboardData: FC = () => { if (deviceValue) { return ( setDeviceValue(undefined)}> - Change Value + {isCmdOnly(deviceValue) ? 'Run Command' : 'Change Value'} {deviceValue.l && ( { {hasMask(dv.n, DeviceEntityMask.DV_API_MQTT_EXCLUDE) && ( )} - {dv.v === undefined && dv.c && } ); @@ -519,21 +520,13 @@ const DashboardData: FC = () => { - ENTITY NAME/COMMAND + ENTITY NAME VALUE {deviceData.data.map((dv, i) => ( - sendCommand(dv)} - // sx={ - // hasMask(dv.n, DeviceEntityMask.DV_FAVORITE) - // ? { backgroundColor: '#334900' } - // : { backgroundColor: 'black' } - // } - > + sendCommand(dv)}> {dv.c && me.admin && !hasMask(dv.n, DeviceEntityMask.DV_READONLY) && ( @@ -544,8 +537,10 @@ const DashboardData: FC = () => { {renderNameCell(dv)} - {formatValue(dv.v, dv.u)} - + + {isCmdOnly(dv) ? : formatValue(dv.v, dv.u)} + + ))} diff --git a/interface/src/project/SettingsCustomization.tsx b/interface/src/project/SettingsCustomization.tsx index 94913af6f..14a0ceb43 100644 --- a/interface/src/project/SettingsCustomization.tsx +++ b/interface/src/project/SettingsCustomization.tsx @@ -116,14 +116,27 @@ const SettingsCustomization: FC = () => { return ( <> - - - You can mark an entity as a favorite to be listed first in the Dashboard ( - ) ,or remove it entirely from the Dashboard ( - ) ,or disable it's write operation ( - ) or have it excluded from the MQTT and API outputs ( + + Select a device and customize each entity using the options: + +   + +  mark it as favorite to be listed at the top of the Dashboard + + +   + +  hide from the Dashboard + + +   + +  make it read-only (if it has write operation available) + + +   - ). +  excluded it from MQTT and API outputs