Skip to content

Commit e13903f

Browse files
feat: remove v1/otomi/values endpoint and update maintenance page (#793)
Co-authored-by: svcAPLBot <174728082+svcAPLBot@users.noreply.github.com>
1 parent a05d866 commit e13903f

3 files changed

Lines changed: 1 addition & 53 deletions

File tree

docker-compose.yml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,10 @@ services:
1414
- $PWD/core.yaml:/etc/otomi/core.yaml
1515
- tmp:/tmp
1616
environment:
17-
TOOLS_HOST: tools
1817
GIT_LOCAL_PATH: /tmp/otomi-values
1918
env_file:
2019
- compose/.env
2120

22-
tools:
23-
depends_on:
24-
- api
25-
container_name: tools
26-
image: otomi/core:${TOOLS_TAG:-main}
27-
user: ${USER_ID}:${GROUP_ID}
28-
command: sh -c 'binzx/otomi server -vv'
29-
expose:
30-
- 17771
31-
ports:
32-
- 17771:17771
33-
volumes:
34-
- tmp:/tmp
35-
environment:
36-
ENV_DIR: /tmp/otomi-values
37-
env_file:
38-
- compose/.env
39-
4021
volumes:
4122
tmp:
4223
driver: local

src/pages/Maintenance.tsx

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
/* eslint-disable @typescript-eslint/no-floating-promises */
22
import PaperLayout from 'layouts/Paper'
33
import React from 'react'
4-
import { Box, Button, Link, Tooltip, Typography } from '@mui/material'
4+
import { Box, Button, Tooltip, Typography } from '@mui/material'
55
import HeaderTitle from 'components/HeaderTitle'
66
import { useLocalStorage } from 'react-use'
77
import { useSession } from 'providers/Session'
88
import { useGetSettingsQuery } from 'redux/otomiApi'
99
import Section from 'components/Section'
1010

1111
const classes = {
12-
actionLink: {
13-
display: 'block',
14-
fontWeight: 400,
15-
fontSize: '14px',
16-
},
1712
actionButton: {
1813
mt: 1,
1914
px: 0,
@@ -51,16 +46,6 @@ export default function (): React.ReactElement {
5146
<Typography variant='h6' sx={{ fontWeight: 'bold' }}>
5247
Actions
5348
</Typography>
54-
<Box sx={{ mt: 2 }}>
55-
<Link sx={classes.actionLink} href='/api/v1/otomi/values?excludeSecrets=false'>
56-
DOWNLOAD PLATFORM VALUES
57-
</Link>
58-
59-
<Link sx={classes.actionLink} href='/api/v1/otomi/values?excludeSecrets=true'>
60-
DOWNLOAD PLATFORM VALUES (SECRETS REDACTED)
61-
</Link>
62-
</Box>
63-
6449
{isPreInstalled && (
6550
<Tooltip title={isObjStorageConfigured() ? 'Object storage settings are already configured.' : ''}>
6651
<span>

src/redux/otomiApi.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
import { emptySplitApi as api } from './emptyApi'
22
const injectedRtkApi = api.injectEndpoints({
33
endpoints: (build) => ({
4-
getValues: build.query<GetValuesApiResponse, GetValuesApiArg>({
5-
query: (queryArg) => ({
6-
url: `/v1/otomi/values`,
7-
params: {
8-
filesOnly: queryArg.filesOnly,
9-
excludeSecrets: queryArg.excludeSecrets,
10-
withWorkloadValues: queryArg.withWorkloadValues,
11-
},
12-
}),
13-
}),
144
getTeams: build.query<GetTeamsApiResponse, GetTeamsApiArg>({
155
query: () => ({ url: `/v1/teams` }),
166
}),
@@ -574,13 +564,6 @@ const injectedRtkApi = api.injectEndpoints({
574564
overrideExisting: false,
575565
})
576566
export { injectedRtkApi as otomiApi }
577-
export type GetValuesApiResponse = unknown
578-
export type GetValuesApiArg = {
579-
/** IDs of settings to return */
580-
filesOnly?: 'true' | 'false'
581-
excludeSecrets?: 'true' | 'false'
582-
withWorkloadValues?: 'true' | 'false'
583-
}
584567
export type GetTeamsApiResponse = /** status 200 Successfully obtained teams collection */ {
585568
id?: string
586569
name: string
@@ -6901,7 +6884,6 @@ export type GetApiStatusApiResponse = /** status 200 Successfully obtained API s
69016884
}
69026885
export type GetApiStatusApiArg = void
69036886
export const {
6904-
useGetValuesQuery,
69056887
useGetTeamsQuery,
69066888
useCreateTeamMutation,
69076889
useGetTeamQuery,

0 commit comments

Comments
 (0)