Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions input/_layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% if page.javascript %}
<script src="{{ page.javascript | relative_url }}"></script>
{% endif %}
81 changes: 81 additions & 0 deletions input/assets/js/country.js
Original file line number Diff line number Diff line change
@@ -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 = '<option>No verification methods found.</option>';
}

// 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 = `
<td>${env.env}</td>
<td>${env.type}</td>
<td><a href="${updatedUrl}" target="_blank">${updatedUrl}</a></td>
`;

tableBody.appendChild(tr);
});
});

} catch (error) {
output.innerHTML = `Error: ${error.message}`;
}
}

document.addEventListener("DOMContentLoaded", fetchAndProcessDID);



6 changes: 6 additions & 0 deletions input/assets/js/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
document.addEventListener("DOMContentLoaded", () => {
const output = document.getElementById("output");
if (output) {
output.innerText = "JavaScript is working!";
}
});
1 change: 1 addition & 0 deletions input/pagecontent/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -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%}



Expand Down
38 changes: 23 additions & 15 deletions input/pagecontent/endpoints.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
### Endpoints

The following describes the active services and endpoints for the GDHCN Trust Network Gateway.
---
layout: default
title: Home
---
<label for="dropdown"><strong>Select Country:</strong></label>
<select id="dropdown">
<option>Loading...</option>
</select>
<div id="output"></div>

#### Operational Metadata
##### Trust Domains
Expand All @@ -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) |


<table>
<thead>
<tr>
<th>Environment</th>
<th>Variant</th>
<th>URL</th>
</tr>
</thead>
<tbody id="env-table">
<!-- Rows will be dynamically added here -->
</tbody>
</table>

#### 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:
Expand Down Expand Up @@ -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) |
75 changes: 75 additions & 0 deletions input/pagecontent/endpoints_test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
layout: default
title: Home
---
<label for="dropdown"><strong>Select Country:</strong></label>
<select id="dropdown">
<option>Loading...</option>
</select>
<div id="output"></div>

#### 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:

<table>
<thead>
<tr>
<th>Environment</th>
<th>Variant</th>
<th>URL</th>
</tr>
</thead>
<tbody id="env-table">
<!-- Rows will be dynamically added here -->
</tbody>
</table>

#### 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) |
3 changes: 3 additions & 0 deletions sushi-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ pages:
title: Changes
endpoints.md:
title: Endpoints
endpoints_test.md:
title: Test Endpoints
indices.md:
title: Indices
artifacts.html:
Expand Down Expand Up @@ -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
Expand Down