oxidized-web
oxidized-web copied to clipboard
Columns disappears after page reload
I select IP in the Hide/Show Columns select-list, the IP column shows up. If I click the Refresh button in the UI or F5 in the browser the IP columns disappears again.
Would have been nice if this setting is saved somewhere permanently.
@ytti, would you be opposed to enabling sessions and storing the desired columns in a session variable?
@tobiasa1, this would sort of solve your problem. You would have to reselect the columns during each new sessions, but the selection would persist across sessions. The only alternative (to make it truly permanent) is to store the columns desired in a database, but since it looks like oxidized-web
doesn't already use a database, I don't think that will happen.
Honestly majority of oxidized-web is not my work by now. I'd be happy to have someone opinionated and clued-up shepherd it.
I think sessions sound great.
Is there an easy modification that can be done to default to displaying all columns?
Hello,
There is my solution (i'm on Debian 9.3) : At the end of this file : /var/lib/gems/2.3.0/gems/oxidized-web-0.9.3/lib/oxidized/web/views/nodes.haml
:javascript $(function() { $('#nodesTable').dataTable({ dom: 'C<"clear">lfrtip', "lengthMenu": [[50, 250, 500, -1], [50, 250, 500, "All"]], columnDefs: [{ visible: false, targets: 1 }, { type: "string", targets: 3 }], colVis: { exclude: [0, 5] }
Just replace the "false" --> "true", restart oxidized, aaaanndd... it's gone.