9058 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
064f3c6c0c
networks: Overhaul Wi-Fi network scan page
Fixes: #1725.

- Show multiple Wi-Fi devices in separate tables so that users can pick them
understanding what they are. Also avoids some confusion related to why APs are
duplicated.

- Request scanning if the last scan time was long ago.

- Show the last scanned time.

- Refresh page in 10 seconds if scan has been requested so that the results of
scan can be shown without user explicitly refreshing the page. Show spinner when
scan has been requested and we are awaiting results.

- Refresh page every 60 seconds in other cases.

- When an SSID can't be decoded into a string, don't show it.

- Don't show hidden networks with no SSID set.

- Improve the styling for signal strength.

- Show a message when no Wi-Fi devices are present.

- Show a message when no Wi-Fi networks are found for a device.

Tests:

- Test on a machine with Wi-Fi device available.

- When page is loaded is for the first time, spinner is shown and refresh
happens in 10 seconds. After refresh if the scan has not completed, again,
spinner is shown and page is reloaded in 10 seconds. Otherwise, spinner is not
shown and page is reloaded in 60 seconds.

- Hidden networks are not shown.

- On a machine with no Wi-Fi devices, 'No Wi-Fi device detected.' message is
shown.

- Clicking on a network takes us to new Wi-Fi network connection page with
'connection name', 'network interface' and SSID filled in correctly.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-11-11 13:28:34 +02:00
Sunil Mohan Adapa
a32a226492
tests: functional: Fix visit() returning prematurely before page load
- It appears from the functional tests run in Gitlab CI pipelines that visit()
is returning before the page has loaded fully. In the screenshots for help app
test failures, we see gitweb web page.

- To fix this, wait for a proper page load in visit().

- Cleanup syntax, rename the non-existent search class, and mechanism for
matching expected URLs.

- Also refactor waiting for uninstall page in uninstall() method. Using the
wait_for_page_update() method as context processor is more accurate.

Tests:

- Run all functional tests and ensure that there are no errors in visit()
method.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-11-09 08:14:51 +02:00
Veiko Aasa
90fd6a71f7
container: Quote arguments that contain spaces when restoring pytest args
Adds single quotes inside single-quoted string, for example bash command
`echo ' '"'"'test'"'"' '` prints ` 'test' `.

Also:
  - Remove wrong comment in the same function.
  - Fix quote usages in container script.

Tested that running bepasty tests with keyword expression filter
`-k "enable_disable or uninstall` works.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
[sunil: Use shlex.quote() for quoting]
[sunil: Pipe the script 'ssh sudo bash' instead of sending argument]
[sunil: enable color always for pytest]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-11-08 08:41:30 -08:00
Sunil Mohan Adapa
63ada3ee62
tests: functional: Don't enable/disable app during tests
- Currently, after every test we disable the app and re-enable for the next
test. The original purpose of this disabling is to make sure that an app is
disabled after test on it. So, change the scope of disabling the app to ensure
that it is only disabled once after all the tests on the app. This should
improve the run time of the tests.

Tests:

- Run functional tests on bepasty app.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-11-08 10:30:55 +02:00
Jiří Podhorecký
fe98e3eb69
Translated using Weblate (Czech)
Currently translated at 100.0% (1770 of 1770 strings)
2024-11-07 16:00:23 +01:00
Dietmar
62d7369724
Translated using Weblate (German)
Currently translated at 98.1% (1738 of 1770 strings)
2024-11-07 16:00:19 +01:00
Sunil Mohan Adapa
c381271601
rssbridge: Mention miniflux in app description similar to tt-rss
Tests:

- App description appears as expected. Links work.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-11-07 12:18:12 +02:00
Sunil Mohan Adapa
c5a967a1a2
i18n: Fix translation of FreedomBox name in various places
Tests:

- With a locale that has translation for the 'FreedomBox' source string, check
the following locations have translated string for 'FreedomBox':

  - Default backup repository label.

  - Firewall app description.

  - Network forms for: topology, internet connection type, and router
  configuration.

  - RSS-Bridge app description.

  - TiddlyWiki app description.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-11-07 12:17:34 +02:00
Sunil Mohan Adapa
3807ee4c54
tests: functional: Wait for uninstall page load before uninstalling
- Many functional test failures in the Gitlab CI pipeline show that uninstall
form was attempted to submitted while still in the app page. After clicking on
the uninstall menu item, we are not waiting for the page to load fully. Fix this
by waiting for page load. This change is expected to fix most of the functional
tests failures in the pipeline.

