hedhyw / json-log-viewer

Interactive viewer for JSON logs.
MIT License
81 stars 7 forks source link

feat: support sorting by field #17

Open hedhyw opened 1 year ago

hedhyw commented 1 year ago

Add an ability to sort by field:

arsalankone commented 9 months ago

Hi I want to work on it. Can you please explain what do you mean by Show the list of fields to sort by ?

hedhyw commented 9 months ago

Hi I want to work on it.

Hi! Thank you.

Can you please explain what do you mean by Show the list of fields to sort by ?

The idea was to show a list of fields from which we can select a field to sort by, but of course, it's not a requirement. Feel free to describe how you see it at its best.

SpoonBuoy commented 9 months ago

He @hedhyw assign it to me on this account, @arsalankone is my work account and I had mistakenly commented from that account.

I might need some help also in understanding the flow of code properly. Also like in sorting by fields, what criterion should be used for sorting mechanism. Sorting by value in case of timestamps and lexicographical sorting in message makes sense, but for level fields, what should be an appropriate parameter?

hedhyw commented 9 months ago

I might need some help also in understanding the flow of code properly.

Sorting by value in case of timestamps and lexicographical sorting in message makes sense, but for level fields, what should be an appropriate parameter?

SpoonBuoy commented 9 months ago

Can you take a look at it and see if I am following the right approach? https://github.com/SpoonBuoy/json-log-viewer/tree/spoon

hedhyw commented 9 months ago

Can you take a look at it and see if I am following the right approach? https://github.com/SpoonBuoy/json-log-viewer/tree/spoon

looks right, but I'm not sure we need StateSorted, we can save the order in the application state, and use it in StateLoaded/StateFiltered

hedhyw commented 3 months ago

@SpoonBuoy do you still need this feature?