Skip to content

Commit ef06101

Browse files
committed
Update NIST viewer README for product-specific directory structure
Update documentation to reflect the new product-specific directory structure where each product (rhel8, rhel9, rhel10) has its own subdirectory with a complete set of viewer pages. Changes: - Updated directory tree showing product subdirectories - Documented file size improvement (2.5MB vs 7.5MB per page) - Added note about product-specific data embedding - Updated manual generation instructions - Clarified that index.html redirects to rhel9 by default - Removed references to localStorage-based product switching
1 parent 3926741 commit ef06101

1 file changed

Lines changed: 26 additions & 10 deletions

File tree

utils/nist_sync/VIEWER_README.md

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,21 @@ ninja nist-viewer
8585

8686
# The viewer will be generated at:
8787
# build/nist-controls-viewer/
88-
# ├── index.html (Dashboard - start here)
89-
# ├── controls.html (Controls browser)
90-
# ├── control-detail.html (Individual control details)
91-
# ├── gaps.html (Gap analysis)
92-
# ├── statistics.html (Detailed statistics)
93-
# ├── family.html (Control families)
94-
# └── nist-controls-data.json (Reference data file)
88+
# ├── index.html (Redirects to rhel9/)
89+
# ├── nist-controls-data.json (Reference data file)
90+
# ├── rhel8/
91+
# │ ├── index.html (RHEL8 Dashboard)
92+
# │ ├── controls.html (Controls browser)
93+
# │ ├── control-detail.html (Control details)
94+
# │ ├── gaps.html (Gap analysis)
95+
# │ ├── statistics.html (Statistics)
96+
# │ └── family.html (Families)
97+
# ├── rhel9/
98+
# │ ├── index.html (RHEL9 Dashboard)
99+
# │ └── ... (same structure)
100+
# └── rhel10/
101+
# ├── index.html (RHEL10 Dashboard)
102+
# └── ... (same structure)
95103
```
96104

97105
### Manual Generation
@@ -105,8 +113,11 @@ python3 generate_nist_viewer.py \
105113
--output-dir ../../build/nist-controls-viewer \
106114
--repo-root ../..
107115

108-
# Open the viewer (starts at dashboard)
116+
# Open the viewer (redirects to rhel9 by default)
109117
open ../../build/nist-controls-viewer/index.html
118+
119+
# Or open a specific product directly:
120+
open ../../build/nist-controls-viewer/rhel9/index.html
110121
```
111122

112123
## Published Version
@@ -119,9 +130,14 @@ The published version updates automatically when changes are pushed to the maste
119130

120131
## Data Structure
121132

122-
The viewer embeds all control data directly in each HTML file (as `EMBEDDED_DATA` JavaScript constant). This allows the viewer to work when opened directly as local files without CORS issues or requiring a web server.
133+
The viewer generates product-specific pages in separate subdirectories (rhel8/, rhel9/, rhel10/). Each product's pages embed only that product's data (as `EMBEDDED_DATA` JavaScript constant), significantly reducing file sizes and improving performance.
123134

124-
Data is embedded in all pages identically, allowing each page to function independently. Pages communicate via URL parameters (e.g., `control-detail.html?id=ac-2`) and localStorage (for product selection and TODOs).
135+
Product-specific data structure:
136+
- Each product subdirectory contains a complete set of viewer pages
137+
- Each page embeds only that product's control data (~2.5MB vs ~7.5MB for all products)
138+
- Pages communicate via URL parameters (e.g., `control-detail.html?id=ac-2`)
139+
- TODOs are stored in localStorage per-control
140+
- Product switching is done via links in the header (not localStorage)
125141

126142
A separate `nist-controls-data.json` file is also generated for reference and debugging purposes.
127143

0 commit comments

Comments
 (0)