From 72e60d2542c661ff688967f6cdd654044945d1d1 Mon Sep 17 00:00:00 2001 From: Johnathan Giang Date: Thu, 9 Sep 2021 12:53:24 -0700 Subject: [PATCH 1/8] Create api page with dummy cards --- content/api/Demo_API_Portal_1.md | 9 ++ content/api/Demo_API_Portal_2.md | 9 ++ content/api/Demo_API_Portal_3.md | 9 ++ content/api/Demo_API_Portal_4.md | 9 ++ .../HPE_Greenlake_Cloud_Service_API_Portal.md | 9 ++ content/api/HPE_Redfish_API_Portal.md | 9 ++ gatsby-config.js | 7 ++ src/pages/api/index.js | 114 ++++++++++++++++++ static/admin/config.yml | 19 ++- 9 files changed, 193 insertions(+), 1 deletion(-) create mode 100644 content/api/Demo_API_Portal_1.md create mode 100644 content/api/Demo_API_Portal_2.md create mode 100644 content/api/Demo_API_Portal_3.md create mode 100644 content/api/Demo_API_Portal_4.md create mode 100644 content/api/HPE_Greenlake_Cloud_Service_API_Portal.md create mode 100644 content/api/HPE_Redfish_API_Portal.md create mode 100644 src/pages/api/index.js diff --git a/content/api/Demo_API_Portal_1.md b/content/api/Demo_API_Portal_1.md new file mode 100644 index 0000000000..58ffb78f37 --- /dev/null +++ b/content/api/Demo_API_Portal_1.md @@ -0,0 +1,9 @@ +--- + title: "Demo API Portal 1" + link: /platform/hpe-ezmeral-container-platform/home/ + description: Helps deploy and manage stateful applications on Kubernetes. + priority: 3 + image: '/img/platforms/Aruba.svg' + Featured: true +--- + \ No newline at end of file diff --git a/content/api/Demo_API_Portal_2.md b/content/api/Demo_API_Portal_2.md new file mode 100644 index 0000000000..a4810b6b37 --- /dev/null +++ b/content/api/Demo_API_Portal_2.md @@ -0,0 +1,9 @@ +--- + title: "Demo API Portal 2" + link: /platform/hpe-ezmeral-container-platform/home/ + description: Helps deploy and manage stateful applications on Kubernetes. + priority: 4 + image: '/img/platforms/Aruba.svg' + Featured: true +--- + \ No newline at end of file diff --git a/content/api/Demo_API_Portal_3.md b/content/api/Demo_API_Portal_3.md new file mode 100644 index 0000000000..6ff7e350a8 --- /dev/null +++ b/content/api/Demo_API_Portal_3.md @@ -0,0 +1,9 @@ +--- + title: "Demo API Portal 3" + link: /platform/hpe-ezmeral-container-platform/home/ + description: Helps deploy and manage stateful applications on Kubernetes. + priority: 5 + image: '/img/platforms/Aruba.svg' + Featured: true +--- + \ No newline at end of file diff --git a/content/api/Demo_API_Portal_4.md b/content/api/Demo_API_Portal_4.md new file mode 100644 index 0000000000..c6fe3a0c1c --- /dev/null +++ b/content/api/Demo_API_Portal_4.md @@ -0,0 +1,9 @@ +--- + title: "Demo API Portal 4" + link: /platform/hpe-ezmeral-container-platform/home/ + description: Helps deploy and manage stateful applications on Kubernetes. + priority: 6 + image: '/img/platforms/Aruba.svg' + Featured: true +--- + \ No newline at end of file diff --git a/content/api/HPE_Greenlake_Cloud_Service_API_Portal.md b/content/api/HPE_Greenlake_Cloud_Service_API_Portal.md new file mode 100644 index 0000000000..6bd3f88bf4 --- /dev/null +++ b/content/api/HPE_Greenlake_Cloud_Service_API_Portal.md @@ -0,0 +1,9 @@ +--- + title: "HPE GreenLake Cloud Service API Portal" + link: /platform/hpe-ezmeral-container-platform/home/ + description: Helps deploy and manage stateful applications on Kubernetes. + priority: 1 + image: '/img/platforms/Greenlake.svg' + Featured: true +--- + \ No newline at end of file diff --git a/content/api/HPE_Redfish_API_Portal.md b/content/api/HPE_Redfish_API_Portal.md new file mode 100644 index 0000000000..13bef4c637 --- /dev/null +++ b/content/api/HPE_Redfish_API_Portal.md @@ -0,0 +1,9 @@ +--- + title: "HPE Redfish API Portal" + link: /platform/hpe-ezmeral-container-platform/home/ + description: Helps deploy and manage stateful applications on Kubernetes. + priority: 2 + image: '/img/platforms/iLOrestfulAPI.svg' + Featured: true +--- + \ No newline at end of file diff --git a/gatsby-config.js b/gatsby-config.js index 7e517723ac..1ef953478e 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -170,6 +170,13 @@ module.exports = { name: 'contribute', }, }, + { + resolve: 'gatsby-source-filesystem', + options: { + path: `${__dirname}/content/api`, + name: 'api', + }, + }, { resolve: 'gatsby-transformer-remark', options: { diff --git a/src/pages/api/index.js b/src/pages/api/index.js new file mode 100644 index 0000000000..089e08e664 --- /dev/null +++ b/src/pages/api/index.js @@ -0,0 +1,114 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { graphql } from 'gatsby'; +import { Box, Paragraph } from 'grommet'; +import { + OpenSourceCard, + Layout, + SEO, + PageDescription, + ResponsiveGrid, + SectionHeader, +} from '../../components'; +import { useSiteMetadata } from '../../hooks/use-site-metadata'; + +const columns = { + small: ['auto'], + medium: ['auto', 'auto'], + large: ['auto', 'auto', 'auto'], + xlarge: ['auto', 'auto', 'auto'], +}; + +const rows = { + small: ['auto', 'auto', 'auto'], + medium: ['auto', 'auto'], + large: ['auto'], + xlarge: ['auto'], +}; + +function ApiPage({ data }) { + const projects = data.allMarkdownRemark.edges; + const siteMetadata = useSiteMetadata(); + const siteTitle = siteMetadata.title; + return ( + + + + + API Portal through redocly + + + + + {projects.map(({ node }) => ( + + ))} + + + + ); +} +ApiPage.propTypes = { + data: PropTypes.shape({ + allMarkdownRemark: PropTypes.shape({ + edges: PropTypes.arrayOf( + PropTypes.shape({ + node: PropTypes.shape({ + id: PropTypes.string, + frontmatter: PropTypes.shape({ + title: PropTypes.string.isRequired, + category: PropTypes.string.isRequired, + description: PropTypes.string.isRequired, + image: PropTypes.string, + priority: PropTypes.number, + }).isRequired, + excerpt: PropTypes.string.isRequired, + fields: PropTypes.shape({ + sourceInstanceName: PropTypes.string.isRequired, + }), + }).isRequired, + }).isRequired, + ).isRequired, + }).isRequired, + }).isRequired, +}; +export default ApiPage; +export const pageQuery = graphql` + query { + allMarkdownRemark( + filter: { fields: { sourceInstanceName: { eq: "api" } } } + sort: { fields: [frontmatter___title] } + ) { + edges { + node { + id + rawMarkdownBody + fields { + slug + sourceInstanceName + } + excerpt + frontmatter { + title + description + link + image + priority + } + } + } + } + } +`; diff --git a/static/admin/config.yml b/static/admin/config.yml index 047110c5ca..cbd207bf75 100644 --- a/static/admin/config.yml +++ b/static/admin/config.yml @@ -217,4 +217,21 @@ collections: fields: - {label: Template Type, name: templateType, widget: string } - {label: Template Name, name: templateName, widget: string } - - {label: Template Link, name: link, widget: string } \ No newline at end of file + - {label: Template Link, name: link, widget: string } +# API collection: + - name: 'api' + label: 'API' + folder: 'content/api' + extension: 'md' + create: true + publish: false + slug: '{{slug}}' + editor: + preview: true + fields: + - { label: 'Title', name: 'title', widget: 'string' } + - { label: 'Category', name: 'category', widget: 'string' } + - { label: 'Navigation Path', name: 'link', widget: 'string'} + - { label: 'Description', name: 'description', widget: 'string'} + - { label: 'Priority', name: 'priority', widget: 'number' } + - { label: 'Thumbnail Image', name: 'image', widget: 'image', media_folder: '/static/img', public_folder: '/img', hint: 'image to appear on opensource card' } \ No newline at end of file From 61c545f4a69f006a7780815ed295421234b176cb Mon Sep 17 00:00:00 2001 From: Johnathan Giang Date: Thu, 9 Sep 2021 12:58:44 -0700 Subject: [PATCH 2/8] Add Our APIs to header --- src/components/Header/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/Header/index.js b/src/components/Header/index.js index 91ee4e996a..6c905170e5 100644 --- a/src/components/Header/index.js +++ b/src/components/Header/index.js @@ -21,6 +21,7 @@ const TextAlignLeft = styled(Box)` function Header() { const size = useContext(ResponsiveContext); const navLinks = [ + , , Date: Fri, 10 Sep 2021 08:53:19 -0700 Subject: [PATCH 3/8] Update Browse API content and sort order --- content/api/HPE_Greenlake_Cloud_Service_API_Portal.md | 9 --------- content/api/HPE_Greenlake_Cloud_Services_API_Portal.md | 9 +++++++++ content/api/HPE_Redfish_API_Portal.md | 4 ++-- src/pages/api/index.js | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) delete mode 100644 content/api/HPE_Greenlake_Cloud_Service_API_Portal.md create mode 100644 content/api/HPE_Greenlake_Cloud_Services_API_Portal.md diff --git a/content/api/HPE_Greenlake_Cloud_Service_API_Portal.md b/content/api/HPE_Greenlake_Cloud_Service_API_Portal.md deleted file mode 100644 index 6bd3f88bf4..0000000000 --- a/content/api/HPE_Greenlake_Cloud_Service_API_Portal.md +++ /dev/null @@ -1,9 +0,0 @@ ---- - title: "HPE GreenLake Cloud Service API Portal" - link: /platform/hpe-ezmeral-container-platform/home/ - description: Helps deploy and manage stateful applications on Kubernetes. - priority: 1 - image: '/img/platforms/Greenlake.svg' - Featured: true ---- - \ No newline at end of file diff --git a/content/api/HPE_Greenlake_Cloud_Services_API_Portal.md b/content/api/HPE_Greenlake_Cloud_Services_API_Portal.md new file mode 100644 index 0000000000..43230fea90 --- /dev/null +++ b/content/api/HPE_Greenlake_Cloud_Services_API_Portal.md @@ -0,0 +1,9 @@ +--- + title: "HPE GreenLake Cloud Services API Portal" + link: https://developer.greenlake.hpe.com/ + description: Integrate with HPE GreenLake Cloud Services today! + priority: 1 + image: '/img/platforms/Greenlake.svg' + Featured: true +--- + \ No newline at end of file diff --git a/content/api/HPE_Redfish_API_Portal.md b/content/api/HPE_Redfish_API_Portal.md index 13bef4c637..5f3363af0f 100644 --- a/content/api/HPE_Redfish_API_Portal.md +++ b/content/api/HPE_Redfish_API_Portal.md @@ -1,7 +1,7 @@ --- title: "HPE Redfish API Portal" - link: /platform/hpe-ezmeral-container-platform/home/ - description: Helps deploy and manage stateful applications on Kubernetes. + link: https://redfishdocsproto.redoc.ly/ + description: Manage your datacenter with Redfish® today! priority: 2 image: '/img/platforms/iLOrestfulAPI.svg' Featured: true diff --git a/src/pages/api/index.js b/src/pages/api/index.js index 089e08e664..1eded03764 100644 --- a/src/pages/api/index.js +++ b/src/pages/api/index.js @@ -32,10 +32,10 @@ function ApiPage({ data }) { const siteTitle = siteMetadata.title; return ( - + @@ -89,7 +89,7 @@ export const pageQuery = graphql` query { allMarkdownRemark( filter: { fields: { sourceInstanceName: { eq: "api" } } } - sort: { fields: [frontmatter___title] } + sort: { order: ASC, fields: [frontmatter___priority] } ) { edges { node { From 8836f664d0118567be3dca5c98f6cd1afa452b71 Mon Sep 17 00:00:00 2001 From: Johnathan Giang Date: Mon, 20 Sep 2021 12:25:58 -0700 Subject: [PATCH 4/8] Add updated images --- content/api/HPE_Redfish_API_Portal.md | 2 +- static/img/api/ourapis.svg | 26 ++++++++++++++++++++++++++ static/img/api/redfish.svg | 9 +++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 static/img/api/ourapis.svg create mode 100644 static/img/api/redfish.svg diff --git a/content/api/HPE_Redfish_API_Portal.md b/content/api/HPE_Redfish_API_Portal.md index 5f3363af0f..fccc4f8035 100644 --- a/content/api/HPE_Redfish_API_Portal.md +++ b/content/api/HPE_Redfish_API_Portal.md @@ -3,7 +3,7 @@ link: https://redfishdocsproto.redoc.ly/ description: Manage your datacenter with Redfish® today! priority: 2 - image: '/img/platforms/iLOrestfulAPI.svg' + image: '/img/api/redfish.svg' Featured: true --- \ No newline at end of file diff --git a/static/img/api/ourapis.svg b/static/img/api/ourapis.svg new file mode 100644 index 0000000000..539e323cf5 --- /dev/null +++ b/static/img/api/ourapis.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/static/img/api/redfish.svg b/static/img/api/redfish.svg new file mode 100644 index 0000000000..64e806be2c --- /dev/null +++ b/static/img/api/redfish.svg @@ -0,0 +1,9 @@ + + + + + + + + + From 08f86ef3e2c83fdee937dd9d1640a224ddcc3590 Mon Sep 17 00:00:00 2001 From: Johnathan Giang Date: Mon, 20 Sep 2021 12:26:21 -0700 Subject: [PATCH 5/8] Add ourapis image path --- src/pages/api/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/api/index.js b/src/pages/api/index.js index 1eded03764..5812bcdc55 100644 --- a/src/pages/api/index.js +++ b/src/pages/api/index.js @@ -34,7 +34,7 @@ function ApiPage({ data }) { Date: Thu, 30 Sep 2021 07:25:36 -0700 Subject: [PATCH 6/8] Add quote to cache card --- content/api/Demo_API_Portal_1.md | 8 ++++---- static/img/api/quote_to_cache.svg | 10 ++++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 static/img/api/quote_to_cache.svg diff --git a/content/api/Demo_API_Portal_1.md b/content/api/Demo_API_Portal_1.md index 58ffb78f37..6956110e83 100644 --- a/content/api/Demo_API_Portal_1.md +++ b/content/api/Demo_API_Portal_1.md @@ -1,9 +1,9 @@ --- - title: "Demo API Portal 1" - link: /platform/hpe-ezmeral-container-platform/home/ - description: Helps deploy and manage stateful applications on Kubernetes. + title: "Quote to Cache API Portal" + link: https://annieplayground.redoc.ly/ + description: Quote to Cache, for Subscriptions and Traditional Sales priority: 3 - image: '/img/platforms/Aruba.svg' + image: '/img/api/quote_to_cache.svg' Featured: true --- \ No newline at end of file diff --git a/static/img/api/quote_to_cache.svg b/static/img/api/quote_to_cache.svg new file mode 100644 index 0000000000..0e4d5946f5 --- /dev/null +++ b/static/img/api/quote_to_cache.svg @@ -0,0 +1,10 @@ + + + + + + + + + + From bdd03b50f36f917ff0885c5799c289bc7e7d521a Mon Sep 17 00:00:00 2001 From: Johnathan Giang Date: Thu, 30 Sep 2021 09:41:54 -0700 Subject: [PATCH 7/8] Update page description --- src/pages/api/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/api/index.js b/src/pages/api/index.js index 5812bcdc55..1d4468fa01 100644 --- a/src/pages/api/index.js +++ b/src/pages/api/index.js @@ -40,7 +40,11 @@ function ApiPage({ data }) { alt="api logo" > - API Portal through redocly + + Application programming interfaces simplify development by + facilitating communications between apps. Use our APIs to develop + innovative solutions that run on HPE Platforms. + From 3f7b18173302b31ef63732a983090fab1f519cad Mon Sep 17 00:00:00 2001 From: Johnathan Giang Date: Thu, 30 Sep 2021 21:06:22 -0700 Subject: [PATCH 8/8] Update QTC card --- content/api/Demo_API_Portal_1.md | 9 --------- content/api/Quote-to-Cash.md | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) delete mode 100644 content/api/Demo_API_Portal_1.md create mode 100644 content/api/Quote-to-Cash.md diff --git a/content/api/Demo_API_Portal_1.md b/content/api/Demo_API_Portal_1.md deleted file mode 100644 index 6956110e83..0000000000 --- a/content/api/Demo_API_Portal_1.md +++ /dev/null @@ -1,9 +0,0 @@ ---- - title: "Quote to Cache API Portal" - link: https://annieplayground.redoc.ly/ - description: Quote to Cache, for Subscriptions and Traditional Sales - priority: 3 - image: '/img/api/quote_to_cache.svg' - Featured: true ---- - \ No newline at end of file diff --git a/content/api/Quote-to-Cash.md b/content/api/Quote-to-Cash.md new file mode 100644 index 0000000000..841b10d78f --- /dev/null +++ b/content/api/Quote-to-Cash.md @@ -0,0 +1,9 @@ +--- + title: "Quote to Cash API Portal" + link: https://hpeqtc.redoc.ly/ + description: Integrate with HPE’s Quote to Cash Application for Subscriptions and Traditional Sales! + priority: 3 + image: '/img/api/quote_to_cache.svg' + Featured: true +--- + \ No newline at end of file