LiteSun commented on a change in pull request #1240:
URL: https://github.com/apache/apisix-dashboard/pull/1240#discussion_r556405672
##########
File path: web/src/pages/Route/List.tsx
##########
@@ -17,29 +17,70 @@
import React, { useRef, useEffect, useState } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import ProTable, { ProColumns, ActionType } from '@ant-design/pro-table';
-import { Button, Popconfirm, notification, Tag, Space, Select } from 'antd';
+import {
+ Button,
+ Popconfirm,
+ notification,
+ Tag,
+ Space,
+ Select,
+ Radio,
+ Form,
+ Upload,
+ Modal,
+ Divider,
+} from 'antd';
import { history, useIntl } from 'umi';
-import { PlusOutlined, BugOutlined } from '@ant-design/icons';
+import { PlusOutlined, BugOutlined, ExportOutlined, ImportOutlined } from
'@ant-design/icons';
+import { js_beautify } from 'js-beautify';
+import yaml from 'js-yaml';
+import moment from 'moment';
import { timestampToLocaleString } from '@/helpers';
-import { fetchList, remove, fetchLabelList, updateRouteStatus } from
'./service';
+import { RcFile } from 'antd/lib/upload';
+import {
+ fetchList,
+ remove,
+ fetchLabelList,
+ updateRouteStatus,
+ exportRoutes,
+ importRoutes,
+} from './service';
import { DebugDrawView } from './components/DebugViews';
+import { EXPORT_FILE_MIME_TYPE_SUPPORTED } from './constants';
const { OptGroup, Option } = Select;
const Page: React.FC = () => {
const ref = useRef<ActionType>();
const { formatMessage } = useIntl();
+ const [exportFileTypeForm] = Form.useForm();
+
+ enum RouteStatus {
+ Offline = 0,
+ Publish,
+ }
+
+ enum ExportFileType {
+ Json = 0,
Review comment:
```suggestion
JSON = 0,
YAML
```
will be better.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]