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 fans | Gigabyte GA-G33M-DS2R | Intel E8400@3,6Ghz | 6GB DDR2 RAM
    1x500MB SSD for System/Caches/Logs/Backup/Downloads | 7x2To HDD RAID 6 for Datas
    Powered by OMV v4.1.29 / Kernel 4.18

    Edited 2 times, last by 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 fans | Gigabyte GA-G33M-DS2R | Intel E8400@3,6Ghz | 6GB DDR2 RAM
    1x500MB SSD for System/Caches/Logs/Backup/Downloads | 7x2To HDD RAID 6 for Datas
    Powered by OMV v4.1.29 / Kernel 4.18

  • 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 fans | Gigabyte GA-G33M-DS2R | Intel E8400@3,6Ghz | 6GB DDR2 RAM
    1x500MB SSD for System/Caches/Logs/Backup/Downloads | 7x2To HDD RAID 6 for Datas
    Powered by OMV v4.1.29 / Kernel 4.18

  • 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 fans | Gigabyte GA-G33M-DS2R | Intel E8400@3,6Ghz | 6GB DDR2 RAM
    1x500MB SSD for System/Caches/Logs/Backup/Downloads | 7x2To HDD RAID 6 for Datas
    Powered by OMV v4.1.29 / Kernel 4.18

  • Thanks Volker.


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

    Lian Li PC-V354 with Be Quiet fans | Gigabyte GA-G33M-DS2R | Intel E8400@3,6Ghz | 6GB DDR2 RAM
    1x500MB SSD for System/Caches/Logs/Backup/Downloads | 7x2To HDD RAID 6 for Datas
    Powered by OMV v4.1.29 / Kernel 4.18

  • 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 fans | Gigabyte GA-G33M-DS2R | Intel E8400@3,6Ghz | 6GB DDR2 RAM
    1x500MB SSD for System/Caches/Logs/Backup/Downloads | 7x2To HDD RAID 6 for Datas
    Powered by OMV v4.1.29 / Kernel 4.18

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



    Lian Li PC-V354 with Be Quiet fans | Gigabyte GA-G33M-DS2R | Intel E8400@3,6Ghz | 6GB DDR2 RAM
    1x500MB SSD for System/Caches/Logs/Backup/Downloads | 7x2To HDD RAID 6 for Datas
    Powered by OMV v4.1.29 / Kernel 4.18

  • 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 fans | Gigabyte GA-G33M-DS2R | Intel E8400@3,6Ghz | 6GB DDR2 RAM
    1x500MB SSD for System/Caches/Logs/Backup/Downloads | 7x2To HDD RAID 6 for Datas
    Powered by OMV v4.1.29 / Kernel 4.18

    Edited 2 times, last by 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 fans | Gigabyte GA-G33M-DS2R | Intel E8400@3,6Ghz | 6GB DDR2 RAM
    1x500MB SSD for System/Caches/Logs/Backup/Downloads | 7x2To HDD RAID 6 for Datas
    Powered by OMV v4.1.29 / Kernel 4.18

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!