Skip to content

Commit

Permalink
fix: yarn up *, fix resulting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
TheChristophe committed Sep 14, 2023
1 parent 92d4238 commit 1e599de
Show file tree
Hide file tree
Showing 7 changed files with 1,545 additions and 1,466 deletions.
8 changes: 4 additions & 4 deletions components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ const Footer: FC = () => (
<div className="text-center">
<ul className="list-unstyled list-inline my-0">
<li className="list-inline-item mx-5">
<Link href="/terms-of-service" passHref>
<a className="text-muted">Terms of service</a>
<Link href="/terms-of-service" className="text-muted">
Terms of service
</Link>
</li>
<li className="list-inline-item mx-5">
<Link href="/privacy-policy" passHref>
<a className="text-muted">Privacy policy</a>
<Link href="/privacy-policy" className="text-muted">
Privacy policy
</Link>
</li>
<li className="list-inline-item mx-5">
Expand Down
50 changes: 25 additions & 25 deletions components/NavHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,24 @@ const NavHeader: FC = () => {
<Navbar.Toggle aria-controls="basic-navbar-nav" className="me-3" />
<Navbar.Collapse id="basic-navbar-nav" className="mx-3">
<Nav className="me-auto ">
<Link href="/search/result" passHref>
<Nav.Link>Search</Nav.Link>
</Link>
<Nav.Link as={Link} href="/search/result">
Search
</Nav.Link>
<NavDropdown title="Submit" id="base-submit-dropdown">
<Link href="/submit/result" passHref>
<NavDropdown.Item>Results</NavDropdown.Item>
</Link>
<Link href="/submit/benchmark" passHref>
<NavDropdown.Item>Benchmarks</NavDropdown.Item>
</Link>
<Link href="/submit/site" passHref>
<NavDropdown.Item>Sites</NavDropdown.Item>
</Link>
<NavDropdown.Item as={Link} href="/submit/result">
Results
</NavDropdown.Item>
<NavDropdown.Item as={Link} href="/submit/benchmark">
Benchmarks
</NavDropdown.Item>
<NavDropdown.Item as={Link} href="/submit/site">
Sites
</NavDropdown.Item>
</NavDropdown>
<NavDropdown title="Instructions" id="base-instructions-dropdown">
<Link href="/code-guidelines" passHref>
<NavDropdown.Item>Code guidelines</NavDropdown.Item>
</Link>
<NavDropdown.Item as={Link} href="/code-guidelines">
Code guidelines
</NavDropdown.Item>
<NavDropdown.Item href="https://perf.readthedocs.io/">
Service Documentation
</NavDropdown.Item>
Expand All @@ -49,20 +49,20 @@ const NavHeader: FC = () => {
</NavDropdown.Item>
<NavDropdown.Item href="/api/v1/">API Reference</NavDropdown.Item>
</NavDropdown>
<Link
<Nav.Link
as={Link}
href="https://appsgrycap.i3m.upv.es:31443/im-dashboard/login"
passHref
>
<Nav.Link>Infrastructure Manager</Nav.Link>
</Link>
Infrastructure Manager
</Nav.Link>
{auth.admin && (
<NavDropdown title="Admin" id="base-admin-dropdown">
<Link href="/report-view" passHref>
<NavDropdown.Item>Report view</NavDropdown.Item>
</Link>
<Link href="/site-editor" passHref>
<NavDropdown.Item>Site editor</NavDropdown.Item>
</Link>
<NavDropdown.Item as={Link} href="/report-view">
Report view
</NavDropdown.Item>
<NavDropdown.Item as={Link} href="/site-editor">
Site editor
</NavDropdown.Item>
</NavDropdown>
)}
</Nav>
Expand Down
2 changes: 1 addition & 1 deletion components/RegistrationCheck.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const RegistrationCheck: FC = () => {
<Row className="align-items-center">
<Col>You must register before submitting data to the services on this website!</Col>
<Col md="auto">
<Link as="a" href="/registration" passHref>
<Link href="/registration" passHref legacyBehavior>
<Button variant="secondary">Register</Button>
</Link>
</Col>
Expand Down
28 changes: 14 additions & 14 deletions lib/useApi.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {
BenchmarksApi,
BenchmarksApiFactory,
Configuration,
FlavorsApi,
ReportsApi,
ResultsApi,
SitesApi,
TagsApi,
UsersApi,
FlavorsApiFactory,
ReportsApiFactory,
ResultsApiFactory,
SitesApiFactory,
TagsApiFactory,
UsersApiFactory,
} from '@eosc-perf/eosc-perf-client';
import getApiRoute from './getApiRoute';
import { useMemo } from 'react';
Expand All @@ -26,13 +26,13 @@ const useApi = (token?: string) =>
accessToken: token,
});
return {
benchmarks: new BenchmarksApi(configuration),
flavors: new FlavorsApi(configuration),
reports: new ReportsApi(configuration),
results: new ResultsApi(configuration),
sites: new SitesApi(configuration),
tags: new TagsApi(configuration),
users: new UsersApi(configuration),
benchmarks: BenchmarksApiFactory(configuration),
flavors: FlavorsApiFactory(configuration),
reports: ReportsApiFactory(configuration),
results: ResultsApiFactory(configuration),
sites: SitesApiFactory(configuration),
tags: TagsApiFactory(configuration),
users: UsersApiFactory(configuration),
};
}, [token]);

