Skip to content
Open
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
57 changes: 57 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Deploy React Flow map

on:
push:
branches:
- master
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: github-pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: 24
cache: npm

- name: Install dependencies
run: npm ci

- name: Configure Pages
id: pages
uses: actions/configure-pages@v5

- name: Build site
run: npm run build
env:
BASE_PATH: ${{ steps.pages.outputs.base_path }}/

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v4
with:
path: dist

deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
dist/
.DS_Store
51 changes: 47 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# gNMI Map
[![map](https://gitlab.com/rdodin/pics/-/wikis/uploads/6a9d18f9cb2240656aad5d224aa757df/rsz_image.png)](https://gitlab.com/rdodin/pics/-/wikis/uploads/d275425d2b66601be213c6722dadd4d6/gnmi_0.7.0_map.pdf)
[![map](https://gitlab.com/rdodin/pics/-/wikis/uploads/6a9d18f9cb2240656aad5d224aa757df/rsz_image.png)](./public/gnmi_0.10.0_map.pdf)

gNMI Map provides a visual representation of the [gNMI](https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-specification.md) service.

Expand All @@ -9,10 +9,53 @@ gNMI Map makes it easy to understand the composition of the gNMI service as well

<p align=center><img src="https://gitlab.com/rdodin/pics/-/wikis/uploads/61e7fa143e5898653c1edb9b42b936f3/image.png" width="600" /></p>

## React Flow map

This repository now includes a React Flow recreation of the latest tagged upstream gNMI protobuf IDL. The app currently tracks `openconfig/gnmi` release `v0.14.1`, whose `gnmi.proto` advertises gNMI service compatibility `0.10.0`. It adds an interactive canvas with search, field-level links, a minimap, source/documentation links, an extension-edge toggle, and a deprecated-field toggle. Deprecated proto fields are hidden by default so the map follows the current spec-facing surface.

```bash
npm install
npm run dev
```

Open the dev-server URL printed by Vite. For a production build:

```bash
npm run build
```

## GitHub Pages

The React Flow map deploys to GitHub Pages through `.github/workflows/pages.yml`.
The workflow runs on pushes to `master` and can also be started manually from the Actions tab.

Enable Pages in the repository settings with **Source: GitHub Actions**. After deployment, the default project Pages URL is:

```text
https://hellt.github.io/gnmi-map/
```

The workflow builds the Vite app into `dist/` and uses the Pages base path when generating asset URLs, so the app and PDF link work under `/gnmi-map/`.

To refresh the generated React Flow map from the latest `openconfig/gnmi` tag:

```bash
npm run build:map
npm run test:map
```

Proto links are pinned to the latest gNMI tag. Specification links track `openconfig/reference` `master`, since that repository does not publish tags.

To refresh the generated PDF map from the default non-deprecated view:

```bash
npm run build:pdf
```

## Usage
The map can be downloaded from this repository or viewed right in a browser. The maps for the following gNMI service versions have been created so far:
The map can be downloaded from this repository or viewed right in a browser:

* **gNMI 0.7.0** - [view](https://gitlab.com/rdodin/pics/-/wikis/uploads/d275425d2b66601be213c6722dadd4d6/gnmi_0.7.0_map.pdf) / [download](https://github.com/hellt/gnmi-map/raw/master/gnmi_0.7.0_map.pdf)
* **gNMI 0.10.0** - [view](./public/gnmi_0.10.0_map.pdf)

## OS X Preview app issue
Mac OS X default PDF reader app - Preview - messes with the link fragments (`http://url.com/page#fragment`), therefore the links won't work in this app (see [1](https://discussions.apple.com/thread/251041261), [2](https://discussions.apple.com/thread/250919338)).
Mac OS X default PDF reader app - Preview - messes with the link fragments (`http://url.com/page#fragment`), therefore the links won't work in this app (see [1](https://discussions.apple.com/thread/251041261), [2](https://discussions.apple.com/thread/250919338)).
Binary file removed gnmi_0.7.0_map.pdf
Binary file not shown.
12 changes: 12 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>gNMI React Flow Map</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading