net-utilities / BigIPReport

Generates an indexed overview of your F5 configuration
https://loadbalancing.se/bigipreport-rest/
GNU General Public License v3.0
10 stars 5 forks source link

Include VS state part of csv #131

Closed vantom85 closed 1 year ago

vantom85 commented 1 year ago

At Virtual Servers tab ,Enabled & Availability is not part of exported report as csv

timriker commented 1 year ago

I'm not sure where we'd put this. The status is currently in the same field as the vip name. What would you expect it to look like? one field with something like this? I don't know if there is a way to get one field from datatables to export to multiple fields in csv.

enabled:available - vs_example.com_HTTPS

epacke commented 1 year ago

I'm having a look now. :)

timriker commented 1 year ago

Some documentation on the customize function here:

https://datatables.net/reference/button/csv

epacke commented 1 year ago

Figured it'd be useful to have them as optional table headers. WDYT?

timriker commented 1 year ago

Seems like we always want that info, so turning off the columns is not useful to me. We also have status and availability on the pools and pool members. I don't expect those in a separate column. I was thinking of creating a pseudo column called "Status" in customizeCSV() that would split Name into Status,Name and split status as "enabled:available - vs_example_HTTPS" to "enabled:available","vs_example_HTTPS" or something like that. customizeCSV() should also work for CSV export the pool table.

epacke commented 1 year ago

I don't follow your reasoning. The old "style" with availability as icons is still there. What I did was adding optional additional columns in the vs table in case you want to filter/export.

timriker commented 1 year ago

It just makes the field enable/disable list longer. I can live with that.

Should we make the same change to the pool table?

epacke commented 1 year ago

Good idea.

epacke commented 1 year ago

Changed my mind. Adding the buttons looks terrible on a laptop. Will checkout the export function. I'll check out that customise function.

epacke commented 1 year ago

I tried to find a way to do this in a non-ugly way but could't since the custom export function does not necessarily contain enough data to look-up availability and enabled state. We could add those if both "Loadbalancer" and "Name" is visible" but that'd kinda go against the logic of the current filter (only export what you see) by adding additional columns you did not ask for and in a non-obvious manner as well. But maybe that's acceptable?

Another way that I can think if is to write a custom csv export from scratch that uses the current data set in data tables.

On the other hand, adding the two columns the "correct way" makes the app look bad on a smaller screen.

Thoughts?