rackslab / Slurm-web

Open source web dashboard for Slurm HPC clusters
https://slurm-web.com
GNU General Public License v3.0
295 stars 89 forks source link

How to generate DejaVuSansMono.typeface.js. #226

Closed bviviano closed 1 month ago

bviviano commented 2 years ago

I am working on deploying Slurm-web 2.4.0 onto a new RHEL8 based HPC cluster w/Slurm 21.08.8. Everything is working, except on the 3D view, I get the following JS errors on my debug console

require.min.js:1961 GET https://hpc.example.com/slurm/js/fonts/DejaVuSansMono.typeface.js net::ERR_ABORTED 404 (Not Found) require.min.js:168 Uncaught Error: Script error for "../../../js/fonts/DejaVuSansMono.typeface" https://requirejs.org/docs/errors.html#scripterror at makeError (require.min.js:168:17) at HTMLScriptElement.onScriptError (require.min.js:1738:36)

Reviewing doc/installation.rst, I see I need to:

nodejs /usr/lib/nodejs/font-converter.js /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf > dashboard/js/fonts/DejaVuSansMono.typeface.js

Problem is, Under RHEL I can no locate the "font-converter.js" script anywhere and Google was no help. I have the DejaVuSansMono.ttf TrueType Font on my system

# ls -l /usr/share/fonts/dejavu/DejaVuSansMono.ttf
-rw-r--r--. 1 root root 340240 May 17  2015 /usr/share/fonts/dejavu/DejaVuSansMono.ttf

But can't seem to locate the steps to correctly convert the TTF -> JS. I tried using this web site:

https://gero3.github.io/facetype.js/

But the resulting font caused an error in Slurm web:

DejaVuSansMono.typeface.js:1 Uncaught ReferenceError: _typeface_js is not defined at DejaVuSansMono.typeface.js:1:1
THREE.TextGeometry: font parameter is not an instance of THREE.Font.
THREE.Geometry.fromBufferGeometry(): Position attribute required for conversion.

Would appreciate it if someone could point me at the correct/complete steps to create the DejaVuSansMono.typeface.js file, or just upload/attach a working one to this issue.

Thanks.

rezib commented 2 months ago

This issue concerns Slurm-web v2 which is not maintained anymore. You are highly encouraged to test the new version v3.0.0 that is not impacted by this issue. The quick start guide for v3.0.0 is available online: https://docs.rackslab.io/slurm-web/install/quickstart.html

Unless someone is motivated to maintain the old version of Slurm-web or you have a justified reason to keep this issue open, it will be closed in a few weeks.

rezib commented 1 month ago

For the reasons explained in the previous comment, I finally close this issue.