add enterprise downloads page (#10550)

* add enterprise downloads page

* remove beta block

* clean up prop repetition, add hcp callout

* move around external props pattern

* add legal notice to ent page
This commit is contained in:
Jeff Escalante 2021-12-24 14:53:07 -05:00 committed by GitHub
parent 7d1899d907
commit 32a2cf4646
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 236 additions and 291 deletions

217
package-lock.json generated
View File

@ -1,217 +0,0 @@
{
"requires": true,
"lockfileVersion": 1,
"dependencies": {
"@algolia/cache-browser-local-storage": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.3.0.tgz",
"integrity": "sha512-91Cf3IPUk84PF2wvR8ys8XO42FqaJEtIh/dyR0WvwMdv0x13GORkAvoBJgkFI2wofZqUY86jNimvHWfsWzPQ+g==",
"requires": {
"@algolia/cache-common": "4.3.0"
}
},
"@algolia/cache-common": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.3.0.tgz",
"integrity": "sha512-AHTbOn9lk0f5IkjssXXmDgnaZfsUJVZ61sqOH1W3LyJdAscDzCj0KtwijELn8FHlLXQak7+K93/O3Oct0uHncQ=="
},
"@algolia/cache-in-memory": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.3.0.tgz",
"integrity": "sha512-8BZS5IFEtiSFkA6vNQUXJXIWABDbSanQdkGX5LArlhbCjuykZqF68yaCjXWG10EZTySnkZLmKc+5ozYVOktJaQ==",
"requires": {
"@algolia/cache-common": "4.3.0"
}
},
"@algolia/client-account": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.3.0.tgz",
"integrity": "sha512-8LJSvWooc+fe+XZXeu+h4dhpo9lsu3sb7rV9cpPhymYSHgEJAHaDkZEcPM1u/PBMvFe0mZXaW6nabeb3jeIRcw==",
"requires": {
"@algolia/client-common": "4.3.0",
"@algolia/client-search": "4.3.0",
"@algolia/transporter": "4.3.0"
}
},
"@algolia/client-analytics": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.3.0.tgz",
"integrity": "sha512-BFH4ddyrqI2pE3bUctn5KtJgYqgvO0Ap9vJEHBNj6mjSKqFbTnZeVEPG3yWrOuWRCqPHR3ewcWRisNwJHG3+Mw==",
"requires": {
"@algolia/client-common": "4.3.0",
"@algolia/client-search": "4.3.0",
"@algolia/requester-common": "4.3.0",
"@algolia/transporter": "4.3.0"
}
},
"@algolia/client-common": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.3.0.tgz",
"integrity": "sha512-8Ohj6zXZkpwDKc8ZWVTZo2wPO4+LT5D258suGg/C6nh4UxOrFOp6QaqeQo8JZ1eqMqtfb3zv5SHgW4fZ00NCLQ==",
"requires": {
"@algolia/requester-common": "4.3.0",
"@algolia/transporter": "4.3.0"
}
},
"@algolia/client-recommendation": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/@algolia/client-recommendation/-/client-recommendation-4.3.0.tgz",
"integrity": "sha512-jCMIAWPA2hsxc5CCtoTtQAcohaG+10CxXK122Tc47t4w1K8qzSJnCjC2cHvM4UNJO+k7NrmjOYW0EXp9RKc7SQ==",
"requires": {
"@algolia/client-common": "4.3.0",
"@algolia/requester-common": "4.3.0",
"@algolia/transporter": "4.3.0"
}
},
"@algolia/client-search": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.3.0.tgz",
"integrity": "sha512-KCgcIsNMW1/0F5OILiFTddbTAKduJHRvXQS4NxY1H9gQWMTVeWJS7VZQ/ukKBiUMLatwUQHJz2qpYm9fmqOjkQ==",
"requires": {
"@algolia/client-common": "4.3.0",
"@algolia/requester-common": "4.3.0",
"@algolia/transporter": "4.3.0"
}
},
"@algolia/logger-common": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.3.0.tgz",
"integrity": "sha512-vQ+aukjZkRAyO9iyINBefT366UtF/B9QoA1Kw8PlY67T6fYmklFgYp3LNH/e7h/gz0py5LYY/HIwSsaTKk8/VQ=="
},
"@algolia/logger-console": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.3.0.tgz",
"integrity": "sha512-7pWtcv1cSSa7F48gRBOZLcEWN073+WbnKjbpRrIGej+abZppw/h+22jtVZZORC8EIjFffGqz2/2e6bZiX+Jg7A==",
"requires": {
"@algolia/logger-common": "4.3.0"
}
},
"@algolia/requester-browser-xhr": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.3.0.tgz",
"integrity": "sha512-CpUwgQhXZsnZmjEd5DTwQv1BKQNCt83bzyVdUqvljsFxZOsNQacS6lOYs0B1eD18tKHCwVMuwbYqTaLPGBXTKQ==",
"requires": {
"@algolia/requester-common": "4.3.0"
}
},
"@algolia/requester-common": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.3.0.tgz",
"integrity": "sha512-1v73KyspJBiTzfyXupjHxikxTYjh5MoxI6mOIvAtQxRqc4ehUPAEdPCNHEvvLiCK96iKWzZaULmV0U7pj3yvTw=="
},
"@algolia/requester-node-http": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.3.0.tgz",
"integrity": "sha512-Hg9Y8sUeSGQgoO1FpoL5jbkDzCtXI/8HXHybU6bimsX93DAz3HZWaoQFKmIpQDNhQ8G9FLgAtzDAxS6eckDxzg==",
"requires": {
"@algolia/requester-common": "4.3.0"
}
},
"@algolia/transporter": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.3.0.tgz",
"integrity": "sha512-BTKHAtdQdfOJ0xzZkiyEK/2QVQJTiVgBZlOBfXp2gBtztjV26OqfW4n6Xz0o7eBRzLEwY1ot3mHF5QIVUjAsMg==",
"requires": {
"@algolia/cache-common": "4.3.0",
"@algolia/logger-common": "4.3.0",
"@algolia/requester-common": "4.3.0"
}
},
"algoliasearch": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.3.0.tgz",
"integrity": "sha512-H2woXyqmd1nFYDrQKLZXgghNkLBTcBXJ7Q/bxQ+F9WWS4H0Kb7IlQvNi7bDzHyldhDhIthImaUwcKqr5iiyMFQ==",
"requires": {
"@algolia/cache-browser-local-storage": "4.3.0",
"@algolia/cache-common": "4.3.0",
"@algolia/cache-in-memory": "4.3.0",
"@algolia/client-account": "4.3.0",
"@algolia/client-analytics": "4.3.0",
"@algolia/client-common": "4.3.0",
"@algolia/client-recommendation": "4.3.0",
"@algolia/client-search": "4.3.0",
"@algolia/logger-common": "4.3.0",
"@algolia/logger-console": "4.3.0",
"@algolia/requester-browser-xhr": "4.3.0",
"@algolia/requester-common": "4.3.0",
"@algolia/requester-node-http": "4.3.0",
"@algolia/transporter": "4.3.0"
}
},
"argparse": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
"requires": {
"sprintf-js": "~1.0.2"
}
},
"dotenv": {
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz",
"integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw=="
},
"esprima": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
},
"extend-shallow": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
"integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"requires": {
"is-extendable": "^0.1.0"
}
},
"gray-matter": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-4.0.2.tgz",
"integrity": "sha512-7hB/+LxrOjq/dd8APlK0r24uL/67w7SkYnfwhNFwg/VDIGWGmduTDYf3WNstLW2fbbmRwrDGCVSJ2isuf2+4Hw==",
"requires": {
"js-yaml": "^3.11.0",
"kind-of": "^6.0.2",
"section-matter": "^1.0.0",
"strip-bom-string": "^1.0.0"
}
},
"is-extendable": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
"integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik="
},
"js-yaml": {
"version": "3.14.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz",
"integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==",
"requires": {
"argparse": "^1.0.7",
"esprima": "^4.0.0"
}
},
"kind-of": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
"integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw=="
},
"section-matter": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz",
"integrity": "sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==",
"requires": {
"extend-shallow": "^2.0.1",
"kind-of": "^6.0.0"
}
},
"sprintf-js": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
},
"strip-bom-string": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz",
"integrity": "sha1-5SEekiQ2n7uB1jOi8ABE3IztrZI="
}
}
}

