Address RemovedInDjango40Warning
In Django 3.1, django.conf.urls.url() is deprecated in favor of django.urls.re_path(). For more info see [1] These were already replaced in Horizon repo by [2]. [1] https://docs.djangoproject.com/en/4.0/releases/3.1/#id2 [2] https://review.opendev.org/c/openstack/horizon/+/827093 Change-Id: I0f7a59d28f8611ccaf66143ea6cdf0a89cedf80f
This commit is contained in:
parent
7f794a9f0b
commit
6289954907
@ -11,19 +11,19 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from django.conf.urls import url # noqa
|
||||
from django.urls import re_path
|
||||
|
||||
from monitoring.alarmdefs import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^$', views.IndexView.as_view(), name='index'),
|
||||
url(r'^alarm/create$',
|
||||
views.AlarmCreateView.as_view(),
|
||||
name='alarm_create'),
|
||||
url(r'^(?P<id>[^/]+)/alarm_detail/$',
|
||||
views.AlarmDetailView.as_view(),
|
||||
name='alarm_detail'),
|
||||
url(r'^alarm/(?P<id>[^/]+)/alarm_edit/$',
|
||||
views.AlarmEditView.as_view(),
|
||||
name='alarm_edit')
|
||||
re_path(r'^$', views.IndexView.as_view(), name='index'),
|
||||
re_path(r'^alarm/create$',
|
||||
views.AlarmCreateView.as_view(),
|
||||
name='alarm_create'),
|
||||
re_path(r'^(?P<id>[^/]+)/alarm_detail/$',
|
||||
views.AlarmDetailView.as_view(),
|
||||
name='alarm_detail'),
|
||||
re_path(r'^alarm/(?P<id>[^/]+)/alarm_edit/$',
|
||||
views.AlarmEditView.as_view(),
|
||||
name='alarm_edit')
|
||||
]
|
||||
|
@ -11,22 +11,22 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from django.conf.urls import url # noqa
|
||||
from django.urls import re_path
|
||||
|
||||
from monitoring.alarms import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^$', views.IndexView.as_view(), name='index'),
|
||||
url(r'^alarm/filter/$',
|
||||
views.AlarmFilterView.as_view(),
|
||||
name='alarm_filter'),
|
||||
url(r'^alarm/(?P<service>[^/]+)/$',
|
||||
views.AlarmServiceView.as_view(),
|
||||
name='alarm'),
|
||||
url(r'^alarm/$',
|
||||
views.AlarmServiceView.as_view(),
|
||||
name='alarm_all'),
|
||||
url(r'^history/(?P<name>[^/]+)/(?P<id>[^/]+)$',
|
||||
views.AlarmHistoryView.as_view(),
|
||||
name='history')
|
||||
re_path(r'^$', views.IndexView.as_view(), name='index'),
|
||||
re_path(r'^alarm/filter/$',
|
||||
views.AlarmFilterView.as_view(),
|
||||
name='alarm_filter'),
|
||||
re_path(r'^alarm/(?P<service>[^/]+)/$',
|
||||
views.AlarmServiceView.as_view(),
|
||||
name='alarm'),
|
||||
re_path(r'^alarm/$',
|
||||
views.AlarmServiceView.as_view(),
|
||||
name='alarm_all'),
|
||||
re_path(r'^history/(?P<name>[^/]+)/(?P<id>[^/]+)$',
|
||||
views.AlarmHistoryView.as_view(),
|
||||
name='history')
|
||||
]
|
||||
|
@ -11,16 +11,16 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from django.conf.urls import url # noqa
|
||||
from django.urls import re_path
|
||||
|
||||
from monitoring.notifications import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^$', views.IndexView.as_view(), name='index'),
|
||||
url(r'^notification_create$',
|
||||
views.NotificationCreateView.as_view(),
|
||||
name='notification_create'),
|
||||
url(r'^notification_edit/(?P<id>[^/]+)$',
|
||||
views.NotificationEditView.as_view(),
|
||||
name='notification_edit')
|
||||
re_path(r'^$', views.IndexView.as_view(), name='index'),
|
||||
re_path(r'^notification_create$',
|
||||
views.NotificationCreateView.as_view(),
|
||||
name='notification_create'),
|
||||
re_path(r'^notification_edit/(?P<id>[^/]+)$',
|
||||
views.NotificationEditView.as_view(),
|
||||
name='notification_edit')
|
||||
]
|
||||
|
@ -11,19 +11,19 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from monitoring.config import local_settings as settings
|
||||
from monitoring.overview import views
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^$', views.IndexView.as_view(), name='index'),
|
||||
url(r'^status', views.StatusView.as_view(), name='status'),
|
||||
url(r'^proxy\/(?P<restpath>.*)$', views.MonascaProxyView.as_view()),
|
||||
url(r'^proxy', views.MonascaProxyView.as_view(), name='proxy'),
|
||||
url(r'^logs_proxy(?P<url>.*)$',
|
||||
views.KibanaProxyView.as_view(
|
||||
base_url=settings.KIBANA_HOST), name='kibana_proxy'
|
||||
)
|
||||
re_path(r'^$', views.IndexView.as_view(), name='index'),
|
||||
re_path(r'^status', views.StatusView.as_view(), name='status'),
|
||||
re_path(r'^proxy\/(?P<restpath>.*)$', views.MonascaProxyView.as_view()),
|
||||
re_path(r'^proxy', views.MonascaProxyView.as_view(), name='proxy'),
|
||||
re_path(r'^logs_proxy(?P<url>.*)$',
|
||||
views.KibanaProxyView.as_view(base_url=settings.KIBANA_HOST),
|
||||
name='kibana_proxy'
|
||||
)
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user