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 2021/08/06 02:46:31 UTC

[GitHub] [apisix-website] juzhiyuan commented on a change in pull request #437: feat: support Plugins Hub

juzhiyuan commented on a change in pull request #437:
URL: https://github.com/apache/apisix-website/pull/437#discussion_r683907595



##########
File path: website/static/data/plugin.json
##########
@@ -0,0 +1,237 @@
+[

Review comment:
       Please format this file by using `2 spaces`

##########
File path: website/static/data/plugin.json
##########
@@ -0,0 +1,237 @@
+[
+    {
+        "groupName": "authentication",
+        "plugins": [
+            {
+                "name": "authz-keycloak",
+                "description": "An authorization plugin to be used with the Keycloak Identity Server",
+                "src": "static/img/plugin/authz-keycloak.jpg"
+            },
+            {
+                "name": "basic-auth",
+                "description": "An authentication plugin that need to work with consumer to add Basic Authentication to a Service or a Route",
+                "src": "static/img/plugin/basic-auth.jpg"
+            },
+            {
+                "name": "hmac-auth",
+                "description": "An authentication plugin that need to work with consumer to establish the integrity of incoming requests",
+                "src": "static/img/plugin/hmac-auth.jpg"
+            },
+            {
+                "name": "jwt-auth",
+                "description": "An authentication plugin that need to work with consumer to securely authenticate a valid user requesting access",
+                "src": "static/img/plugin/jwt-auth.jpg"
+            },
+            {
+                "name": "key-auth",
+                "description": "An authentication plugin that need to work with consumer to add key authentication to your Services",
+                "src": "static/img/plugin/key-auth.jpg"
+            },
+            {
+                "name": "openid-connect",
+                "description": "An authentication plugin that provides authentication and introspection capability to APISIX",
+                "src": "static/img/plugin/openid-connect.jpg"
+            }
+        ]
+    },
+    {
+        "groupName": "security",
+        "plugins": [
+            {
+                "name": "api-breaker",
+                "description": "The plugin implements API fuse functionality to help us protect our upstream business services",
+                "src": "static/img/plugin/api-breaker.jpg"
+            },
+            {
+                "name": "consumer-restriction",
+                "description": "The plugin makes corresponding access restrictions based on different objects selected",
+                "src": "static/img/plugin/consumer-restriction.jpg"
+            },
+            {
+                "name": "cors",
+                "description": "The plugin can help you enable CORS easily",
+                "src": "static/img/plugin/cors.jpg"
+            },
+            {
+                "name": "fault-injection",
+                "description": "The plugin provides the ability to deliberately cause a service to fail, in order to test failure in a complex distributed solution",
+                "src": "static/img/plugin/fault-injection.jpg"
+            },
+            {
+                "name": "ip-restriction",
+                "description": "The ip-restriction can restrict access to a Service or a Route by either whitelisting or blacklisting IP addresses",
+                "src": "static/img/plugin/ip-restriction.jpg"
+            },
+            {
+                "name": "referer-restriction",
+                "description": "The referer-restriction can restrict access to a Service or a Route by whitelisting request header Referrers",
+                "src": "static/img/plugin/referer-restriction.jpg"
+            },
+            {
+                "name": "request-validation",
+                "description": "The request-validation plugin validates the requests before forwarding to an upstream service",
+                "src": "static/img/plugin/request-validation.jpg"
+            },
+            {
+                "name": "uri-blocker",
+                "description": "The plugin helps to intercept user requests",
+                "src": "static/img/plugin/uri-blocker.jpg"
+            }
+        ]
+    },
+    {
+        "groupName": "Traffic Control",
+        "plugins": [
+            {
+                "name": "limit-conn",
+                "description": "The plugin  Limits request concurrency",
+                "src": "static/img/plugin/limit-conn.jpg"
+            },
+            {
+                "name": "limit-count",
+                "description": "The plugin Limits request rate by a fixed number of requests in a given time window",
+                "src": "static/img/plugin/limit-count.jpg"
+            },
+            {
+                "name": "limit-req",
+                "description": "The plugin limits request rate using the eaky bucket method",
+                "src": "static/img/plugin/limit-req.jpg"
+            },
+            {
+                "name": "traffic-split",
+                "description": "The traffic split plugin allows users to incrementally direct percentages of traffic between various upstreams",
+                "src": "static/img/plugin/traffic-split.jpg"
+            }
+        ]
+    },
+    {
+        "groupName": "Serverless",
+        "plugins": [
+            {
+                "name": "serverless-pre-function",
+                "description": "The serverless-pre-function runs at the beginning of the specified phase",
+                "src": "static/img/plugin/serverless-pre-function.jpg"
+            },
+            {
+                "name": "serverless-post-function",
+                "description": "The serverless-post-function runs at the end of the specified phase",
+                "src": "static/img/plugin/serverless-post-function.jpg"
+            }
+        ]
+    },
+    {
+        "groupName": "Observability",
+        "plugins": [
+            {
+                "name": "error-log-logger",
+                "description": "Error-log-logger is a plugin which pushes the log data of APISIX's error.log to TCP servers",
+                "src": "static/img/plugin/error-log-logger.jpg"
+            },
+            {
+                "name": "http-logger",
+                "description": "Http-logger is a plugin which push Log data requests to HTTP/HTTPS servers",
+                "src": "static/img/plugin/http-logger.jpg"
+            },
+            {
+                "name": "kafka-logger",
+                "description": "Kafka-logger is a plugin which works as a Kafka client driver for the ngx_lua nginx module",
+                "src": "static/img/plugin/kafka-logger.jpg"
+            },
+            {
+                "name": "prometheus",
+                "description": "The plugin exposes metrics in Prometheus Exposition format",
+                "src": "static/img/plugin/prometheus.jpg"
+            },
+            {
+                "name": "request-id",
+                "description": "The plugin adds a unique ID (UUID) to each request proxied through APISIX",
+                "src": "static/img/plugin/request-id.jpg"
+            },
+            {
+                "name": "skywalking",
+                "description": "Skywalking uses its native Nginx LUA tracer to provide tracing, topology analysis, and metrics from service and URI perspective",
+                "src": "static/img/plugin/skywalking.jpg"
+            },
+            {
+                "name": "sls-logger",
+                "description": "Sls-logger pushes Log data requests to ali cloud Log Server with RF5424",
+                "src": "static/img/plugin/sls-logger.jpg"
+            },
+            {
+                "name": "syslog",
+                "description": "Sys pushes Log data requests to Syslog",
+                "src": "static/img/plugin/syslog.jpg"
+            },
+            {
+                "name": "tcp-logger",
+                "description": "Tcp-logger pushes Log data requests to TCP servers",
+                "src": "static/img/plugin/tcp-logger.jpg"
+            },
+            {
+                "name": "udp-logger",
+                "description": "Udp-logger pushes Log data requests to UDP servers",
+                "src": "static/img/plugin/udp-logger.jpg"
+            },
+            {
+                "name": "zipkin",
+                "description": "Zipkin is a OpenTracing plugin",
+                "src": "static/img/plugin/zipkin.jpg"
+            }
+        ]
+    },
+    {
+        "groupName": "other",
+        "plugins": [
+            {
+                "name": "batch-requests",
+                "description": "Batch-requests accepts multiple request and send them from apisix via http pipeline",
+                "src": "static/img/plugin/batch-requests.jpg"
+            },
+            {
+                "name": "grpc-transcode",
+                "description": "Grpc-transcoding involves mapping HTTP/JSON requests and their parameters to gRPC methods and their parameters and return types",
+                "src": "static/img/plugin/grpc-transcode.jpg"
+            },
+            {
+                "name": "proxy-cache",
+                "description": "The proxy-cache plugin provides the ability to cache upstream response data and can be used with other plugins",
+                "src": "static/img/plugin/proxy-cache.jpg"
+            },
+            {
+                "name": "proxy-mirror",
+                "description": "TThe proxy-mirror plugin provides the ability to mirror client requests",
+                "src": "static/img/plugin/proxy-mirror.jpg"
+            },
+            {
+                "name": "proxy-rewrite",
+                "description": "The proxy-rewrite is an upstream proxy information rewriting plugin",
+                "src": "static/img/plugin/proxy-rewrite.jpg"
+            },
+            {
+                "name": "response-rewrite",
+                "description": "Response-rewrite rewrites the content returned by the upstream as well as Apache APISIX itself",
+                "src": "static/img/plugin/response-rewrite.jpg"
+            },
+            {
+                "name": "wolf-rbac",
+                "description": "Wolf-rbac is an authentication and authorization (rbac) plugin where the rbac feature is provided by wolf",
+                "src": "static/img/plugin/wolf-rbac.jpg"
+            },
+            {
+                "name": "client-control",
+                "description": "The client-control plugin dynamically controls the behavior of Nginx to handle the client request",
+                "src": "static/img/plugin/defaultPluginImg.jpg"
+            },
+            {
+                "name": "ext-plugin-pre-req",
+                "description": "The ext-plugin-pre-req runs specific external plugins in the plugin runner, before executing most of the builtin Lua plugins",
+                "src": "static/img/plugin/defaultPluginImg.jpg"
+            },
+            {
+                "name": "ext-plugin-post-req",
+                "description": "The ext-plugin-post-req runs after executing builtin Lua plugins and before proxying to the upstream",
+                "src": "static/img/plugin/defaultPluginImg.jpg"
+            }
+        ]
+    }
+]

Review comment:
       ```suggestion
   ]
   
   ```

##########
File path: website/src/pages/pluginhub.js
##########
@@ -0,0 +1,138 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import React from "react";
+import styled from "styled-components";
+import Layout from "@theme/Layout";
+import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
+
+
+const PageTitle = styled.h1`
+  text-align: center;
+  margin-top: 1rem;
+  font-size: 3rem;
+  font-weight: 700;
+  text-transform: uppercase;
+`;
+
+const PageSubtitle = styled.div`
+  text-align: center;
+  font-size: 1rem;
+  margin-bottom: 2rem;
+  font-weight: 400;
+`;
+
+const Page = styled.div`
+  max-width: var(--ifm-container-width);
+  margin: 0 auto;
+  padding: 2rem var(--ifm-spacing-horizontal);
+  width: 100%;
+  flex-wrap: wrap;
+  
+`;
+
+const PluginsContainer = styled.div`
+  display: grid;
+  grid-template-columns: repeat(4, 1fr);
+  grid-gap: 5px;
+  @media (max-width: 812px) {
+  grid-template-columns: repeat(2, 1fr);
+}
+`;
+const PluginCard = styled.a`
+  border-radius: 0.75rem;
+  border: 1px solid #eee;
+  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
+  display: flex;
+  flex-direction: column;
+  align-items: left;
+  justify-content: center;
+  text-align: left;
+  padding: 1rem;
+  min-width: calc(180px + 5rem);
+  cursor: pointer;
+  height: 100%;
+  &:hover {
+  color: inherit;
+  text-decoration: none;
+}
+`;
+
+const PluginName = styled.div`
+  font-size: 1rem;
+  font-weight: 600;
+  margin-top: 12px;
+  margin-bottom: -4px;
+  line-height: 1rem;
+  text-align: left;
+  text-transform: capitalize;
+`;
+const PluginDescription = styled.div`
+  font-size: 0.8rem;
+  font-weight: 500;
+  margin-top: 10px;
+  color : #7e7c7c;
+  text-align: left;
+`;
+
+const SectionTitle = styled.h2`
+  margin-bottom: 24px;
+  margin-top: 84px;
+  text-transform: uppercase;
+`;
+
+
+function Plugins(props) {
+  const { siteConfig } = useDocusaurusContext();
+  const plugins = siteConfig.customFields.plugins.map((section) => {
+    const pluginCards = section.plugins.map((plugin) => {
+      return (
+        <div key={plugin.name}>
+          <PluginCard>
+            <a href={'https://apisix.apache.org/docs/apisix/plugins/' + plugin.name} target="_blank">
+              <img className="plugin-logo shadow" src={plugin.src} alt={plugin.name} />
+            </a>
+            <PluginName>{plugin.name}</PluginName>
+            <PluginDescription>{plugin.description}</PluginDescription>
+            <a className="read-more-link" href={'https://apisix.apache.org/docs/apisix/plugins/' + plugin.name}>{'Read more>>'}</a>
+          </PluginCard>
+        </div>
+      );
+    });
+    return (
+      <div key={section.groupName}>
+        <SectionTitle>{section.groupName}</SectionTitle>
+        <PluginsContainer id={section.groupName}>
+          {pluginCards}
+        </PluginsContainer>
+      </div>
+    );
+  });
+
+  return (
+    <Page>
+      <PageTitle>APISIX®️ Plugin Hub</PageTitle>

Review comment:
       ```suggestion
         <PageTitle>Apache APISIX®️ Plugin Hub</PageTitle>
   ```

##########
File path: website/docusaurus.config.js
##########
@@ -462,9 +459,22 @@ module.exports = {
           position: "right",
         },
         {
-          to: "/help",
-          label: "Help",
+          label: "Resources",
           position: "right",
+          items: [
+            {
+              to: "/pluginhub",

Review comment:
       ```suggestion
                 to: "/hub",
   ```

##########
File path: website/static/data/plugin.json
##########
@@ -0,0 +1,237 @@
+[

Review comment:
       Maybe we could generate this file automatically in the future




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