{"_id":"@couchbaselabs/topology-ui","_rev":"5-b9e3be1248a0680c8752b59c5e0bfbd4","name":"@couchbaselabs/topology-ui","dist-tags":{"latest":"1.3.0"},"versions":{"1.0.0":{"name":"@couchbaselabs/topology-ui","version":"1.0.0","keywords":["couchbase","topology","tailwind","tailwind","font-awesome","markdown","renderer"],"license":"Apache-2.0","_id":"@couchbaselabs/topology-ui@1.0.0","maintainers":[{"name":"tayebchlyah","email":"tayebchlyah@gmail.com"}],"homepage":"https://github.com/couchbaselabs/topology-ui#readme","bugs":{"url":"https://github.com/couchbaselabs/topology-ui/issues"},"dist":{"shasum":"678cf457f08a310dbcad86412b4d2b7d44414202","tarball":"https://registry.npmjs.org/@couchbaselabs/topology-ui/-/topology-ui-1.0.0.tgz","fileCount":44,"integrity":"sha512-YKN1Dnmkj8xPt0NuJMaPVa+KIbSW4iXQ1Qp39rK0Tizr8l5KUmQzzzATTUB2HAeUR9mOGi2lapdqBMLUG3aQWA==","signatures":[{"sig":"MEUCIHeUskAQiwJZDlHXB4r9nlRvVkbgLC0urO5B0HPdoYdbAiEAzZMACWBhuX7q5cmKEUrEekuAp3n+jZLU9EXqx57ENHY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3623589},"main":"./index.js","type":"commonjs","style":"./dist/topology-ui.css","module":"./index.mjs","exports":{".":{"import":"./index.mjs","require":"./index.js"},"./browser":"./js/couchbase-info.js","./images/*":"./images/*","./styles.css":"./dist/topology-ui.css"},"gitHead":"86843fefa777d5a1a04d60f4f487bb0e47356ce8","scripts":{"test":"npm run build:css && node --test","prepare":"npm run build:css","build:css":"tailwindcss -i ./build/tailwind-input.css -o ./dist/topology-ui.css --config ./tailwind.config.cjs --minify && node ./scripts/bundle-styles.mjs","prepublishOnly":"npm test"},"_npmUser":{"name":"tayebchlyah","email":"tayebchlyah@gmail.com"},"repository":{"url":"git+https://github.com/couchbaselabs/topology-ui.git","type":"git"},"_npmVersion":"11.9.0","description":"Packaged Couchbase topology renderer preserving the original browser output and dependencies.","directories":{},"_nodeVersion":"25.6.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tailwindcss":"3.0.24","@fortawesome/fontawesome-free":"5.15.4"},"_npmOperationalInternal":{"tmp":"tmp/topology-ui_1.0.0_1773895083084_0.2513646291606908","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@couchbaselabs/topology-ui","version":"1.1.0","keywords":["couchbase","topology","tailwind","font-awesome","markdown","renderer"],"license":"Apache-2.0","_id":"@couchbaselabs/topology-ui@1.1.0","maintainers":[{"name":"tayebchlyah","email":"tayebchlyah@gmail.com"}],"homepage":"https://github.com/couchbaselabs/topology-ui#readme","bugs":{"url":"https://github.com/couchbaselabs/topology-ui/issues"},"dist":{"shasum":"0a7818d2ec54aa751e196abdac45a2a3c2fe6b4d","tarball":"https://registry.npmjs.org/@couchbaselabs/topology-ui/-/topology-ui-1.1.0.tgz","fileCount":44,"integrity":"sha512-khymBSfyNrqU2NiZwknxVBRpTmudy6AGF5tA3dcoxIYrDAbK4QxsuAw1v0tLndIPTcnGP0ipE7uTeEwU3VhxRg==","signatures":[{"sig":"MEUCIFDADzYT2gouj6uEa9qMAOtE3ePlgaXdKeaJz652Zki5AiEAkxXMvBqyazeEm4yA3DR2SgsjJCkOaAN4Hz/VeqWC3T8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@couchbaselabs%2ftopology-ui@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":3628556},"main":"./index.js","type":"commonjs","style":"./dist/topology-ui.css","module":"./index.mjs","exports":{".":{"import":"./index.mjs","require":"./index.js"},"./browser":"./js/couchbase-info.js","./images/*":"./images/*","./styles.css":"./dist/topology-ui.css"},"gitHead":"7de9989abff52e4ba7564ed4534ea9560440d9a7","scripts":{"test":"npm run build:css && node --test","prepare":"npm run build:css","build:css":"tailwindcss -i ./build/tailwind-input.css -o ./dist/topology-ui.css --config ./tailwind.config.cjs --minify && node ./scripts/bundle-styles.mjs","prepublishOnly":"npm test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:81522cb6-ea3f-4479-b3a5-3fa2a8fa81e2"}},"repository":{"url":"git+https://github.com/couchbaselabs/topology-ui.git","type":"git"},"_npmVersion":"11.12.1","description":"Packaged Couchbase topology renderer preserving the original browser output and dependencies.","directories":{},"_nodeVersion":"24.15.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tailwindcss":"3.0.24","@fortawesome/fontawesome-free":"5.15.4"},"_npmOperationalInternal":{"tmp":"tmp/topology-ui_1.1.0_1779005546519_0.26466832707663523","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@couchbaselabs/topology-ui","version":"1.1.1","keywords":["couchbase","topology","tailwind","font-awesome","markdown","renderer"],"license":"Apache-2.0","_id":"@couchbaselabs/topology-ui@1.1.1","maintainers":[{"name":"tayebchlyah","email":"tayebchlyah@gmail.com"}],"homepage":"https://github.com/couchbaselabs/topology-ui#readme","bugs":{"url":"https://github.com/couchbaselabs/topology-ui/issues"},"dist":{"shasum":"883433bcd0f4b54ebca49967dda785e6057c3e38","tarball":"https://registry.npmjs.org/@couchbaselabs/topology-ui/-/topology-ui-1.1.1.tgz","fileCount":44,"integrity":"sha512-PutlNsjoEiFQH1R/oQwnSd6QU7dwqzghNgAwQwzjtZh9lP/dr0Sp71oH9/4ElgcecPQ0VjHGEB4Taqizf+Iltw==","signatures":[{"sig":"MEYCIQDy/GOV5yRm7dmqpVMCAhDFt4mYtSScpZMRHkvFmKVwUQIhAKWX1o8B81QqyDIMBUnnAyPvx3wzc7OSgMnuRTT1AvKp","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@couchbaselabs%2ftopology-ui@1.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":3629329},"main":"./index.js","type":"commonjs","style":"./dist/topology-ui.css","module":"./index.mjs","exports":{".":{"import":"./index.mjs","require":"./index.js"},"./browser":"./js/couchbase-info.js","./images/*":"./images/*","./styles.css":"./dist/topology-ui.css"},"gitHead":"474dd0b918a6b0b7f6b13445f2448ee40bb42e6e","scripts":{"test":"npm run build:css && node --test","prepare":"npm run build:css","build:css":"tailwindcss -i ./build/tailwind-input.css -o ./dist/topology-ui.css --config ./tailwind.config.cjs --minify && node ./scripts/bundle-styles.mjs","prepublishOnly":"npm test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:81522cb6-ea3f-4479-b3a5-3fa2a8fa81e2"}},"repository":{"url":"git+https://github.com/couchbaselabs/topology-ui.git","type":"git"},"_npmVersion":"11.12.1","description":"Packaged Couchbase topology renderer preserving the original browser output and dependencies.","directories":{},"_nodeVersion":"24.15.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tailwindcss":"3.0.24","@fortawesome/fontawesome-free":"5.15.4"},"_npmOperationalInternal":{"tmp":"tmp/topology-ui_1.1.1_1779016482600_0.9463080870202065","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@couchbaselabs/topology-ui","version":"1.2.0","keywords":["couchbase","topology","tailwind","font-awesome","markdown","renderer"],"license":"Apache-2.0","_id":"@couchbaselabs/topology-ui@1.2.0","maintainers":[{"name":"tayebchlyah","email":"tayebchlyah@gmail.com"}],"homepage":"https://github.com/couchbaselabs/topology-ui#readme","bugs":{"url":"https://github.com/couchbaselabs/topology-ui/issues"},"dist":{"shasum":"d755149f576dcc5e08d11c2e7ee776388ebb9d0a","tarball":"https://registry.npmjs.org/@couchbaselabs/topology-ui/-/topology-ui-1.2.0.tgz","fileCount":45,"integrity":"sha512-lRk7ZvgjaMPyNsSw+4aAahwms32LaN7Tedeigmnpx1RptIY0hQcJRtFB4bnUp6R06Yhzx/Jj3c6rMCRQsTnSng==","signatures":[{"sig":"MEYCIQDYyHZFa8nVYGH2mX10EkZJ4yQberw0ynFC2fNT9XRPowIhAKSRQ3Ow+sSUtIEOGTmcdV+apHczYdnfa5gSLytQNPVy","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQCJaQOhCJpEs60lqDwfMi5SGNBstTM8dx5IhrD4UmDG+gIhAOL+sEZlktDwQj2/54Sqq6c+SRs/kivoWwTtjO+Ld8VS","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@couchbaselabs%2ftopology-ui@1.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":3635896},"main":"./index.js","type":"commonjs","style":"./dist/topology-ui.css","module":"./index.mjs","exports":{".":{"import":"./index.mjs","require":"./index.js"},"./browser":"./js/couchbase-info.js","./images/*":"./images/*","./styles.css":"./dist/topology-ui.css"},"gitHead":"7ba450f7e91fda2a761f9724639d3d72e69142d5","scripts":{"test":"npm run build:css && node --test","prepare":"npm run build:css","build:css":"tailwindcss -i ./build/tailwind-input.css -o ./dist/topology-ui.css --config ./tailwind.config.cjs --minify && node ./scripts/bundle-styles.mjs","prepublishOnly":"npm test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:81522cb6-ea3f-4479-b3a5-3fa2a8fa81e2"}},"repository":{"url":"git+https://github.com/couchbaselabs/topology-ui.git","type":"git"},"_npmVersion":"11.19.0","description":"Packaged Couchbase topology renderer preserving the original browser output and dependencies.","directories":{},"_nodeVersion":"24.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tailwindcss":"3.0.24","@fortawesome/fontawesome-free":"5.15.4"},"_npmOperationalInternal":{"tmp":"tmp/topology-ui_1.2.0_1789667898511_0.9564895968234899","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"_id":"@couchbaselabs/topology-ui@1.3.0","bugs":{"url":"https://github.com/couchbaselabs/topology-ui/issues"},"dist":{"shasum":"9caf9f65fae3b64f76a678872900c1eb79589f56","tarball":"https://registry.npmjs.org/@couchbaselabs/topology-ui/-/topology-ui-1.3.0.tgz","fileCount":45,"integrity":"sha512-FIO+CW6cO/PBRBa9HaZ9ept8cmY8kQAxqYV4hrGVuISE1kUXeWCu6GaJvLZosBt5ri5geRW+hpR/kajpOdwEyA==","signatures":[{"sig":"MEYCIQDVb4G2l5kNDrkJOl3MR/3RVUoKNP1hG6SospU6scEJYwIhAJ8lmqe0QwFJeIPOuZPsUtoRqDqJwIVGls9fpkOE/NRr","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGq0EyIYGALoWJVlrYjhdciqlFYgYPbqpWtWX/ia+hdLAiEAiFK3fk4FAMiQ1woZ4r3X2OddSFRwxX+KMhUPfzwbLlo="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@couchbaselabs%2ftopology-ui@1.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":3642264},"main":"./index.js","name":"@couchbaselabs/topology-ui","type":"commonjs","style":"./dist/topology-ui.css","module":"./index.mjs","exports":{".":{"import":"./index.mjs","require":"./index.js"},"./browser":"./js/couchbase-info.js","./images/*":"./images/*","./styles.css":"./dist/topology-ui.css"},"gitHead":"96a1b1ccdac49e2c7497b7dd332a3f85df7e571c","license":"Apache-2.0","scripts":{"test":"npm run build:css && node --test","prepare":"npm run build:css","build:css":"tailwindcss -i ./build/tailwind-input.css -o ./dist/topology-ui.css --config ./tailwind.config.cjs --minify && node ./scripts/bundle-styles.mjs","prepublishOnly":"npm test"},"version":"1.3.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:81522cb6-ea3f-4479-b3a5-3fa2a8fa81e2"}},"homepage":"https://github.com/couchbaselabs/topology-ui#readme","keywords":["couchbase","topology","tailwind","font-awesome","markdown","renderer"],"repository":{"url":"git+https://github.com/couchbaselabs/topology-ui.git","type":"git"},"_npmVersion":"11.19.0","description":"Packaged Couchbase topology renderer preserving the original browser output and dependencies.","directories":{},"maintainers":[{"name":"tayebchlyah","email":"tayebchlyah@gmail.com"}],"_nodeVersion":"24.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tailwindcss":"3.0.24","@fortawesome/fontawesome-free":"5.15.4"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/topology-ui_1.3.0_1789743310051_0.5400219582396231"}}},"time":{"created":"2026-03-19T04:38:02.954Z","modified":"2026-09-18T14:55:10.569Z","1.0.0":"2026-03-19T04:38:03.291Z","1.1.0":"2026-05-17T08:12:26.764Z","1.1.1":"2026-05-17T11:14:42.803Z","1.2.0":"2026-09-17T17:58:18.653Z","1.3.0":"2026-09-18T14:55:10.212Z"},"bugs":{"url":"https://github.com/couchbaselabs/topology-ui/issues"},"license":"Apache-2.0","homepage":"https://github.com/couchbaselabs/topology-ui#readme","keywords":["couchbase","topology","tailwind","font-awesome","markdown","renderer"],"repository":{"url":"git+https://github.com/couchbaselabs/topology-ui.git","type":"git"},"description":"Packaged Couchbase topology renderer preserving the original browser output and dependencies.","maintainers":[{"name":"tayebchlyah","email":"tayebchlyah@gmail.com"}],"readme":"# JavaScript Couchbase Topology UI Viewer\nCouchbase Topology UI Viewer is a JavaScript library for rendering Couchbase cluster, mobile, and bucket topology details in the browser.\n\nThe package is designed to be safe to embed inside host applications that already ship their own CSS frameworks or content styling, including Vuetify apps, CMS platforms, and documentation sites. Load the packaged stylesheet once, call `renderTopology(...)`, and no host-specific compatibility CSS should be necessary.\n\n![overview](https://raw.githubusercontent.com/couchbaselabs/topology-ui/main/docs/assets/overview-mobile.png)\n\n## Get Started \n\n### Installation\n\n```\nnpm install @couchbaselabs/topology-ui\n```\n\nFor developers working from this repository, `npm install` also runs the package `prepare` step and generates the bundled stylesheet in `dist/`.\n\n### Stylesheet\n\nFor bundlers, import the published stylesheet subpath:\n\n```\nimport \"@couchbaselabs/topology-ui/styles.css\";\n```\n\nFor a plain HTML page, load the packaged CSS file directly from the installed package or from a copied asset bundle:\n\n```\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>Couchbase Info CSS</title>\n    <link href=\"./node_modules/@couchbaselabs/topology-ui/dist/topology-ui.css\" rel=\"stylesheet\"/>\n    <!-- jsoneditor v9.7.3 -->\n    <link href=\"https://cdnjs.cloudflare.com/ajax/libs/jsoneditor/9.7.3/jsoneditor.min.css\" rel=\"stylesheet\" type=\"text/css\">\n    <script src=\"https://cdnjs.cloudflare.com/ajax/libs/jsoneditor/9.7.3/jsoneditor.min.js\"></script>\n</head>\n```\n\nThe package bundles the required Tailwind-generated rules and Font Awesome icon styles into `dist/topology-ui.css`, so consumers do not need to add Tailwind CSS or Font Awesome separately.\n\n- The stylesheet is scoped to the renderer root, `.cb-topology-renderer`.\n- Internal renderer classes are library-owned and prefixed, so host utility classes like `flex`, `px-6`, `py-1`, `text-right`, and similar framework helpers do not collide with the topology markup.\n- The default package CSS is the only stylesheet consumers should need.\n- `jsoneditor` is not included and remains demo-only.\n\n### Use As A Dependency\n\n```\nconst topologyUi = require(\"@couchbaselabs/topology-ui\");\n\nconst data = {\n  ... topology data here ...\n};\n\nconst html = topologyUi.renderTopology(data);\n```\n\n`renderTopology()` returns markup wrapped in the library root container (`.cb-topology-renderer`), and the packaged stylesheet targets only that rendered topology block.\n\nOr if you already have a DOM element:\n\n```\nconst topologyUi = require(\"@couchbaselabs/topology-ui\");\n\nconst content = document.getElementById(\"display\");\ntopologyUi.create_cluster(content, data);\n```\n\nIf the topology source comes as a JSON string or a JavaScript object literal string:\n\n```\nconst topologyUi = require(\"@couchbaselabs/topology-ui\");\n\nconst data = topologyUi.parseTopologySource(rawInput);\nconst html = topologyUi.renderTopology(data);\n```\n\nThe packaged renderer preserves the public JavaScript API and visual output while emitting host-safe, namespaced internal classes. By default image references resolve to `images/...` relative to the page. In npm-based apps you will usually copy `node_modules/@couchbaselabs/topology-ui/images` into your public assets and override that path with `assetRoot`:\n\n```\nconst html = topologyUi.renderTopology(data, { assetRoot: \"/assets/topology-ui/images\" });\n```\n\nBest-practice usage is still simple: install the package, load one stylesheet, and render the returned HTML.\n\n```\nimport \"@couchbaselabs/topology-ui/styles.css\";\n```\n\n## Figures and quality\n\nEvery displayed memory, CPU, bucket quota, document count, resident ratio, and replica count is a figure. Supply a plain number as before, or include quality information:\n\n```js\n{ value: 7, unit: \"GB\", status: \"partial\", reason: \"2 nodes unreachable\" }\n```\n\n`renderTopology()` and `mountTopology()` accept `renderFigure`. The renderer calls it for every figure. The default output is a `cb-tu-figure` span with `data-status` and `aria-description`. Missing or failed data renders as `&mdash;`. Partial data renders with a `~` prefix, for example `~7 GB`. Existing topology colors stay unchanged. The Total row leaves Resident, Replicas, and TTL empty. This avoids invented values and keeps quality visible without adding color semantics.\n\n```js\nconst html = topologyUi.renderTopology(data, {\n  renderFigure: (figure) => `<strong>${figure.value}</strong>`\n});\n```\n\nUse `normalizeFigure(value, unit)` and `defaultRenderFigure(figure)` from the package when a host needs the same figure contract outside the topology renderer.\n\nIn an embedded host application you can load that stylesheet once and inject the returned HTML directly:\n\n```\nconst topologyUi = require(\"@couchbaselabs/topology-ui\");\n\nconst container = document.getElementById(\"display\");\ncontainer.innerHTML = topologyUi.renderTopology(data);\n```\n\n### Topology Viewer\n\n```\n<head>\n    <meta charset=\"UTF-8\">\n    <title>Couchbase Info CSS</title>\n    <link href=\"./node_modules/@couchbaselabs/topology-ui/dist/topology-ui.css\" rel=\"stylesheet\">\n    ...\n</head>\n<body>\n<div class=\"container\">\n    <main class=\"container-fluid\">\n        <div class=\"row justify-content-center\">\n            <div id=\"display\" class=\"flex justify-content-center\">\n                <!-- cluster topology display would be here -->\n            </div>\n        </div>\n          ....\n    </main>\n</div>\n<script>\n    var data =\n        {\n\t\t\t\t... topology data here ...\n        }\n    let content = document.getElementById(\"display\");\n    topologyUi.create_cluster(content, data);\n</script>\n</body>\n```\n\n## Data Structure\n\n```\nlet data = {\n            name: \"cb-demo\",\n            version: \"6.6.3\",\n            resources: {\n                memory: \"128\",\n                cpus: \"8\"\n            },\n            serverGroups: [\n                {\n                    name: \"serverGroup1\",\n                    nodes: [\n                        {\n                            name: \"cb-demo0000\",\n                            resources: {\n                                memory: \"256\",\n                                cpus: \"16\"\n                            },\n                            services: [\n                                \"Query\",\n                                \"Index\"\n                            ],\n                            status: \"HEALTHY\"\n                        },\n                        {\n                            name: \"cb-demo0001\",\n                            services: [\n                                \"Data\",\n                                \"Query\",\n                                \"Index\",\n                                \"Analytics\"\n                            ],\n                            status: \"HEALTHY\"\n                        },\n                        {\n                            name: \"cb-demo0002\",\n                            services: [\n                                \"Data\",\n                                \"Query\",\n                                \"Index\",\n                                \"Analytics\"\n                            ],\n                            status: \"HEALTHY\"\n                        }\n                    ],\n                    status: \"HEALTHY\"\n                },\n                {\n                    name: \"serverGroup2\",\n                    nodes: [\n                        {\n                            name: \"cb-demo0003\",\n                            resources: {\n                                memory: \"256\",\n                                cpus: \"16\"\n                            },\n                            services: [\n                                \"Data\",\n                                \"Query\",\n                                \"Index\",\n                                \"Analytics\"\n                            ],\n                            status: \"HEALTHY\"\n                        },\n                        {\n                            name: \"cb-demo0004\",\n                            services: [\n                                \"Data\",\n                                \"Query\",\n                                \"Index\",\n                                \"Analytics\"\n                            ],\n                            status: \"HEALTHY\"\n                        },\n                        {\n                            name: \"cb-demo0005\",\n                            services: [\n                                \"Data\",\n                                \"Query\",\n                                \"Index\",\n                                \"Analytics\"\n                            ],\n                            status: \"HEALTHY\"\n                        }\n                    ],\n                    status: \"HEALTHY\"\n                },\n                {\n                    name: \"serverGroup3\",\n                    nodes: [\n                        {\n                            name: \"cb-demo0006\",\n                            services: [\n                                \"Data\"\n                            ],\n                            status: \"HEALTHY\"\n                        },\n                        {\n                            name: \"cb-demo0007\",\n                            services: [\n                                \"Data\",\n                            ],\n                            status: \"HEALTHY\"\n                        },\n                        {\n                            name: \"cb-demo0008\",\n                            services: [\n                                \"Query\",\n                                \"Index\"\n                            ],\n                            resources: {\n                                memory: \"256\",\n                                cpus: \"16\"\n                            },\n                            status: \"HEALTHY\"\n                        }\n                    ],\n                    status: \"HEALTHY\"\n                }\n            ],\n            buckets: [\n                { name: \"mybucket\", type: \"couchbase\", quota: 5590, documents: 39000000, replicas:1, ratio: 49, \n                   scopes: [{ name: \"scope1\", \n                              collections:[{name: \"collection1\"} ]}], \n                   connectors: [\"mobile\",\"kafka\", \"elastic\", \"spark\"]\n                }\n                { name: \"mybucket2\", type: \"ephemeral\", quota: 5590, documents: 39000000, ratio: 32, replicas:1\n                   scopes: [{ name: \"scope1\", documents: 39000000, \n                         collections:[{name: \"collection1\", documents: 39000000}]}], \n                         connectors: [\"mobile\",\"kafka\", \"elastic\"]\n                },\n                { name: \"mybucket3\", type: \"magma\", quota: 5590, replicas:1, documents: 39000000, ratio: 75, \n                  scopes: [{ name: \"scope1\", documents: 34000000},\n                           { name: \"scope2\", documents: 5000000, \n                                collections:[{name: \"collection1\", documents: 5000000}]}\n                          ],\n                  connectors: [\"mobile\",\"kafka\", \"elastic\"]}\n              ],\n            status: \"HEALTHY\",\n            mobile: {\n\t        version: \"2.8.3\",\n                resources: {\n                    memory: 32,\n                    cpus: 8\n                },\n                groups : [{\n                    name:\"Group1 - Import=true\",\n                    instances: [\n                        {\n                            nodeIp: \"10.0.0.9\",\n                            name: \"SG 1\",\n                            resources: {\n                                memory: 32,\n                                cpus: 8\n                            }\n                        },\n                        {\n                            nodeIp: \"10.0.0.10\",\n                            name: \"SG 2\",\n                            resources: {\n                                memory: 32,\n                                cpus: 8\n                            }\n                        }]\n                },\n                    {\n                        name:\"Group2 - Import=false\",\n                        instances: [\n                            {\n                                nodeIp: \"10.0.0.11\",\n                                name: \"SG 3\",\n                                resources: {\n                                    memory: 32,\n                                    cpus: 8\n                                }\n                            },\n                            {\n                                nodeIp: \"10.0.0.12\",\n                                name: \"SG 4\",\n                                resources: {\n                                    memory: 32,\n                                    cpus: 8\n                                }\n                            },\n                            {\n                                nodeIp: \"10.0.0.13\",\n                                name: \"SG 5\",\n                                resources: {\n                                    memory: 32,\n                                    cpus: 8\n                                }\n                            }]\n                    }],\n                databases: [{name: \"mobileDatabase\" },{name: \"db2\" }],\n                publicAddress: \"https://mypublicdns.com\",\n                clients: [{ name:\"front-end App\", versions: [\"3.0\"], os:[\"windows\",\"ios\",\"android\"], language: \"Java\", total:50},{ name:\"front-end App2\", versions: [\"3.0\"], os:[\"windows\",\"ios\",\"android\"], language: \".Net\"}]\n            },\n            applications: {},\n            connectors: {}\n        };\n```\n\n### Data Structure Properties\n\n* **name**: display name of the cluster \n* **version**: cluster version\n* **resources**: If all/majority of nodes have the same hardware (cpu/memory) you can fill the resources at the cluster level instead of individual nodes.  \n\n```\n{\n  memory: \"128\",\n  cpus: \"8\"\n}\n            \n```\n            \n* **serverGroups**: Array of Server Groups. Each Server Group contains the information of the Server Group name, list of nodes and status. \n\n```\n[\n{\n                    name: \"serverGroup1\",\n                    nodes: [\n                        {\n                            name: \"cb-demo0000\",\n                            resources: {\n                                memory: \"256\",\n                                cpus: \"16\"\n                            },\n                            services: [\n                                \"Query\",\n                                \"Index\"\n                            ],\n                            status: \"HEALTHY\"\n                        },\n                        ...\n                    ],\n                    status: \"HEALTHY\"\n                },\n                {\n                    name: \"serverGroup2\",\n                    ...\n                } \n            ]\n```\n\n#### Limiting nodes per line with `nodesPerLine`\n\nBy default all nodes inside a server group render on a single line and wrap only when the container runs out of width. Set the optional cluster-level `nodesPerLine` field (positive integer) to cap how many nodes appear on each line. Each server group chunks its nodes independently — the last line may be shorter.\n\n```\n{\n    name: \"cb-demo\",\n    nodesPerLine: 3,\n    serverGroups: [ ... ]\n}\n```\n\nExample: 9 nodes with `nodesPerLine: 3` → 3 rows of 3. With `nodesPerLine: 2` → 4 rows of 2 plus a final row of 1. Omit the field (or set `0` / a non-integer) to keep the original wrap behavior.\n\n#### Bucket columns\n\nThe bucket grid renders `quota`, `documents`, `ratio`, `replicas`, `eviction`, `connectors` and `ttl`, in that order, after the bucket name.\n\nA column renders only when at least one bucket carries that field. A topology whose buckets declare no `connectors` and no `ttl` shows neither column, and the grid narrows to fit. A field that is present but whose figure value is `null` keeps its column: a measured value the source did not answer stays visible as missing, while a field the caller never set is not modelled at all.\n\n`eviction` is a string field. The cell drops the suffix every row repeats, so `value_only` renders as `value` and `full_eviction` renders as `full`. Any other value renders as reported. Like every other cell it goes through the figure contract, so it accepts a plain string or a figure with quality.\n\n```\nbuckets: [\n    { name: \"mybucket\", quota: 5590, documents: 39000000, replicas: 1, ratio: 49, eviction: \"value_only\" }\n]\n```\n\nScope and collection rows follow the same visible columns, so their document counts stay under `#docs` whatever the grid width.\n\n#### Host names\n\nNode names and mobile instance addresses are shortened to fit their tile. A fully qualified name loses its domain suffix first, because every node in a cluster shares it, then the remaining label is middle-elided: `svc-dqis-node-001.29fep4zxmeuizhpc.cloud.couchbase.com` renders as `sv ... -001`. An IPv4 address keeps its shape and is elided from the middle: `10.156.192.8` renders as `10 ... 92.8`.\n\n#### Grouping identical nodes with `total`\n\nWhen a Server Group or Sync Gateway Group contains many identical nodes, listing them one by one makes the diagram tall and noisy. Set the `total` property on a node (or Sync Gateway instance) to render a single visual that represents `total` identical nodes. The renderer draws the node once with a small stacked-card effect behind it and a black `Nx` label on the left.\n\nThe field is optional. Omit it (or set `total <= 1`) to keep the original one-node-per-entry rendering.\n\n```\n{\n    name: \"cb-demo0003\",\n    resources: { memory: \"256\", cpus: \"16\" },\n    services: [\"Data\"],\n    status: \"HEALTHY\",\n    total: 20\n}\n```\n\nThe same field works for Sync Gateway instances:\n\n```\n{\n    nodeIp: \"10.0.0.9\",\n    name: \"SG 1\",\n    resources: { memory: 32, cpus: 8 },\n    total: 5\n}\n```\n\n* **buckets**: Array of Buckets. You can define `ephemeral`, `couchbase` and `magma` bucket types. The default value if `type` property is missing is `couchbase`. Optionally, you can display the list of scopes and collections per scope. Another optional property among others, is `connectors` that would accept the following enum values: `mobile`, `kafka`, `elastic`, `spark`\n\n![scopes/collections](docs/assets/scopes-collections.png)\n\n```   \n             buckets: [\n                { name: \"mybucket\", type: \"couchbase\", quota: 5590, documents: 39000000, replicas:1, ratio: 49, \n                   scopes: [{ name: \"scope1\", \n                              collections:[{name: \"collection1\"} ]}], \n                   connectors: [\"mobile\",\"kafka\", \"elastic\", \"spark\"]\n                }\n                { name: \"mybucket2\", type: \"ephemeral\", quota: 5590, documents: 39000000, ratio: 32, replicas:1\n                   scopes: [{ name: \"scope1\", documents: 39000000, \n                         collections:[{name: \"collection1\", documents: 39000000}]}], \n                         connectors: [\"mobile\",\"kafka\", \"elastic\"]\n                },\n                { name: \"mybucket3\", type: \"magma\", quota: 5590, replicas:1, documents: 39000000, ratio: 75, \n                  scopes: [{ name: \"scope1\", documents: 34000000},\n                           { name: \"scope2\", documents: 5000000, \n                                collections:[{name: \"collection1\", documents: 5000000}]}\n                          ],\n                  connectors: [\"mobile\",\"kafka\", \"elastic\"]}\n              ]\n```\n\n*Note: Information at the bucket/scope/collections level is optional.* \n\n* **status**: Status of the cluster. \n\n* **mobile**: Sync Gateway and Couchbase Lite topology information\n\n```\n mobile: {\n             version: \"2.8.3\",\n                groups : [{\n                    name:\"Group1 - Import=true\",\n                    instances: [\n                        {\n                            nodeIp: \"10.0.0.9\",\n                            name: \"SG 1\",\n                            resources: {\n                                memory: 32,\n                                cpus: 8\n                            }\n                        },\n                        ...]\n                   },\n                   {\n                        name:\"Group2 - Import=false\",\n                        instances: [\n                            {\n                                nodeIp: \"10.0.0.11\",\n                                name: \"SG 3\"\n                            },\n                            ... ]\n                   }],\n                databases: [{name: \"mobileDatabase\" },\n                            {name: \"db2\" }],\n                publicAddress: \"https://mypublicdns.com\",\n                clients: [{ name:\"front-end App\", versions: [\"3.0\"], os:[\"windows\",\"ios\",\"android\"], language: \"Java\", total:50}, \n                          { name:\"front-end App2\", versions: [\"3.0\"], os:[\"windows\",\"ios\",\"android\"], language: \".Net\"}]\n            }\n```\n\n* **Applications**: TBD\n\n* **Connectors**: TBD\n\n\n\n## Topologies Samples:\n\n* [**3 Nodes with Data, Query and Index Services with homogenous cpu/memory resources**](docs/samples/server-3nodes.md)\n\n* [**3 Data Nodes, 2 Query/Index Nodes**](docs/samples/server-5nodes.md)\n\n* [**3 Data Nodes, 2 Query/Index Nodes, 2 FTS/Eventing Nodes**](docs/samples/server-7nodes.md)\n\n* [**9 Nodes distributed accross 3 Server Group And non homogenous cpu/memory resources**](docs/samples/server-9nodes.md)\n\n* [**mobile** - 2 Sync Gateways and 3 data,query,index nodes](docs/samples/mobile-2sg-3nodes.md)\n\n* [**mobile** - 2 Sync Gateway Groups, 3 data and 2 query/index nodes](docs/samples/mobile-5sg-5nodes.md)\n\n* [**mobile** - 2 Clients Couchbase Lite languages, 2 groups of 5 Sync Gateways and 3 server groups](docs/samples/mobile-5sg-9nodes.md)\n","readmeFilename":"README.md"}