James Valleroy 83bfc51931
upgrades: Add button to test dist-upgrade in development mode
Tests:

- In non-development mode, button does not appear.

- On testing system, button does not appear.

- On stable system in development mode, the button appears.

- Pressing the button starts a dist-upgrade.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Join strings that fit in the same line]
[sunil: Fix indentation in template]
[sunil: Change 'dist-upgrade' to 'distribution upgrade' in UI strings]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-08-18 08:47:03 -07:00

27 lines
991 B
Python

# SPDX-License-Identifier: AGPL-3.0-or-later
"""
URLs for the upgrades module
"""
from django.urls import re_path
from . import views
urlpatterns = [
re_path(r'^sys/upgrades/$', views.UpgradesConfigurationView.as_view(),
name='index'),
re_path(r'^sys/upgrades/activate-backports/$', views.activate_backports,
name='activate-backports'),
re_path(r'^sys/upgrades/firstboot/backports/$',
views.BackportsFirstbootView.as_view(),
name='backports-firstboot'),
re_path(r'^sys/upgrades/firstboot/update/$',
views.UpdateFirstbootView.as_view(), name='update-firstboot'),
re_path(r'^sys/upgrades/firstboot/update/progress/$',
views.UpdateFirstbootProgressView.as_view(),
name='update-firstboot-progress'),
re_path(r'^sys/upgrades/upgrade/$', views.upgrade, name='upgrade'),
re_path(r'^sys/upgrades/test-dist-upgrade/$', views.test_dist_upgrade,
name='test-dist-upgrade'),
]