Tests:

- Ran bepasty functional tests.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-11-07 10:07:12 +02:00
Sunil Mohan Adapa
85cf5a16c8
networks: Improve styling of badges in the information tables
- Make text size and weight to be regular.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-11-07 08:41:18 +02:00
Sunil Mohan Adapa
0e59b67bbd
networks: Fix display of strength and channel for Wi-Fi connections
- Currently, strength and channel information is not shown for Wi-Fi connections
in connection information page. This is a regression related to handling SSID as
a binary string. Fix this.

- Also fix the styling to not make signal strength too prominent.

Tests:

- On a machine with Wi-Fi network device. Viewing the Wi-Fi connection
information does not signal strength and channel without patch but show with the
patch.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-11-07 08:41:04 +02:00
Sunil Mohan Adapa
7fa664d445
networks: Fix display of mangled SSIDs when scanning Wi-Fi networks
In the list of Wi-Fi networks shown after scanning, the SSID shows as "b'myap'"
instead of "myap". Fix this.

Tests:

- On a machine with Wi-Fi network device, scan of Wi-Fi networks. Without the
patch, incorrect SSID labels show up. With patch, SSID is correct.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-11-07 08:40:52 +02:00
Sunil Mohan Adapa
bfdb05bf0d
networks: Fix editing wireless connections with SSID field
Fixes: #2447.

- When editing an existing wireless connection, SSID field shows as "b'myap'"
instead of "myap". Fix this.

Tests:

- On a machine with a wireless connection, edit the connection. Without the
patch, form show SSID incorrectly. With the patch, it shows the correct value.

- Unit tests in test_network.py pass when run as root.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-11-07 08:39:56 +02:00
Besnik Bleta
ff4250f24e
Translated using Weblate (Albanian)
Currently translated at 99.7% (1766 of 1770 strings)
2024-11-06 06:06:56 +01:00
109247019824
01f28a1d45
Translated using Weblate (Bulgarian)
Currently translated at 46.8% (829 of 1770 strings)
2024-11-06 06:06:56 +01:00
大王叫我来巡山
1f3612e0ec
Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 63.5% (1125 of 1770 strings)
2024-11-06 06:06:56 +01:00
Burak Yavuz
d46c0d7258
Translated using Weblate (Turkish)
Currently translated at 100.0% (1770 of 1770 strings)
2024-11-06 06:06:55 +01:00
James Valleroy
f0082f2102
Release v24.23 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v24.23
2024-11-04 20:56:14 -05:00
James Valleroy
3a403e7b57
debian: Drop python3-flake8 build dependency
Although flake8 is used in development, it is not needed for building
the package.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-04 20:54:47 -05:00
James Valleroy
e02ffd086c
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-04 20:36:41 -05:00
James Valleroy
8b46fbdd1d
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-04 20:12:32 -05:00
Sunil Mohan Adapa
5cca536765
index: css: Move the 'powered by' logo further down
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-02 21:20:20 -04:00
Sunil Mohan Adapa
5c41a67267
base: Add link to about for unauthenticated users
Since the about page is now public, adding a link to it in the navbar allows the
users to easily discover it and find out about FreedomBox.

Tests:

- In mobile view, the hamburger menu show the icon and text. Link works.

- In desktop mode, only the icon is visible. Link works.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-02 21:20:18 -04:00
Sunil Mohan Adapa
6bb13140e8
index: Remove links and about text and link to about page
- Make a separate image for 'FreedomBox Powered'.

- Link to the now publicly available about page.

Tests:

- Clicking on the new 'Powered' image leads to about page which is available to
logged in and logged out users.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-02 21:20:15 -04:00
Sunil Mohan Adapa
6084b95a65
help: Add all footer links to about page
Fixes: #2464.

- This page will act as replacement for the footer links in the home page.

- Remove link to FreedomBox Foundation and add link to Weblate project. We
already have a donate link to the foundation website.

Tests:

- About page is shown as expected. Old 'Learn more' button is no more. So is the
last paragraph.

- Styling is as expected. All the section have equal width.

- All links work.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-02 21:20:13 -04:00
Sunil Mohan Adapa
62e67c6c99
help: Make about page available to unauthenticated users
- This page will replace the rather large footer in the front page.

Tests:

- Log out. Visit the help about page. It is available without redirection to
login page. Version related alert is not shown.

