feat(resource): migrate resource-status and resource-history from Jinja2 to Vue 3 + Vite

Rewrite both resource pages (1,697 lines vanilla JS + 3,200 lines Jinja2 templates)
as Vue 3 SFC components. Extract resource-shared/ module with shared CSS, E10 status
constants, and HierarchyTable tree component. History page charts use vue-echarts,
Status page reuses useAutoRefresh composable with 5-minute interval.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
egg
2026-02-09 18:19:32 +08:00
parent a2653b8139
commit 720e190bc6
45 changed files with 5099 additions and 4993 deletions

View File

@@ -63,14 +63,14 @@ class TestTemplateIntegration(unittest.TestCase):
self.assertIn('type="module"', html)
self.assertNotIn('mes-toast-container', html)
def test_resource_page_includes_base_scripts(self):
def test_resource_page_serves_pure_vite_module(self):
response = self.client.get('/resource')
self.assertEqual(response.status_code, 200)
html = response.data.decode('utf-8')
self.assertIn('toast.js', html)
self.assertIn('mes-api.js', html)
self.assertIn('mes-toast-container', html)
self.assertIn('/static/dist/resource-status.js', html)
self.assertIn('type="module"', html)
self.assertNotIn('mes-toast-container', html)
def test_excel_query_page_includes_base_scripts(self):
response = self.client.get('/excel-query')