networks: Implement wizard step for suggesting router configuration
Currently when setting up FreedomBox, we are not guiding users on how to setup their domains or how to configure their router. We have a UX design plan for changing this. One of the parts of this plan is to ask the user for how their FreedomBox is connected to the Internet. We store this information and use it to suggest various setup options during the setup process and also later on when setting up apps. Implement guiding users to configure their routers. See page number 17 of reachability UX (#1531).
-
Implement a form in networks/forms.py for configuring a router. The three options provided and their descriptions should be show in the UX design. -
Implement a simple page view to show this in networks/views.py and add the view to networks/urls.py. This page should be independent and should not contain distractions like app header etc. See Gitweb's create repro view as an example. Ignore showing the diagrams from the UX design for the purpose of this task. -
If task to add page 1 of reachability UX is implemented, then ensure that selecting 'connected to router' will lead showing this page next. This is for the update button in 'FreedomBox Internet Connectivity' section in networks app. If that task is not yet implemented, then add a new section in the Networks main page with section title 'FreedomBox Internet Connectivity' and a button to link to the newly created page. See page 18 of the reachability UX (#1531). Again, ignore the diagram. -
Create another view that reuses the form created earlier but appears like a wizard step. See page 17 of the reachability UX (#1531). See users/views.py::FirstBootView as an example. 'Skip' and 'Next' need to be implemented. Ignore the 'Back' button for now. -
Declare a first boot step that will show up as part of the first boot wizard that appears during initial FreedomBox setup. See users/init.py::first_boot_steps for example on how to do this. We currently have to wizard three wizard steps Welcome (order 0), User Account Creation (order 1) and Finish (order 10). Insert our first boot wizard step with order 4. -
When the form is submitted in both cases (from networks app or from first boot wizard), Store this information in sqlite database against a key named 'networks_router_configuration_type' in FreedomBox's key/value store. Values can be one of 'dmz', 'port_forwarding' and 'not_configured'. See config/init.py::set_advanced_mode() for example on how to store the key.
This task is nominated for 'Contributor Invite' (ping @dannyhaidar-guest):
- Effort Area: Coding
- Effort Estimate: 4/5
- Skills Required: Python, Django forms/views/urls/templates