You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2021/11/02 18:27:15 UTC

[GitHub] [trafficcontrol] mitchell852 opened a new issue #6323: User last authenticated sort is broken

mitchell852 opened a new issue #6323:
URL: https://github.com/apache/trafficcontrol/issues/6323


   ## This Bug Report affects these Traffic Control components:
   - Traffic Portal
   
   ## Current behavior:
   
   ![image](https://user-images.githubusercontent.com/251272/139922050-3a49359a-0091-4b16-8c2d-fb55bb70e259.png)
   
   ## Expected behavior:
   
   Should sort by date and not label.
   
   ## Steps to reproduce:
   in TP, navigate to https://tp.domain.tld/#!/users and show the "last authenticated" column and sort.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] ocket8888 commented on issue #6323: User last authenticated sort is broken

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on issue #6323:
URL: https://github.com/apache/trafficcontrol/issues/6323#issuecomment-958100519


   The issue is that for jQuery datatables, the value is coerced to a display value, then inserted into a DOM slot, then sorted on. "13 minutes ago" comes after "13 hours ago" in a lexicographic sort.
   
   I don't know of a way to fix that with the legacy tables. However, in an ag-grid table, the display value is coerced on-demand from the actual underlying data, so the sort would be on the Date values (or `moment` instance, I think), not the particular string chosen to represent them.
   
   tl;dr this problem can be solved by upgrading the table to use ag-grid.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] ocket8888 commented on issue #6323: User last authenticated sort is broken

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on issue #6323:
URL: https://github.com/apache/trafficcontrol/issues/6323#issuecomment-959231567






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] ocket8888 commented on issue #6323: User last authenticated sort is broken

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on issue #6323:
URL: https://github.com/apache/trafficcontrol/issues/6323#issuecomment-958100519


   The issue is that for jQuery datatables, the value is coerced to a display value, then inserted into a DOM slot, then sorted on. "13 minutes ago" comes after "13 hours ago" in a lexicographic sort.
   
   I don't know of a way to fix that with the legacy tables. However, in an ag-grid table, the display value is coerced on-demand from the actual underlying data, so the sort would be on the Date values (or `moment` instance, I think), not the particular string chosen to represent them.
   
   tl;dr this problem can be solved by upgrading the table to use ag-grid.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] ocket8888 commented on issue #6323: User last authenticated sort is broken

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on issue #6323:
URL: https://github.com/apache/trafficcontrol/issues/6323#issuecomment-959231567


   Maybe, but if it's me fixing it I would say that's not worth my time to even google, when ag-grid is an all-around improvement anyway.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] ocket8888 commented on issue #6323: User last authenticated sort is broken

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on issue #6323:
URL: https://github.com/apache/trafficcontrol/issues/6323#issuecomment-959231567


   Maybe, but if it's me fixing it I would say that's not worth my time to even google, when ag-grid is an all-around improvement anyway.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] mitchell852 commented on issue #6323: User last authenticated sort is broken

Posted by GitBox <gi...@apache.org>.
mitchell852 commented on issue #6323:
URL: https://github.com/apache/trafficcontrol/issues/6323#issuecomment-958176052


   > tl;dr this problem can be solved by upgrading the table to use ag-grid.
   
   that's fine but i want to say there's a `data-sort` attribute you can use with jquery datatable columns....


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org