Skip to content

Commit 92b7db6

Browse files
committed
Fix missing controller tag
1 parent 09062ef commit 92b7db6

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

contract/src/main/resources/swagger/kafbat-ui-api.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2257,7 +2257,7 @@ paths:
22572257
/auth:
22582258
post:
22592259
tags:
2260-
- ApplicationConfig
2260+
- Unmapped
22612261
summary: Authenticate
22622262
operationId: authenticate
22632263
requestBody:

frontend/src/lib/api.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
AuthorizationApi,
1212
ApplicationConfigApi,
1313
AclsApi,
14+
UnmappedApi,
1415
} from 'generated-sources';
1516
import { BASE_PARAMS } from 'lib/constants';
1617

@@ -27,3 +28,4 @@ export const consumerGroupsApiClient = new ConsumerGroupsApi(apiClientConf);
2728
export const authApiClient = new AuthorizationApi(apiClientConf);
2829
export const appConfigApiClient = new ApplicationConfigApi(apiClientConf);
2930
export const aclApiClient = new AclsApi(apiClientConf);
31+
export const internalApiClient = new UnmappedApi(apiClientConf);

frontend/src/lib/hooks/api/appConfig.ts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
import { appConfigApiClient as api } from 'lib/api';
1+
import {
2+
appConfigApiClient as appConfig,
3+
internalApiClient as internalApi,
4+
} from 'lib/api';
25
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
36
import {
47
ApplicationConfig,
@@ -9,15 +12,15 @@ import { QUERY_REFETCH_OFF_OPTIONS } from 'lib/constants';
912
export function useAuthSettings() {
1013
return useQuery(
1114
['app', 'authSettings'],
12-
() => api.getAuthenticationSettings(),
15+
() => appConfig.getAuthenticationSettings(),
1316
QUERY_REFETCH_OFF_OPTIONS
1417
);
1518
}
1619

1720
export function useAuthenticate() {
1821
return useMutation({
1922
mutationFn: (params: { username: string; password: string }) =>
20-
api.authenticateRaw(params, {
23+
internalApi.authenticateRaw(params, {
2124
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
2225
}),
2326
});
@@ -26,13 +29,13 @@ export function useAuthenticate() {
2629
export function useAppInfo() {
2730
return useQuery(
2831
['app', 'info'],
29-
() => api.getApplicationInfoRaw(),
32+
() => appConfig.getApplicationInfoRaw(),
3033
QUERY_REFETCH_OFF_OPTIONS
3134
);
3235
}
3336

3437
export function useAppConfig() {
35-
return useQuery(['app', 'config'], () => api.getCurrentConfig());
38+
return useQuery(['app', 'config'], () => appConfig.getCurrentConfig());
3639
}
3740

3841
function aggregateClusters(
@@ -64,7 +67,7 @@ export function useUpdateAppConfig({
6467
const client = useQueryClient();
6568
return useMutation(
6669
async (cluster: ApplicationConfigPropertiesKafkaClusters) => {
67-
const existingConfig = await api.getCurrentConfig();
70+
const existingConfig = await appConfig.getCurrentConfig();
6871

6972
const clusters = aggregateClusters(
7073
cluster,
@@ -80,7 +83,7 @@ export function useUpdateAppConfig({
8083
kafka: { clusters },
8184
},
8285
};
83-
return api.restartWithConfig({ restartRequest: { config } });
86+
return appConfig.restartWithConfig({ restartRequest: { config } });
8487
},
8588
{
8689
onSuccess: () => client.invalidateQueries(['app', 'config']),
@@ -99,7 +102,7 @@ export function useAppConfigFilesUpload() {
99102

100103
export function useValidateAppConfig() {
101104
return useMutation((config: ApplicationConfigPropertiesKafkaClusters) =>
102-
api.validateConfig({
105+
appConfig.validateConfig({
103106
applicationConfig: { properties: { kafka: { clusters: [config] } } },
104107
})
105108
);

0 commit comments

Comments
 (0)