- Log in. Visit the help about page. It is available. Version related alert is
shown.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-02 21:20:10 -04:00
Sunil Mohan Adapa
5db6c46e8b
ui: Remove the border around content container
- The container border is, strictly speaking, no longer required as the background and
content container don't have different styles.

- This makes the mobile and desktop interfaces a lot more similar.

- Don't change any margins and padding for the content container.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-02 09:25:12 -04:00
Sunil Mohan Adapa
c8c753af29
ui: Remove the noise background
- Update the mediawiki functional tests which were using this image.

- Slightly increase the darkness of the shadow around the cards to compensate
for the loss of the contrast with the noise background.

Tests:

- Re-run mediawiki functional tests.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-02 09:25:07 -04:00
Sunil Mohan Adapa
6cb51719aa
ui: Move app names below app icons
Fixes: #2418.

- This resolves a issue that icons being misaligned when the name of the app
flows into multiple lines. The increase in size of the card is not very
bothering as long as icons are not still aligning. If the noise background is
removed (to be proposed later), the increased size of the icon is even less
bothering.

- The other options would have been to reflect the increased size of the tile to
neighboring apps in that row (does not seem possible with CSS) or ellipsize the
title when it overflows.

- Redo all the spacing in spacing inside the card to better match the new
layout. The height of the card reduces slightly due this change, which looks
better and closer to other icons grids in other UIs.

Tests:

- In index, apps, and help:index pages, the title has change location. Spacings
are as expected and appealing. System page is unaffected.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-01 18:02:21 -04:00
Sunil Mohan Adapa
2d3e6b6cfa
ui: Don't bold titles in card lists
- Making most of text that is read in a page bold is useless. Emphasis should
instead be used for some text that should stand out of the rest of the text.

- The need to make the text bold goes away if the text color is not such a
lighter shade of gray. Reset this to the regular text color.

Tests:

- Observe changes in home, apps, system, and help index pages.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-01 18:02:18 -04:00
Sunil Mohan Adapa
11038b477a
system: Increase the size of items in listing page
Fixes: #2179.

Tests:

- Set language to Magyar (hu). Test that items in the system page are large enough to
accommodate most names/descriptions.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-01 18:02:15 -04:00
Sunil Mohan Adapa
cb5435dacd
ui: Increase the width of app and system listings
- Increase the width of the containers that hold home cards, app cards, system
cards, and help cards. This helps in:

  - Showing system page layout better with wider cards for each item.

  - Showing more apps in the app page. This does not decrease the readability in
  the same way that increasing the size of the paragraph does beyond a certain
  point.

- Also increase the width of the navbar to make it appear consistent.

- Other containers such as content container remain at the same width.
Increasing this width would make a reading a paragraph harder.

- Behavior is mobile layouts is unchanged.

Tests:

- Test that apps, system, home and help views show cards in a wider layout.

- Success/error messages shown in apps, system, home and help views are narrow
and are not effected.

- In home and help:index pages (reached when clicking help icon without JS), the
icons are wide but the content is narrow.

- Individual app pages, confirmation pages, and help pages remain at the older
width.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-01 18:02:12 -04:00
Coucouf
6a53458e10
Translated using Weblate (French)
Currently translated at 89.3% (1582 of 1770 strings)
2024-11-01 18:00:27 +01:00
gallegonovato
8a8e5c78e8
Translated using Weblate (Spanish)
Currently translated at 94.5% (1674 of 1770 strings)
2024-11-01 18:00:26 +01:00
Sunil Mohan Adapa
e6fb96b381
backups: Sort list of apps in backup, restore, and schedules
Fixes: #2364

Tests:

- Set language to English. Go to backups -> create. List of apps is sorted
alphabetically and case is ignored. Take a backup.

- Click on restore for the new backup. The list of apps is again sorted
alphabetically and case is ignored.

- Click on schedules. List of apps is sorted and alphabetically and case is
ignored.

- Repeat tests with Spanish locale.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-28 10:14:01 +02:00
Sunil Mohan Adapa
15e9c6cad9
backups: Better explanation for the format of upload file
Fixes: #2115.

Tests:

- Visit the backups upload page. Notice that the new help text is as expected.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-28 09:50:55 +02:00
Sunil Mohan Adapa
d85105a428
middleware: tests: Drop some obsolete mock code
- setup_helper was removed long ago.

Tests:

