Skip to content

Commit

Permalink
tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
aabouzaid committed Jan 30, 2025
1 parent 3adeb0a commit b429b42
Show file tree
Hide file tree
Showing 10 changed files with 514 additions and 146 deletions.
92 changes: 92 additions & 0 deletions docs/download-hub/helm-chart.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{
"11.1.1": [
{
"system": "linux-x86_64",
"download": "https://github.com/camunda/camunda/releases/download/8.6.7/camunda8-run-8.6.7-linux-x86_64.tar.gz",
"links": [
{
"description": "Release Notes",
"link": "https://github.com/camunda/camunda-platform-helm/releases/tag/camunda-platform-11.1.1"
},
{
"description": "Values",
"link": "https://artifacthub.io/packages/helm/camunda/camunda-platform/11.1.1#parameters"
}
]
},
{
"system": "windows-x86_64",
"download": "https://github.com/camunda/camunda/releases/download/8.6.7/camunda8-run-8.6.7-windows-x86_64.tar.gz",
"links": [
{
"description": "Release Notes",
"link": "https://github.com/camunda/camunda-platform-helm/releases/tag/camunda-platform-11.1.1"
},
{
"description": "Values",
"link": "https://artifacthub.io/packages/helm/camunda/camunda-platform/11.1.1#parameters"
}
]
}
],
"11.1.0": [
{
"system": "linux-x86_64",
"download": "https://github.com/camunda/camunda/releases/download/8.6.7/camunda8-run-8.6.7-linux-x86_64.tar.gz",
"links": [
{
"description": "Release Notes",
"link": "https://github.com/camunda/camunda-platform-helm/releases/tag/camunda-platform-11.1.1"
},
{
"description": "Values",
"link": "https://artifacthub.io/packages/helm/camunda/camunda-platform/11.1.1#parameters"
}
]
},
{
"system": "windows-x86_64",
"download": "https://github.com/camunda/camunda/releases/download/8.6.7/camunda8-run-8.6.7-windows-x86_64.tar.gz",
"links": [
{
"description": "Release Notes",
"link": "https://github.com/camunda/camunda-platform-helm/releases/tag/camunda-platform-11.1.1"
},
{
"description": "Values",
"link": "https://artifacthub.io/packages/helm/camunda/camunda-platform/11.1.1#parameters"
}
]
}
],
"11.0.4": [
{
"system": "linux-x86_64",
"download": "https://github.com/camunda/camunda/releases/download/8.6.7/camunda8-run-8.6.7-linux-x86_64.tar.gz",
"links": [
{
"description": "Release Notes",
"link": "https://github.com/camunda/camunda-platform-helm/releases/tag/camunda-platform-11.1.1"
},
{
"description": "Values",
"link": "https://artifacthub.io/packages/helm/camunda/camunda-platform/11.1.1#parameters"
}
]
},
{
"system": "windows-x86_64",
"download": "https://github.com/camunda/camunda/releases/download/8.6.7/camunda8-run-8.6.7-windows-x86_64.tar.gz",
"links": [
{
"description": "Release Notes",
"link": "https://github.com/camunda/camunda-platform-helm/releases/tag/camunda-platform-11.1.1"
},
{
"description": "Values",
"link": "https://artifacthub.io/packages/helm/camunda/camunda-platform/11.1.1#parameters"
}
]
}
]
}
6 changes: 3 additions & 3 deletions docs/download-hub/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ description: One-stop shop for all Camunda 8 downloads
import {
C8Run,
DockerCompose,
HelmLocal,
Helm,
} from "@site/src/components/CamundaDistributions/DistributionCards";
import helmData from "./helm-chart.json";

# Camunda Download Hub

