Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

fix: delete upgrade page

shuai262b29ee2899
diff --git a/ui/src/i18n/locales/en.json b/ui/src/i18n/locales/en.json
index 4f0de90b..5b767092 100644
--- a/ui/src/i18n/locales/en.json
+++ b/ui/src/i18n/locales/en.json
@@ -830,15 +830,6 @@
"installed": "Already installed",
"installed_description": "You appear to have already installed. To reinstall please clear your old database tables first."
},
- "upgrade": {
- "title": "Answer",
- "update_btn": "Update data",
- "update_title": "Data update required",
- "update_description": "<1>Answer has been updated! Before you continue, we have to update your data to the newest version.</1><1>The update process may take a little while, so please be patient.</1>",
- "done_title": "No update required",
- "done_btn": "Done",
- "done_desscription": "Your Answer data is already up-to-date."
- },
"page_404": {
"description": "Unfortunately, this page doesn't exist.",
"back_home": "Back to homepage"
diff --git a/ui/src/pages/Upgrade/index.tsx b/ui/src/pages/Upgrade/index.tsx
deleted file mode 100644
index c264e46c..00000000
--- a/ui/src/pages/Upgrade/index.tsx
+++ /dev/null
@@ -1,72 +0,0 @@
-import { useState } from 'react';
-import { Container, Row, Col, Card, Button, Spinner } from 'react-bootstrap';
-import { useTranslation, Trans } from 'react-i18next';
-
-import { PageTitle } from '@/components';
-import { upgradSystem } from '@/services';
-
-const Index = () => {
- const { t } = useTranslation('translation', {
- keyPrefix: 'upgrade',
- });
- const [step] = useState(1);
- const [loading, setLoading] = useState(false);
-
- const handleUpdate = async () => {
- await upgradSystem();
- setLoading(true);
- };
- return (
- <div className="page-wrap2">
- <Container style={{ paddingTop: '74px' }}>
- <PageTitle title={t('upgrade', { keyPrefix: 'page_title' })} />
- <Row className="justify-content-center">
- <Col lg={6}>
- <h2 className="text-center mb-4">{t('title')}</h2>
- <Card>
- <Card.Body>
- {step === 1 && (
- <>
- <h5>{t('update_title')}</h5>
- <Trans
- i18nKey="upgrade.update_description"
- components={{ 1: <p /> }}
- />
- {loading ? (
- <Button variant="primary" disabled className="float-end">
- <Spinner
- as="span"
- animation="border"
- size="sm"
- role="status"
- aria-hidden="true"
- />
- <span> {t('update_btn')}</span>
- </Button>
- ) : (
- <Button className="float-end" onClick={handleUpdate}>
- {t('update_btn')}
- </Button>
- )}
- </>
- )}
-
- {step === 2 && (
- <>
- <h5>{t('done_title')}</h5>
- <p>{t('done_desscription')}</p>
- <Button className="float-end" href="/">
- {t('done_btn')}
- </Button>
- </>
- )}
- </Card.Body>
- </Card>
- </Col>
- </Row>
- </Container>
- </div>
- );
-};
-
-export default Index;
diff --git a/ui/src/router/routes.ts b/ui/src/router/routes.ts
index 5723a4e2..24016d0a 100644
--- a/ui/src/router/routes.ts
+++ b/ui/src/router/routes.ts
@@ -269,9 +269,5 @@ const routes: RouteNode[] = [
path: '/maintenance',
page: 'pages/Maintenance',
},
- {
- path: '/upgrade',
- page: 'pages/Upgrade',
- },
];
export default routes;
diff --git a/ui/src/services/common.ts b/ui/src/services/common.ts
index 7b4db720..1ddc7f18 100644
--- a/ui/src/services/common.ts
+++ b/ui/src/services/common.ts
@@ -248,7 +248,3 @@ export const changeEmailVerify = (params: { code: string }) => {
export const getAppSettings = () => {
return request.get<Type.SiteSettings>('/answer/api/v1/siteinfo');
};
-
-export const upgradSystem = () => {
- return request.post('/answer/api/v1/upgradation');
-};