update chức năng ndvi time seriese
This commit is contained in:
+32
-23
@@ -427,28 +427,12 @@
|
||||
</div>
|
||||
|
||||
<!-- Navigation Tabs -->
|
||||
<div class="nav-tabs">
|
||||
<button class="nav-tab active" onclick="switchTab('home')">
|
||||
🏠 Trang Chủ
|
||||
</button>
|
||||
<button class="nav-tab" onclick="switchTab('train')">
|
||||
🎓 Training
|
||||
</button>
|
||||
<button class="nav-tab" onclick="switchTab('predict')">
|
||||
🗺️ Prediction
|
||||
</button>
|
||||
<button class="nav-tab" onclick="switchTab('dashboard')">
|
||||
📊 Dashboard
|
||||
</button>
|
||||
<button class="nav-tab" onclick="switchTab('models')">
|
||||
🤖 Models
|
||||
</button>
|
||||
<button class="nav-tab" onclick="switchTab('reports')">
|
||||
📄 Reports
|
||||
</button>
|
||||
<button class="nav-tab" onclick="switchTab('batch')">
|
||||
🔄 Batch Processing
|
||||
</button>
|
||||
<div style="background: white; padding: 15px; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; border-bottom: 2px solid #e0e0e0;">
|
||||
<a href="/" style="padding: 10px 20px; background: #667eea; color: white; border-radius: 8px; text-decoration: none; font-weight: 600;">🏠 Trang Chủ (Active)</a>
|
||||
<a href="/training" style="padding: 10px 20px; background: #f093fb; color: white; border-radius: 8px; text-decoration: none; font-weight: 600;">🎓 Training</a>
|
||||
<a href="/prediction" style="padding: 10px 20px; background: #4facfe; color: white; border-radius: 8px; text-decoration: none; font-weight: 600;">🗺️ Prediction</a>
|
||||
<a href="/batch" style="padding: 10px 20px; background: #764ba2; color: white; border-radius: 8px; text-decoration: none; font-weight: 600;">🚀 Batch Processing</a>
|
||||
<a href="/ndvi" style="padding: 10px 20px; background: #2ecc71; color: white; border-radius: 8px; text-decoration: none; font-weight: 600;">🌿 NDVI Analysis</a>
|
||||
</div>
|
||||
|
||||
<!-- Tab Content: Home -->
|
||||
@@ -810,8 +794,30 @@
|
||||
const row = document.createElement('tr');
|
||||
const typeIcon = report.type === 'training' ? '🎓' : '🗺️';
|
||||
|
||||
// Check if this is a batch job
|
||||
const isBatchJob = report.is_batch_job;
|
||||
const batchInfo = report.batch_metadata;
|
||||
|
||||
let batchLabel = '';
|
||||
if (isBatchJob && batchInfo) {
|
||||
const timestamp = batchInfo.batch_timestamp ?
|
||||
new Date(batchInfo.batch_timestamp).toLocaleString('vi-VN') :
|
||||
'N/A';
|
||||
batchLabel = `
|
||||
<div style="background: #fff3cd; padding: 5px 8px; border-radius: 4px; margin-top: 5px; font-size: 0.85em;">
|
||||
<strong>🚀 Batch:</strong> ${batchInfo.batch_name || 'N/A'} |
|
||||
<strong>ID:</strong> ${batchInfo.batch_job_id || 'N/A'}<br>
|
||||
<strong>Thời gian:</strong> ${timestamp}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
row.innerHTML = `
|
||||
<td><strong>${report.filename}</strong></td>
|
||||
<td>
|
||||
<strong>${report.filename}</strong>
|
||||
${isBatchJob ? '<span style="background: #ffc107; color: white; padding: 2px 6px; border-radius: 3px; font-size: 0.75em; margin-left: 5px;">BATCH</span>' : ''}
|
||||
${batchLabel}
|
||||
</td>
|
||||
<td>${typeIcon} ${report.type}</td>
|
||||
<td>${new Date(report.created).toLocaleString('vi-VN')}</td>
|
||||
<td>${report.size_kb} KB</td>
|
||||
@@ -826,6 +832,9 @@
|
||||
</button>
|
||||
</td>
|
||||
`;
|
||||
if (isBatchJob) {
|
||||
row.style.borderLeft = '4px solid #ffc107';
|
||||
}
|
||||
tbody.appendChild(row);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user