95 lines
2.4 KiB
HTML
95 lines
2.4 KiB
HTML
{% extends "base.html" %} {% block title %}Dashboard · CalMiner{% endblock %} {%
|
|
block content %}
|
|
<div class="dashboard-header">
|
|
<div>
|
|
<h2>Operations Overview</h2>
|
|
<p class="dashboard-subtitle">
|
|
Unified insight across scenarios, costs, production, maintenance, and
|
|
simulations.
|
|
</p>
|
|
</div>
|
|
<div class="dashboard-actions">
|
|
<button id="refresh-dashboard" type="button" class="btn primary">
|
|
Refresh Dashboard
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<p id="dashboard-status" class="feedback" hidden></p>
|
|
|
|
<section>
|
|
<div id="summary-metrics" class="dashboard-metrics-grid">
|
|
{% for metric in summary_metrics %}
|
|
<article class="metric-card">
|
|
<span class="metric-label">{{ metric.label }}</span>
|
|
<span class="metric-value">{{ metric.value }}</span>
|
|
</article>
|
|
{% endfor %}
|
|
</div>
|
|
<p id="summary-empty" class="empty-state" {% if summary_metrics|length>
|
|
0 %} hidden{% endif %}> Add project inputs to populate summary metrics.
|
|
</p>
|
|
</section>
|
|
|
|
<section class="dashboard-charts">
|
|
<article class="panel chart-card">
|
|
<header class="panel-header">
|
|
<div>
|
|
<h3>Scenario Cost Mix</h3>
|
|
<p class="chart-subtitle">CAPEX vs OPEX totals per scenario</p>
|
|
</div>
|
|
</header>
|
|
<canvas
|
|
id="cost-chart"
|
|
height="220"
|
|
{%
|
|
if
|
|
not
|
|
cost_chart_has_data
|
|
%}
|
|
hidden{%
|
|
endif
|
|
%}
|
|
></canvas>
|
|
<p
|
|
id="cost-chart-empty"
|
|
class="empty-state"
|
|
{%
|
|
if
|
|
cost_chart_has_data
|
|
%}
|
|
hidden{%
|
|
endif
|
|
%}
|
|
>
|
|
Add CAPEX or OPEX entries to display this chart.
|
|
</p>
|
|
</article>
|
|
<article class="panel chart-card">
|
|
<header class="panel-header">
|
|
<div>
|
|
<h3>Production vs Consumption</h3>
|
|
<p class="chart-subtitle">Throughput comparison by scenario</p>
|
|
</div>
|
|
</header>
|
|
<canvas
|
|
id="activity-chart"
|
|
height="220"
|
|
{%
|
|
if
|
|
not
|
|
activity_chart_has_data
|
|
%}
|
|
hidden{%
|
|
endif
|
|
%}
|
|
></canvas>
|
|
</article>
|
|
</section>
|
|
{% endblock %} {% block scripts %} {{ super() }}
|
|
<script id="dashboard-data" type="application/json">
|
|
{{ {"summary_metrics": summary_metrics, "scenario_rows": scenario_rows, "overall_report_metrics": overall_report_metrics, "recent_simulations": recent_simulations, "upcoming_maintenance": upcoming_maintenance} | tojson }}
|
|
</script>
|
|
<script src="/static/js/dashboard.js"></script>
|
|
{% endblock %}
|