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

fix: Update LiveViewPage layout and adjust AnalyzerRuns fetch method #1405

Merged
merged 1 commit into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 3 additions & 2 deletions frontend/src/pages/LiveViewPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,18 @@ export function LiveViewPage() {
const { data, loading, error } = useRecentRunsQuery({});
if (loading || error) {
return (
<>
<PageLayout>
<Breadcrumbs aria-label="breadcrumb">
<Link color="inherit" href="/">
Home
</Link>
<Typography color="textPrimary">LiveView</Typography>
</Breadcrumbs>
<LinearProgress sx={{ paddingTop: '5px' }} />
</>
</PageLayout>
);
}
console.log(data);
if (!data?.recentRuns || data.recentRuns.length === 0) {
return (
<PageLayout>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

import io.github.martinwitt.laughing_train.mining.AnalyzerRunGraphQlDto;
import io.quarkus.security.Authenticated;
import java.util.List;
import org.eclipse.microprofile.graphql.GraphQLApi;
import org.eclipse.microprofile.graphql.Mutation;
import org.eclipse.microprofile.graphql.Query;

import java.util.List;

/** This class provides GraphQL endpoints for querying and retrieving analyzer run data. */
@GraphQLApi
public class MiningGraphQL {
Expand Down Expand Up @@ -42,7 +43,7 @@ private List<AnalyzerRunGraphQlDto> constructAnalyzerRunGraphQlDtos(
* @return A list of AnalyzerRunDao objects.
*/
private List<AnalyzerRunDao> fetchAnalyzerRuns(int limit) {
return AnalyzerRunDao.find("ORDER BY localDateTime DESC LIMIT").page(0, limit).list();
return AnalyzerRunDao.find("ORDER BY localDateTime DESC").page(0, limit).list();
}

@Authenticated
Expand Down