diff --git a/dashboard/observablehq.config.js b/dashboard/observablehq.config.js index e72fdba..c467f7b 100644 --- a/dashboard/observablehq.config.js +++ b/dashboard/observablehq.config.js @@ -44,6 +44,7 @@ export default { open: false, pages: [ { name: "Repository DoI", path: "/policy/repo-doi" }, + { name: "Service DoM", path: "/policy/service-dom" }, { name: "Workstream DoD", path: "/policy/workstream-dod" }, ], }, diff --git a/dashboard/src/docs/state-hub.md b/dashboard/src/docs/state-hub.md index e38b58e..29c49dc 100644 --- a/dashboard/src/docs/state-hub.md +++ b/dashboard/src/docs/state-hub.md @@ -265,5 +265,6 @@ why, even years later. - [Connecting to the Hub](/docs/connecting) - [Repo Integration](/docs/repo-integration) - [Repository DoI](/policy/repo-doi) — Definition of Integrated +- [Service DoM](/policy/service-dom) — Definition of Mature - [TPSC](/docs/tpsc) — Third-Party Services Catalog - [SBOM](/docs/sbom) diff --git a/dashboard/src/policy/service-dom.md b/dashboard/src/policy/service-dom.md new file mode 100644 index 0000000..e16f7a2 --- /dev/null +++ b/dashboard/src/policy/service-dom.md @@ -0,0 +1,90 @@ +--- +title: Service Definition of Mature (DoM) +--- + +```js +import {API} from "../components/config.js"; +``` + +```js +import {marked} from "npm:marked"; + +const _resp = await fetch(`${API}/policy/service-dom`); +if (!_resp.ok) throw new Error(`Failed to load policy: ${_resp.status}`); +const _policy = await _resp.json(); +``` + +```js +let _content = _policy.content; +let _editing = false; + +const _root = display(html`
`); + +async function _save(text) { + const r = await fetch(`${API}/policy/service-dom`, { + method: "PUT", + headers: {"Content-Type": "application/json"}, + body: JSON.stringify({content: text}), + }); + if (!r.ok) throw new Error(`Save failed: ${r.status}`); + _content = text; +} + +function _toolbar(...nodes) { + return html`