Ansaribinhyder's picture
Revert back to original
bc46226
<!DOCTYPE html>
<html>
<head>
<title>IPM Comparison</title>
<style>
body {
font-family: 'Segoe UI', sans-serif;
background: #f7f9fc;
text-align: center;
padding: 30px;
}
h2 {
color: #1e88e5;
}
select {
padding: 10px;
margin: 20px;
border-radius: 6px;
border: 1px solid #aaa;
font-size: 16px;
}
img {
max-width: 90%;
border: 1px solid #ddd;
border-radius: 8px;
margin-top: 20px;
}
a {
display: inline-block;
background-color: #43a047;
color: white;
padding: 10px 20px;
text-decoration: none;
border-radius: 6px;
margin-top: 15px;
transition: background 0.3s ease;
}
a:hover {
background-color: #2e7d32;
}
button {
background-color: #e53935;
color: white;
border: none;
padding: 10px 20px;
border-radius: 6px;
margin-top: 20px;
cursor: pointer;
}
button:hover {
background-color: #c62828;
}
</style>
<script>
function showPlot() {
const col = document.getElementById("col-select").value;
document.getElementById("plot-img").src = "/plot_image/" + encodeURIComponent(col);
}
</script>
</head>
<body>
<h2>📊 IPM Correlation</h2>
{% if file_ready %}
<a href="/download_comparison">⬇️ Download Comparison Excel</a>
{% endif %}
<h3>Select Parameter to Plot:</h3>
<select id="col-select" onchange="showPlot()">
<option disabled selected>Select a column</option>
{% for c in cols %}
<option value="{{ c }}">{{ c }}</option>
{% endfor %}
</select>
<br>
<img id="plot-img" src="" alt="Plot will appear here">
<br>
<form action="/reset_golden">
<button>Reset Golden Data</button>
</form>
</body>
</html>
<!-- New Code -->
<!-- <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Plot Comparison</title>
<style>
.plot-container {
display: flex;
flex-wrap: wrap;
gap: 20px;
margin-top: 20px;
}
.plot-item {
border: 1px solid #ccc;
padding: 10px;
box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}
img {
max-width: 100%;
height: auto;
display: block;
}
</style>
</head>
<body>
<h1>Comparison Results</h1>
<p>
<a href="{{ url_for('download_comparison') }}">Download Comparison Excel</a> |
<a href="{{ url_for('reset_golden') }}">Start New Comparison</a>
</p>
<h2>Individual Parameter Plots (Golden vs Test 1 vs Test 2)</h2>
{% if file_ready %}
<div class="plot-container">
{% for col in cols %}
<div class="plot-item">
<h3>{{ col }}</h3>
<img src="{{ url_for('plot_image', col=col) }}" alt="Plot for {{ col }}">
</div>
{% endfor %}
</div>
{% else %}
<p>Comparison is not ready. Please go back to the <a href="{{ url_for('index') }}">homepage</a> to upload files.</p>
{% endif %}
</body>
</html> -->