feat: SMW-Importer Frontend (Phase 2 complete)
Phase 2A: API Functions - 5 MediaWiki import functions in api.js - previewMediaWikiImport, executeMediaWikiImport - getMediaWikiImportStatus, listMediaWikiImportLogs - deleteMediaWikiImportReference Phase 2B: UI Component - MediaWikiImportPage.jsx (3-tab interface) - Preview Tab: Category selection, preview with accordions - Execute Tab: Import form with status polling - History Tab: Import log list with refresh Phase 2C: Routing - Added /admin/mediawiki-import route in App.jsx - Import and ProtectedRoute wrapper Issue: SMW-Importer Frontend (Option C from handover) Related: backend/routers/csv_import.py (MediaWiki endpoints)
This commit is contained in:
1 parent
a67cc5f812
commit
46d000d6b3
3 files changed
+561
-1
No files matched your search
@@ -595,7 +595,26 @@ export const api = {
|
||||
|
||||
// System
|
||||
getVersion,
|
||||
healthCheck
|
||||
healthCheck,
|
||||
|
||||
// MediaWiki Import
|
||||
previewMediaWikiImport: (category, importType = 'exercise', limit = 10) =>
|
||||
request(`/api/import/mediawiki/preview?category=${encodeURIComponent(category)}&import_type=${importType}&limit=${limit}`),
|
||||
|
||||
executeMediaWikiImport: (data) =>
|
||||
request('/api/import/mediawiki/execute', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(data)
|
||||
}),
|
||||
|
||||
getMediaWikiImportStatus: (logId) =>
|
||||
request(`/api/import/mediawiki/status/${logId}`),
|
||||
|
||||
listMediaWikiImportLogs: () =>
|
||||
request('/api/import/mediawiki/logs'),
|
||||
|
||||
deleteMediaWikiImportReference: (refId) =>
|
||||
request(`/api/import/mediawiki/references/${refId}`, { method: 'DELETE' })
|
||||
}
|
||||
|
||||
export default api
|
||||
Reference in new issue
Block a user