Not showing context devices not passing context validation

Hello,

Today I realized that my list of context devices isn’t filtered based on the validation you set on the dashboard settings on the tab Dashboard Context Validation session. I added a screenshot to clarify my suggestion/bug.

I created a dashboard that is only applicable on certain devices holding a specific tag. The validation works as you see in the screenshot below, but it would be nice to not see the devices not passing the validation not as an option in the context device selector.

In the screenshot above I see all my devices as an option, where I know I can only choose 3 that pass the context validation.

Hope my suggestion makes sense, if not please let me know! ( I could not find a similar feature/bug report, sorry if there is any!)

I see the issue you’re referring to. It looks like when we swapped that device selector out for a new version, we only accounted for validation by specific device IDs, and not by device tags.

Thanks for the bug report. I’m sending this over to the platform engineering team and we will get a fix out in our next release.

1 Like

Hi Dylan,

Great news: I think this bug report has been fixed! Thanks for that. I only do run into a new one:
When you create a context variable you can still select a default device that doesn’t match the device validation. In the screenshot below I expect only two devices matching the device validation, but I can select all of my devices:

The result actually shows up in the device selector on the dashboard. (I could select the default device but pressing “Set Value” doesn’t do anything.

I can fix this, just see this as a suggestion to make the platform a little better every iteration.

That is actually by design; the default value for a context variable, which is what you are setting here, is not subject to the same validation rules that you define for other possible values for the variable. From our documentation:

  • Validation is optional; it is a device query that accepts a single device ID, or by clicking “Select multiple devices or tags” multiple device IDs and/or tags that the variable must match. If both IDs and tags are provided, the variable may match a specific ID, or the tag must be applied to the device. If multiple tags are defined in validation, the device must match all tags (or a provided ID). If no validation rules are provided, then any device from the selected application is valid. Note that the default value does not have to match your defined validation rules.
1 Like

Thanks for your answer Dylan. I see that you have been designing this with flexibility in mind. The only downside it that it can result in unresponsive UI elements (the “Set Value” button). Maybe add a warning under the default device selector to indicate that a default device is selected that does not match the device validation.

Can you elaborate on “result in unresponsive UI elements”? As in, do you see a spot where you are attempting to set a variable’s value but are unable to do so? Or is there something else you mean by this? Please provide examples if possible.

Sorry Dylan,

After playing with it a bit more, I realized that the unresponsive “Set Value” button has nothing to with the default context device. But the “Set Value” button on a dashboard can become unresponsive under very specific conditions: The screenshot below shows the path to trigger the issue:




Sorry for the confusion with the default device. Hope this helps.

I guess the fix is super simple: If the button “Set Value” is pressed when the selected device is the same as the current device: close the dropdown menu (and maybe trigger an update of the dashboard).

Yes, I noticed that just after my last reply and filed a bug ticket. Thanks for bringing that to our attention. I’m hoping to get that fixed in our next release (late February).

1 Like