20 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
42d0198a2e networks: Refactor for simplicity and brevity
- Make connection adding/editing forms inherit from base.

- Make the forms responsible for extracting cleaned data.

- Use dictionaries for passing around settings values while
  adding/editing connections.
2015-12-09 17:56:11 +05:30
Sunil Mohan Adapa
d1b20ac113 networks: I18N for static IP configuration 2015-12-09 12:20:37 +05:30
Daniel Steglich
1a1faa8a1b Github issue 314: static IP configuration enhancement
* fixed IP configuration
  * set up a new ipv4settings object to avoid the need of reseting all the values
* extended Static IP configuration:
  * allow configuration of netmask (optional)
  * allow configuration of Gateway (optional)
  * allow configuartion of two DNS Servers (optional)
* extend DHCP configuration:
  * allow configuration of user specific DNS Server
  * DHCP provided DNS Servers will be ignored in that case
2015-12-09 10:28:53 +05:30
Sunil Mohan Adapa
cc858bbd6a Use pgi only when gi is not available
- Write a convenience utility to handle the import process.
2015-11-16 09:55:20 +05:30
Nik Nyby
608897b9ec Test on python 3.3 and 3.4 with travis
Python 3.2.x is deprecated, so I thought it would be
good to get tests running on some newer pythons. I've
switched from the python3-gi package to using 'pgi' from
pypi, because the apt-installed python3-gi was having trouble
importing.

pgi required python 3.3+ (see: https://pypi.python.org/pypi/pgi),
so I've removed python 3.2 from the test matrix. Let me know if
we're using python 3.2 anywhere, but as far as I know plinth is
run on python 3.4.3 with debian sid on the freedombox image.
2015-11-16 08:44:01 +05:30
Sunil Mohan Adapa
3df1a88824 Switch to Django i18n for code strings
Django i18n layer is on top of gettext and provide may crucial features
such as per-request locales, lazy translations etc.
2015-11-13 22:08:43 +05:30
Sunil Mohan Adapa
2ef22ec1b4 Require library version for GObject introspection
Specify the version of a library before importing it using GObject
introspection.  Mainly to avoid warnings with recent version of
pygobject.  Closes #247.
2015-10-17 21:13:35 -04:00
Sunil Mohan Adapa
ef156dab91 networks: Minor styling and comments update
- Add comment about PPP peers possibly not responding to echo requests.
2015-08-22 21:14:21 +05:30
Sunil Mohan Adapa
958c249dfb networks: Retrieve password while editing PPPoE
- Retrieve password using connection.get_secrets() instead of
  settings_pppoe.get_password().

- Make sure IPv4 settings are not accessed during PPPoE editing.
2015-08-22 21:10:56 +05:30
Sunil Mohan Adapa
4f75f44769 networks: Fix showing password during PPPoE edit
- Javascript was missing for the template altogether.  Added one similar
  to create case.

- Minor refactoring to existing javascript.

- Consistent styling for display label and field id.
2015-08-22 20:22:08 +05:30
Daniel Steglich
d79437d2a2 show / hide password box
Added a selectbox to change the input box type from password to text.
2015-08-22 13:03:00 +05:30
Daniel Steglich
286caf8917 Added a new network connection type to handle PPPoE connections
* Added a new choice to main selectbox for adding Network Connections (network.py)
* Added a new form which asks for name, interface, firewall zone, username and password (forms.py, urls.py)
* Added new helper functions to create PPPoE based connection object (network.py)
2015-08-22 13:03:00 +05:30
Sunil Mohan Adapa
acf3a919f6 networks: Improvements to interface binding
- Fetch network interfaces list at the time of form creation instead of
  during definition.

- Add help text to interfaces list choice field.

- Don't write an explict check for requiring interface
  selection. required=True, which is default, takes care of that.

- Internationalize the empty selection text.

- Update the empty selection text.

- Re-order interface parameter in the same order of priority/appearance.
2015-07-27 22:03:02 +05:30
Daniel Steglich
378d6b8d84 networks: Always bind connections to a device 2015-07-27 22:03:02 +05:30
Sunil Mohan Adapa
0cb8b4a5fc network: Cleanup, minor fixes and refactoring
- Make network-manager package get installed when accessing the index page of
  networks.  Also freedombox-setup shold actually pull network-manager package
  as dependency and use it for configuring the initial networks.

- Remove the /connect page and re-use the /add_wifi page for that purpose.

- Fix add connection page titles.

- Handle the case when network-manager returned empty string for SSID.

- Don't explictly URL encode the Wi-Fi SSID when adding a new Wi-Fi network.
  Django automatically handles this in 'url' tag and decodes before url
  routing.  Relax the regex that matches SSID as part of the URL to handle all
  possible SSIDs.
2015-04-06 22:21:29 +05:30
James Valleroy
2441caf647 Add AP and adhoc wifi modes, and shared IPv4 addressing mode. 2015-04-06 22:21:29 +05:30
James Valleroy
8d9b388375 Fix network tests, add form help and validator. 2015-04-06 22:21:29 +05:30
James Valleroy
45086ff003 Add firewall zone selection for networks. 2015-04-06 22:21:29 +05:30
James Valleroy
f0c5cd080c Add wifi security settings. 2015-04-06 22:21:29 +05:30
James Valleroy
9b201a2daf Rename network module to networks.
Move networkmanager helper functions into a new file.
Add some network tests.
2015-04-06 22:21:28 +05:30