75 Commits

Author SHA1 Message Date
Swapnil Gupta
615f0d0298
Update in licenses 2016-12-20 17:36:00 -05:00
Swapnil Gupta
699bdbfed6
Revert "Added license for inline js"
This reverts commit ee0d3745107c910e20350fa57c1fec7da7f90563.
2016-12-20 17:35:57 -05:00
Swapnil Gupta
cfe75b57f0
Added license for inline js 2016-12-20 17:35:54 -05:00
Sunil Mohan Adapa
dce51fd6d7
networks: Support configuring IPv6 networks
- Very similar to configuration of IPv4 networks.

- Supports 'auto', 'dhcp', 'manual' and 'ignored' modes as supported by
  network manager.  'shared' mode is not yet implemented by network
  manager.
2016-10-01 07:09:03 -04:00
Sunil Mohan Adapa
26a724b773
networks: Add batctl as dependency
This will be removed from freedombox-setup depedency list.
2016-09-17 14:03:58 -04:00
Sunil Mohan Adapa
ff0d117a89
Readjust the responsive widths of various tables
Most tables now occupy the full width of the container row.  Some of
them are otherwise squished.  Also make sure the new fixed container
layout has not reduced the originally intended width of a table.
2016-09-11 13:15:00 -04:00
Sunil Mohan Adapa
2c204429c6
Remove width management for forms
Now all forms will uniformly occupy the full width of the available
row.  Bootstrap originally designed forms this way.  However, we were
setting restricted widths on forms as they were too wide.  With the new
fixed container layout this is no longer necessary.
2016-09-11 13:14:57 -04:00
Sunil Mohan Adapa
18996b5c56
Import urlresolvers from django.urls
In Django 1.10, django.core.urlresolvers is available from
django.urls. Use it.
2016-08-11 18:03:00 -04:00
Sunil Mohan Adapa
74ffc8d323
networks: Fix incorrect access of DNS settings
Network manager's libnm throws a critical message for when accessing DNS
entries from IPv4 configuration when there are none available.  See the
number of entries available before accessing them.
2016-08-11 17:11:27 -04:00
Sunil Mohan Adapa
fee14b1764
networks: Remove the IP address hack fully 2016-08-11 17:11:23 -04:00
Sunil Mohan Adapa
28a9933fd9
networks: Configure wireless BSSID, band, channel
Select the frequency band (2.4 GHz vs. 5 GHz) is a prerequisite for
selecting the channel.  Channel selection is useful primarily as follow:

- Restrict to a particular access point when multiple access points use
  the same SSID (AP name) but are available on different frequencies.

- Configure for a particular ad-hoc mesh network.

- Setup multiple access points from a single FreedomBox on multiple
  channels to maximize the throughput and number of simultaneous
  clients.

Ability to specify a particular BSSID will help associate with a
particular access point when multiple access points use the same
SSID (AP name).  This is also makes it slightly harder to trick clients
into connection to a malicious device.  Also configuring BATMAN-adv
seems to require setting a particular BSSID.
2016-07-21 19:23:31 -04:00
Sunil Mohan Adapa
a9ca2d7cc3
networks: Add 'disabled' IPv4 method, i18n
Disabled IPv4 method allows not configuring IPv4 entirely on network
interfaces as required in some cases.

