Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added java plugin runner download block #411

Merged
merged 2 commits into from
Jul 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ module.exports = {
shape: "triangle",
color: "#e8433e",
githubRepo: "apache/apisix",
githubBranch: "master",
downloadPath: "apisix/2.7/apache-apisix-2.7-src",
version: "2.7",
releaseDate: "2021-06-25",
firstDocPath: "/getting-started",
Expand All @@ -114,6 +116,8 @@ module.exports = {
shape: "square",
color: "#10B981",
githubRepo: "apache/apisix-dashboard",
githubBranch: "master",
downloadPath: "apisix/dashboard/2.7/apache-apisix-dashboard-2.7-src",
version: "2.7",
releaseDate: "2021-06-15",
firstDocPath: "/USER_GUIDE",
Expand All @@ -125,10 +129,25 @@ module.exports = {
shape: "hexagon",
color: "#2563EB",
githubRepo: "apache/apisix-ingress-controller",
githubBranch: "master",
downloadPath: "apisix/ingress-controller/1.1.0/apache-apisix-ingress-controller-1.1.0-src",
version: "1.1.0",
releaseDate: "2021-07-13",
firstDocPath: "/getting-started",
}
},
{
name: "APISIX™ Java Plugin Runner",
nameInParamCase: "java-plugin-runner",
description: "Runs Apache APISIX plugins written in Java. Implemented as a sidecar that accompanies Apache APISIX.",
shape: "star",
color: "#FB9300",
githubRepo: "apache/apisix-java-plugin-runner",
githubBranch: "main",
downloadPath: "apisix/java-plugin-runner/0.1/apisix-java-plugin-runner-0.1.0-src",
version: "0.1.0",
releaseDate: "2021-06-23",
firstDocPath: "/development",
},
],

team: require("./static/data/team.json"),
Expand Down
21 changes: 10 additions & 11 deletions website/src/pages/downloads/ProjectCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import IconDownload from "../../assets/icons/download.svg";
import IconTriangle from "../../assets/icons/triangle.svg";
import IconSquare from "../../assets/icons/square.svg";
import IconHexagon from "../../assets/icons/hexagon.svg";
import IconStarSolid from "../../assets/icons/star-solid.svg";

const Dropdown = (props) => {
const ref = useRef();
Expand All @@ -34,27 +35,25 @@ const ProjectCard = (props) => {
const [repoStats, setRepoStats] = useState({ stars: 0, issues: 0 });
const {
name,
nameInParamCase,
description,
shape,
color,
version,
releaseDate,
githubRepo,
githubBranch,
downloadPath
} = props;
const shapeComponent =
shape === "triangle" ? (
<IconTriangle />
) : shape === "square" ? (
<IconSquare />
) : (
) : shape === "hexagon" ? (
<IconHexagon />
) : (
<IconStarSolid />
);
const downloadLink = `apisix${
nameInParamCase !== "apisix" ? "/" + nameInParamCase : ""
}/${version}/apache-${
nameInParamCase !== "apisix" ? "apisix-" + nameInParamCase : "apisix"
}-${version}-src`;

useEffect(() => {
getGitHubRepoStats(githubRepo).then((stats) => {
Expand Down Expand Up @@ -92,7 +91,7 @@ const ProjectCard = (props) => {
</LeftSideLink>
<LeftSideLink
className="downloads-leftsidelink"
href={`https://github.com/${githubRepo}/blob/master/CHANGELOG.md`}
href={`https://github.com/${githubRepo}/blob/${githubBranch}/CHANGELOG.md`}
target="_blank"
>
<IconDocumentText /> CHANGELOG
Expand Down Expand Up @@ -120,21 +119,21 @@ const ProjectCard = (props) => {
>
<DropdownItem
className="download-dropdown-item"
href={`https://www.apache.org/dyn/closer.cgi/${downloadLink}.tgz`}
href={`https://www.apache.org/dyn/closer.cgi/${downloadPath}.tgz`}
target="_blank"
>
Source
</DropdownItem>
<DropdownItem
className="download-dropdown-item"
href={`https://downloads.apache.org/${downloadLink}.tgz.asc`}
href={`https://downloads.apache.org/${downloadPath}.tgz.asc`}
target="_blank"
>
ASC
</DropdownItem>
<DropdownItem
className="download-dropdown-item"
href={`https://downloads.apache.org/${downloadLink}.tgz.sha512`}
href={`https://downloads.apache.org/${downloadPath}.tgz.sha512`}
target="_blank"
>
SHA512
Expand Down