diff --git a/frontend/src/pages/route/index.tsx b/frontend/src/pages/route/index.tsx index 15f9b2d5..69fdf24e 100644 --- a/frontend/src/pages/route/index.tsx +++ b/frontend/src/pages/route/index.tsx @@ -8,6 +8,7 @@ import { } from '@/interfaces/route'; import { addGatewayRoute, deleteGatewayRoute, getGatewayRoutes, updateGatewayRoute } from '@/services'; import store from '@/store'; +import switches from '@/switches'; import { isInternalResource } from '@/utils'; import { ExclamationCircleOutlined, RedoOutlined } from '@ant-design/icons'; import { PageContainer } from '@ant-design/pro-layout'; @@ -121,6 +122,9 @@ const RouteList: React.FC = () => { i.key || (i.key = i.id ? `${i.id}` : i.name); i.internal = isInternalResource(i.name); }); + if (!switches.SHOW_INTERNAL_ROUTES) { + result = result.filter(r => !r.internal); + } result.sort((i1, i2) => { if (i1.internal !== i2.internal) { return i1.internal ? 1 : -1 diff --git a/frontend/src/switches.ts b/frontend/src/switches.ts new file mode 100644 index 00000000..3c45f6f8 --- /dev/null +++ b/frontend/src/switches.ts @@ -0,0 +1,3 @@ +export default { + SHOW_INTERNAL_ROUTES: false, +}; \ No newline at end of file