{% extends "workspaces/base.html" %} {% from "components/alert.html" import Alert %} {% from "components/icon.html" import Icon %} {% from "components/empty_state.html" import EmptyState %} {% block workspace_content %} {{ Alert("Budget Report for Workspace " + workspace.name, message="

Track your monthly and cumulative expenditures for your workspace, projects, and environments below.

\

Please note that the projected spend is based on the average expense over the last three completed months and therefore does not account for future changes that might be made in scale or configuration of your cloud services.

", actions=[ {"label": "Learn More", "href": "/", "icon": "info"} ] ) }}

Workspace Total Spend

{% set budget = workspace_totals['budget'] %} {% set spent = workspace_totals['spent'] %} {% set remaining = budget - spent %}
Budget
{{ budget | dollars }}
Remaining
{{ remaining | dollars }}
Total spend to date
{{ spent | dollars }}

Task Order

Task Order Number
1234567890
Expires
Remaining
{{ remaining_days }} days
Manage Task Order
Contracting Officer
Pietro Quirines email@email.com
{% set workspace_totals = monthly_totals['workspace'] %} {% set current_month_index = current_month.strftime('%m/%Y') %} {% set prev_month_index = prev_month.strftime('%m/%Y') %} {% set two_months_ago_index = two_months_ago.strftime('%m/%Y') %} {% set reports_url = url_for("workspaces.workspace_reports", workspace_id=workspace.id) %} {% if not monthly_totals['environments'] %} {% set can_create_projects = user_can(permissions.ADD_APPLICATION_IN_WORKSPACE) %} {% set message = 'This Workspace has no Cloud Environments setup, hence there is no spending data to report. Create a Project with some Cloud Environments to get started.' if can_create_projects else 'This Workspace has no Cloud Environments setup, hence there is no spending data to report. Contact the Workspace Owner to set up some Cloud Environments.' %} {{ EmptyState( 'Nothing to report', action_label='Add a New Project' if can_create_projects else None, action_href=url_for('workspaces.new_project', workspace_id=workspace.id) if can_create_projects else None, icon='chart', sub_message=message ) }} {% else %}

Cumulative Budget

Monthly Spend
Monthly spend visual key
Accumulated Spend
Accumulated spend visual key
Projected
Projected monthly spend visual key
Projected accumulated spend visual key
{# spend/projected budget path lines #} {# max budget line #} {# make this clickable to focus on that month #}  |  {# container block #} {# budget bar #} {# projected budget bar #} {# task order expiration line #} {# task order expiration label #} T.O. Expires {# cumulative dot #} {# abbreviated cumulative label #} {# abbreviated spend label #} {# month label #} {# year label #} Total Budget

Total spend per month

Spending scope {{ two_months_ago.strftime('%B %Y') }} {{ prev_month.strftime('%B %Y') }} {{ current_month.strftime('%B %Y') }} % of total spend this month
Total {{ workspace_totals.get(two_months_ago_index, 0) | dollars }} {{ workspace_totals.get(prev_month_index, 0) | dollars }} {{ workspace_totals.get(current_month_index, 0) | dollars }}
{{ Icon('link') }}
{% endif %} {% endblock %}