openwisp / openwisp/netjsongraph.js
[bug] Fix missing legacy iconfont assets referenced by netjsongraph.css
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 314
- Forks
- 119
- Avg merge
- 18h 17m
- Merged PRs (30d)
- 15
Description
Describe the bug
src/css/netjsongraph.css defines an @font-face rule that references external legacy iconfont assets:
iconfont.eoticonfont.wofficonfont.ttficonfont.svg
None of these files are tracked in the repository or included in the generated dist/ output. The rule also includes an inline base64 WOFF2 font, so modern browsers render the icon correctly without requesting the missing files.
However, this breaks Django deployments using manifest static storage, including OpenWISP's CompressStaticFilesStorage. During collectstatic, Django resolves every CSS url() reference and fails because the external font files do not exist:
ValueError: The file 'netjsongraph/css/src/iconfont.eot' could not be found with <openwisp_utils.storage.CompressStaticFilesStorage ...>
Steps To Reproduce
- Install or package
netjsongraph.jsfor use in a Django deployment with manifest static storage. - Run
collectstaticwith OpenWISP'sCompressStaticFilesStorage(or another storage backend that resolves CSS asset references). - Observe that processing
netjsongraph.cssfails when Django attempts to resolve the missingiconfont.eotreference.
Expected behavior
The distributed stylesheet should not reference assets that are absent from the package. The @font-face declaration should retain the embedded WOFF2 data URI while removing the unavailable EOT, WOFF, TTF, and SVG fallback URLs.
The generated dist/ output should be rebuilt after the source change.
Screenshots
Not applicable.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/css/netjsongraph.css and inspect the @font-face declaration referencing the missing iconfont assets. Retain the embedded WOFF2 data URI while removing the unavailable EOT, WOFF, TTF, and SVG URLs, then rebuild the generated dist/ output. Confirm the distributed stylesheet no longer references absent files and can be processed by manifest static storage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100