Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging Hotfix/Pilot Demo Feedback Changes #202

Merged
merged 40 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
48551d6
repaired monaco instance and implementations. expanded validation sys…
siddheshraze Dec 2, 2024
5897859
removing console logging statements. streaming input system implement…
siddheshraze Dec 3, 2024
91857ff
partially complete. structure rework of the connection manager to use…
siddheshraze Dec 6, 2024
b1710d1
forgot to add msv reloads after upload, etc.
siddheshraze Dec 6, 2024
d737d06
remaining minor issues resolved
siddheshraze Dec 6, 2024
5f77644
post-review tinkering
siddheshraze Dec 6, 2024
224d8b6
beginning hotfix application based on user feedback from pilot demons…
siddheshraze Dec 9, 2024
c34b229
next round of hotfixes. see github issue updates for more info
siddheshraze Dec 11, 2024
6b7b5de
adding information about form headers to the upload system and multil…
siddheshraze Dec 13, 2024
e384701
form explanation system implemented. standardized via central compone…
siddheshraze Dec 13, 2024
8d176a3
removing species autocorrection. required headers have been added to …
siddheshraze Dec 13, 2024
531db00
completing refit to standardize units information in plots and remove…
siddheshraze Dec 17, 2024
e00eeca
baseline review changes column added. additional enhancements pending…
siddheshraze Dec 17, 2024
9f79cf6
adding paginationModel dependency to the validation status column ren…
siddheshraze Dec 17, 2024
4b26b6e
integrated dedicated view reset button for manual control. fixed depe…
siddheshraze Dec 18, 2024
7643185
fixing conversion error
siddheshraze Dec 19, 2024
f2a6d6a
fixing filtration system as it's ported to the form downloading syste…
siddheshraze Dec 19, 2024
f9223f0
correcting postvalidation queries
siddheshraze Dec 20, 2024
5358ec8
trigger updates
siddheshraze Dec 22, 2024
1b753ab
Merge branch 'development-hotfixes' into development-streamingupload
siddheshraze Dec 22, 2024
7bc4fce
saving changes and merging in hotfix updates. streaming upload system…
siddheshraze Dec 23, 2024
f53217b
structural updates to try and curtail the ongoing error occurring whe…
siddheshraze Dec 23, 2024
40d80fb
streaming upload seems to be working correctly for the time being. wi…
siddheshraze Dec 24, 2024
173a921
first-round implementation of the personnelrole multiline grid input …
siddheshraze Dec 26, 2024
62f11be
autocomplete and auto-update system for personnel complete. using man…
siddheshraze Dec 27, 2024
1346aad
table explanations added.
siddheshraze Dec 28, 2024
05c76b5
adding reformatting to form explanations too
siddheshraze Dec 28, 2024
806f1db
adding baseline filtration system back in
siddheshraze Dec 28, 2024
e2bcd98
plot editing function added & tested. correctly updates and triggers …
siddheshraze Jan 2, 2025
fd7c301
removing buggy behavior from sidebar
siddheshraze Jan 2, 2025
370f827
species limits interaction system re-implemented, tested, and fleshed…
siddheshraze Jan 3, 2025
586eabc
revision and restructuring of the SQL connection management system. A…
siddheshraze Jan 6, 2025
9c275d1
removing deprecated code from poolmonitor
siddheshraze Jan 6, 2025
c95d3b9
minor changes to system. saving changes before attempting (again) the…
siddheshraze Jan 6, 2025
1729fc3
incremental change. changed onClick in plot edit open button to onMou…
siddheshraze Jan 8, 2025
915bc7d
revision of poolmonitoring system to rely fully on server polling ins…
siddheshraze Jan 9, 2025
181fb9f
removing broken TOC reference
siddheshraze Jan 9, 2025
6bf9a7a
reworking upload implementation to try and fix the sqlload bug that k…
siddheshraze Jan 9, 2025
6fb4c06
trying to figure out why the file streamed upload is still causing pr…
siddheshraze Jan 14, 2025
8538a79
figured out why the row count wasn't working, accidentally committing…
siddheshraze Jan 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions frontend/app/(hub)/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ export default function DashboardPage() {
Object.entries(changelog.oldRowState).map(([key, value]) => (
<Stack direction={'row'} key={key}>
<Typography level={'body-md'}>
<strong>{key}</strong>: {value ?? 'NULL'}
<strong>{JSON.stringify(key)}</strong>: {JSON.stringify(value) ?? 'NULL'}
</Typography>
</Stack>
))
Expand All @@ -274,7 +274,7 @@ export default function DashboardPage() {
Object.entries(changelog.newRowState).map(([key, value]) => (
<Stack direction={'row'} key={key}>
<Typography level={'body-md'}>
<strong>{key}</strong>: {value ?? 'NULL'}
<strong>{JSON.stringify(key)}</strong>: {JSON.stringify(value) ?? 'NULL'}
</Typography>
</Stack>
))
Expand Down
9 changes: 8 additions & 1 deletion frontend/app/(hub)/fixeddatainput/alltaxonomies/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import RenderGridExplanations from '@/components/client/rendergridexplanations';
import IsolatedAllTaxonomiesViewDataGrid from '@/components/datagrids/applications/isolated/isolatedalltaxonomiesdatagrid';
import { DatagridType } from '@/config/macros/formdetails';

export default function AllTaxonomiesPage() {
return <IsolatedAllTaxonomiesViewDataGrid />;
return (
<>
<RenderGridExplanations datagridType={DatagridType.alltaxonomiesview} />
<IsolatedAllTaxonomiesViewDataGrid />
</>
);
}
9 changes: 8 additions & 1 deletion frontend/app/(hub)/fixeddatainput/attributes/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import RenderGridExplanations from '@/components/client/rendergridexplanations';
import IsolatedAttributesDataGrid from '@/components/datagrids/applications/isolated/isolatedattributesdatagrid';
import { DatagridType } from '@/config/macros/formdetails';

export default function AttributesPage() {
return <IsolatedAttributesDataGrid />;
return (
<>
<RenderGridExplanations datagridType={DatagridType.attributes} />
<IsolatedAttributesDataGrid />
</>
);
}
9 changes: 8 additions & 1 deletion frontend/app/(hub)/fixeddatainput/personnel/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import IsolatedPersonnelDataGrid from '@/components/datagrids/applications/isolated/isolatedpersonneldatagrid';
import { DatagridType } from '@/config/macros/formdetails';
import RenderGridExplanations from '@/components/client/rendergridexplanations';

export default function PersonnelPage() {
return <IsolatedPersonnelDataGrid />;
return (
<>
<RenderGridExplanations datagridType={DatagridType.personnel} />
<IsolatedPersonnelDataGrid />
</>
);
}
9 changes: 8 additions & 1 deletion frontend/app/(hub)/fixeddatainput/quadrats/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import RenderGridExplanations from '@/components/client/rendergridexplanations';
import IsolatedQuadratsDataGrid from '@/components/datagrids/applications/isolated/isolatedquadratsdatagrid';
import { DatagridType } from '@/config/macros/formdetails';

export default function QuadratsPage() {
return <IsolatedQuadratsDataGrid />;
return (
<>
<RenderGridExplanations datagridType={DatagridType.quadrats} />
<IsolatedQuadratsDataGrid />
</>
);
}
72 changes: 52 additions & 20 deletions frontend/app/(hub)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@ import { title } from '@/config/primitives';
import { useSession } from 'next-auth/react';
import { redirect, usePathname } from 'next/navigation';
import dynamic from 'next/dynamic';
import { Box, IconButton, Stack, Typography } from '@mui/joy';
import { Box, IconButton, Stack, Typography, useTheme } from '@mui/joy';
import Divider from '@mui/joy/Divider';
import { useLoading } from '@/app/contexts/loadingprovider';
import { useOrgCensusContext, usePlotContext, useSiteContext } from '@/app/contexts/userselectionprovider';
import {
useOrgCensusContext,
useOrgCensusDispatch,
usePlotContext,
usePlotDispatch,
useSiteContext,
useSiteDispatch
} from '@/app/contexts/userselectionprovider';
import { useOrgCensusListDispatch, usePlotListDispatch, useQuadratListDispatch, useSiteListDispatch } from '@/app/contexts/listselectionprovider';
import { getEndpointHeaderName, siteConfig } from '@/config/macros/siteconfigs';
import GithubFeedbackModal from '@/components/client/githubfeedbackmodal';
Expand Down Expand Up @@ -49,6 +56,9 @@ export default function HubLayout({ children }: { children: React.ReactNode }) {
const currentSite = useSiteContext();
const currentPlot = usePlotContext();
const currentCensus = useOrgCensusContext();
const siteDispatch = useSiteDispatch();
const plotDispatch = usePlotDispatch();
const censusDispatch = useOrgCensusDispatch();
const { data: session } = useSession();
const previousSiteRef = useRef<string | undefined>(undefined);
const previousPlotRef = useRef<number | undefined>(undefined);
Expand Down Expand Up @@ -205,16 +215,37 @@ export default function HubLayout({ children }: { children: React.ReactNode }) {

// Handle manual reset logic
useEffect(() => {
async function clearContexts() {
if (currentSite) {
if (siteDispatch) await siteDispatch({ site: undefined });
}
if (currentPlot) {
if (plotDispatch) await plotDispatch({ plot: undefined });
}
if (currentCensus) {
if (censusDispatch) await censusDispatch({ census: undefined });
}
}

if (manualReset) {
setLoading(true, 'Manual refresh beginning...');

// Reset all loading states
setSiteListLoaded(false);
setPlotListLoaded(false);
setCensusListLoaded(false);
setQuadratListLoaded(false);

setManualReset(false);
clearContexts()
.then(() => {
setSiteListLoaded(false);
})
.then(() => {
setPlotListLoaded(false);
})
.then(() => {
setCensusListLoaded(false);
})
.then(() => {
setQuadratListLoaded(false);
})
.finally(() => {
setManualReset(false);
});
}
}, [manualReset]);

Expand Down Expand Up @@ -287,6 +318,8 @@ export default function HubLayout({ children }: { children: React.ReactNode }) {
}
}, [session]);

const theme = useTheme();

return (
<>
<Box
Expand Down Expand Up @@ -377,16 +410,8 @@ export default function HubLayout({ children }: { children: React.ReactNode }) {
justifyContent: 'center'
}}
>
{/*{siteConfig.name}*/}
<AcaciaVersionTypography>{siteConfig.name}</AcaciaVersionTypography>
</Typography>
{/*<Stack direction="row" sx={{ alignItems: 'center', justifyContent: 'center' }}>*/}
{/* <Tooltip title="Version" variant="solid" placement="top" arrow sx={{ pointerEvents: 'none' }}>*/}
{/* <Box sx={{ display: 'inline-block', verticalAlign: 'middle' }}>*/}
{/* <AcaciaVersionTypography>{siteConfig.version}</AcaciaVersionTypography>*/}
{/* </Box>*/}
{/* </Tooltip>*/}
{/*</Stack>*/}
</Stack>
<IconButton
onClick={() => setIsFeedbackModalOpen(true)}
Expand All @@ -396,10 +421,17 @@ export default function HubLayout({ children }: { children: React.ReactNode }) {
bottom: 20,
right: 20,
zIndex: 2000,
bgcolor: 'primary.main',
color: 'white',
backgroundColor: 'transparent', // Remove background color
boxShadow: 'none', // Remove shadow if present
color: theme.vars.palette.primary.solidColor, // Text/icon color
opacity: 0.5, // Initial opacity
transition: 'opacity 0.3s ease',
'&:hover': {
bgcolor: 'primary.dark'
opacity: 1,
backgroundColor: 'transparent' // Ensure no hover background
},
'&:focus-visible': {
outline: `2px solid ${theme.vars.palette.primary.solidColor}` // Add focus ring for accessibility if needed
}
}}
>
Expand Down
25 changes: 24 additions & 1 deletion frontend/app/(hub)/measurementshub/postvalidation/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { useOrgCensusContext, usePlotContext, useSiteContext } from '@/app/conte
import React, { useEffect, useState } from 'react';
import { Box, Button, Checkbox, Table, Typography, useTheme } from '@mui/joy';
import { PostValidationQueriesRDS } from '@/config/sqlrdsdefinitions/validations';
import PostValidationRow from '@/components/client/postvalidationrow';
import { Paper, TableBody, TableCell, TableContainer, TableHead, TableRow } from '@mui/material';
import { Done } from '@mui/icons-material';
import { useLoading } from '@/app/contexts/loadingprovider';
import dynamic from 'next/dynamic';

export default function PostValidationPage() {
const currentSite = useSiteContext();
Expand All @@ -17,13 +17,16 @@ export default function PostValidationPage() {
const [expandedQuery, setExpandedQuery] = useState<number | null>(null);
const [expandedResults, setExpandedResults] = useState<number | null>(null);
const [selectedResults, setSelectedResults] = useState<PostValidationQueriesRDS[]>([]);
const [schemaDetails, setSchemaDetails] = useState<{ table_name: string; column_name: string }[]>([]);
const replacements = {
schema: currentSite?.schemaName,
currentPlotID: currentPlot?.plotID,
currentCensusID: currentCensus?.dateRanges[0].censusID
};
const { setLoading } = useLoading();

const PostValidationRow = dynamic(() => import('@/components/client/postvalidationrow'), { ssr: false });

const enabledPostValidations = postValidations.filter(query => query.isEnabled);
const disabledPostValidations = postValidations.filter(query => !query.isEnabled);

Expand Down Expand Up @@ -86,6 +89,24 @@ export default function PostValidationPage() {
.then(() => setLoading(false));
}, []);

useEffect(() => {
const fetchSchema = async () => {
try {
const response = await fetch(`/api/structure/${currentSite?.schemaName ?? ''}`);
const data = await response.json();
if (data.schema) {
setSchemaDetails(data.schema);
}
} catch (error) {
console.error('Error fetching schema:', error);
}
};

if (postValidations.length > 0) {
fetchSchema().then(r => console.warn(r));
}
}, [postValidations]);

const handleExpandClick = (queryID: number) => {
setExpandedQuery(expandedQuery === queryID ? null : queryID);
};
Expand Down Expand Up @@ -218,6 +239,7 @@ export default function PostValidationPage() {
handleExpandClick={handleExpandClick}
handleExpandResultsClick={handleExpandResultsClick}
handleSelectResult={handleSelectResult}
schemaDetails={schemaDetails}
/>
))}

