Clean up, fix file path issues with import scripts, adjust data management page for new metrics calcs
This commit is contained in:
@@ -767,11 +767,11 @@ export function DataManagement() {
|
||||
return new Intl.NumberFormat().format(num);
|
||||
};
|
||||
|
||||
// Update renderTableCountsSection to use skeletons
|
||||
// Update renderTableCountsSection to show new metrics tables
|
||||
const renderTableCountsSection = () => {
|
||||
const renderTableCountsSkeleton = () => (
|
||||
<div>
|
||||
{Array.from({ length: 18 }).map((_, i) => (
|
||||
{Array.from({ length: 11 }).map((_, i) => (
|
||||
<div key={i} className="flex justify-between text-sm items-center py-2 border-b last:border-0">
|
||||
<Skeleton className="h-4 w-[120px]" />
|
||||
<Skeleton className="h-4 w-[60px]" />
|
||||
@@ -801,12 +801,12 @@ export function DataManagement() {
|
||||
);
|
||||
|
||||
return (
|
||||
<Card className="md:col-start-2 md:row-span-2 h-[670px]">
|
||||
<Card className="md:col-start-2 md:row-span-2 h-[550px]">
|
||||
<CardHeader className="pb-3">
|
||||
<CardTitle>Table Record Counts</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
{isLoading ? (
|
||||
{isLoading && !tableCounts ? (
|
||||
<div className="px-2">
|
||||
{renderTableCountsSkeleton()}
|
||||
</div>
|
||||
@@ -820,7 +820,8 @@ export function DataManagement() {
|
||||
) : (
|
||||
<div>
|
||||
<div className="bg-sky-50/50 rounded-t-md px-2">{renderTableGroup('Core Tables', tableCounts?.core || [])}</div>
|
||||
<div className="bg-green-50/50 rounded-b-md px-2">{renderTableGroup('Metrics Tables', tableCounts?.metrics || [])}</div>
|
||||
<div className="bg-green-50/50 px-2">{renderTableGroup('Metrics Tables', tableCounts?.metrics || [])}</div>
|
||||
<div className="bg-amber-50/50 rounded-b-md px-2">{renderTableGroup('Config Tables', tableCounts?.config || [])}</div>
|
||||
</div>
|
||||
)}
|
||||
</CardContent>
|
||||
@@ -952,12 +953,12 @@ export function DataManagement() {
|
||||
|
||||
<div className="grid gap-4 md:grid-cols-2">
|
||||
{/* Table Status */}
|
||||
<div className="space-y-4 flex flex-col h-[670px]">
|
||||
<div className="space-y-4 flex flex-col h-[550px]">
|
||||
<Card className="flex-1">
|
||||
<CardHeader className="pb-3">
|
||||
<CardTitle>Last Import Times</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent className="h-[calc(50%)]">
|
||||
<CardContent className="h-auto">
|
||||
<div className="">
|
||||
{isLoading && !tableStatus.length ? (
|
||||
<div>
|
||||
@@ -999,11 +1000,11 @@ export function DataManagement() {
|
||||
<CardHeader className="pb-3">
|
||||
<CardTitle>Last Calculation Times</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent className="h-[calc(50%)]">
|
||||
<CardContent className="h-auto">
|
||||
<div className="">
|
||||
{isLoading && !moduleStatus.length ? (
|
||||
<div>
|
||||
{Array.from({ length: 7 }).map((_, i) => (
|
||||
{Array.from({ length: 3 }).map((_, i) => (
|
||||
<div key={i} className="flex justify-between text-sm items-center py-2 border-b last:border-0">
|
||||
<Skeleton className="h-4 w-[120px]" />
|
||||
<Skeleton className="h-4 w-[60px]" />
|
||||
|
||||
Reference in New Issue
Block a user