You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/04/13 03:11:16 UTC
[GitHub] [apisix-dashboard] guoqqqi commented on a diff in pull request #2393: feat: Adding view buttons to the plugin-template page
guoqqqi commented on code in PR #2393:
URL: https://github.com/apache/apisix-dashboard/pull/2393#discussion_r849032847
##########
web/src/pages/PluginTemplate/List.tsx:
##########
@@ -162,6 +180,24 @@ const Page: React.FC = () => {
</Button>,
]}
/>
+ <RawDataEditor
+ visible={visible}
+ type="PluginTemplate"
+ readonly={false}
+ data={rawData}
+ onClose={() => {
+ setVisible(false);
+ }}
+ onSubmit={(data: any) => {
+ (editorMode === 'create' ? create(data) : update(id, data)).then(() => {
+ setVisible(false);
+ handleTableActionSuccessResponse(
+ `${formatMessage({ id: 'component.global.submit.success' })}`,
Review Comment:
```suggestion
formatMessage({ id: 'component.global.submit.success' }),
```
##########
web/src/pages/PluginTemplate/List.tsx:
##########
@@ -22,13 +22,19 @@ import type { ActionType, ProColumns } from '@ant-design/pro-table';
import { Button, notification, Popconfirm, Select, Space, Tag } from 'antd';
import { PlusOutlined } from '@ant-design/icons';
import usePagination from '@/hooks/usePagination';
-import { fetchList, remove, fetchLabelList } from './service';
+import { fetchList, remove, create, fetchLabelList, update } from './service';
+import { RawDataEditor } from '@/components/RawDataEditor';
+import { omit } from 'lodash';
Review Comment:
```suggestion
import { omit } from 'lodash';
import { fetchList, remove, create, fetchLabelList, update } from './service';
import { RawDataEditor } from '@/components/RawDataEditor';
```
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org