Views
Views of the React Infrastructure Resource list in the Smarter web console.
The ledger, InfrastructureResource, describes the
platform’s cloud infrastructure and what it costs, so it is for superusers only. It is written
by the infrastructure signals’ receivers, so the list is read-only.
- class smarter.apps.infrastructure.views.listview.InfrastructureResourceListApiView(**kwargs)[source]
Bases:
SmarterAuthenticatedNeverCachedWebViewThe ledger’s most recent resources, newest first, and a summary of all of them.
The request’s JSON body may have
limit, the number of resources, up toDEFAULT_LIMIT.Response:
{ "summary": {"total": 12, "active": 9, "activeBillable": 3, "destroyed": 3}, "objects": [{"id": 12, "provider": "aws", "resourceType": "dns.zone", ...}] }
- property formatted_class_name: str
Returns the class name in a formatted string along with the name of this view.
- class smarter.apps.infrastructure.views.listview.InfrastructureResourceListView(**kwargs)[source]
Bases:
SmarterAuthenticatedNeverCachedWebViewRender the Infrastructure Resource list of the Smarter web console.
- property formatted_class_name: str
Returns a formatted string of the class name for logging purposes.
- smarter.apps.infrastructure.views.listview.summary()[source]
Counts of the ledger’s resources: in total, active, active and billable, and destroyed.
Django URL patterns of the infrastructure app: the ledger of cloud resources.
- how we got here:
/infrastructure/