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

chore(ui): upgrade UI node dependencies #195

Merged
merged 5 commits into from
Nov 14, 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
2 changes: 1 addition & 1 deletion ui/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18 AS build
FROM node:20 AS build
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
Expand Down
2 changes: 1 addition & 1 deletion ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Web UI for [Burrito](https://github.com/padok-team/burrito).

1. Install [NodeJS](https://nodejs.org/en/download/) and [Yarn](https://yarnpkg.com).
2. Run `yarn install` to install local prerequisites.
3. Run `yarn start` to launch the dev UI server.
3. Run `yarn dev` to launch the dev UI server.
4. Run `yarn build` to bundle static resources into the `./dist` directory.

## Build Docker production image
Expand Down
4 changes: 2 additions & 2 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/react-query": "^4.36.1",
"@tanstack/react-query": "^5.8.3",
"@tanstack/react-table": "^8.10.7",
"axios": "^1.5.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.16.0",
"react-tooltip": "^5.21.6",
"tailwind-merge": "^1.14.0"
"tailwind-merge": "^2.0.0"
},
"devDependencies": {
"@types/react": "^18.2.15",
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/cards/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ const Card: React.FC<CardProps> = ({
))}
</div>
<Tooltip
className="!opacity-100"
opacity={1}
id="card-tooltip"
variant={variant === "light" ? "dark" : "light"}
/>
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/tables/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ const Table: React.FC<TableProps> = ({
</tbody>
</table>
<Tooltip
className="!opacity-100"
opacity={1}
id="table-tooltip"
variant={variant === "light" ? "dark" : "light"}
/>
Expand Down
4 changes: 3 additions & 1 deletion ui/src/pages/layers/Layers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ const Layers: React.FC = () => {
const [repositoryFilter, setRepositoryFilter] = useState<string[]>([]);
const [hidePRFilter, setHidePRFilter] = useState<boolean>(true);

const layersQuery = useQuery(reactQueryKeys.layers, fetchLayers, {
const layersQuery = useQuery({
queryKey: reactQueryKeys.layers,
queryFn: fetchLayers,
select: (data) => ({
...data,
results: data.results
Expand Down
22 changes: 10 additions & 12 deletions ui/src/pages/layers/components/RepositoryDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,16 @@ const RepositoryDropdown: React.FC<RepositoryDropdownProps> = ({
}) => {
const [search, setSearch] = useState<string>("");

const repositoriesQuery = useQuery(
reactQueryKeys.repositories,
fetchRepositories,
{
select: (data) => ({
...data,
results: data.results.filter((r) =>
r.name.toLowerCase().includes(search.toLowerCase())
),
}),
}
);
const repositoriesQuery = useQuery({
queryKey: reactQueryKeys.repositories,
queryFn: fetchRepositories,
select: (data) => ({
...data,
results: data.results.filter((r) =>
r.name.toLowerCase().includes(search.toLowerCase())
),
}),
});

const handleChange = (
e: React.ChangeEvent<HTMLInputElement>,
Expand Down
450 changes: 229 additions & 221 deletions ui/yarn.lock

Large diffs are not rendered by default.