Add disk usage statistics

- add model CustomerPackageDiskUsage for hosting package disk usage
  statistics
- add REST API endpoint for submittings statistics for disk, mysql and
  pgsql usage
- add disk usage information to hosting package detail view
- add separate hosting package disk usage statistic view
This commit is contained in:
Jan Dittberner 2023-07-22 19:43:10 +02:00
parent affb49a971
commit cb62bd63e2
10 changed files with 379 additions and 16 deletions

View file

@ -4,7 +4,7 @@ This module defines the URL patterns for hosting package related views.
"""
from __future__ import absolute_import
from django.urls import re_path
from django.urls import path, re_path
from .views import (
AddHostingOption,
@ -12,7 +12,9 @@ from .views import (
CreateCustomerHostingPackage,
CreateHostingPackage,
CustomerHostingPackageDetails,
CustomerHostingPackageDiskUsageDetails,
HostingOptionChoices,
UploadCustomerPackageDiskUsage,
)
urlpatterns = [
@ -42,4 +44,14 @@ urlpatterns = [
AddHostingOption.as_view(),
name="add_hosting_option",
),
path(
"<int:package>/disk-usage/",
CustomerHostingPackageDiskUsageDetails.as_view(),
name="disk_usage_details",
),
path(
"upload-disk-usage/",
UploadCustomerPackageDiskUsage.as_view(),
name="upload_disk_usage",
),
]