Helps: #1962
Shown an alarming warning in connection_show page (only) for the primary
connection. Captions 'Deactivate' and 'Delete' buttons, now explicitly
mention the primary connection and they are placed within the warning
box.
Signed-off-by: Fioddor Superconcentrado <fioddor@gmail.com>
[sunil: Primary connection is not the same as connection user is using]
[sunil: Reduce the importance of primary connection as it is just default route]
[sunil: Update primary connection message]
[sunil: Fix the use of exclamation icon for screen readers as per bootstrap]
[sunil: Don't place buttons inside the warning, as it is non-intuitive UI]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Closes: #1974
BTW: Javascript IPV4/6 hide/show arrangements triggered on page load.
Otherwise page loads form fields inconsistently.
Signed-off-by: Fioddor Superconcentrado <fioddor@gmail.com>
[sunil: Fix the use of RadioSelect widget]
[sunil: Alter the wording of what each type means]
[sunil: Drop the help text for radio group as it is mostly repetitive]
[sunil: js: Make the entire jQuery code run on document ready]
[sunil: js: Revert unneeded double call to change methods, change() is enough]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Pull the delete button in the connection show page to the right to prevent
hitting it by accident.
Signed-off-by: Fioddor Superconcentrado <fioddor@gmail.com>
[sunil: Use a new consistent style compatible with bootstrap4]
[sunil: Styled the delete button with danger color]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
- When the base font size is changed, all the measure will scale appropriately.
- Bootstrap 4 has done the same.
- Keep using px for responsive lengths and some border widths that need not
scale.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
Closes: #1818. The new navbar collapse handles items better without a scrollbar.
- Switch dependency to newer bootstrap4 library.
- Bootstrap 4 has 5 grid levels instead of 4. Adjust all classes accordingly to
retain current semantics.
- Update for newer markup for dropdowns.
- Replace use for labels with badges. Labels have been removed. Use
badge-secondary instead of label-default.
- Replace use of btn-xs with btn-sm. Size is roughly the same.
- Accommodate removal of form-horizontal.
- .hidden* and .visible* classes have been removed. Use alternate utilities.
- Replace use of table-condensed with table-sm.
- Update progress bar background styling. .progress-bar-* have been replaced
with bg-*.
- Drop support for IE9 and below. Bootstrap 4 does not support those browsers.
- Use the new simplified markup for navs, navbar and navbar-toggler. Accommodate
removal of .navbar-fixed-top.
- Update the JSXC page too.
- Update all values that are using rem units. The base font size is now 1rem =
16px instead of 1rem = 10px. This the default for bootstrap 4.
- A button inside a dropdown menu is natively supported by bootstrap 4. Remove
custom styling done earlier.
- Drop use of removed class thumbnail.
- Override colors for buttons and warnings to keep the old style.
- Use new markup for close buttons inside alerts.
- Use .collapse.show instead of .collapse.in as per bootstrap 4 styling.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
Helps: #1938
It also corrects the transliteration of another tooltip.
Signed-off-by: Fioddor Superconcentrado <fioddor@gmail.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Helps: #1938.
- Translate various states passed in by Network Manager:
- Device state
- Device state reason
- Device type
- Firewall zone
- IPv4/IPv6 connection method
- Wireless mode
- forms.py: Move zones list to network.py, reuse in views.py.
Testing:
- Yapf applied.
- Flake8 without errors or warnings for changed files.
- (Unit) tests run without errors.
- Screnshots attached to #1938.
Signed-off-by: Fioddor Superconcentrado <fioddor@gmail.com>
[sunil: Add strings for many more states]
[sunil: Don't allow None to be selected as firewall zone]
[sunil: Drop forced_literals.py as it reduces modularity of the code]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Helps: #1938.
Fixed application of available translations in daemon.py and apache,
diagnostics, networks, firewall and users modules.
diagnostics:
- __init__.py: return the app name along its results.
- diagnostics.html: display the app name instead of its id.
- diagnostics_results.html:
- mark for translation,
- apply class to results <td> HTML tag.
main.css: center-align the results.
Locale files excluded. Will be regenerated automatically and translations to be
done via Weblate.
original testing (rebased later):
- Yapf applied.
- Flake8 without errors or warnings for changed files.
- (Unit) tests run without errors.
Signed-off-by: Fioddor Superconcentrado <fioddor@gmail.com>
[sunil: Translate 'None' app name]
[sunil: Don't translate tests strings second time in template]
[sunil: Tweak the center rule]
[sunil: Don't split a translation string]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
- API can be consumed by other apps.
- Consistently, get/set store keys and default values without repeated code.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
The word "Manual" means 'user guide' in case of help and 'not automatically' in
case of networking app.
After change, POT file is produced as follows:
msgctxt "User guide"
msgid "Manual"
msgstr ""
msgctxt "Not automatically"
msgid "Manual"
msgstr ""
Closes: #1922.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
Change "overtime" to "over time", also matches the other choice in the
form.
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Mention that interface is automatically assigned to external zone.
Test:
- Re-assigned host0 interface to public zone. Disabled firewalld to
still access interface. Firewall zone is shown as "external" with the
note about automatic assignment.
Closes: #1858.
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
- Talk about cockpit in networking, firewall and storage apps for advanced
operations. Make it a separate section instead of just description update to
provider higher emphasis.
- Update cockpit description too.
Closes: #1809.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
If the user chooses to skip the network topology wizard, then there is no need
to show the router configuration wizard step. Skip it.
We may want to skip other wizard step too. However, those can be dealt later.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
If during the first wizard, the user selects that they are not behind a router,
then don't show the router configuration wizard.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
After user selects that they are behind the router, we need to show the router
configuration wizard step. Only after this should be show the Internet
connection type step.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Signed-off-by: Nektarios Katakis <iam@nektarioskatakis.xyz>
[sunil: Use the term 'network topology' consistently]
[sunil: Properly title case the <h1> title]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Signed-off-by: Nektarios Katakis <iam@nektarioskatakis.xyz>
[sunil: Use the term 'network topology' consistently]
[sunil: Minor grammer fix, and spacing for i18n]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Add a comment explaining when .pkla file is used and when the .rules file is
used.
Tests performed:
- Install policykit-1 version 0.105. Something like apt install
policykit-1=0.105-26 libpolkit-agent-1-0=0.105-26 libpolkit-gobject-1-0=0.105-26
- View list of network connections.
- Add a network connection.
- View a network connection's details page.
- Delete a network connection.
- Add Debian experimental to /etc/apt/sources.list. apt update. Then install
policykit-1 version 0.116. apt install -t experimental policykit-1.
- Repeat all above tests.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
Tests performed:
- Visit networks main view to list network connections.
- Add an Ethernet connection, view it and delete it.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
- Make first wizard steps for router configuration and Internet connection type
private. Since they run after the admin user page, the steps can run for logged
in users.
- Add option to the Internet connection type wizard, to let the user say that
they don't know the type. This allows them to have a stress-free first setup
experience. The option can act as if they have don't have public IP address at
all. This is an extension of the proposed user experience.
- Implement class based views for simplicity.
- Update various IDs for consistency (even though other IDs in the networks
module don't conform).
- Iron out inconsistent terminology. Setup vs Configuration, Help vs. Wizard,
etc.
Tests performed:
- Run first boot wizard from the beginning. Notice that both the wizard steps
appear properly after the user login step (without permission denied problems).
When not logged in, accessing the wizard steps with URL should redirect to login
page.
- During first boot wizard, select 'Skip this step' in both the steps after
selecting non-default options. Values set should be default options as confirmed
from networks page.
- During first boot wizard, select non-default values, the values should be set
properly as confirmed from networks page.
- From the networks page select each value of the wizard. The option should get
saved properly.
- In case of Internet connection type, when the wizard values changes, the
networks page should reflect the value properly. This should also show properly
after skipping the step during first boot.
- During first boot, the default value for Internet connection type should be 'I
don't know' and router configuration should be 'Not configured'.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Nektarios Katakis <iam@nektarioskatakis.xyz>
- Cosmetic styling fixes. Having doc string as suggested by Python doc string
guidelines.
- 'connected to the Internet' seems much more popular phrase than 'connected on
the Internet' judging by web search results.
- Stylize as 'Internet' for consistency although 'internet' is correct too.
- Add space at the end of main radio button option text as translators seems to
understand it incorrectly. See current Spanish translation.
- Recommend 'DMZ' for router configuration.
- Remove incorrect title casing port forwarding text.
- Internationalize some strings.
- Update the default value for router configuration to 'not_configured'.
- Update the default value for Internet connection type to None so that nothing
is selected by default. We could consider introducing a fourth option
'not_configured'.
- Update the ID of first boot wizard step for Internet connectivity.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
- Using Markup on format_lazy objects seems to convert negate their lazy
behavior.
- Extend the format_lazy() utility method to handle markup.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
None of the files are installed into /etc/. They will unconditionally override
older versions of themselves. They are not likely to cause any configuration
file prompts.
Reviewed-by: Veiko Aasa <veiko17@disroot.org>