View File

@ -0,0 +1,92 @@
import Button from '@hashicorp/react-button'
import s from '../../pages/downloads/style.module.css'
export default function DownloadsProps(preMerchandisingSlot) {
return {
getStartedDescription:
'Follow step-by-step tutorials on the essentials of Consul.',
getStartedLinks: [
{
label: 'CLI Quickstart',
href: 'https://learn.hashicorp.com/collections/consul/getting-started',
},
{
label: 'HCP Consul',
href:
'https://learn.hashicorp.com/collections/consul/cloud-get-started',
},
{
label: 'HCS on Azure',
href: 'https://learn.hashicorp.com/collections/consul/hcs-azure',
},
{
label: 'Kubernetes Quickstart',
href:
'https: //learn.hashicorp.com/collections/consul/gs-consul-service-mesh',
},
{
label: 'View all Consul tutorials',
href: 'https://learn.hashicorp.com/consul',
},
],
tutorialLink: {
href: 'https://learn.hashicorp.com/consul',
label: 'View Tutorials at HashiCorp Learn',
},
logo: (
<img
className={s.logo}
alt="Consul"
src={require('@hashicorp/mktg-logos/product/consul/primary/color.svg')}
/>
),
merchandisingSlot: (
<>
{preMerchandisingSlot && preMerchandisingSlot}
<div className={s.merchandisingSlot}>
<div className={s.centerWrapper}>
<p>
Looking for a way to secure and automate application networking
without the added complexity of managing the infrastructure?
</p>
<Button
title="Try HCP Consul"
linkType="inbound"
url="https://portal.cloud.hashicorp.com/sign-up?utm_source=consul_io&utm_content=download_cta"
theme={{
variant: 'tertiary',
brand: 'consul',
}}
/>
</div>
</div>
<p>
<a href="/docs/download-tools">&raquo; Download Consul Tools</a>
</p>
<div className={s.releaseCandidate}>
<p>Note for ARM users:</p>
<ul>
<li>Use Armelv5 for all 32-bit armel systems</li>
<li>Use Armhfv6 for all armhf systems with v6+ architecture</li>
<li>Use Arm64 for all v8 64-bit architectures</li>
</ul>
<p>
The following commands can help determine the right version for your
system:
</p>
<code>$ uname -m</code>
<br />
<code>
$ readelf -a /proc/self/exe | grep -q -c Tag_ABI_VFP_args && echo
&quot;armhf&quot; || echo &quot;armel&quot;
</code>
</div>
</>
),
}
}

