feat: Enhance project and scenario creation with monitoring metrics
- Added monitoring metrics for project creation success and error handling in `ProjectRepository`. - Implemented similar monitoring for scenario creation in `ScenarioRepository`. - Refactored `run_monte_carlo` function in `simulation.py` to include timing and success/error metrics. - Introduced new CSS styles for headers, alerts, and navigation buttons in `main.css` and `projects.css`. - Created a new JavaScript file for navigation logic to handle chevron buttons. - Updated HTML templates to include new navigation buttons and improved styling for buttons. - Added tests for reporting service and routes to ensure proper functionality and access control. - Removed unused imports and optimized existing test files for better clarity and performance.
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
{% block title %}Scenario Comparison | CalMiner{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% include "partials/reports_header.html" with context %}
|
||||
{% include "partials/reports_header.html" %}
|
||||
|
||||
{% include "partials/reports/options_card.html" with options=include_options iterations=iterations percentiles=percentiles %}
|
||||
{% include "partials/reports/options_card.html" %}
|
||||
<section class="report-filters">
|
||||
<div class="report-card">
|
||||
<h2>Compared Scenarios</h2>
|
||||
@@ -104,7 +104,7 @@
|
||||
<span class="meta-label">Primary Resource</span>
|
||||
<span class="meta-value">{{ item.scenario.primary_resource or "—" }}</span>
|
||||
</div>
|
||||
{% include "partials/reports/scenario_actions.html" with scenario=item.scenario %}
|
||||
{% include "partials/reports/scenario_actions.html" %}
|
||||
</div>
|
||||
|
||||
<div class="scenario-grid">
|
||||
@@ -147,7 +147,7 @@
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</p>
|
||||
{% include "partials/reports/monte_carlo_table.html" with metrics=item.monte_carlo.metrics currency=item.scenario.currency or project.currency percentiles=percentiles %}
|
||||
{% include "partials/reports/monte_carlo_table.html" %}
|
||||
{% else %}
|
||||
<p class="muted">No Monte Carlo data available for this scenario.</p>
|
||||
{% if item.monte_carlo and item.monte_carlo.notes %}
|
||||
|
||||
Reference in New Issue
Block a user