fix(ui): flat progress bar on status page, format created-time
This commit is contained in:
1 parent
7b19b5b41a
commit
47ffede485
2 files changed
+8
-2
No files matched your search
+1
-1
@@ -594,7 +594,7 @@ main {
|
|||||||
|
|
||||||
.progress-fill {
|
.progress-fill {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: linear-gradient(90deg, var(--color-primary-500), var(--color-primary-400));
|
background: var(--color-primary-500);
|
||||||
border-radius: var(--radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
transition: width 0.4s ease;
|
transition: width 0.4s ease;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<span class="status-badge badge badge-{{ 'info' if job.status.name == 'RUNNING' else 'warning' if job.status.name == 'PENDING' else 'success' if job.status.name == 'COMPLETED' else 'error' if job.status.name == 'FAILED' else 'neutral' }}" id="status-badge">
|
<span class="status-badge badge badge-{{ 'info' if job.status.name == 'RUNNING' else 'warning' if job.status.name == 'PENDING' else 'success' if job.status.name == 'COMPLETED' else 'error' if job.status.name == 'FAILED' else 'neutral' }}" id="status-badge">
|
||||||
{{ job.status.name }}
|
{{ job.status.name }}
|
||||||
</span>
|
</span>
|
||||||
<span class="status-time" id="created-time">{{ job.created_at | int }}</span>
|
<time class="status-time" id="created-time" datetime="{{ job.created_at }}">{{ job.created_at | int }}</time>
|
||||||
</div>
|
</div>
|
||||||
<h2 class="job-id" id="job-title">Job {{ job.job_id[:8] }}...</h2>
|
<h2 class="job-id" id="job-title">Job {{ job.job_id[:8] }}...</h2>
|
||||||
</div>
|
</div>
|
||||||
@@ -98,6 +98,12 @@
|
|||||||
<script src="{{ url_for('static', filename='app.js') }}"></script>
|
<script src="{{ url_for('static', filename='app.js') }}"></script>
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
var el = document.getElementById('created-time');
|
||||||
|
if (el) {
|
||||||
|
var ts = parseInt(el.getAttribute('datetime'), 10) * 1000;
|
||||||
|
var d = new Date(ts);
|
||||||
|
el.textContent = d.toLocaleString('en-US', { month: 'short', day: 'numeric', year: 'numeric', hour: 'numeric', minute: '2-digit', hour12: true });
|
||||||
|
}
|
||||||
if (typeof initStatusPage === 'function') {
|
if (typeof initStatusPage === 'function') {
|
||||||
initStatusPage('{{ job.job_id }}', '{{ job.status.name }}');
|
initStatusPage('{{ job.job_id }}', '{{ job.status.name }}');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user