View File

@ -2578,13 +2578,62 @@
}
}
},
"node_modules/@next/swc-darwin-arm64": {
"version": "11.1.2",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-11.1.2.tgz",
"integrity": "sha512-hZuwOlGOwBZADA8EyDYyjx3+4JGIGjSHDHWrmpI7g5rFmQNltjlbaefAbiU5Kk7j3BUSDwt30quJRFv3nyJQ0w==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@next/swc-darwin-x64": {
"version": "11.1.2",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-11.1.2.tgz",
"integrity": "sha512-PGOp0E1GisU+EJJlsmJVGE+aPYD0Uh7zqgsrpD3F/Y3766Ptfbe1lEPPWnRDl+OzSSrSrX1lkyM/Jlmh5OwNvA==",
"cpu": ["x64"],
"cpu": [
"x64"
],
"optional": true,
"os": ["darwin"],
"os": [
"darwin"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@next/swc-linux-x64-gnu": {
"version": "11.1.2",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-11.1.2.tgz",
"integrity": "sha512-YcDHTJjn/8RqvyJVB6pvEKXihDcdrOwga3GfMv/QtVeLphTouY4BIcEUfrG5+26Nf37MP1ywN3RRl1TxpurAsQ==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@next/swc-win32-x64-msvc": {
"version": "11.1.2",
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-11.1.2.tgz",
"integrity": "sha512-e/pIKVdB+tGQYa1cW3sAeHm8gzEri/HYLZHT4WZojrUxgWXqx8pk7S7Xs47uBcFTqBDRvK3EcQpPLf3XdVsDdg==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">= 10"
}
@ -8598,7 +8647,9 @@
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
"hasInstallScript": true,
"optional": true,
"os": ["darwin"],
"os": [
"darwin"
],
"engines": {
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
}
@ -21932,12 +21983,30 @@
"integrity": "sha512-hsoJmPfhVqjZ8w4IFzoo8SyECVnN+8WMnImTbTKrRUHOVJcYMmKLL7xf7T0ft00tWwAl/3f3Q3poWIN2Ueql/Q==",
"requires": {}
},
"@next/swc-darwin-arm64": {
"version": "11.1.2",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-11.1.2.tgz",
"integrity": "sha512-hZuwOlGOwBZADA8EyDYyjx3+4JGIGjSHDHWrmpI7g5rFmQNltjlbaefAbiU5Kk7j3BUSDwt30quJRFv3nyJQ0w==",
"optional": true
},
"@next/swc-darwin-x64": {
"version": "11.1.2",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-11.1.2.tgz",
"integrity": "sha512-PGOp0E1GisU+EJJlsmJVGE+aPYD0Uh7zqgsrpD3F/Y3766Ptfbe1lEPPWnRDl+OzSSrSrX1lkyM/Jlmh5OwNvA==",
"optional": true
},
"@next/swc-linux-x64-gnu": {
"version": "11.1.2",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-11.1.2.tgz",
"integrity": "sha512-YcDHTJjn/8RqvyJVB6pvEKXihDcdrOwga3GfMv/QtVeLphTouY4BIcEUfrG5+26Nf37MP1ywN3RRl1TxpurAsQ==",
"optional": true
},
"@next/swc-win32-x64-msvc": {
"version": "11.1.2",
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-11.1.2.tgz",
"integrity": "sha512-e/pIKVdB+tGQYa1cW3sAeHm8gzEri/HYLZHT4WZojrUxgWXqx8pk7S7Xs47uBcFTqBDRvK3EcQpPLf3XdVsDdg==",
"optional": true
},
"@node-rs/helper": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/@node-rs/helper/-/helper-1.2.1.tgz",

View File

@ -0,0 +1,38 @@
import VERSION from 'data/version'
import { productSlug } from 'data/metadata'
import ProductDownloadsPage from '@hashicorp/react-product-downloads-page'
import { generateStaticProps } from '@hashicorp/react-product-downloads-page/server'
import baseProps from 'components/downloads-props'
import s from './style.module.css'
export default function DownloadsPage(staticProps) {
return (
<>
<ProductDownloadsPage
enterpriseMode={true}
{...baseProps(
<p className={s.legalNotice}>
<em>
The following shall apply unless your organization has a
separately signed Enterprise License Agreement or Evaluation
Agreement governing your use of the package: Enterprise packages
in this repository are subject to the license terms located in the
package. Please read the license terms prior to using the package.
Your installation and use of the package constitutes your
acceptance of these terms. If you do not accept the terms, do not
use the package.
</em>
</p>
)}
{...staticProps}
/>
</>
)
}
export async function getStaticProps() {
return generateStaticProps({
product: productSlug,
latestVersion: VERSION,
})
}

View File

@ -2,79 +2,10 @@ import VERSION from 'data/version'
import { productSlug } from 'data/metadata'
import ProductDownloadsPage from '@hashicorp/react-product-downloads-page'
import { generateStaticProps } from '@hashicorp/react-product-downloads-page/server'
import s from './style.module.css'
import baseProps from 'components/downloads-props'
export default function DownloadsPage(staticProps) {
return (
<ProductDownloadsPage
getStartedDescription="Follow step-by-step tutorials on the essentials of Consul."
getStartedLinks={[
{
label: 'CLI Quickstart',
href:
'https://learn.hashicorp.com/collections/consul/getting-started',
},
{
label: 'HCP Consul',
href:
'https://learn.hashicorp.com/collections/consul/cloud-get-started',
},
{
label: 'HCS on Azure',
href: 'https://learn.hashicorp.com/collections/consul/hcs-azure',
},
{
label: 'Kubernetes Quickstart',
href:
'https: //learn.hashicorp.com/collections/consul/gs-consul-service-mesh',
},
{
label: 'View all Consul tutorials',
href: 'https://learn.hashicorp.com/consul',
},
]}
logo={
<img
className={s.logo}
alt="Consul"
src={require('@hashicorp/mktg-logos/product/consul/primary/color.svg')}
/>
}
tutorialLink={{
href: 'https://learn.hashicorp.com/consul',
label: 'View Tutorials at HashiCorp Learn',
}}
merchandisingSlot={
<>
<p>
<a href="/docs/download-tools">&raquo; Download Consul Tools</a>
</p>
<div className={s.releaseCandidate}>
<p>Note for ARM users:</p>
<ul>
<li>Use Armelv5 for all 32-bit armel systems</li>
<li>Use Armhfv6 for all armhf systems with v6+ architecture</li>
<li>Use Arm64 for all v8 64-bit architectures</li>
</ul>
<p>
The following commands can help determine the right version for
your system:
</p>
<code>$ uname -m</code>
<br />
<code>
$ readelf -a /proc/self/exe | grep -q -c Tag_ABI_VFP_args && echo
&quot;armhf&quot; || echo &quot;armel&quot;
</code>
</div>
</>
}
{...staticProps}
/>
)
return <ProductDownloadsPage {...baseProps()} {...staticProps} />
}
export async function getStaticProps() {

View File

@ -20,3 +20,35 @@
margin-bottom: 0;
}
}
.merchandisingSlot {
width: 100%;
border: 1px solid var(--gray-6);
padding: 16px;
display: flex;
justify-content: center;
margin-bottom: 58px;
& .centerWrapper {
display: flex;
align-items: center;
& p {
margin: 0;
max-width: 490px;
margin-right: 26px;
}
@media (max-width: 800px) {
flex-direction: column;
& p {
text-align: center;
margin-bottom: 12px;
}
}
}
}
.legalNotice {
margin-bottom: 60px;
}