Also, make sure to internationalize all the choices form values in
network module.  There were missed before.
2016-07-21 19:23:27 -04:00
Sunil Mohan Adapa
04babacafa
networks: Ability to configure generic interfaces
After batman-adv kernel driver takes over the Wi-Fi network interface
and provides a bat0 interface, this interface shows up as device type
'batadv'.  This type is not recognized by network manager is dealt with
as a generic device.  Configuring this device for IPv4/IPv6 in
auto/shared mode etc. works fine.  So, add the ability to configure
generic interfaces.
2016-07-21 19:23:20 -04:00
Sunil Mohan Adapa
5f548a9e36
packages: Make modules declare managed packages
This can then be used by a privileged action to verify that packages
requested for installation are in fact valid.  This slightly improves
security of those privileged actions.
2016-06-11 12:11:32 -04:00
Sunil Mohan Adapa
4f634b86e2
networks: Better explain auto/shared connections 2016-06-07 08:12:25 -04:00
Sunil Mohan Adapa
4865a64d2b
networks: Allow shared connections to have IPs
Setting IP address on a shared connection can be usefull.  This tells
Network Manager to pick the provided network range (inferred from
IP/netmask) instead of something in 10.42.x.x.  This can be used to give
predicatable IPs, static IPs and to make large static
reservations (instead of the default 8).
2016-06-07 08:12:18 -04:00
Sunil Mohan Adapa
ad61028a3a
menu: Sort menu items for all locales
Currently menu items are shown in alphabetical order in applications and
no clear order in system configuration.  This is done using static
weights for menu items based on English names that does not work for
other locales.

Sorting can't be done at the time of adding menu items as users of
multiple locales may use the interface at the same time.

Implement a sorting mechanism based on existing order as well as labels
of menu item.  This allows the flexiblity of grouping menu items in
future as it may be need for system configuration.  In case of help menu

Remove sort order for all modules except for help menu as here we want
that specific order.
2016-06-06 17:44:59 -04:00
Sunil Mohan Adapa
a51c784457
Various message fixes
- Capitalize 'Internet' to make it consistent across Plinth.  See:
  https://en.wikipedia.org/wiki/Capitalization_of_%22Internet%22

- Other minor fixes
2016-03-13 18:20:54 -04:00
James Valleroy
767e3c4757
dynamicdns: Make corrections to source strings. 2016-03-12 16:11:55 -05:00
Sunil Mohan Adapa
335eeccee9
networks: Use new setup mechanism 2016-02-13 13:51:28 +05:30
Sunil Mohan Adapa
7f4c5f7410
Make app names as module identifiers
- The last part of the module import path is the module name.  This also
  becomes the Django app name.  Apps names have to be unique.  Hence,
  there is no scope for two different modules with same name but
  different load path to exist in the project.

- Most uses of list of loaded modules are dealing with app names instead
  of full module load path.  This is due to the fact that Django deals
  with app names and not module paths.

- It is also somewhat clumsy to access a loaded module as we are
  re-importing every time to get access module.

- Simplify all of the above by using app names are module identifiers
  and maintaing an ordered dictionary of app names to loadded modules.

- Remove unused imports.

- Minor styling fixes.
2016-02-13 13:49:23 +05:30
Caly
15312fe595
Update messages for simplicity/consistency/grammer
- Closes #375 and #380.

- More use of configurable brand name.
2016-01-24 12:14:25 +05:30
Sunil Mohan Adapa
572e68dc36
Make remaining uses of brand name customizable 2016-01-24 00:50:14 +05:30
Sunil Mohan Adapa
4602c5bfce
Use translated brand name in templates
Using brand name directly from configuration means that it can't be
easily translated.  Instead use the translated brand name sent in my the
context processor.
2016-01-24 00:37:01 +05:30
cat-git
2f9b419f4f
networks: Fix grammer in two sentences
Minor changes to English grammar to make user messages more
readable/translatable.
2016-01-08 15:04:13 +05:30
Daniel Steglich
de2d2323d4 Merge pull request 338 from SunilMohanAdapa:
Refactoring of networks module.
2016-01-01 22:00:28 +00:00
Sunil Mohan Adapa
201837518f Update strings during edit/delete operations 2015-12-09 23:55:55 +05:30
Ruben Lubbes
161e374419 Improved base strings to avoid duplicates
Should not affect already translated strings.
2015-12-09 23:55:55 +05:30
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
ba5c7a772d networks: Refactor & fix extracting netmask
- Use host byte ordering instead of big-endian.
2015-12-09 17:55:03 +05:30
Sunil Mohan Adapa
da99a7cb9d networks: Minor indentation fixes 2015-12-09 12:21:38 +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
a69f419c3c Make Django urlpatterns list of url()s
- Support for legacy pattern() mechanism will be removed in Django
  1.10.  Currently we see a warning for each Plinth module.
