Gluon: configmode: prevent loss of state when entering advanced settings

Created on 9 Jul 2014  路  15Comments  路  Source: freifunk-gluon/gluon

When navigating from configmode to expertmode any state will be lost. This is especially annoying when geo-coordinates have been entered.

As we are planning to add modularity to configmode anyway we could add a special expertmode module to the configmode page that can be expanded by clicking on some button.

Example:

     Hostname
     ...

-> Advanced Configuration

[Save]

after clicking on Advanced Configuration the section would be expanded like this:

     Hostname
     ...

v  Advanced Configuration
     SSH Key
     WAN Port Mode
     ...

[Save]
enhancement feature-accepted

Most helpful comment

What about adding a "save" button next to "save & reboot"?

All 15 comments

:+1:

I can imagine two solutions:
Either all settings are moved into one html page and the switch between expert and not is done by js or css.

Or you modify the expert switch-link into a save-and-switch to expert

What about using a luci compound widget?

Just got the same thing as feedback from a communal IT dept. ;-)

Workaround:
Right-click on "Expert Mode" and click "Open in new Tab". Then, after saving the changes in Expert Mode, you can just close the tab and hit the "Save and Restart" button on the already filled-out Basic Config form.

This problem is not really very important, cause you have a workaround, but couldn't we just simply set the "advanced settings" link with target="_blank" until this is solved with a better solution?

Or maybe change the target of the wizzard link onchange of any of the input fields with javascript.

I presume this behavior of losing the setting when clicking on the "advanced" tab is just meant to scholar users for being new to gluon or not being familiar how to operate a web browser decently.

We could simply add a Java script check on click, that creates a warning

'you have unsaved changes, do you want to leave this page? You can use right click in a new tab'

this would be annoying for everyone who knows the consequences...

This would not Annoy anyone if the message is only shown if you changed something already.

Surely the message should not show if you just open 192.168.1.1 and directly click on the advanced settings.

What about adding a "save" button next to "save & reboot"?

well, let's add the "patch welcome" label.
see https://github.com/freifunk-gluon/gluon/labels/patch%20welcome for a list of such issues :)

I think to add an extra button is quite a lot of work and I would have to dive deep into the gluon-web development.

What about an extra checkbox?

  • [x] reboot after save

That's an ugly hack, we already have that when we tell users to open expert mode in a tab. No point in adding another.

The point here should be to improve usability.

Ok, then I will hide the checkbox (display:none) and add a form-button with javascript, that unchecks the hidden checkbox.

I started a PR here (WIP): https://github.com/rubo77/gluon/commit/4f3fbe734ebb95f71fe29a540ecc1a1eaf13191f

can someone explain how to set the correct if condition in line 64?

Was this page helpful?
0 / 5 - 0 ratings