Expand All @@ -233,6 +255,7 @@ export default function PostValidationPage() {
handleExpandClick={handleExpandClick}
handleExpandResultsClick={handleExpandResultsClick}
handleSelectResult={handleSelectResult}
schemaDetails={schemaDetails}
/>
))}
</TableBody>
Expand Down
14 changes: 14 additions & 0 deletions frontend/app/(hub)/measurementshub/recentchanges/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'use client';

import RenderGridExplanations from '@/components/client/rendergridexplanations';
import IsolatedUnifiedChangelogDataGrid from '@/components/datagrids/applications/isolated/isolatedunifiedchangelogdatagrid';
import { DatagridType } from '@/config/macros/formdetails';

export default function RecentChangesPage() {
return (
<>
<RenderGridExplanations datagridType={DatagridType.unifiedchangelog} />
<IsolatedUnifiedChangelogDataGrid />
</>
);
}
9 changes: 8 additions & 1 deletion frontend/app/(hub)/measurementshub/summary/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import RenderGridExplanations from '@/components/client/rendergridexplanations';
import MeasurementsSummaryViewDataGrid from '@/components/datagrids/applications/msvdatagrid';
import { DatagridType } from '@/config/macros/formdetails';

export default function SummaryPage() {
return <MeasurementsSummaryViewDataGrid />;
return (
<>
<RenderGridExplanations datagridType={DatagridType.measurementssummaryview} />
<MeasurementsSummaryViewDataGrid />
</>
);
}
Loading
Loading