oxidized-web icon indicating copy to clipboard operation
oxidized-web copied to clipboard

Columns disappears after page reload

Open twindh opened this issue 9 years ago • 4 comments

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.

twindh avatar Sep 23 '15 06:09 twindh

@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.

supertylerc avatar Dec 28 '15 05:12 supertylerc

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.

ytti avatar Dec 28 '15 12:12 ytti

Is there an easy modification that can be done to default to displaying all columns?

bradvido avatar Jan 13 '17 18:01 bradvido

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.

Baptizein avatar Jan 08 '18 14:01 Baptizein