I watched over @gradyoti 's shoulder while he was doing this testing. It<br>
looks good, but I definitely recommend independent testing.<br>
<br>
On 10/29/2013 05:43 PM, gradyoti wrote:<br>
> Added test for name collisions with uploaded profiles, including a<br>
> warning and a prompt to allow the user to overwrite the existing profile<br>
> with the same name.<br>
> <br>
> To test:<br>
> 1) Upload a profile (for instance, "TEST") (must be valid profile)<br>
> 2) Change one value in the profile (but not the name). Example: ssid was<br>
> "TEST", change it to "TESTover"<br>
> 3) Upload the profile again, you should be prompted with a warning and a<br>
> set of options<br>
> 4) Click "No, I will rename the file and upload later", then "Confirm".<br>
> Check the profile "TEST" in etc/commotion/profiles.d/ to confirm that<br>
> the previous TEST profile was not overwritten<br>
> 5) Upload the profile again, click "Yes, please overwrite the existing<br>
> profile". Check the profile in profiles.d/ to confirm that TEST was in<br>
> fact overwritten with the new ssid value<br>
> 6) After clicking "confirm", you should see the default meshprofile page<br>
> (no warning or overwrite options)<br>
> <br>
> Serve chilled.<br>
> <br>
> ------------------------------------------------------------------------<br>
> <br>
> <br>
>         You can merge this Pull Request by running<br>
> <br>
>   git pull https://github.com/opentechinstitute/luci-commotion issue20<br>
> <br>
> Or view, comment on, or merge it at:<br>
> <br>
>   https://github.com/opentechinstitute/luci-commotion/pull/41<br>
> <br>
> <br>
>         Commit Summary<br>
> <br>
>   * moved uploaded mesh profiles to tmp before copying to<br>
>     /etc/commotion/profiles.d/ to allow name collision checking<br>
>   * added check for name collisions with extant profiles in<br>
>     /etc/commotion/profiles.d/<br>
>   * added warning to user when a name conflict occurs<br>
>   * added 'radio' button to meshprofile.htm, which is called when passed<br>
>     the variable 'OW' (overwite) from meshprofile.lua<br>
>   * added 'confirm' button. If the user clicks 'yes'->'confirm', the new<br>
>     profile will overwrite the existing one<br>
>   * profile uploader now allows user to decline overwriting the existing<br>
>     profile<br>
> <br>
> <br>
>         File Changes<br>
> <br>
>   * *A* luasrc/controller/commotion/.meshprofile.lua.swp<br>
>     <https://github.com/opentechinstitute/luci-commotion/pull/41/files#diff-0><br>
>     (0)<br>
>   * *M* luasrc/controller/commotion/meshprofile.lua<br>
>     <https://github.com/opentechinstitute/luci-commotion/pull/41/files#diff-1><br>
>     (49)<br>
>   * *A* luasrc/controller/commotion/meshprofile.lua~<br>
>     <https://github.com/opentechinstitute/luci-commotion/pull/41/files#diff-2><br>
>     (347)<br>
>   * *M* luasrc/view/commotion/meshprofile.htm<br>
>     <https://github.com/opentechinstitute/luci-commotion/pull/41/files#diff-3><br>
>     (10)<br>
> <br>
> <br>
>         Patch Links:<br>
> <br>
>   * https://github.com/opentechinstitute/luci-commotion/pull/41.patch<br>
>   * https://github.com/opentechinstitute/luci-commotion/pull/41.diff<br>
>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href='https://github.com/opentechinstitute/luci-commotion/pull/41#issuecomment-27346406'>view it on GitHub</a>.<img src='https://github.com/notifications/beacon/HSS0tS4nfORw_XnPQF8f0bBf5GQCMg7Sn9yT8d6SttAWSqvNGup3EpCa6aGzlvKC.gif' height='1' width='1'></p>