Expand Down
66 changes: 33 additions & 33 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,32 @@
"test:coverage": "jest --coverage --watchAll=false --coverageDirectory=coverage --collectCoverageFrom=**/*.{js,jsx,tsx} --verbose "
},
"dependencies": {
"@eosc-perf/eosc-perf-client": "1.0.0-SNAPSHOT.202210201417",
"@eosc-perf/eosc-perf-client": "^1.0.0-SNAPSHOT.202309140158",
"@popperjs/core": "^2.11.7",
"axios": "^0.26.0",
"bootstrap": "^5.3.0",
"chart.js": "^3.9.1",
"axios": "^1.5.0",
"bootstrap": "^5.3.1",
"chart.js": "^4.4.0",
"clsx": "^2.0.0",
"echarts": "^5.4.0",
"echarts": "^5.4.3",
"echarts-for-react": "^3.0.2",
"echarts-stat": "^1.2.0",
"lodash": "^4.17.21",
"next": "^12.1.4",
"next-transpile-modules": "^9.0.0",
"oidc-client-ts": "^2.1.0",
"prismjs": "^1.27.0",
"qs": "^6.10.2",
"next": "^13.4.19",
"next-transpile-modules": "^10.0.1",
"oidc-client-ts": "^2.2.5",
"prismjs": "^1.29.0",
"qs": "^6.11.2",
"react": "^18.2.0",
"react-bootstrap": "^2.8.0",
"react-bootstrap-icons": "^1.8.1",
"react-chartjs-2": "^4.3.1",
"react-datepicker": "^4.5.0",
"react-bootstrap-icons": "^1.10.3",
"react-chartjs-2": "^5.2.0",
"react-datepicker": "^4.17.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.29.0",
"react-oidc-context": "^2.2.0",
"react-query": "^3.34.19",
"sass": "^1.66.1",
"uuid": "^8.3.2"
"react-hook-form": "^7.46.1",
"react-oidc-context": "^2.3.0",
"react-query": "^3.39.3",
"sass": "^1.67.0",
"uuid": "^9.0.1"
},
"devDependencies": {
"@babel/cli": "^7.17.6",
Expand All @@ -65,23 +65,23 @@
"@typescript-eslint/parser": "^5.61.0",
"commit-and-tag-version": "^11.2.3",
"cross-env": "^7.0.3",
"cypress": "^9.5.3",
"eslint": "^8.44.0",
"eslint-config-next": "^13.4.9",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-cypress": "^2.13.3",
"cypress": "^13.2.0",
"eslint": "^8.49.0",
"eslint-config-next": "^13.4.19",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-cypress": "^2.14.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-github": "^4.8.0",
"eslint-plugin-prettier": "^4.0.0",
"jest": "^27.4.5",
"msw": "^0.39.2",
"openapi-typescript-codegen": "^0.20.1",
"prettier": "^2.6.1",
"eslint-plugin-github": "^4.10.0",
"eslint-plugin-prettier": "^5.0.0",
"jest": "^29.7.0",
"msw": "^1.3.1",
"openapi-typescript-codegen": "^0.25.0",
"prettier": "^3.0.3",
"react-test-renderer": "^18.2.0",
"ts-node": "^10.5.0",
"typedoc": "0.23.19",
"typescript": "^5.1.6",
"webpack-bundle-analyzer": "^4.5.0"
"ts-node": "^10.9.1",
"typedoc": "^0.25.1",
"typescript": "^5.2.2",
"webpack-bundle-analyzer": "^4.9.1"
},
"packageManager": "[email protected]"
}
35 changes: 14 additions & 21 deletions pages/search/result.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ const ResultSearch: FC<PageProps> = (props: PageProps) => {
unselectMultiple: function (results: Result[]) {
setSelectedResults(
selectedResults.filter(
(selected) => !results.some((unselected) => unselected.id === selected.id)
)
(selected) => !results.some((unselected) => unselected.id === selected.id),
),
);
},
isSelected: function (result: Result) {
Expand Down Expand Up @@ -307,28 +307,21 @@ const ResultSearch: FC<PageProps> = (props: PageProps) => {
? `+${sorting.key}`
: sorting.mode === SortMode.Descending
? `-${sorting.key}`
: undefined
: undefined,
),
{
select: (response) => response.data,
initialData: props.results
? {
status: 200,
statusText: 'OK',
data: props.results,
headers: {},
config: {},
}
: undefined,
}
keepPreviousData: true,
},
);

