diff --git a/input/_layouts/default.html b/input/_layouts/default.html new file mode 100644 index 00000000000..88dd121ee16 --- /dev/null +++ b/input/_layouts/default.html @@ -0,0 +1,3 @@ +{% if page.javascript %} + +{% endif %} diff --git a/input/assets/js/country.js b/input/assets/js/country.js new file mode 100644 index 00000000000..2cb258e4fd2 --- /dev/null +++ b/input/assets/js/country.js @@ -0,0 +1,81 @@ + +const environments = [ + { env: 'DEV', type: 'Embedded', url: 'https://tng-cdn-dev.who.int/v2/trustlist' }, + { env: 'DEV', type: 'Reference', url: 'https://tng-cdn-dev.who.int/v2/trustlist-ref' }, + { env: 'UAT', type: 'Embedded', url: 'https://tng-cdn-uat.who.int/v2/trustlist' }, + { env: 'UAT', type: 'Reference', url: 'https://tng-cdn-uat.who.int/v2/trustlist-ref' }, + { env: 'PROD', type: 'Embedded', url: 'https://tng-cdn.who.int/v2/trustlist' }, + { env: 'PROD', type: 'Reference', url: 'https://tng-cdn.who.int/v2/trustlist-ref' } + ]; + + + async function fetchAndProcessDID() { + const dropdown = document.getElementById("dropdown"); + const output = document.getElementById("output"); + const tableBody = document.getElementById("env-table"); + let outputText = ""; + + try { + const response = await fetch('https://raw.githubusercontent.com/WorldHealthOrganization/tng-cdn-dev/main/v2/trustlist/did.json'); + const data = await response.json(); + + dropdown.innerHTML = ''; + + if (data.verificationMethod) { + const seen = new Set(); + + data.verificationMethod.forEach(method => { + if (method.id) { + const parts = method.id.split(":"); + if (parts.length >= 7) { + const value = parts[6]; + if (!seen.has(value)) { + seen.add(value); + + const option = document.createElement("option"); + option.value = value; + option.textContent = value; + dropdown.appendChild(option); + } + } + } + }); + + output.innerHTML = 'Select a country to populate the table.'; + } else { + dropdown.innerHTML = ''; + } + + // Handle selection change + dropdown.addEventListener("change", () => { + const selectedCountry = dropdown.value; + + // Clear existing table body + tableBody.innerHTML = ''; + + // Add rows with selected country appended to URL + environments.forEach(env => { + const tr = document.createElement("tr"); + + // Append selected country as query param, e.g., ?country=Germany + const updatedUrl = `${env.url}/DCC/${selectedCountry}/did.json`; + + tr.innerHTML = ` + ${env.env} + ${env.type} + ${updatedUrl} + `; + + tableBody.appendChild(tr); + }); + }); + + } catch (error) { + output.innerHTML = `Error: ${error.message}`; + } + } + + document.addEventListener("DOMContentLoaded", fetchAndProcessDID); + + + \ No newline at end of file diff --git a/input/assets/js/main.js b/input/assets/js/main.js new file mode 100644 index 00000000000..5f9d82bb526 --- /dev/null +++ b/input/assets/js/main.js @@ -0,0 +1,6 @@ +document.addEventListener("DOMContentLoaded", () => { + const output = document.getElementById("output"); + if (output) { + output.innerText = "JavaScript is working!"; + } +}); \ No newline at end of file diff --git a/input/pagecontent/deployment.md b/input/pagecontent/deployment.md index fe5faf2359e..1362202a584 100644 --- a/input/pagecontent/deployment.md +++ b/input/pagecontent/deployment.md @@ -15,6 +15,7 @@ This Implementation Guide contains the following deployment support guidance: {% include downloads.md %} {% include changes.md %} {% include endpoints.md %} +{%include endpoints_test.md%} diff --git a/input/pagecontent/endpoints.md b/input/pagecontent/endpoints.md index 7b3ee67a46e..7b8c5c9d063 100644 --- a/input/pagecontent/endpoints.md +++ b/input/pagecontent/endpoints.md @@ -1,6 +1,12 @@ -### Endpoints - -The following describes the active services and endpoints for the GDHCN Trust Network Gateway. +--- +layout: default +title: Home +--- + + +
#### Operational Metadata ##### Trust Domains @@ -23,18 +29,20 @@ The list of onboarded Trust Network Participants is availabe in the [GDHCN Part THe following are the endpoints for the [GDHCN DID Trust List](concepts_did_gdhcn.html) for each of development (DEV), user-acceptence testing (UAT) and production (PROD) **environment*s: -| Environment | Variant | URL | -|---------|------------|--------------------------------------------------------------------------------------------------------------| -| DEV | Embedded | [https://tng-cdn-dev.who.int/v2/trustlist/did.json](https://tng-cdn-dev.who.int/v2/trustlist/did.json) | -| DEV | Reference | [https://tng-cdn-dev.who.int/v2/trustlist-ref/did.json](https://tng-cdn-dev.who.int/v2/trustlist-ref/did.json) | -| UAT | Embedded | [https://tng-cdn-uat.who.int/v2/trustlist/did.json](https://tng-cdn-uat.who.int/v2/trustlist/did.json) | -| UAT | Reference | [https://tng-cdn-uat.who.int/v2/trustlist-ref/did.json](https://tng-cdn-uat.who.int/v2/trustlist-ref/did.json) | -| PROD | Embedded | [https://tng-cdn.who.int/v2/trustlist/did.json](https://tng-cdn.who.int/v2/trustlist/did.json) | -| PROD | Reference | [https://tng-cdn.who.int/v2/trustlist-ref/did.json](https://tng-cdn.who.int/v2/trustlist-ref/did.json) | - - + + + + + + + + + + + +
EnvironmentVariantURL
-#### Trust Network Gateway +#### Trust Network Gateway THe following are the endpoints for the [Trust Network Gateway](concepts.html#trust-network-gateway-tng) for each of development (DEV), user-acceptence testing (UAT) and production (PROD) **environment*s: @@ -64,4 +72,4 @@ The following dashboards reflect the realtime status of key materials for each o | UAT | [Gateway Availability Dashboard](https://tng-monitor-uat.who.int/grafana/d/c3ed3dbe-6cc0-4f16-8f0a-c7bcebd36420/uat-gateway-availability-dashboard) | | PROD | [Country certificate expiry](https://tng-monitor.who.int/grafana/d/cert-expiry/prod-country-certificate-expiry) | | PROD | [Country Queries](https://tng-monitor.who.int/grafana/d/prod-country-queries/prod-country-queries) | -| PROD | [Gateway Availability Dashboard](https://tng-monitor.who.int/grafana/d/gateway-availability/prod-gateway-availability-dashboard) | +| PROD | [Gateway Availability Dashboard](https://tng-monitor.who.int/grafana/d/gateway-availability/prod-gateway-availability-dashboard) | \ No newline at end of file diff --git a/input/pagecontent/endpoints_test.md b/input/pagecontent/endpoints_test.md new file mode 100644 index 00000000000..7b8c5c9d063 --- /dev/null +++ b/input/pagecontent/endpoints_test.md @@ -0,0 +1,75 @@ +--- +layout: default +title: Home +--- + + +
+ +#### Operational Metadata +##### Trust Domains + +The list of active trust domains is maintained in the [GDHCN Trust Domain Value Set](ValueSet-Domains.html). + + +##### Key Usage Codes + +The list of key usage codes is maintained in the [GDHCN Key Usage Value Set](ValueSet-KeyUsage.html). + + +##### Participants + +The list of onboarded Trust Network Participants is availabe in the [GDHCN Participants Value Set](ValueSet-Participants.html). + + + +#### Trustlist Distribution Endpoints + +THe following are the endpoints for the [GDHCN DID Trust List](concepts_did_gdhcn.html) for each of development (DEV), user-acceptence testing (UAT) and production (PROD) **environment*s: + + + + + + + + + + + + +
EnvironmentVariantURL
+ +#### Trust Network Gateway + + +THe following are the endpoints for the [Trust Network Gateway](concepts.html#trust-network-gateway-tng) for each of development (DEV), user-acceptence testing (UAT) and production (PROD) **environment*s: + +| Environment | URL | +|-------------|-----| +| PROD | https://tng.who.int | +| UAT | https://tng-uat.who.int | +| DEV | https://tng-dev.who.int | + + + + +#### Status Monitoring Dashboards + +The following dashboards reflect the realtime status of key materials for each of development (DEV), user-acceptence testing (UAT) and production (PROD) **environment*s: + + +| Environment | Dashboard | +|----------|--------------| +| DEV | [Country certificate expiry](https://tng-monitor-dev.who.int/grafana/d/dev-cert-expiry/dev-country-certificate-expiry) | +| DEV | [Country Onboarding Status](https://tng-monitor-dev.who.int/grafana/d/ddh0xqz9diio0c/dev-country-onboarding-status) | +| DEV | [Country Queries](https://tng-monitor-dev.who.int/grafana/d/dev-country-queries/dev-country-queries) | +| DEV | [Gateway Availability Dashboard](https://tng-monitor-dev.who.int/grafana/d/gw-availability/dev-gateway-availability-dashboard) | +| UAT | [Country certificate expiry](https://tng-monitor-uat.who.int/grafana/d/uat-cert-expiry/uat-country-certificate-expiry) | +| UAT | [Country Queries](https://tng-monitor-uat.who.int/grafana/d/uat-country-queries/uat-country-queries) | +| UAT | [Gateway Availability Dashboard](https://tng-monitor-uat.who.int/grafana/d/c3ed3dbe-6cc0-4f16-8f0a-c7bcebd36420/uat-gateway-availability-dashboard) | +| PROD | [Country certificate expiry](https://tng-monitor.who.int/grafana/d/cert-expiry/prod-country-certificate-expiry) | +| PROD | [Country Queries](https://tng-monitor.who.int/grafana/d/prod-country-queries/prod-country-queries) | +| PROD | [Gateway Availability Dashboard](https://tng-monitor.who.int/grafana/d/gateway-availability/prod-gateway-availability-dashboard) | \ No newline at end of file diff --git a/sushi-config.yaml b/sushi-config.yaml index 13e5d2e6d47..b801a92dfe2 100644 --- a/sushi-config.yaml +++ b/sushi-config.yaml @@ -122,6 +122,8 @@ pages: title: Changes endpoints.md: title: Endpoints + endpoints_test.md: + title: Test Endpoints indices.md: title: Indices artifacts.html: @@ -168,6 +170,7 @@ menu: Downloads: downloads.html Changes: changes.html Endpoints: endpoints.html + Test Endpoints: endpoints_test.html Indices: Artifact Index: artifacts.html References: references.html