Azure / pcs-remote-monitoring-webui

Azure IoT PCS Remote Monitoring Web UI
MIT License
54 stars 72 forks source link

Clicking sort on Rules column title (e.g. trigger) does not sort #1160

Closed ashdonaldson14 closed 5 years ago

ashdonaldson14 commented 6 years ago

Type of issue

Description

To be specific: first click does work, but after 1 full loop (a->z, z->a, no sort), sorting doesn't work anymore ...

Steps to reproduce

  1. [First step]
  2. [Second step]
  3. [and so on...]

Expected behavior

...

Current behavior <!-- The actual behavior observed --

...

Known workarounds

...

Possible solution

...

Context and Environment

Screenshot

mechaffin commented 6 years ago

The sorting appears to work for me on master. Can you give more info on when/where this was an issue?

mechaffin commented 5 years ago

The sorting works on most columns but not on others. Within the RulesGrid, rule name, description, severity, device group, and status all work fine. I cannot tell if Notification works as the data is the same in all rows, but my suspicion is that its fine. Trigger, Count, and Last Trigger do not work.

For comparison, I checked the DevicesGrid as well. Those all appear to work fine.

Count and Last Trigger are loaded async (not in the same call that loads the rest of the grid). The field value is not a simple value. Its an object with multiple properties... which means the grid is unlikely to understand how to sort it.

Trigger is also an object containing all the conditions for the rule.

I'll investigate use of custom comparator functions for these columns to enable sorting.