const resultData = results.isSuccess ? results.data.data : props.results;

const refreshLocation = (
newBenchmark: Benchmark | undefined,
newSite: Site | undefined,
newFlavor: Flavor | undefined,
columns: string[] | undefined,
newFilters: Map<string, Filter>
newFilters: Map<string, Filter>,
) => {
let query = {};
if (newBenchmark?.id) {
Expand Down Expand Up @@ -564,10 +557,10 @@ const ResultSearch: FC<PageProps> = (props: PageProps) => {
{(results.isLoading ||
results.isFetching ||
results.isRefetching) && <LoadingOverlay />}
{results.isSuccess && results.data.total > 0 && (
{results.isSuccess && results.data.data.total > 0 && (
<ResultTable
results={results.data.items}
pageOffset={results.data.per_page * results.data.page}
results={resultData.items}
pageOffset={resultData.per_page * resultData.page}
ops={resultOps}
suggestions={suggestedFields}
sorting={sorting}
Expand All @@ -576,7 +569,7 @@ const ResultSearch: FC<PageProps> = (props: PageProps) => {
setCustomColumns={updateCustomColumns}
/>
)}
{results.isSuccess && results.data.total === 0 && (
{results.isSuccess && resultData.total === 0 && (
<div className="text-muted m-2">No results found.</div>
)}
{results.isError && 'Error while loading results'}
Expand All @@ -591,7 +584,7 @@ const ResultSearch: FC<PageProps> = (props: PageProps) => {
</Col>
<Col />
<Col sm md="auto">
<Paginator pagination={results.data} navigateTo={setPage} />
<Paginator pagination={resultData} navigateTo={setPage} />
</Col>
</Row>
)}
Expand Down Expand Up @@ -681,7 +674,7 @@ export const getServerSideProps: GetServerSideProps = async (context) => {
: context.query['siteId'] && context.query['flavorId'],
undefined,
[],
undefined
undefined,
)
.then((response) => {
props.results = response.data;
Expand Down
Loading

0 comments on commit 1e599de

Please sign in to comment.