Skip to content

Commit 1e628e3

Browse files
committed
selector copy namespace
1 parent 21e10e1 commit 1e628e3

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

src/routes/Plugin/Common/SelectorCopy.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import React, { Component } from "react";
1919
import { Modal, TreeSelect } from "antd";
2020
import { connect } from "dva";
2121
import {
22-
getPluginDropDownList,
22+
getPluginDropDownListByNamespace,
2323
getAllSelectors,
2424
findSelector,
2525
} from "../../../services/api";
@@ -45,7 +45,9 @@ class SelectorCopy extends Component {
4545
getAllSelectors = async () => {
4646
const { currentNamespaceId } = this.props;
4747
const { code: pluginCode, data: pluginList = [] } =
48-
await getPluginDropDownList();
48+
await getPluginDropDownListByNamespace({
49+
namespace: currentNamespaceId,
50+
});
4951
const {
5052
code: selectorCode,
5153
data: { dataList: selectorList = [] },

src/services/api.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,16 @@ export async function getPluginDropDownList() {
591591
});
592592
}
593593

594+
// get plugin dropdown list by namespace
595+
export async function getPluginDropDownListByNamespace(params) {
596+
return request(
597+
`${baseUrl}/plugin/listByNamespace?namespace=${params.namespace}`,
598+
{
599+
method: `GET`,
600+
},
601+
);
602+
}
603+
594604
// get plugin handle list
595605
export async function getAllPluginHandles(params) {
596606
return request(`${baseUrl}/plugin-handle?${stringify(params)}`, {

0 commit comments

Comments
 (0)