Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement "Custom Output Format" #123

Merged
merged 36 commits into from
Jan 6, 2025
Merged

Conversation

kw4tts
Copy link
Contributor

@kw4tts kw4tts commented Dec 12, 2024

This is a fast implementation of feature, requested / noted to be missing in #122 :

  • loads Custom Output Formats (COF) from nfsen-ng config file (^1)

  • Allows user to add COF
    (-> drop-down:"custom", fill out field, click "add new")

  • Allows user to add COF based on pre-selecting and modifying existing one
    (-> drop-down: custom filter, modify in input field, click "add new")

  • Allows user to edit existing COF (^1)
    (-> drop-down: custom filter, modify in input field, click "modify/delete")

  • Allows user to delete existing saved COF.
    (-> drop-down: custom filter, erase the input field, click "modify/delete", confirm)

Comments welcome. As said, this is a quickly written implementation, there might be room for improvement.

Regards,
E/kw4tts

^1: Rules, saved on server, will overwrite users' preferences each time the page loads. What is your opinion on that?

@mbolli mbolli linked an issue Dec 13, 2024 that may be closed by this pull request
@mbolli
Copy link
Owner

mbolli commented Dec 13, 2024

@kw4tts thanks for this!

regarding ^1: seems reasonable?

I'd like to merge it after you un-draft it 👍

@kw4tts
Copy link
Contributor Author

kw4tts commented Dec 13, 2024

@mbolli thanks for your opinion and approval 👍

Will keep this draft as long as we're testing this (hopefully I get to have some more feedback from our team) and will reach out in a week or so.

@kw4tts
Copy link
Contributor Author

kw4tts commented Dec 16, 2024

Our team suggested that, with the ability to utilize COF, one might not necessarily want to (always) hide some of the columns, especially if they are in the COF itself.

By default, this is a thing, and is done in nfsen-ng.js L1085 +- context.

I have a rough idea on how to fix that, with defaults being a noop change for most of the people, so I will hopefully implement that during this week and push in this PR as it's COF-related, if you don't mind.

@mbolli
Copy link
Owner

mbolli commented Dec 16, 2024

makes sense!

@kw4tts
Copy link
Contributor Author

kw4tts commented Dec 16, 2024

Being open for further discussion:

On flow submit request:

  • fetch current defaults
  • fetch defaults from config (if exist - meaning that existing configs won't error out)
  • remove fields, that are in current output format, from the "dropdown candidates"
  • and ofc, display the table with returned data.

Seems OK for me right now, but will test that out tomorrow with the team. If you have an option to give it a spin, happy to find out feedback.

@kw4tts kw4tts marked this pull request as ready for review December 20, 2024 10:17
@kw4tts
Copy link
Contributor Author

kw4tts commented Dec 24, 2024

@mbolli We're running this in our environment now.

You are more than welcome to have another glance over it. Unless you have anything else to recommend/suggest, I consider this to be ready to be merged.
(Probably a full merge just before the holidays isn't quite the best idea for some people, but just letting you know that this is most highly likely as far as this PR will go and letting you pull a call :) )

I do have some UI "fixes", but that's just us, can be taken as a suggestion, and is therefore put aside in another branch.

Happy holidays!

@mbolli
Copy link
Owner

mbolli commented Jan 6, 2025

@kw4tts I hope you enjoyed the holidays. Thanks again for this. LGTM.

@mbolli mbolli merged commit ef71fee into mbolli:master Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom Ouptut Format (+ defaults)
2 participants