2015-12-05 09:33:23 -05:00
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
01d50c7ae8 Fix i18n of template expressions 2015-11-14 11:42:32 +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
02cd89b60d Internationalize strings in template files 2015-11-13 22:02:17 +05:30
Sunil Mohan Adapa
11bf585025 networks: Show network diagram
- As discussed in the first boot redesign proposal.

- Images are taken from Tango icon set, GNOME icons or created.

- Responsive, works for very small widths also.

- First cut, special cases of network connectivity are not handled.
2015-10-28 20:02:56 -04:00
Sunil Mohan Adapa
96b98fae9f networks: Handle unavailability of device 2015-10-28 20:02:56 -04:00
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
fonfon
81e09a1280 networks: increased column size; added TODO 2015-10-14 12:54:21 +00:00
Sunil Mohan Adapa
7170d3db38 networks: Ability to enable/disable without JS
- Avoid using a drop down menu.

- Separate out the status indicator and activate/deactivate button.

- Closes #173.
2015-10-14 12:51:34 +00:00
Sunil Mohan Adapa
fc19b0fd3d networks: Refactor code for showing connection
- Fix showing configured IP address in edit form.

- Combine the retrival functions and organize them according to where
  the information is being retrived from connection/device/active
  connection/access point.

- Add more fields to show such as ether speed, default ipv4/ipv6
  connection, wifi mode, etc.

- Re-format the page.  Separate ipv4/ipv6 sections. Separate device
  information and connection information sections.

- Take the action buttons to the top.

- Make the activate/deactivate button work with new POST only CSRF
  requirement.

- Update Firewall zone description messages.

- Show all IP addresses of the device.
2015-10-11 16:28:55 +05:30
Sunil Mohan Adapa
682e5d7c2d networks: Prefill proper Wi-Fi device in add form
Add access points found on a particular Wi-Fi device only to that device
as it is not gauranteed that other Wi-Fi devices will be able to find
them.  For example, an access point operating in 5 GHz frequency will
only be found and used by Wi-Fi devices capable for 5 GHz communication.
2015-10-11 16:28:55 +05:30
Daniel Steglich
408aa8910a wi-fi network connection: Fixed error message when entering the form
- When selecting an existing WiFi on the "scan" page, the user will be redirected to the "WiFi add" form.
  This form did not contain a WiFi capable Interface as default selection, for this reason the user get a
  invalid form message when entering the form.
2015-10-11 16:28:55 +05:30
Daniel Steglich
f49def2d39 Add network connection: Show current IP address when editing a connection
- Added some generic network helper functions to global network helper class
  to get some information from a device by it's name. This is used when editing
  a connection (no ip was shown before).

- ToDo:
  This is only a workaround because we want to get the information from the connection but not from the device
  which belongs to the connection. If multiple connections are setup on the same device, this workaround will not
  work anymore.
2015-10-11 16:28:55 +05:30
Daniel Steglich
c3e5753b52 Network Status pages: added status pages
- implemented network status page which supports:
 * show IP address and netmask
 * show MAC address
 * show device name
 * show firewall zone name
 * show DNS server information
 * show default gateway
 * show wifi information
 * shows if connection is shared or not and if connection is the default connection

- when clicking on a cennection on the overview page go to the status page, not to the
  editing page

- ToDo: if connection is disabled and re-enabled again, no information are visible anymore (Bug)
2015-10-11 16:28:55 +05:30
Sean Alexandre
d14f077608 network: CSRF check for (de)activating connections
Fixes issue #127
Network manager: fix CSRF when activating/deactivating network connections
https://github.com/freedombox/Plinth/issues/127
2015-09-19 20:03:20 +05:30