[Commotion-admin] [luci-commotion] Issue20 (#41)

gradyoti notifications at github.com
Tue Oct 29 21:43:09 UTC 2013


Added test for name collisions with uploaded profiles, including a warning and a prompt to allow the user to overwrite the existing profile with the same name.

To test:
1) Upload a profile (for instance, "TEST") (must be valid profile)
2) Change one value in the profile (but not the name). Example: ssid was "TEST", change it to "TESTover"
3) Upload the profile again, you should be prompted with a warning and a set of options
4) Click "No, I will rename the file and upload later", then "Confirm". Check the profile "TEST" in etc/commotion/profiles.d/ to confirm that the previous TEST profile was not overwritten
5) Upload the profile again, click "Yes, please overwrite the existing profile". Check the profile in profiles.d/ to confirm that TEST was in fact overwritten with the new ssid value
6) After clicking "confirm", you should see the default meshprofile page (no warning or overwrite options)

Serve chilled.
You can merge this Pull Request by running:

  git pull https://github.com/opentechinstitute/luci-commotion issue20

Or you can view, comment on it, or merge it online at:

  https://github.com/opentechinstitute/luci-commotion/pull/41

-- Commit Summary --

  * moved uploaded mesh profiles to tmp before copying to /etc/commotion/profiles.d/ to allow name collision checking
  * added check for name collisions with extant profiles in /etc/commotion/profiles.d/
  * added warning to user when a name conflict occurs
  * added 'radio' button to meshprofile.htm, which is called when passed the variable 'OW' (overwite) from meshprofile.lua
  * added 'confirm' button. If the user clicks 'yes'->'confirm', the new profile will overwrite the existing one
  * profile uploader now allows user to decline overwriting the existing profile

-- File Changes --

    A luasrc/controller/commotion/.meshprofile.lua.swp (0)
    M luasrc/controller/commotion/meshprofile.lua (49)
    A luasrc/controller/commotion/meshprofile.lua~ (347)
    M luasrc/view/commotion/meshprofile.htm (10)

-- Patch Links --

https://github.com/opentechinstitute/luci-commotion/pull/41.patch
https://github.com/opentechinstitute/luci-commotion/pull/41.diff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.chambana.net/pipermail/commotion-admin/attachments/20131029/8fd27732/attachment.html>


More information about the Commotion-admin mailing list