Need help with OMV framework

  • Hi all !


    I'm trying to tweak the omv graphs and dev a plugin for that after.
    I want to show multiple CPU graphs on the same page, side by side.


    At the moment, I'm stuck with a stupid thing and I cannot find the way it works in IOMV Framework.


    I just created a /var/www/openmediavault/js/omv/workspace/panel/RrdGraph2.js (almost the same as RrdGraph.js but with the HTML code to have 2 CPU core) with that code.


    I'd like to have 2 string var passed to it, with "cpu-0" and "cpu-1" for both core of my CPU.


    So I tried to call it with a modified /var/www/openmediavault/js/omv/module/admin/diagnostic/system/Cpu.js



    That doesn't work. I must missed something but I cannot find what...
    Any help is welcome.


    Thanks

    Lian Li PC-V354 (with Be Quiet! Silent Wings 3 fans)
    ASRock Rack x470D4U | AMD Ryzen 5 3600 | Crucial 16GB DDR4 2666MHz ECC | Intel x550T2 10Gb NIC

    1 x ADATA 8200 Pro 256MB NVMe for System/Caches/Logs/Downloads
    5 x Western Digital 10To HDD in RAID 6 for Datas
    1 x Western Digital 2To HDD for Backups

    Powered by OMV v5.6.26 & Linux kernel 5.10.x

    2 Mal editiert, zuletzt von sbocquet ()

  • Thanks Volker for your help,


    Unfortunatly at the moment, it's just on my test server as I haven't begin to correctly dev the plugin.
    I'm just trying to make it work at the moment, and wanted to know if I was doing it the right way or not, since I haven't gone deeper in the Template thing.


    Do you see any 'big' mistake ?


    Cheers,

    Lian Li PC-V354 (with Be Quiet! Silent Wings 3 fans)
    ASRock Rack x470D4U | AMD Ryzen 5 3600 | Crucial 16GB DDR4 2666MHz ECC | Intel x550T2 10Gb NIC

    1 x ADATA 8200 Pro 256MB NVMe for System/Caches/Logs/Downloads
    5 x Western Digital 10To HDD in RAID 6 for Datas
    1 x Western Digital 2To HDD for Backups

    Powered by OMV v5.6.26 & Linux kernel 5.10.x

  • Is there any kind of "Template" registering as my RrdGraph2.js file seems to never been called by CPU.js?

    Lian Li PC-V354 (with Be Quiet! Silent Wings 3 fans)
    ASRock Rack x470D4U | AMD Ryzen 5 3600 | Crucial 16GB DDR4 2666MHz ECC | Intel x550T2 10Gb NIC

    1 x ADATA 8200 Pro 256MB NVMe for System/Caches/Logs/Downloads
    5 x Western Digital 10To HDD in RAID 6 for Datas
    1 x Western Digital 2To HDD for Backups

    Powered by OMV v5.6.26 & Linux kernel 5.10.x

  • So nobody knows how I can have this RrdGraph2 Template with 2 string variable, and why it seems to never be called ? :(

    Lian Li PC-V354 (with Be Quiet! Silent Wings 3 fans)
    ASRock Rack x470D4U | AMD Ryzen 5 3600 | Crucial 16GB DDR4 2666MHz ECC | Intel x550T2 10Gb NIC

    1 x ADATA 8200 Pro 256MB NVMe for System/Caches/Logs/Downloads
    5 x Western Digital 10To HDD in RAID 6 for Datas
    1 x Western Digital 2To HDD for Backups

    Powered by OMV v5.6.26 & Linux kernel 5.10.x

  • Thanks Volker.


    I will give it a try this evening and quickly come back to you.

    Lian Li PC-V354 (with Be Quiet! Silent Wings 3 fans)
    ASRock Rack x470D4U | AMD Ryzen 5 3600 | Crucial 16GB DDR4 2666MHz ECC | Intel x550T2 10Gb NIC

    1 x ADATA 8200 Pro 256MB NVMe for System/Caches/Logs/Downloads
    5 x Western Digital 10To HDD in RAID 6 for Datas
    1 x Western Digital 2To HDD for Backups

    Powered by OMV v5.6.26 & Linux kernel 5.10.x

  • Hi,


    I have modified /var/www/openmediavault/js/omv/module/admin/diagnostic/system/plugin/Cpu.js like this to point to my new Rrdgraph2.js



    Rights are correctly set for both files.


    I can't see any error in the debug tool of my browser, but the CPU panel vanishes from the WebUI...



    The only thing I have in "openmediavault-webgui_error.log" is :



    Code
    2018/04/29 20:21:11 [error] 1754#1754: *5450 open() "/var/www/openmediavault/scss/_core.scss" failed (2: No such file or directory), client: 192.168.0.11, server: openmediavault-we
    bgui, request: "GET /scss/_core.scss HTTP/1.1", host: "home-server.famille-bocquet.fr", referrer: "diagnostics://3/"
    2018/04/29 20:21:11 [error] 1754#1754: *5453 open() "/var/www/openmediavault/scss/_path.scss" failed (2: No such file or directory), client: 192.168.0.11, server: openmediavault-we
    bgui, request: "GET /scss/_path.scss HTTP/1.1", host: "home-server.famille-bocquet.fr", referrer: "diagnostics://3/"
    2018/04/29 20:21:11 [error] 1754#1754: *5447 open() "/var/www/openmediavault/scss/_icons.scss" failed (2: No such file or directory), client: 192.168.0.11, server: openmediavault-w
    ebgui, request: "GET /scss/_icons.scss HTTP/1.1", host: "home-server.famille-bocquet.fr", referrer: "diagnostics://3/"
    2018/04/29 20:21:11 [error] 1754#1754: *5455 open() "/var/www/openmediavault/scss/_extras.scss" failed (2: No such file or directory), client: 192.168.0.11, server: openmediavault-
    webgui, request: "GET /scss/_extras.scss HTTP/1.1", host: "home-server.famille-bocquet.fr", referrer: "diagnostics://3/"
    2018/04/29 20:21:11 [error] 1754#1754: *5457 open() "/var/www/openmediavault/scss/_animated.scss" failed (2: No such file or directory), client: 192.168.0.11, server: openmediavaul
    t-webgui, request: "GET /scss/_animated.scss HTTP/1.1", host: "home-server.famille-bocquet.fr", referrer: "diagnostics://3/"


    Is there any other log file I should check with OMV_DEBUG_EXTJS set to YES ?


    Both files src are in the first post.
    Thanks,

    Lian Li PC-V354 (with Be Quiet! Silent Wings 3 fans)
    ASRock Rack x470D4U | AMD Ryzen 5 3600 | Crucial 16GB DDR4 2666MHz ECC | Intel x550T2 10Gb NIC

    1 x ADATA 8200 Pro 256MB NVMe for System/Caches/Logs/Downloads
    5 x Western Digital 10To HDD in RAID 6 for Datas
    1 x Western Digital 2To HDD for Backups

    Powered by OMV v5.6.26 & Linux kernel 5.10.x

  • Founded that... but the file is in the right place.



    Lian Li PC-V354 (with Be Quiet! Silent Wings 3 fans)
    ASRock Rack x470D4U | AMD Ryzen 5 3600 | Crucial 16GB DDR4 2666MHz ECC | Intel x550T2 10Gb NIC

    1 x ADATA 8200 Pro 256MB NVMe for System/Caches/Logs/Downloads
    5 x Western Digital 10To HDD in RAID 6 for Datas
    1 x Western Digital 2To HDD for Backups

    Powered by OMV v5.6.26 & Linux kernel 5.10.x

  • F... this work at least !



    I was thinking that this code was some unused comments :( .
    Sorry, I'm a noob with JS and ExtJS...


    Thanks a lot Volker.

    Lian Li PC-V354 (with Be Quiet! Silent Wings 3 fans)
    ASRock Rack x470D4U | AMD Ryzen 5 3600 | Crucial 16GB DDR4 2666MHz ECC | Intel x550T2 10Gb NIC

    1 x ADATA 8200 Pro 256MB NVMe for System/Caches/Logs/Downloads
    5 x Western Digital 10To HDD in RAID 6 for Datas
    1 x Western Digital 2To HDD for Backups

    Powered by OMV v5.6.26 & Linux kernel 5.10.x

    2 Mal editiert, zuletzt von sbocquet ()

  • Volker (or any other),


    Each time I update to the latest version of OMV 4, I have to put back my .js modified files (no problem for me), but I also go back to where I was in post 9: no CPU tab.
    Sometime, and I don't know how (!), I can fix it and get it work.


    Is there some kind of JS "cache" to be clean/reset after each update?


    Thx for the help,

    Lian Li PC-V354 (with Be Quiet! Silent Wings 3 fans)
    ASRock Rack x470D4U | AMD Ryzen 5 3600 | Crucial 16GB DDR4 2666MHz ECC | Intel x550T2 10Gb NIC

    1 x ADATA 8200 Pro 256MB NVMe for System/Caches/Logs/Downloads
    5 x Western Digital 10To HDD in RAID 6 for Datas
    1 x Western Digital 2To HDD for Backups

    Powered by OMV v5.6.26 & Linux kernel 5.10.x

  • Thanks a lot. That was it.


    Have a nice day.

    Lian Li PC-V354 (with Be Quiet! Silent Wings 3 fans)
    ASRock Rack x470D4U | AMD Ryzen 5 3600 | Crucial 16GB DDR4 2666MHz ECC | Intel x550T2 10Gb NIC

    1 x ADATA 8200 Pro 256MB NVMe for System/Caches/Logs/Downloads
    5 x Western Digital 10To HDD in RAID 6 for Datas
    1 x Western Digital 2To HDD for Backups

    Powered by OMV v5.6.26 & Linux kernel 5.10.x

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!