From ff32de40c233c4ce352d1f14cf411caf78370c86 Mon Sep 17 00:00:00 2001 From: Martin Rohrmeier Date: Thu, 23 Feb 2023 10:14:48 +0100 Subject: [PATCH 1/6] added md loading indicator --- public/documentation/css/Chapter.css | 25 +++++++-- public/documentation/css/Main.css | 52 ++++++++++++++++-- public/documentation/js/Main.js | 79 ++++++++++++++++++++-------- 3 files changed, 127 insertions(+), 29 deletions(-) diff --git a/public/documentation/css/Chapter.css b/public/documentation/css/Chapter.css index 9c6af7cd2..6354e97bf 100644 --- a/public/documentation/css/Chapter.css +++ b/public/documentation/css/Chapter.css @@ -41,6 +41,7 @@ nav.menu { display: flex; flex-direction: row; transition: width 0.1s; + min-height: 35vh; } nav.menu.open { @@ -122,6 +123,7 @@ nav.breadcrumb { display: flex; flex-direction: row; justify-content: space-between; + margin-bottom: 20px; } nav.menu ul.level1, @@ -139,14 +141,19 @@ nav.menu ul.level2 { } nav.breadcrumb ul { + display: flex; + flex-direction: row; padding-inline-start: 0; margin-block-start: 0; margin-block-end: 0; list-style-type: none; margin-bottom: 30px; font-size: 12px; - display: flex; - flex-direction: row; + margin-top: 10px; +} + +nav.breadcrumb a.github img { + margin-top: 10px; } nav.breadcrumb ul li { @@ -199,17 +206,27 @@ article.content { } article.content.small { - padding: 40px 60px 60px 60px; + padding: 30px 60px 60px 60px; width: 800px; margin-left: 280px; } article.content.large { - padding: 40px 60px 60px 60px; + padding: 30px 60px 60px 60px; width: 1072px; margin-left: 20px; } +article.content > div { + position: relative; +} + +article.content .loader { + position: absolute; + top: 0px; + right: 0px; +} + ul.subchapter { display: flex; flex-direction: row; diff --git a/public/documentation/css/Main.css b/public/documentation/css/Main.css index e64b72ea8..490942f6a 100644 --- a/public/documentation/css/Main.css +++ b/public/documentation/css/Main.css @@ -28,7 +28,7 @@ html { } body { - font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji; + font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji; background-image: url(/assets/images/frame/Home.jpg); background-position: 0px 0px; background-repeat: no-repeat; @@ -65,13 +65,13 @@ header { } .release-selection select, -.search input { +.search input { padding: 4px; border-radius: 4px; border: 1px solid lightgray } -.search input { +.search input { padding: 4px 10px; line-height: 17px; } @@ -272,4 +272,50 @@ footer .copy { .scroll-helper button:hover { color: #aaaaaa; +} + +.loader { + width: 40px; + height: 40px; + border-radius: 50%; + position: relative; + animation: rotate 1s linear infinite +} + +.loader::before { + content: ""; + box-sizing: border-box; + position: absolute; + inset: 0px; + border-radius: 50%; + border: 5px solid rgb(15, 113, 203); + animation: prixClipFix 4s linear infinite; +} + +@keyframes rotate { + 100% { + transform: rotate(360deg) + } +} + +@keyframes prixClipFix { + 0% { + clip-path: polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0) + } + + 25% { + clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0) + } + + 50% { + clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%) + } + + 75% { + clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%) + } + + 100% { + clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0) + } } \ No newline at end of file diff --git a/public/documentation/js/Main.js b/public/documentation/js/Main.js index cca72d53f..2066c926b 100644 --- a/public/documentation/js/Main.js +++ b/public/documentation/js/Main.js @@ -124,14 +124,12 @@ class Search extends Viewable { } filter(e) { - //console.log(this.clazz, e) if (!e) { state.setSearch([]) return this } const regex = new RegExp(`(${e.toLocaleLowerCase().replace(/[^a-z0-9]/g, ' ').trim().split(/\s+/).join('|')})`, 'ig') const count = (expr) => ((expr || '').match(regex) || []).length - // search in names const topics = Object.values(state.data.map) .filter(item => item.name.match(regex)) .map(item => ({ ...item, matches: count(item.name) })) @@ -232,7 +230,6 @@ class ReleaseSelection extends Viewable { } - class Breadcrumb extends Viewable { constructor() { @@ -254,6 +251,7 @@ class Breadcrumb extends Viewable { } selectionChanged(selection, content) { + clear(this.view) const list = [content] while (list[0].parent) { list.unshift(list[0].parent) @@ -398,17 +396,33 @@ class Content extends Viewable { super() state.addMenuOpenListener(this) this.breadcrumb = new Breadcrumb() - this.view = N('article', null, { class: 'content small' }) + this.markdown = N('script', ' ', { type: 'text/markdown' }) + this.page = N('zero-md', this.markdown) + this.loader = N('div', '', { class: 'loader hidden' }) + this.view = N('article', [ + N('div', [ + this.breadcrumb, + this.loader, + ]), + this.page, + ], { class: 'content small' }) + } + + menuOpenChanged(menuOpen) { + this.view.className = menuOpen ? 'content small' : 'content large' + return this } selectionChanged(selection, content) { - return this.clear() - .append(this.breadcrumb.selectionChanged(selection, content)) - .append(this.renderArticle(content)) + this.breadcrumb.selectionChanged(selection, content) + return this.renderArticle(content) } - menuOpenChanged(menuOpen) { - this.view.className = menuOpen ? 'content small' : 'content large' + replacePage(page) { + const parent = this.page.parentElement + parent.removeChild(this.page) + parent.appendChild(page) + this.page = page return this } @@ -422,7 +436,7 @@ class Content extends Viewable { } replaceLink(item) { - const newItem = N('div', null, { class: 'headline' }) + const newItem = N('div', null, { class: 'headline', style: { height: item.height } }) const link = this.renderLink(this.content, item.id) item.parentElement.insertBefore(newItem, item) item.parentElement.removeChild(item) @@ -430,14 +444,15 @@ class Content extends Viewable { newItem.appendChild(link) newItem.onmouseover = () => link.style.display = 'block' newItem.onmouseout = () => link.style.display = 'none' - item.onclick = () => { + item.onclick = (e) => { + //e.preventDefault() history.replaceState({}, document.getElementsByTagName('title').content, location.href.split('#')[0] + (item.id ? '#' + item.id : '')) item.scrollIntoView() } } replaceLinks() { - const root = this.zeromd.shadowRoot; + const root = this.page.shadowRoot; [...root.querySelectorAll('a')].forEach(link => addEvents( link, { @@ -445,7 +460,6 @@ class Content extends Viewable { e.preventDefault() const path = decodeURI(link.href).replace(`${Settings.DOCBASE}/${state.releaseSelection}/`, '').replace(/\/$/, '') e.target.href = `.?path=${path}` - //console.log(link.href, path) state.setSelection(path) } } @@ -453,23 +467,44 @@ class Content extends Viewable { [...root.querySelectorAll('h1, h2, h3, h4, h5, h6')].forEach(this.replaceLink.bind(this)) root.styleSheets[0].insertRule('h1:hover, h2:hover, h3:hover, h4:hover, h5:hover { text-decoration: underline; cursor: pointer; }') root.styleSheets[0].insertRule('.headline { position: relative; }') - root.styleSheets[0].insertRule('a.github { position: absolute; width: 20px; height: 20px; bottom: 15%; right: 0px; background-color: #888888; display: none; }') - root.styleSheets[0].insertRule('.markdown-body { margin-top: -24px; }') + root.styleSheets[0].insertRule('a.github { position: absolute; width: 20px; height: 20px; bottom: 15%; right: 0px; background-color: #888888; display: none; }'); + root.styleSheets[0].insertRule('.markdown-body { margin-top: -24px; }'); } renderMD(content) { this.content = content - this.zeromd = N('zero-md', null, { src: `${Settings.DOCBASE}/${state.releaseSelection}/${content.path}` }) - this.checkLoadedCount = 0 + const url = `${Settings.DOCBASE}/${state.releaseSelection}/${content.path}` + this.loader.classList.remove('hidden') + fetch(url) + .then(response => response.text()) + .then(this.mdFromText.bind(this)) + return this + } + + mdFromText(text) { + this.replacePage( + N('zero-md', N('script', text, { type: 'text/markdown' })) + ) + setTimeout(this.replaceLinks.bind(this), 100) + this.loader.classList.add('hidden') + return this + } + + mdFromURL(url) { + this.replacePage( + N('zero-md', null, { src: url }) + ) // we don't get an onload event from zero-md so waiting one sec before replacing the links - // as a future improvement we might load the md separately and then initialize zero-md with the content - // this would also allow to show a loading icon which is currently difficult - this.checkLoadedTimer = setTimeout(this.replaceLinks.bind(this), 1000) - return this.zeromd + setTimeout(this.replaceLinks.bind(this), 1000) + return this } renderOverview(content) { - return N('ul', content.children.map((chapter) => N('li', new ChapterCard(chapter))), { class: 'subchapter' }) + return this.replacePage( + N('ul', content.children.map((chapter) => + N('li', new ChapterCard(chapter)) + ), { class: 'subchapter' }) + ) } renderArticle(content) { From 8b47757162a0c24988ab26c7c1bfafaaae3a1f15 Mon Sep 17 00:00:00 2001 From: Martin Rohrmeier Date: Thu, 23 Feb 2023 10:41:20 +0100 Subject: [PATCH 2/6] prepare for release 1.0.0 --- .../documentation/data/1.0.0/developer.json | 1390 +++++++++++++++++ public/documentation/data/1.0.0/docs.json | 907 +++++++++++ public/documentation/data/Releases.json | 81 +- public/documentation/data/main/developer.json | 188 ++- public/documentation/data/main/docs.json | 53 +- public/documentation/js/Main.js | 8 +- public/documentation/js/Settings.js | 2 +- public/documentation/js/State.js | 11 +- 8 files changed, 2443 insertions(+), 197 deletions(-) create mode 100644 public/documentation/data/1.0.0/developer.json create mode 100644 public/documentation/data/1.0.0/docs.json diff --git a/public/documentation/data/1.0.0/developer.json b/public/documentation/data/1.0.0/developer.json new file mode 100644 index 000000000..08952c871 --- /dev/null +++ b/public/documentation/data/1.0.0/developer.json @@ -0,0 +1,1390 @@ +{ + "path": "developer", + "name": "Catena-X Developer Documentation", + "children": [ + { + "path": "developer/01. Onboarding", + "name": "01. Onboarding", + "children": [ + { + "path": "developer/01. Onboarding/01. Invite", + "name": "01. Invite", + "children": [ + { + "path": "developer/01. Onboarding/01. Invite/01. Summary.md", + "name": "01. Summary.md", + "chapter": [ + "## Summary" + ] + }, + { + "path": "developer/01. Onboarding/01. Invite/02. Overview Invited Companies.md", + "name": "02. Overview Invited Companies.md", + "chapter": [ + "## Get Invited Companies", + "#### API Details" + ] + }, + { + "path": "developer/01. Onboarding/01. Invite/03. Invite Company : Create Application.md", + "name": "03. Invite Company : Create Application.md", + "chapter": [ + "## Invite Company", + "#### API Details" + ] + } + ] + }, + { + "path": "developer/01. Onboarding/02. Registration", + "name": "02. Registration", + "children": [ + { + "path": "developer/01. Onboarding/02. Registration/01. Login.md", + "name": "01. Login.md", + "chapter": [ + "# Intro", + "#### Registration Login", + "### Registration Login Details", + "## Portal Login" + ] + }, + { + "path": "developer/01. Onboarding/02. Registration/02. Add Company Data.md", + "name": "02. Add Company Data.md", + "chapter": [ + "# Implementation", + "## Enter / Verify Company Data", + "#### API Details", + "##### Display Company Data Registration Details (pre-saved)", + "###### a) via BPN search and automatic data load", + "###### a) adding the data manually", + "##### Unique Identifier", + "##### Logic implemented for the country specific identifier", + "###### API Response", + "###### Result on UI", + "#A - no unique identifier", + "#B - only one unique identifier (happy path)", + "#C - multiple identifier", + "###### Implemented Pattern", + "###### POST allowed Unique Identifier", + "##### Store / Save Company Data Registration Details" + ] + }, + { + "path": "developer/01. Onboarding/02. Registration/03. Add Additional Users.md", + "name": "03. Add Additional Users.md", + "chapter": [ + "# Implementation", + "## Add Aditional Users", + "#### API Details" + ] + }, + { + "path": "developer/01. Onboarding/02. Registration/04. Company Role & Consent.md", + "name": "04. Company Role & Consent.md", + "chapter": [ + "# Implementation", + "## Select company role & sign terms and conditions", + "#### API Details", + "#1 Roles and agreements are fetched from the consent endpoint", + "#2 Consent Post" + ] + }, + { + "path": "developer/01. Onboarding/02. Registration/05. Document Upload.md", + "name": "05. Document Upload.md", + "chapter": [ + "# Implementation", + "## Upload registration relevant documents", + "#### API Details", + "##### #1 API Get Documents", + "##### #2 API Upload Document", + "##### #3 API Delete Document", + "##### #4 API Download Document" + ] + }, + { + "path": "developer/01. Onboarding/02. Registration/06. Verify Registration Data.md", + "name": "06. Verify Registration Data.md", + "chapter": [ + "# Implementation", + "## Verify your data", + "##### #1 Get application data", + "##### #2 Submit Registration" + ] + } + ] + }, + { + "path": "developer/01. Onboarding/03. Registration Approval", + "name": "03. Registration Approval", + "children": [ + { + "path": "developer/01. Onboarding/03. Registration Approval/01. Summary.md", + "name": "01. Summary.md", + "chapter": [ + "## Summary", + "## Functional Details", + "### Display Application Details" + ] + }, + { + "path": "developer/01. Onboarding/03. Registration Approval/02. View Company Application(s).md", + "name": "02. View Company Application(s).md", + "chapter": [ + "## View Company Application(s)", + "## 1 Get Applications", + "###### Filtering", + "###### Search", + "#### Logical flow of the service", + "#### API Details", + "## 2 Get Application Details", + "#### API Details Get Company Registration Data", + "##### Response Body / Details:", + "#### API Details Get Company Checklist Status", + "## 3 Download Documents", + "#### Logical flow of the service", + "#### API Details" + ] + }, + { + "path": "developer/01. Onboarding/03. Registration Approval/03. Registration Approval Process.md", + "name": "03. Registration Approval Process.md", + "chapter": [ + "## Summary", + "### Approval Overlay/Status", + "##### #1 Registration Validation", + "##### #2 BPN Creation", + "##### #3 Managed Identity Wallet", + "##### #4 Clearinghouse", + "##### #5 Self Description LP", + "### Approval Flow", + "#### Details \"Manual Validation\"", + "##### Scenario: Approve", + "##### Scenario: Decline", + "##### Details \"Create Business Partner Number (if necessary)\"", + "##### Scenario 1 - Registration with BPN", + "##### Scenario 2 - Registration without BPN", + "##### Scenario 3 - manually add BPN as an operator (interim supported workflow)", + "##### Details \"Create Managed Identity Wallet\"", + "#### Details \"Clearinghouse Check\"", + "###### Step 1 - Send company data to clearinghouse", + "###### Step 2 - Clearinghouse response", + "##### Details \"Self-Description Creation LegalPerson\"", + "###### Step 1 - Create SelfDescription - send company data to SD Factory", + "###### Step 2 - Save self description document", + "###### DB Table Content", + "##### Details \"Activation\"", + "### Add/Update BPN for the registration company", + "### Status endpoint - Checklist Details" + ] + }, + { + "path": "developer/01. Onboarding/03. Registration Approval/04. Decline Application.md", + "name": "04. Decline Application.md", + "chapter": [ + "## Decline Company Application", + "##### API Implementation" + ] + } + ] + } + ] + }, + { + "path": "developer/02. Technical Integration", + "name": "02. Technical Integration", + "children": [ + { + "path": "developer/02. Technical Integration/01. Connector Registration", + "name": "01. Connector Registration", + "children": [ + { + "path": "developer/02. Technical Integration/01. Connector Registration/01. Summary.md", + "name": "01. Summary.md", + "chapter": [ + "# Summary" + ] + }, + { + "path": "developer/02. Technical Integration/01. Connector Registration/02. View Connector.md", + "name": "02. View Connector.md", + "chapter": [ + "## View Connector", + "## Details", + "##### Status:", + "##### SD Registration:", + "##### Host:", + "## Implementation/APIs", + "### 1 Get all MY Connector Registrations", + "#### Logical flow of the service", + "#### API Details" + ] + }, + { + "path": "developer/02. Technical Integration/01. Connector Registration/03. Create new Connector Registration.md", + "name": "03. Create new Connector Registration.md", + "chapter": [ + "## 1. Create new Connector Registration - self-owned", + "#### Details to the DAPS", + "#### Details to the SD", + "##### #1 Self description request", + "##### #2 Self description response (asynchron)", + "#### Logical flow of the service", + "#### API Details", + "## 2. Create new Connector Registration - managedĀ ", + "#### Logical flow of the service", + "#### API Details" + ] + }, + { + "path": "developer/02. Technical Integration/01. Connector Registration/04. DAPS Registration.md", + "name": "04. DAPS Registration.md", + "chapter": [ + "## 4 Retrigger DAPS", + "#### API Details" + ] + }, + { + "path": "developer/02. Technical Integration/01. Connector Registration/05. Self Description.md", + "name": "05. Self Description.md", + "chapter": [ + "## Self Description", + "### Implementation Details", + "#### Send Company Data to SD Factory (Create SD)", + "#### SD CallBack Service" + ] + }, + { + "path": "developer/02. Technical Integration/01. Connector Registration/06. Delete Connector.md", + "name": "06. Delete Connector.md", + "chapter": [ + "## 5 Delete Connector", + "#### API Details" + ] + } + ] + }, + { + "path": "developer/02. Technical Integration/02. Identity Provider Management", + "name": "02. Identity Provider Management", + "children": [ + { + "path": "developer/02. Technical Integration/02. Identity Provider Management/01. Summary.md", + "name": "01. Summary.md", + "chapter": [ + "# Summary" + ] + }, + { + "path": "developer/02. Technical Integration/02. Identity Provider Management/02. Configure Company IdP.md", + "name": "02. Configure Company IdP.md", + "chapter": [ + "# User Description", + "### Register your company IdP", + "#### Create the new idp record" + ] + }, + { + "path": "developer/02. Technical Integration/02. Identity Provider Management/03. User Migration.md", + "name": "03. User Migration.md", + "chapter": [ + "#### Migrate existing user accounts to the new created IdP" + ] + }, + { + "path": "developer/02. Technical Integration/02. Identity Provider Management/04. FAQ.md", + "name": "04. FAQ.md", + "chapter": [ + "### FAQ", + "#### ?" + ] + } + ] + }, + { + "path": "docs/04. App(s)/06. App Change Process", + "name": "06. App Change Process", + "children": [ + { + "path": "docs/04. App(s)/06. App Change Process/01. Summary.md", + "name": "01. Summary.md", + "chapter": [ + "## Summary", + "## Function" + ] + }, + { + "path": "docs/04. App(s)/06. App Change Process/02. App Deactivation.md", + "name": "02. App Deactivation.md", + "chapter": [ + "## Summary" + ] + } + ] + }, + { + "path": "docs/04. App(s)/07. App Provider Management", + "name": "07. App Provider Management", + "children": [ + { + "path": "docs/04. App(s)/07. App Provider Management/01. Open API.md", + "name": "01. Open API.md", + "chapter": [ + "## Open API - Offer Autosetup", + "## Interface / API / Service Summary", + "## Architecture Overview", + "## Implementation", + "### #1 PUT Service URL", + "### #2 POST Service Request", + "### #3 POST Service Instance" + ] + } + ] + }, + { + "path": "docs/04. App(s)/index.md", + "name": "index.md", + "chapter": [ + "# Summary", + "### App Marketplace in Catena-X" + ] + } + ] + }, + { + "path": "docs/05. Service(s)", + "name": "05. Service(s)", + "children": [ + { + "path": "docs/05. Service(s)/01. Service Marketplace", + "name": "01. Service Marketplace", + "children": [ + { + "path": "docs/05. Service(s)/01. Service Marketplace/01. Service Marketplace.md", + "name": "01. Service Marketplace.md", + "chapter": [ + "## Summary", + "## Functionality", + "### Service Marketplace Overview" + ] + }, + { + "path": "docs/05. Service(s)/01. Service Marketplace/02. Service Details.md", + "name": "02. Service Details.md", + "chapter": [ + "## Service Offer Details" + ] + }, + { + "path": "docs/05. Service(s)/01. Service Marketplace/03. FAQ.md", + "name": "03. FAQ.md", + "chapter": [ + "### FAQ" + ] + } + ] + }, + { + "path": "docs/05. Service(s)/02. Service Release Process", + "name": "02. Service Release Process", + "children": [ + { + "path": "docs/05. Service(s)/02. Service Release Process/01. Release Flow.md", + "name": "01. Release Flow.md", + "chapter": [ + "## Summary" + ] + }, + { + "path": "docs/05. Service(s)/02. Service Release Process/02. FAQ.md", + "name": "02. FAQ.md", + "chapter": [ + "### FAQ", + "### How can I submit a new service offer for marketplace publishing?" + ] + } + ] + }, + { + "path": "docs/05. Service(s)/03. Service Subscription", + "name": "03. Service Subscription", + "children": [ + { + "path": "docs/05. Service(s)/03. Service Subscription/01. Service Subscription.md", + "name": "01. Service Subscription.md", + "chapter": [ + "## Summary", + "## Connected Documentation" + ] + }, + { + "path": "docs/05. Service(s)/03. Service Subscription/02. FAQ.md", + "name": "02. FAQ.md", + "chapter": [ + "### FAQ", + "#### Can I trigger a second service subscription request?", + "#### I dont have subscription rights - how can I receive the necessary rights?", + "#### I triggered a service request what do I need to do now?" + ] + } + ] + }, + { + "path": "docs/05. Service(s)/index.md", + "name": "index.md", + "chapter": [ + "## Service Marketplace in Catena-X" + ] + } + ] + }, + { + "path": "docs/Style-Guide", + "name": "Style-Guide", + "children": [ + { + "path": "docs/Style-Guide/Static_Page_Template.md", + "name": "Static_Page_Template.md", + "chapter": [ + "## Static Page Template(s)", + "### Templates", + "#### Common Notes", + "#### #1 TextCenterAlignedWithCardGrid", + "#### #2 TextCenterAlignedWithLinkButtonGrid ", + "#### #3 TextImageSideBySideWithCardGrid ", + "#### #4 TextVideoSideBySide ", + "#### #5 Video-Text-Side-By-Side ", + "#### #6 Text-Image-Center-Aligned", + "#### #7 Text-Center-Aligned", + "#### #8 Text-Image-Side-By-Side", + "### Implementation ", + "#### New Page creation", + "#### Enhancing an existing page" + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/public/documentation/data/Releases.json b/public/documentation/data/Releases.json index be65f2ef1..ee55b2d93 100644 --- a/public/documentation/data/Releases.json +++ b/public/documentation/data/Releases.json @@ -1,82 +1,3 @@ [ - { - "ref": "refs/tags/1.0.0-RC1", - "node_id": "REF_kwDOIe7Dt7NyZWZzL3RhZ3MvMS4wLjAtUkMx", - "url": "https://api.github.com/repos/catenax-ng/tx-portal-assets/git/refs/tags/1.0.0-RC1", - "object": { - "sha": "0d0026867d57c86dc4a04be45e44016a60a651cb", - "type": "tag", - "url": "https://api.github.com/repos/catenax-ng/tx-portal-assets/git/tags/0d0026867d57c86dc4a04be45e44016a60a651cb" - } - }, - { - "ref": "refs/tags/1.0.0-RC2", - "node_id": "REF_kwDOIe7Dt7NyZWZzL3RhZ3MvMS4wLjAtUkMy", - "url": "https://api.github.com/repos/catenax-ng/tx-portal-assets/git/refs/tags/1.0.0-RC2", - "object": { - "sha": "12d52264f28691cc038a7ddad64762eea2b5ebeb", - "type": "tag", - "url": "https://api.github.com/repos/catenax-ng/tx-portal-assets/git/tags/12d52264f28691cc038a7ddad64762eea2b5ebeb" - } - }, - { - "ref": "refs/tags/1.0.0-RC3", - "node_id": "REF_kwDOIe7Dt7NyZWZzL3RhZ3MvMS4wLjAtUkMz", - "url": "https://api.github.com/repos/catenax-ng/tx-portal-assets/git/refs/tags/1.0.0-RC3", - "object": { - "sha": "feb26cc5d69489659020d76d76e624a213419474", - "type": "tag", - "url": "https://api.github.com/repos/catenax-ng/tx-portal-assets/git/tags/feb26cc5d69489659020d76d76e624a213419474" - } - }, - { - "ref": "refs/tags/1.0.0-RC4", - "node_id": "REF_kwDOIe7Dt7NyZWZzL3RhZ3MvMS4wLjAtUkM0", - "url": "https://api.github.com/repos/catenax-ng/tx-portal-assets/git/refs/tags/1.0.0-RC4", - "object": { - "sha": "2e0ebf994eba2c020bcec93e4d349e5d2dfe9758", - "type": "tag", - "url": "https://api.github.com/repos/catenax-ng/tx-portal-assets/git/tags/2e0ebf994eba2c020bcec93e4d349e5d2dfe9758" - } - }, - { - "ref": "refs/tags/1.0.0-RC5", - "node_id": "REF_kwDOIe7Dt7NyZWZzL3RhZ3MvMS4wLjAtUkM1", - "url": "https://api.github.com/repos/catenax-ng/tx-portal-assets/git/refs/tags/1.0.0-RC5", - "object": { - "sha": "6312a9414dfdef29aacd094ba4885ddeb8eb7b43", - "type": "tag", - "url": "https://api.github.com/repos/catenax-ng/tx-portal-assets/git/tags/6312a9414dfdef29aacd094ba4885ddeb8eb7b43" - } - }, - { - "ref": "refs/tags/1.0.0-RC6", - "node_id": "REF_kwDOIe7Dt7NyZWZzL3RhZ3MvMS4wLjAtUkM2", - "url": "https://api.github.com/repos/catenax-ng/tx-portal-assets/git/refs/tags/1.0.0-RC6", - "object": { - "sha": "1dbb80f6878695db1bbaae38a70b44e349d05b2f", - "type": "tag", - "url": "https://api.github.com/repos/catenax-ng/tx-portal-assets/git/tags/1dbb80f6878695db1bbaae38a70b44e349d05b2f" - } - }, - { - "ref": "refs/tags/1.0.0-RC7", - "node_id": "REF_kwDOIe7Dt7NyZWZzL3RhZ3MvMS4wLjAtUkM3", - "url": "https://api.github.com/repos/catenax-ng/tx-portal-assets/git/refs/tags/1.0.0-RC7", - "object": { - "sha": "0a9174e534f56f4c7d49b69f2ca5cc9957b58ea8", - "type": "tag", - "url": "https://api.github.com/repos/catenax-ng/tx-portal-assets/git/tags/0a9174e534f56f4c7d49b69f2ca5cc9957b58ea8" - } - }, - { - "ref": "refs/tags/1.0.0-RC8", - "node_id": "REF_kwDOIe7Dt7NyZWZzL3RhZ3MvMS4wLjAtUkM4", - "url": "https://api.github.com/repos/catenax-ng/tx-portal-assets/git/refs/tags/1.0.0-RC8", - "object": { - "sha": "d8d43d3ff3f3fe1d1d88e3e122ab5b15e2d3f2cb", - "type": "tag", - "url": "https://api.github.com/repos/catenax-ng/tx-portal-assets/git/tags/d8d43d3ff3f3fe1d1d88e3e122ab5b15e2d3f2cb" - } - } + "refs/tags/1.0.0" ] diff --git a/public/documentation/data/main/developer.json b/public/documentation/data/main/developer.json index 4a85e2e30..08952c871 100644 --- a/public/documentation/data/main/developer.json +++ b/public/documentation/data/main/developer.json @@ -425,11 +425,11 @@ ] }, { - "path": "developer/03. User Management/3 Technical User", - "name": "3 Technical User", + "path": "developer/03. User Management/03. Technical User", + "name": "03. Technical User", "children": [ { - "path": "developer/03. User Management/3 Technical User/01. Summary.md", + "path": "developer/03. User Management/03. Technical User/01. Summary.md", "name": "01. Summary.md", "chapter": [ "# Summary", @@ -438,7 +438,7 @@ ] }, { - "path": "developer/03. User Management/3 Technical User/02. View Technical Users.md", + "path": "developer/03. User Management/03. Technical User/02. View Technical Users.md", "name": "02. View Technical Users.md", "chapter": [ "## View technical users", @@ -447,7 +447,7 @@ ] }, { - "path": "developer/03. User Management/3 Technical User/03. Create Technical User.md", + "path": "developer/03. User Management/03. Technical User/03. Create Technical User.md", "name": "03. Create Technical User.md", "chapter": [ "## Create a new technical user", @@ -459,7 +459,7 @@ ] }, { - "path": "developer/03. User Management/3 Technical User/04. Delete Technical User.md", + "path": "developer/03. User Management/03. Technical User/04. Delete Technical User.md", "name": "04. Delete Technical User.md", "chapter": [ "## Delete an user", @@ -470,11 +470,11 @@ ] }, { - "path": "developer/03. User Management/4 App Access Management", - "name": "4 App Access Management", + "path": "developer/03. User Management/04. App Access Management", + "name": "04. App Access Management", "children": [ { - "path": "developer/03. User Management/4 App Access Management/01. Summary.md", + "path": "developer/03. User Management/04. App Access Management/01. Summary.md", "name": "01. Summary.md", "chapter": [ "# Summary", @@ -482,7 +482,7 @@ ] }, { - "path": "developer/03. User Management/4 App Access Management/02. Assign App Role Page Overview.md", + "path": "developer/03. User Management/04. App Access Management/02. Assign App Role Page Overview.md", "name": "02. Assign App Role Page Overview.md", "chapter": [ "## App Role Management", @@ -491,7 +491,7 @@ ] }, { - "path": "developer/03. User Management/4 App Access Management/03. Assign App Role.md", + "path": "developer/03. User Management/04. App Access Management/03. Assign App Role.md", "name": "03. Assign App Role.md", "chapter": [ "## Assign App Role", @@ -1038,41 +1038,63 @@ ] }, { - "path": "developer/Technical Documentation/Identity & Access/09. Generic Security.md", - "name": "09. Generic Security.md", + "path": "developer/Technical Documentation/Identity & Access/05. Roles & Rights Concept.md", + "name": "05. Roles & Rights Concept.md", "chapter": [ - "## Security Generic", - "### Host", - "### Bruce Force Detection", - "#### Catena-X configuration", - "##### Preventing automated attacks", - "##### Preventing manual attacks", - "### Clickjacking", - "### Open redirections", - "### Compromised Authorization code", - "### Compromised access and refresh tokens", - "### CSRF attack", - "### Limiting Scope - Client Token", - "### Client Policies" + "## 1. General details", + "### 1.1 Scope and binding force of the document", + "### 1.2 Affected application", + "### 1.3 Referenced documents", + "## 2. Authorization structure and role model", + "### 2.1 Underlying business processes and roles:", + "### 2.2 Basic principles", + "### 2.3 Individual privileges and authorization framework", + "### 2.4 Role definition", + "### 2.5 Role/Permission Matrix", + "#### 2.5.1 Technical User (portal internal)", + "#### 2.5.2 Registration Application", + "#### 2.5.3 Portal Application", + "#### 2.5.3b Technical User Accounts", + "#### 2.5.4 Managed Wallets", + "#### 2.5.5 BPDM", + "#### 2.5.6 BPDM Gate", + "#### 2.5.7 BPDMShare", + "### 2.6 Segregation of duties", + "## 3. Global subjects", + "### 3.1 Authorization management connections", + "### 3.2 Used infrastructure components", + "### 3.3 Privileged and technical user accounts", + "### 3.4 Technical restrictions", + "### 3.5 Logging the use", + "## 4. Authorization procedure", + "## 5. Appendix" ] }, { - "path": "developer/Technical Documentation/Identity & Access/Event Logging.md", - "name": "Event Logging.md", + "path": "developer/Technical Documentation/Identity & Access/06. Password Policy.md", + "name": "06. Password Policy.md", "chapter": [ - "# Event Logging", - "## Requirement", - "## Keycloak events", - "## Configure Logging", - "##### Keycloak Admin UI/DB", - "###### Event Types", - "##### Log Files", - "## Event Listener" + "# Password Policy", + "## Password Policy", + "#### How to configure Password Policies", + "#### Implementation", + "##Password Reset", + "#### How to configure Password Recovery", + "#### Implementation", + "## 2-Factor-Auth", + "#### Setup for Catena-X", + "##### Config for the Master Realm", + "##### Config for the Catena-X Realm", + "##### Config for the Company Spec. Realm", + "#### How to Setup - Yubikey as 2-Fact-Auth", + "##### #1 Create New Auth Flow as shown below", + "##### #2 Set the Auth Flow as browser flow", + "##### #3 Update the Required Actions" ] }, { - "path": "developer/Technical Documentation/Identity & Access/IdP - Email Configuration.md", - "name": "IdP - Email Configuration.md", + "path": "developer/Technical Documentation/Identity & Access/07. Email Configuration.md", + "name": "07. Email Configuration.md", "chapter": [ "# IdP Email Configuration", "## Requirement", @@ -1089,58 +1111,54 @@ ] }, { - "path": "developer/Technical Documentation/Identity & Access/Password Policy.md", - "name": "Password Policy.md", + "path": "developer/Technical Documentation/Identity & Access/08. Event Logging.md", + "name": "08. Event Logging.md", "chapter": [ - "# Password Policy", - "## Password Policy", - "#### How to configure Password Policies", - "#### Implementation", - "##Password Reset", - "#### How to configure Password Recovery", - "#### Implementation", - "## 2-Factor-Auth", - "#### Setup for Catena-X", - "##### Config for the Master Realm", - "##### Config for the Catena-X Realm", - "##### Config for the Company Spec. Realm", - "#### How to Setup - Yubikey as 2-Fact-Auth", - "##### #1 Create New Auth Flow as shown below", - "##### #2 Set the Auth Flow as browser flow", - "##### #3 Update the Required Actions" + "# Event Logging", + "## Requirement", + "## Keycloak events", + "## Configure Logging", + "##### Keycloak Admin UI/DB", + "###### Event Configuration", + "###### Save Events", + "###### Login Events", + "###### Login Event Filter", + "###### Event Types", + "##### Log Files", + "## Event Listener" ] }, { - "path": "developer/Technical Documentation/Identity & Access/Roles & Rights Concept.md", - "name": "Roles & Rights Concept.md", + "path": "developer/Technical Documentation/Identity & Access/09. Generic Security.md", + "name": "09. Generic Security.md", "chapter": [ - "## 1. General details", - "### 1.1 Scope and binding force of the document", - "### 1.2 Affected application", - "### 1.3 Referenced documents", - "## 2. Authorization structure and role model", - "### 2.1 Underlying business processes and roles:", - "### 2.2 Basic principles", - "### 2.3 Individual privileges and authorization framework", - "### 2.4 Role definition", - "### 2.5 Role/Permission Matrix", - "#### 2.5.1 Technical User (portal internal)", - "#### 2.5.2 Registration Application", - "#### 2.5.3 Portal Application", - "#### 2.5.3b Technical User Accounts", - "#### 2.5.4 Managed Wallets", - "#### 2.5.5 BPDM", - "#### 2.5.6 BPDM Gate", - "#### 2.5.7 BPDMShare", - "### 2.6 Segregation of duties", - "## 3. Global subjects", - "### 3.1 Authorization management connections", - "### 3.2 Used infrastructure components", - "### 3.3 Privileged and technical user accounts", - "### 3.4 Technical restrictions", - "### 3.5 Logging the use", - "## 4. Authorization procedure", - "## 5. Appendix" + "## Security Generic", + "### Host", + "### Bruce Force Detection", + "#### Catena-X configuration", + "##### Preventing automated attacks", + "##### Preventing manual attacks", + "### Clickjacking", + "### Open redirections", + "### Compromised Authorization code", + "### Compromised access and refresh tokens", + "### CSRF attack", + "### Limiting Scope - Client Token", + "### Client Policies" + ] + }, + { + "path": "developer/Technical Documentation/Identity & Access/10. FAQ.md", + "name": "10. FAQ.md", + "chapter": [ + "## FAQ", + "### How to crete new roles", + "##### Portal Role", + "##### App Role", + "##### Technical User Role", + "### What is the difference between roles & permission", + "### How to setup technical user authentication", + "### Retrieve token for service account" ] } ] diff --git a/public/documentation/data/main/docs.json b/public/documentation/data/main/docs.json index e258fe909..f6857c069 100644 --- a/public/documentation/data/main/docs.json +++ b/public/documentation/data/main/docs.json @@ -447,18 +447,10 @@ "name": "03. Technical User", "children": [ { - "path": "docs/03. User Management/03. Technical User/00. Summary.md", - "name": "00. Summary.md", - "chapter": [ - "# Summary", - "### Customer Functionalities covered in the function" - ] - }, - { - "path": "docs/03. User Management/03. Technical User/01. View Technical User - UPDATE NEEDED.md", - "name": "01. View Technical User - UPDATE NEEDED.md", + "path": "docs/03. User Management/03. Technical User/01. Technical User Overview.md", + "name": "01. Technical User Overview.md", "chapter": [ - "## Create a new technical user" + "## Technical User Overview" ] }, { @@ -482,38 +474,53 @@ "path": "docs/03. User Management/03. Technical User/04. FAQ.md", "name": "04. FAQ.md", "chapter": [] + }, + { + "path": "docs/03. User Management/03. Technical User/index.md", + "name": "index.md", + "chapter": [ + "# Summary", + "### Customer Functionalities covered in the function" + ] } ] }, { - "path": "docs/03. User Management/04. App Access Management", - "name": "04. App Access Management", + "path": "docs/03. User Management/04. Assign App Roles", + "name": "04. Assign App Roles", "children": [ { - "path": "docs/03. User Management/04. App Access Management/01. Summary.md", - "name": "01. Summary.md", + "path": "docs/03. User Management/04. Assign App Roles/01. App Access Management Overview.md", + "name": "01. App Access Management Overview.md", "chapter": [ - "# Summary" + "## App Access Management Overview" ] }, { - "path": "docs/03. User Management/04. App Access Management/02. App Role Management Overview - UPDATE NEEDED.md", - "name": "02. App Role Management Overview - UPDATE NEEDED.md", + "path": "docs/03. User Management/04. Assign App Roles/02. Assign User App Role(s).md", + "name": "02. Assign User App Role(s).md", "chapter": [ - "## Assign App Role" + "## Assign User App Role" ] }, { - "path": "docs/03. User Management/04. App Access Management/03. Assign App Role.md", - "name": "03. Assign App Role.md", + "path": "docs/03. User Management/04. Assign App Roles/03. Update Users Assigned App Role(s).md", + "name": "03. Update Users Assigned App Role(s).md", "chapter": [ - "## Assign App Role" + "## Update User Assigned App Role" ] }, { - "path": "docs/03. User Management/04. App Access Management/04. FAQ.md", + "path": "docs/03. User Management/04. Assign App Roles/04. FAQ.md", "name": "04. FAQ.md", "chapter": [] + }, + { + "path": "docs/03. User Management/04. Assign App Roles/index.md", + "name": "index.md", + "chapter": [ + "# Summary" + ] } ] }, diff --git a/public/documentation/js/Main.js b/public/documentation/js/Main.js index 2066c926b..b75f679e8 100644 --- a/public/documentation/js/Main.js +++ b/public/documentation/js/Main.js @@ -569,15 +569,17 @@ class App extends Viewable { loadReleases() { fetch('data/Releases.json') .then(response => response.json()) - .then((releases) => state.setReleases([{ ref: `/${Settings.DEFAULT_BRANCH}` }].concat(releases.reverse()))) + .then((releases) => state.setReleases( + Array.from(new Set([...[Settings.DEFAULT_BRANCH], ...releases]) + ))) } releasesChanged(releases) { state.setReleaseSelection(Settings.DEFAULT_BRANCH) } - releaseSelectionChanged(releaseSelection) { - fetch(`data/${releaseSelection}/${NavTools.getRoot()}.json`) + releaseSelectionChanged(releaseSelection) { + fetch(`data/${releaseSelection.split('/').slice(-1)[0]}/${NavTools.getRoot()}.json`) .then(response => response.json()) .then(state.setData.bind(state)) .catch(() => { location.href = '.' }) diff --git a/public/documentation/js/Settings.js b/public/documentation/js/Settings.js index aabec03c9..1a95355b1 100644 --- a/public/documentation/js/Settings.js +++ b/public/documentation/js/Settings.js @@ -20,7 +20,7 @@ export const Settings = { DOCBASE: 'https://raw.githubusercontent.com/catenax-ng/tx-portal-assets', SRCBASE: 'https://github.com/catenax-ng/tx-portal-assets', - DEFAULT_BRANCH: 'main', + DEFAULT_BRANCH: 'refs/tags/1.0.0', DEFAULT_ROOT: 'docs', } diff --git a/public/documentation/js/State.js b/public/documentation/js/State.js index bd3cf0de1..90a183587 100644 --- a/public/documentation/js/State.js +++ b/public/documentation/js/State.js @@ -86,7 +86,7 @@ class State { return this.refresh = false const content = this.getItem(selection) - NavTools.pushState({...content, hash}) + NavTools.pushState({ ...content, hash }) this.selection = content.path this.fireSelectionChanged() return this @@ -117,10 +117,11 @@ class State { } setReleases(releases) { - this.releases = releases.map(item => { - item.name = item.ref.split('/').slice(-1)[0] - return item - }) + this.releases = releases.sort().map(ref => ({ + ref, + name: ref.split('/').slice(-1)[0] + })) + console.log(this.releases) this.fireReleasesChanged(this.releases) return this } From fe5bb57d02e1342c9fe4e58198fc4bc68e02acd4 Mon Sep 17 00:00:00 2001 From: Martin Rohrmeier Date: Thu, 23 Feb 2023 10:44:21 +0100 Subject: [PATCH 3/6] bumped version to 1.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index de2d2a778..82246b7b8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cx-portal-assets", - "version": "1.0.0-RC8", + "version": "1.0.0", "description": "Shared frontend content and static assets for the Catena-X Portal", "main": "index.js", "repository": "git@github.com:eclipse-tractusx/portal-assets.git", From 6795124b970ed50bc006cd49a3838adc08d0d1ff Mon Sep 17 00:00:00 2001 From: Martin Rohrmeier Date: Thu, 23 Feb 2023 10:45:19 +0100 Subject: [PATCH 4/6] removed console.log --- public/documentation/js/State.js | 1 - 1 file changed, 1 deletion(-) diff --git a/public/documentation/js/State.js b/public/documentation/js/State.js index 90a183587..39a33c667 100644 --- a/public/documentation/js/State.js +++ b/public/documentation/js/State.js @@ -121,7 +121,6 @@ class State { ref, name: ref.split('/').slice(-1)[0] })) - console.log(this.releases) this.fireReleasesChanged(this.releases) return this } From 6d5c015a77f79afa066d1bc3f88e495d6d113991 Mon Sep 17 00:00:00 2001 From: Martin Rohrmeier Date: Thu, 23 Feb 2023 10:56:43 +0100 Subject: [PATCH 5/6] removed ; --- public/documentation/js/Main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/documentation/js/Main.js b/public/documentation/js/Main.js index b75f679e8..166343774 100644 --- a/public/documentation/js/Main.js +++ b/public/documentation/js/Main.js @@ -467,8 +467,8 @@ class Content extends Viewable { [...root.querySelectorAll('h1, h2, h3, h4, h5, h6')].forEach(this.replaceLink.bind(this)) root.styleSheets[0].insertRule('h1:hover, h2:hover, h3:hover, h4:hover, h5:hover { text-decoration: underline; cursor: pointer; }') root.styleSheets[0].insertRule('.headline { position: relative; }') - root.styleSheets[0].insertRule('a.github { position: absolute; width: 20px; height: 20px; bottom: 15%; right: 0px; background-color: #888888; display: none; }'); - root.styleSheets[0].insertRule('.markdown-body { margin-top: -24px; }'); + root.styleSheets[0].insertRule('a.github { position: absolute; width: 20px; height: 20px; bottom: 15%; right: 0px; background-color: #888888; display: none; }') + root.styleSheets[0].insertRule('.markdown-body { margin-top: -24px; }') } renderMD(content) { From 49f308609d0197283b7b478792633dcbaf60db3d Mon Sep 17 00:00:00 2001 From: Martin Rohrmeier Date: Thu, 23 Feb 2023 11:11:20 +0100 Subject: [PATCH 6/6] cleanup --- public/documentation/js/Main.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/public/documentation/js/Main.js b/public/documentation/js/Main.js index 166343774..ec6c6aece 100644 --- a/public/documentation/js/Main.js +++ b/public/documentation/js/Main.js @@ -436,7 +436,7 @@ class Content extends Viewable { } replaceLink(item) { - const newItem = N('div', null, { class: 'headline', style: { height: item.height } }) + const newItem = N('div', null, { class: 'headline' }) const link = this.renderLink(this.content, item.id) item.parentElement.insertBefore(newItem, item) item.parentElement.removeChild(item) @@ -444,8 +444,7 @@ class Content extends Viewable { newItem.appendChild(link) newItem.onmouseover = () => link.style.display = 'block' newItem.onmouseout = () => link.style.display = 'none' - item.onclick = (e) => { - //e.preventDefault() + item.onclick = () => { history.replaceState({}, document.getElementsByTagName('title').content, location.href.split('#')[0] + (item.id ? '#' + item.id : '')) item.scrollIntoView() }