Skip to content

Commit 3346a84

Browse files
authored
feat(settings): Add number of users to deletion warning (#5862)
- Added number of users to the provider deletion form (will only be displayed if the number of users is > 0) - Updated the openapi client and fixed some import issues caused by the openapi spec Resolves [MAASENG-5644](https://warthogs.atlassian.net/browse/MAASENG-5644?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ)
1 parent b618cdc commit 3346a84

File tree

10 files changed

+1597
-422
lines changed

10 files changed

+1597
-422
lines changed

src/app/api/query/imageSources.ts

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,64 +6,64 @@ import {
66
queryOptionsWithHeaders,
77
} from "@/app/api/utils";
88
import type {
9-
GetBootSourceData,
10-
GetBootSourceErrors,
11-
GetBootSourceResponses,
12-
ListBootSourcesData,
13-
ListBootSourcesErrors,
14-
ListBootSourcesResponses,
9+
GetBootsourceData,
10+
GetBootsourceErrors,
11+
GetBootsourceResponses,
12+
ListBootsourcesData,
13+
ListBootsourcesErrors,
14+
ListBootsourcesResponses,
1515
Options,
16-
UpdateBootSourceData,
17-
UpdateBootSourceErrors,
18-
UpdateBootSourceResponses,
16+
UpdateBootsourceData,
17+
UpdateBootsourceErrors,
18+
UpdateBootsourceResponses,
1919
} from "@/app/apiclient";
2020
import {
21-
updateBootSource,
22-
getBootSource,
23-
listBootSources,
21+
updateBootsource,
22+
getBootsource,
23+
listBootsources,
2424
} from "@/app/apiclient";
2525
import {
26-
getBootSourceQueryKey,
27-
listBootSourcesQueryKey,
26+
getBootsourceQueryKey,
27+
listBootsourcesQueryKey,
2828
} from "@/app/apiclient/@tanstack/react-query.gen";
2929

30-
export const useImageSources = (options?: Options<ListBootSourcesData>) => {
30+
export const useImageSources = (options?: Options<ListBootsourcesData>) => {
3131
return useWebsocketAwareQuery(
3232
queryOptionsWithHeaders<
33-
ListBootSourcesResponses,
34-
ListBootSourcesErrors,
35-
ListBootSourcesData
36-
>(options, listBootSources, listBootSourcesQueryKey(options))
33+
ListBootsourcesResponses,
34+
ListBootsourcesErrors,
35+
ListBootsourcesData
36+
>(options, listBootsources, listBootsourcesQueryKey(options))
3737
);
3838
};
3939

4040
export const useGetImageSource = (
41-
options: Options<GetBootSourceData>,
41+
options: Options<GetBootsourceData>,
4242
enabled: boolean
4343
) => {
4444
return useWebsocketAwareQuery({
4545
...queryOptionsWithHeaders<
46-
GetBootSourceResponses,
47-
GetBootSourceErrors,
48-
GetBootSourceData
49-
>(options, getBootSource, getBootSourceQueryKey(options)),
46+
GetBootsourceResponses,
47+
GetBootsourceErrors,
48+
GetBootsourceData
49+
>(options, getBootsource, getBootsourceQueryKey(options)),
5050
enabled,
5151
});
5252
};
5353

5454
export const useUpdateImageSource = (
55-
mutationOptions?: Options<UpdateBootSourceData>
55+
mutationOptions?: Options<UpdateBootsourceData>
5656
) => {
5757
const queryClient = useQueryClient();
5858
return useMutation({
5959
...mutationOptionsWithHeaders<
60-
UpdateBootSourceResponses,
61-
UpdateBootSourceErrors,
62-
UpdateBootSourceData
63-
>(mutationOptions, updateBootSource),
60+
UpdateBootsourceResponses,
61+
UpdateBootsourceErrors,
62+
UpdateBootsourceData
63+
>(mutationOptions, updateBootsource),
6464
onSuccess: () => {
6565
return queryClient.invalidateQueries({
66-
queryKey: listBootSourcesQueryKey(),
66+
queryKey: listBootsourcesQueryKey(),
6767
});
6868
},
6969
});

0 commit comments

Comments
 (0)