display storage plans
This commit is contained in:
parent
d987f62471
commit
7b93830df2
2 changed files with 47 additions and 1 deletions
|
@ -2,7 +2,12 @@ import re
|
|||
|
||||
from django.shortcuts import render
|
||||
from collections import defaultdict
|
||||
from hub.services.models import ComputePlan, VSHNAppCatPrice, ExternalPricePlans
|
||||
from hub.services.models import (
|
||||
ComputePlan,
|
||||
VSHNAppCatPrice,
|
||||
ExternalPricePlans,
|
||||
StoragePlan,
|
||||
)
|
||||
from django.contrib.admin.views.decorators import staff_member_required
|
||||
from django.db import models
|
||||
|
||||
|
@ -235,6 +240,11 @@ def pricelist(request):
|
|||
|
||||
group_name = plan.group.name if plan.group else "No Group"
|
||||
|
||||
# Get storage plans for this cloud provider
|
||||
storage_plans = StoragePlan.objects.filter(
|
||||
cloud_provider=plan.cloud_provider
|
||||
).prefetch_related("prices")
|
||||
|
||||
# Add pricing data to the grouped structure
|
||||
pricing_data_by_group_and_service_level[group_name][
|
||||
service_level_display
|
||||
|
@ -250,6 +260,7 @@ def pricelist(request):
|
|||
"compute_plan_group_node_label": (
|
||||
plan.group.node_label if plan.group else ""
|
||||
),
|
||||
"storage_plans": storage_plans,
|
||||
"vcpus": plan.vcpus,
|
||||
"ram": plan.ram,
|
||||
"cpu_mem_ratio": plan.cpu_mem_ratio,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue