diff --git a/src/App.tsx b/src/App.tsx index 8975cdc..cdba256 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -12,7 +12,6 @@ import VectorGetPage from './pages/VectorGetPage' import WelcomePage from './pages/WelcomePage' import TutorialsPage from './pages/TutorialsPage' import BackupsPage from './pages/BackupsPage' -import { APP_VERSION } from './config' import { useTheme } from './useTheme' import { AuthProvider, useAuth } from './context/AuthContext' import { NotificationProvider } from './context/NotificationContext' @@ -146,9 +145,9 @@ function Header() { )} -
+ {/*
v{APP_VERSION} -
+
*/} ) diff --git a/src/pages/BackupsPage.tsx b/src/pages/BackupsPage.tsx index f83b44b..6e0d1d0 100644 --- a/src/pages/BackupsPage.tsx +++ b/src/pages/BackupsPage.tsx @@ -8,6 +8,8 @@ import Notification from '../components/Notification' interface Backup { name: string + original_index: string + timestamp: number } interface ActiveBackup { @@ -89,7 +91,16 @@ export default function BackupsPage() { throw new Error('Failed to fetch backups.') } const data = await response.json() - const backupList = Array.isArray(data) ? data.map((name: string) => ({ name })) : [] + const backupList: Backup[] = Object.entries(data).map(([name, info]) => { + const backupInfo = info as BackupInfo + return { + name, + original_index: backupInfo.original_index, + timestamp: backupInfo.timestamp + } + }) + // Sort by timestamp descending (newest first) + backupList.sort((a, b) => b.timestamp - a.timestamp) setBackups(backupList) setError(null) } catch (err) { @@ -299,8 +310,6 @@ export default function BackupsPage() { month: 'short', day: 'numeric', year: 'numeric', - hour: '2-digit', - minute: '2-digit', }) } @@ -393,6 +402,12 @@ export default function BackupsPage() { Backup Name + + Original Index + + + Created At + Actions @@ -400,12 +415,22 @@ export default function BackupsPage() { {backups.map((backup) => ( - + - openInfoModal(backup.name)} className="text-sm font-medium text-slate-800 dark:text-slate-200 hover:text-blue-600 hover:underline cursor-pointer"> + openInfoModal(backup.name)} className="text-sm font-medium text-slate-800 dark:text-slate-200 hover:text-blue-600 dark:hover:text-blue-400 hover:underline cursor-pointer"> {backup.name} + + + {backup.original_index} + + + + + {formatDateTime(backup.timestamp)} + +
{/* +
+
+ {/* Header */} +
+
+
+

Backup Details

+

{infoBackupName}

+
+ +
-

{infoBackupName}

- {loadingInfo && ( -
Loading...
- )} + {/* Content */} +
+ {loadingInfo && ( +
+
+
+ )} + + {infoError && ( + + )} + + {backupInfo && ( +
+ {/* Primary Info */} +
+
+

Source Index

+

{backupInfo.original_index}

+
+
+

Created

+

{formatDateTime(backupInfo.timestamp)}

+
+
+

Size

+

{backupInfo.size_mb} MB

+
+
- {infoError && ( - - )} + {/* Divider */} +
- {backupInfo && ( -
-
-
-
Original Index
-
{backupInfo.original_index}
-
+ {/* Index Parameters */}
-
Created
-
{formatDateTime(backupInfo.timestamp)}
-
-
-
Size
-
{backupInfo.size_mb} MB
-
-
-
Space Type
-
{backupInfo.params.space_type}
-
-
- -
-
Index Parameters
-
-
- Dimensions - {backupInfo.params.dim} +

Index Configuration

+
+
+ Dimensions + {backupInfo.params.dim} +
+
+ Vectors + {backupInfo.params.total_elements.toLocaleString()} +
+
+ Space Type + {backupInfo.params.space_type} +
+
+ M + {backupInfo.params.M} +
+
+ ef_construction + {backupInfo.params.ef_construction} +
+
+ Quant Level + {backupInfo.params.quant_level} +
+ {backupInfo.params.sparse_dim > 0 && ( +
+ Sparse Dim + {backupInfo.params.sparse_dim} +
+ )}
Vectors @@ -525,16 +587,19 @@ export default function BackupsPage() { )}
-
- )} + )} +
-
- + {/* Footer */} +
+
+ +