- Re-run unit tests.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
[vexch: Removed unused global variable setup_helper]
Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-28 09:40:49 +02:00
Sunil Mohan Adapa
24382c298c
Translated using Weblate (Norwegian Bokmål)
Currently translated at 64.9% (1150 of 1770 strings)
2024-10-28 00:30:40 +01:00
Ettore Atalan
e4a2a6b9a6
Translated using Weblate (German)
Currently translated at 94.7% (1677 of 1770 strings)
2024-10-27 01:15:46 +02:00
James Valleroy
33b41a66c3
ejabberd: Set mod_mam default to always
This helps various clients to use MAM.

Fixes: #2338

Tests:

- Functional tests for ejabberd pass.

- Install ejabberd and enable MAM. Check that default is set to always
  in the configuration.

- Without this change, install ejabberd and enable MAM. Then restart
  plinth with this change. The configuration is changed from never to
  always. After several minutes, ejabberd is running again.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-10-24 10:33:38 -07:00
Jiří Podhorecký
a87c3b102e
Translated using Weblate (Czech)
Currently translated at 100.0% (1770 of 1770 strings)
2024-10-24 17:15:48 +02:00
Ettore Atalan
e80bd01de7
Translated using Weblate (German)
Currently translated at 90.4% (1601 of 1770 strings)
2024-10-24 17:15:46 +02:00
Veiko Aasa
df52acc329
users: tests: functional: Check LDAP information is correct after renaming user
Tests performed in stable and testing containers:
  - All the users module tests pass.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-10-23 21:24:35 -07:00
Veiko Aasa
b67ce15f89
functional tests: Add pytest testinfra plugin
Adds ability to run local commands with functional tests.

By default, commands are run locally. It is possible to set remote
host connection parameters from pytest command line, for example:
`--hosts 'fbx@IP' --ssh-identity-file '.container/ssh/id_ed25519'`

For more options, see documentation
https://testinfra.readthedocs.io/en/latest/backends.html#ssh.

Includes a fixture `host_sudo` to run commands as sudo.

Relates to
https://salsa.debian.org/freedombox-team/freedombox/-/issues/2451#note_530752.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-10-23 21:24:28 -07:00
Veiko Aasa
f12e634bc9
users: Delete or move home folder when user is deleted or renamed
On user deletion, user's home folder is also deleted. Admins have an
option to avoid deleting user's home by inactivating the user instead.

This commit also removes user deletion buttons from the user's list
page and adds this option to the user edit page. The user's edit form
asks for a confirmation if the user deletion is requested. This change
also means that the confirmation password is now required to delete a user.

Also:
  - Add a simple username validation to the privileged actions.
  - Functional tests: Create a fixture to login as an admin before every test.
  - Functional tests: Add a test to check that SSH passwordless login works
    after user is renamed to validate correct SSH related path permissions.
  - Privileged tests: Add `test_` prefix to the generated random string which
    makes easier to check and cleanup created home folders.
  - Minor quote fixes.

Tests performed in stable and testing containers:
  - Run all the users module tests twice, no failures in tests.
  - When user is the last admin, both "Active" and "Delete user"
    checkboxes are disabled.

Closes #2451.

[sunil]

- Refactor the JS code:

  - Ensure that DOM elements are lookup after DOM content is loaded.

  - Styling changes. Reduce the number of globals, name the global names
  somewhat more unique.

  - Click the button instead of submitting the form to disable the button.

- Template changes:

  - Add a body for the confirmation dialog to talk about disabling the user and
  deleting the home directory.

  - Change the label of the confirm button to make it more
  explicit (recommendation from many UX guides).

  - Styling.

- Functional tests:

  - Fix visibility checking of an element to use the correct splinter API.

  - Simplify clicking the edit user link.

- Minor update to form checkbox help text.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-10-23 21:13:25 -07:00
Besnik Bleta
0eac9c3260
Translated using Weblate (Albanian)
Currently translated at 99.6% (1764 of 1770 strings)
2024-10-23 07:15:48 +02:00
109247019824
b997703c71
Translated using Weblate (Bulgarian)
Currently translated at 46.4% (823 of 1770 strings)
2024-10-23 07:15:47 +02:00
大王叫我来巡山
7e92d0fdba
Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 63.8% (1130 of 1770 strings)
2024-10-23 07:15:46 +02:00
Burak Yavuz
7105c3ce59
Translated using Weblate (Turkish)
Currently translated at 100.0% (1770 of 1770 strings)
2024-10-23 07:15:45 +02:00
James Valleroy
822fcc8f2b
Release v24.22 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v24.22
2024-10-21 20:43:13 -04:00