Forum Discussion

Gareth_Evans's avatar
Gareth_Evans
Icon for Neophyte rankNeophyte
2 months ago

Sort and/or filter a Table Widget

Hi there, 

I have a table widget which has the resource name as the row and system up time (days) as the column. The idea is that my team can easily identify those servers which have been recently rebooted.

Although the widget shows all the devices, I need it to sort by up time so the most recently rebooted is shown at the top without having to keep clicking on the column name. But when I change the dashboard and revert back to the one with this table widget, the sort column changes back to the default.

The other thing that would be useful is to apply a filter so only servers with an uptime of 7 days or less would be shown. 

I cannot see any obvious way to do this. Any ideas?

Thanks.

5 Replies

  • Thanks for the replies. I am using dynamic as custom made no sense to me. Using expressions is fine but does not really help me give the information I need immediately to hand. The sorting column reset each time so thats not working.

    No point having a table widget if you cannot do simple things like filtering and sorting. Will feedback to LM.

    • Stuart_Weenig's avatar
      Stuart_Weenig
      Icon for Legend rankLegend

      If you're using dynamic, you should e able to pick "Bottom 25" and it'll show the most recently 25 rebooted devices.

      • Stuart_Weenig's avatar
        Stuart_Weenig
        Icon for Legend rankLegend

        If they had a "bottom all" or "top all" option, this would work better.

  • Under the table options are you using custom or dynamic? Custom has no sorting options. Dynamic does (but it stupidly only lets you sort if you also limit the total number of rows returned).

    That said, once you sort a widget manually, if you do not modify the widget it should remember that sort order for you. It's per user, but they'd only have to do it once.

  • As far as I know, the table widget will always sort high-to-low on the first data column. I suggest submitting a feedback request in the LM portal to suggest other options as you mentioned.

    In a few cases I've been able to kinda hack way to workaround this by using perform expression on datapoint to multiple by -1 by using something like "DataPoint*(0-1)", so it flips the order by making all the numbers negative. Not the best option, can cause confusion and breaks the color bars if you use that, but kinda works.

    You can also try using expressions to throw uptimes that are > 7 days to the bottom of the table, like "if(gt(UptimeDays,7),0-10000,UptimeDays)" (untested). Or perhaps use "unkn()" or "neginf()" instead of -10000.