How to get the server Hostname to appear in the gui header

  • edit file: /var/www/openmediavault/js/omv/workspace/Workspace.js


    change line 100


    FROM:

    Code
    "</div></div>"



    TO:


    Code
    "</div><br><p style='color:white;font-size:200%' align='center' >" + location.hostname + "</p></div>"


    This copies the URL host name to the middle of the top line.


    If I could figure out how to make an RPC call, I could get the server hostname from rpc.service = "Network" and method = "getGeneralSettings." There's probably a way to get ExtJS to do this as well, but I found the learning curve too steep for a Monday afternoon. Any help here would be appreciated.

  • Unfortunately, that's all css stuff (presentation), not content. Alas, there's nothing in there about how to set up and receive the rpc data within the ExtJS framework. There are other examples in the code set but it's all combined with the panes and I don't have whatever IDE people are using to pair the pane with the js.


    I could use an extant css style that matched what I hard-coded, but when I looked though what was already there, I didn't see anything appropriate.

  • I think I've managed to get ExtJS (6.2 not 6.6) to read the hostname with an RPC, but the framework makes a very special effort to keep data and procedure separate and I'm having a really hard time getting the result onto the gui. It's frustrating.

Jetzt mitmachen!

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