juzhiyuan commented on a change in pull request #1736:
URL: https://github.com/apache/apisix-dashboard/pull/1736#discussion_r611707250



##########
File path: web/src/components/Plugin/data.tsx
##########
@@ -30,5 +30,164 @@ export const PLUGIN_ICON_LIST: Record<string, any> = {
 // This list is used to filter out plugins that cannot be displayed in the 
plugins list.
 export const PLUGIN_FILTER_LIST: Record<string, { list: 
PluginComponent.ReferPage[] }> = {
   redirect: { list: ['route'] }, // Filter out the redirect plugin on the 
route page.
-  'proxy-rewrite': { list: ['route']},
+  'proxy-rewrite': { list: ['route'] },
 };
+
+export enum PluginType {
+  authentication = "authentication",
+  security = "security",
+  traffic = "traffic",
+  serverless = "serverless",
+  transformation = "transformation",
+  monitoring = "monitoring",
+  logging = "logging",
+  other = "other"
+}
+
+/**
+ * Plugin List that contains type field
+*/
+export const PLUGIN_LIST = {
+  "hmac-auth": {
+    type: PluginType.authentication
+  },
+  "serverless-post-function": {
+    type: PluginType.serverless
+  },
+  "mqtt-proxy": {
+    type: PluginType.other
+  },
+  "response-rewrite": {
+    type: PluginType.transformation
+  },
+  "basic-auth": {
+    type: PluginType.authentication
+  },
+  "error-log-logger": {
+    type: PluginType.logging
+  },
+  "fault-injection": {
+    type: PluginType.transformation
+  },
+  "limit-count": {
+    type: PluginType.traffic
+  },
+  "prometheus": {
+    type: PluginType.monitoring
+  },
+  "proxy-rewrite": {
+    type: PluginType.transformation
+  },
+  "syslog": {
+    type: PluginType.logging
+  },
+  "traffic-split": {
+    type: PluginType.traffic
+  },
+  "jwt-auth": {
+    type: PluginType.authentication
+  },
+  "kafka-logger": {
+    type: PluginType.logging
+  },
+  "limit-conn": {
+    type: PluginType.traffic
+  },
+  "udp-logger": {
+    type: PluginType.logging
+  },
+  "zipkin": {
+    type: PluginType.monitoring
+  },
+  "echo": {
+    type: PluginType.other,
+    hidden: true
+  },
+  "log-rotate": {
+    type: PluginType.logging
+  },
+  "serverless-pre-function": {
+    type: PluginType.serverless
+  },
+  "dubbo-proxy": {
+    type: PluginType.other
+  },
+  "node-status": {
+    type: PluginType.monitoring
+  },
+  "referer-restriction": {
+    type: PluginType.security
+  },
+  "api-breaker": {
+    type: PluginType.traffic
+  },
+  "consumer-restriction": {
+    type: PluginType.security
+  },
+  "cors": {
+    type: PluginType.security
+  },
+  "limit-req": {
+    type: PluginType.traffic
+  },
+  "proxy-mirror": {
+    type: PluginType.traffic
+  },
+  "request-validation": {
+    type: PluginType.traffic

Review comment:
       I see this plugin belongs to `Security` here[1], but `Traffic` here[2], 
which one is correct?
   
   [1] 
https://github.com/apache/apisix-dashboard/blob/053721cc483c6ffc21981b1d6a70cfce07aa808b/web/src/components/Plugin/data.tsx#L138
   [2] https://apisix.apache.org/docs/apisix/plugins/request-validation




-- 
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]


Reply via email to