Upload files to "/"
This commit is contained in:
@@ -4,7 +4,41 @@
|
||||
<div class="dashboard-container">
|
||||
<h1>{{ title }}</h1>
|
||||
|
||||
{# ── Filter bar ─────────────────────────────────────────── #}
|
||||
<form class="filter-bar" method="get" id="filter-form" onsubmit="
|
||||
this.querySelectorAll('input').forEach(function(el){ if(!el.value) el.disabled = true; });
|
||||
">
|
||||
<div class="filter-group">
|
||||
<label for="recon_job_name">Job Name</label>
|
||||
<input type="text" id="recon_job_name" name="recon_job_name"
|
||||
placeholder="e.g. daily-fx-recon"
|
||||
value="{{ recon_job_name or '' }}">
|
||||
</div>
|
||||
<div class="filter-group">
|
||||
<label for="as_at_date">As-at Date</label>
|
||||
<input type="date" id="as_at_date" name="as_at_date"
|
||||
value="{{ as_at_date or '' }}">
|
||||
</div>
|
||||
<div class="filter-actions">
|
||||
<button type="submit" class="btn btn-primary">Apply</button>
|
||||
<a href="?" class="btn btn-secondary">Clear</a>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
(function () {
|
||||
var params = new URLSearchParams(window.location.search);
|
||||
["recon_job_name", "as_at_date"].forEach(function (key) {
|
||||
var val = params.get(key);
|
||||
if (val) {
|
||||
var el = document.getElementById(key);
|
||||
if (el) el.value = val;
|
||||
}
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
|
||||
{% if results | length > 0 %}
|
||||
<div class="table-scroll">
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -31,6 +65,30 @@
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{# ── Pagination ─────────────────────────────────────────── #}
|
||||
{# Build filter params string only for values that are set #}
|
||||
{% set filter_qs %}{% if recon_job_name %}&recon_job_name={{ recon_job_name }}{% endif %}{% if as_at_date %}&as_at_date={{ as_at_date }}{% endif %}{% endset %}
|
||||
<div class="pagination">
|
||||
{% if prev_cursor %}
|
||||
<a class="btn btn-secondary"
|
||||
href="?cursor={{ prev_cursor }}{{ filter_qs }}">
|
||||
← Previous
|
||||
</a>
|
||||
{% else %}
|
||||
<span class="btn btn-secondary btn-disabled">← Previous</span>
|
||||
{% endif %}
|
||||
|
||||
{% if next_cursor %}
|
||||
<a class="btn btn-secondary"
|
||||
href="?cursor={{ next_cursor }}{{ filter_qs }}">
|
||||
Next →
|
||||
</a>
|
||||
{% else %}
|
||||
<span class="btn btn-secondary btn-disabled">Next →</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
+95
-2
@@ -108,12 +108,14 @@ footer {
|
||||
}
|
||||
|
||||
/* ── Data table ─────────────────────────────────────────── */
|
||||
.table-scroll {
|
||||
overflow-x: auto;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.data-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 14px;
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
.data-table thead {
|
||||
@@ -165,3 +167,94 @@ footer {
|
||||
.badge-pending { background: rgba(234,179,8,0.15); color: #facc15; }
|
||||
.badge-none { background: rgba(100,116,139,0.15); color: #94a3b8; }
|
||||
.badge-flag { background: rgba(249,115,22,0.15); color: #fb923c; }
|
||||
|
||||
/* ── Filter bar ─────────────────────────────────────────── */
|
||||
.filter-bar {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-end;
|
||||
gap: 16px;
|
||||
margin-bottom: 24px;
|
||||
padding: 18px 20px;
|
||||
background: rgba(255, 255, 255, 0.04);
|
||||
border: 1px solid #2d2d3a;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.filter-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
.filter-group label {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.07em;
|
||||
color: #94a3b8;
|
||||
}
|
||||
.filter-group input {
|
||||
background: #0f1117;
|
||||
border: 1px solid #2d2d3a;
|
||||
border-radius: 6px;
|
||||
color: #e2e8f0;
|
||||
font-size: 14px;
|
||||
padding: 8px 12px;
|
||||
min-width: 200px;
|
||||
transition: border-color 0.15s ease;
|
||||
}
|
||||
.filter-group input:focus {
|
||||
outline: none;
|
||||
border-color: #6366f1;
|
||||
}
|
||||
.filter-group input[type="date"]::-webkit-calendar-picker-indicator {
|
||||
filter: invert(0.6);
|
||||
cursor: pointer;
|
||||
}
|
||||
.filter-actions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
/* ── Buttons ────────────────────────────────────────────── */
|
||||
.btn {
|
||||
display: inline-block;
|
||||
padding: 8px 18px;
|
||||
border-radius: 6px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.03em;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
border: none;
|
||||
transition: opacity 0.15s ease, background 0.15s ease;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.btn-primary {
|
||||
background: #6366f1;
|
||||
color: #fff;
|
||||
}
|
||||
.btn-primary:hover {
|
||||
background: #4f46e5;
|
||||
}
|
||||
.btn-secondary {
|
||||
background: rgba(255, 255, 255, 0.07);
|
||||
color: #cbd5e1;
|
||||
border: 1px solid #2d2d3a;
|
||||
}
|
||||
.btn-secondary:hover:not(.btn-disabled) {
|
||||
background: rgba(255, 255, 255, 0.13);
|
||||
}
|
||||
.btn-disabled {
|
||||
opacity: 0.35;
|
||||
cursor: default;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* ── Pagination ─────────────────────────────────────────── */
|
||||
.pagination {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
justify-content: flex-end;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user