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



##########
File path: web/src/components/Plugin/data.tsx
##########
@@ -30,5 +30,166 @@ 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,
+    hidden: true
+  },
+  "response-rewrite": {
+    type: PluginType.other
+  },
+  "basic-auth": {
+    type: PluginType.authentication
+  },
+  "error-log-logger": {
+    type: PluginType.logging
+  },
+  "fault-injection": {
+    type: PluginType.security
+  },
+  "limit-count": {
+    type: PluginType.traffic
+  },
+  "prometheus": {
+    type: PluginType.monitoring
+  },
+  "proxy-rewrite": {
+    type: PluginType.other
+  },
+  "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,
+    hidden: true
+  },
+  "node-status": {
+    type: PluginType.other

Review comment:
       I think we should.hide this plugin
   need @nic-chen confirm

##########
File path: web/src/components/Plugin/data.tsx
##########
@@ -30,5 +30,166 @@ 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,
+    hidden: true
+  },
+  "response-rewrite": {
+    type: PluginType.other
+  },
+  "basic-auth": {
+    type: PluginType.authentication
+  },
+  "error-log-logger": {
+    type: PluginType.logging
+  },
+  "fault-injection": {
+    type: PluginType.security
+  },
+  "limit-count": {
+    type: PluginType.traffic
+  },
+  "prometheus": {
+    type: PluginType.monitoring
+  },
+  "proxy-rewrite": {
+    type: PluginType.other
+  },
+  "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

Review comment:
       should hide too

##########
File path: web/src/components/Plugin/data.tsx
##########
@@ -30,5 +30,166 @@ 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,
+    hidden: true
+  },
+  "response-rewrite": {
+    type: PluginType.other
+  },
+  "basic-auth": {
+    type: PluginType.authentication
+  },
+  "error-log-logger": {
+    type: PluginType.logging
+  },
+  "fault-injection": {
+    type: PluginType.security
+  },
+  "limit-count": {
+    type: PluginType.traffic
+  },
+  "prometheus": {
+    type: PluginType.monitoring
+  },
+  "proxy-rewrite": {
+    type: PluginType.other
+  },
+  "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,
+    hidden: true
+  },
+  "node-status": {
+    type: PluginType.other
+  },
+  "referer-restriction": {
+    type: PluginType.security
+  },
+  "api-breaker": {
+    type: PluginType.traffic

Review comment:
       should be security
   same as uri-breaker




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