Expand All @@ -30,11 +30,11 @@ A Docker Compose configuration to run Camunda Self-Managed components (Zeebe, Op

[More details ...](../../../docs/self-managed/setup/deploy/local/docker-compose)

### Kubernetes
### Kubernetes Local

We recommend using Kubernetes and Helm to deploy and run Camunda 8 Self-Managed in development too.

<HelmLocal />
<Helm runCommandArgs={["--values https://helm.camunda.io/values-local.yaml"]} />

[More details ...](../../../docs/self-managed/setup/deploy/local/local-kubernetes-cluster)

Expand Down
190 changes: 136 additions & 54 deletions src/components/CamundaDistributions/ArtifactCard.js
Original file line number Diff line number Diff line change
@@ -1,77 +1,159 @@
// import React, { useState } from "react";
// import Link from "@docusaurus/Link";
// import CodeBlock from "@theme/CodeBlock";
// import styles from "./styles.module.css";

// const ArtifactCard = (artifactData = Object) => {
// const versions = artifactData.keys()
// return (
// <div className={styles.card}>
// <div className={styles.dropdownContainer}>
// {version != null && (
// <>
// <label>Version</label>
// <select
// value={version}
// onChange={(e) => setVersion(e.target.value)}
// >
// {versions.map((version) => (
// <option key={version} value={version}>
// {version}
// </option>
// ))}
// </select>
// </>
// )}
// {artifactData.system != "" && (
// <>
// <label>System</label>
// <select
// value={artifactData.system}
// onChange={(e) => setArchitecture(e.target.value)}
// >
// {artifactData.system.map((os) => (
// <option key={os} value={os}>
// {os}
// </option>
// ))}
// </select>
// </>
// )}
// </div>
// <div>
// {downloadURL != "" && (
// <Link
// to={downloadURL}
// title={downloadURL}
// className={styles.downloadURL}
// >
// Download
// </Link>
// )}
// <br />
// {runCommand != "" && (
// <CodeBlock language="shell">
// {runCommand.replaceAll("${version}", version)}
// </CodeBlock>
// )}
// </div>
// <div className={styles.linkContainer}>
// {extraLinks.forEach(element => {
// <Link to={element.url}>{element.desc}</Link>
// })}
// </div>
// </div>
// );
// };

// export default ArtifactCard;
import React, { useState } from "react";
import styles from "./styles.module.css";
import Link from "@docusaurus/Link";
import CodeBlock from "@theme/CodeBlock";
import styles from "./styles.module.css";

const ArtifactCard = ({
osName = "",
architectures = [],
versions = [],
downloadURL = "",
releaseNotesUrl = "",
runCommand = "",
}) => {
const [architecture, setArchitecture] = useState(architectures[0]);
const [version, setVersion] = useState(versions[0]);
const ArtifactCard = ({ data, runCommand = "" }) => {
const versions = Object.keys(data);

// Ensure at least one version exists
const [selectedVersion, setSelectedVersion] = useState(versions[0] || "");
const [selectedSystem, setSelectedSystem] = useState(
data[versions[0]]?.[0]?.system || ""
);

const handleVersionChange = (event) => {
const newVersion = event.target.value;
setSelectedVersion(newVersion);
setSelectedSystem(data[newVersion]?.[0]?.system || "");
};

const handleDownload = (downloadURL) => {
window.open(downloadURL, "_blank");
const handleSystemChange = (event) => {
setSelectedSystem(event.target.value);
};

const selectedData =
data[selectedVersion]?.find((item) => item.system === selectedSystem) || {};

return (
<div className={styles.card}>
<div className={styles.dropdownContainer}>
{osName != "" && (
<>
<label>System</label>
<select
value={architecture}
onChange={(e) => setArchitecture(e.target.value)}
>
{architectures.map((arch) => (
<option key={arch} value={arch}>
{arch}
</option>
))}
</select>
</>
)}
{version != null && (
<>
<label>Version</label>
<select
value={version}
onChange={(e) => setVersion(e.target.value)}
>
{versions.map((ver) => (
<option key={ver} value={ver}>
{ver}
<label>
Version:
<select value={selectedVersion} onChange={handleVersionChange}>
{versions.map((version) => (
<option key={version} value={version}>
{version}
</option>
))}
</select>
</label>
{selectedSystem && (
<label>
System:
<select value={selectedSystem} onChange={handleSystemChange}>
{data[selectedVersion]?.map((item) => (
<option key={item.system} value={item.system}>
{item.system}
</option>
))}
</select>
</>
</label>
)}
</div>
<div>
{downloadURL != "" && (

{selectedData.download && (
<>
<h4>Get</h4>
<Link
to={downloadURL}
title={downloadURL}
to={selectedData.download}
title={selectedData.download}
className={styles.downloadURL}
>
Download
</Link>
)}
<br />
{runCommand != "" && (
<CodeBlock language="shell">
{runCommand.replaceAll("${version}", version)}
</CodeBlock>
)}
</div>
<div className={styles.linkContainer}>
<Link to={releaseNotesUrl}>View Release Notes</Link>
</div>
</>
)}

<h4>Run</h4>
{runCommand && (
<CodeBlock language="shell">
{runCommand.replace("${version}", selectedVersion)}
</CodeBlock>
)}

{selectedData.links && (
<>
<h4>Links</h4>
<ul>
{selectedData.links.map((link, index) => (
<li key={index}>
<a href={link.link} target="_blank" rel="noopener noreferrer">
{link.description}
</a>
</li>
))}
</ul>
</>
)}
</div>
);
};
Expand Down
Loading

0 comments on commit b429b42

Please sign in to comment.