8 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
1027b624aa
help: Use privileged decorator for actions
Tests:

- Functional tests work
- Accessing help/status-log/ works and last 100 logs lines are shown.
  - When there are no logs, '--no entries--' message is shown.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-08 18:52:05 -04:00
Sunil Mohan Adapa
6db1029d27
help: tests: Fix about page test by mocking version calls
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-08-01 16:01:20 -07:00
James Valleroy
e5a866dd64
help: Add "How can I help?" section to Contribute page
This doesn't use the how-can-i-help package, but it is a similar
implementation that fetches the same data from udd.debian.org.

There are sections for the following issues:
- Packages that will be removed from Debian testing
- Packages that are not in Debian testing
- Good first issues for beginners
- Issues for which the package maintainer has requested help

The overall "How can I help?" section is collapsed by default.

Test:
- View the page in stable and testing container.
- Run help functional tests.

Closes: #536

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Minor indentation fix]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-08-01 14:09:47 -07:00
Sunil Mohan Adapa
74214c18ae
*: Use Django gettext functions instead of ugettext
- ugettext functions will be removed in Django 4.0. Each use emits a warning
when running with Django 3.2. Since we have warnings enabled in developer mode,
we see quite a few messages because of this.

- ugettext is already a simple alias of gettext. So, no regressions are
expected.

Tests:

- Accessing an affected app in UI with Django 3.2 and Django 2.2 works fine.

- Using Django 3.2 there are no warnings related to removal of ugettext
functions.

- Ran regular unit tests.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-09-20 16:50:16 -04:00
Fioddor Superconcentrado
792c2cd00f
help: Link to updates page when new version is available
Closes: #1332.

Signed-off-by: Fioddor Superconcentrado <fioddor@gmail.com>
[sunil: Simplify the message for link to upgrade page]
[sunil: Use url method instead of hard-coded path]
[sunil: Cosmetic changes]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-10-19 16:57:34 -07:00
Fioddor Superconcentrado
f1f84a2509
upgrades: Add status section showing version and upgrade status
Closes: #1939.

- Force a delay before returning the upgrade result to allow upgrade to kick in.
Otherwise when the flow returns, get_context_data() creates the context too
early and finds the upgrade not yet busy, causing the refresh loop to miss it.
The page renders static and the user gets no clue to the upgrade executing in
the background.

Signed-off-by: Fioddor Superconcentrado <fioddor@gmail.com>
[sunil: Retain the styling for the remainder of the page]
[sunil: Re-style the status section as a simple web-page]
[sunil: Drop unused running-status CSS styles]
[sunil: Rename CSS variables, minor changes to color values]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-10-13 14:41:50 -07:00
James Valleroy
f41cc116a1
security: Move backports notice to security page
Move get_backports_in_use to upgrades.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-07-13 14:42:29 -07:00
Sunil Mohan Adapa
95d0923788
help: Rename views modules as 'views'
Tests performed:

- Visit help main view by visiting URL /plinth/help/.

- Visit pages: about, manual, get support, submit feedback, contribute.

- Download manual.

- Raise an exception in a view, visit the view in non-develop mode, see the
status log.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-03-06 13:08:08 +02:00