How to change order of your Service icons (nodes)

  • Someone sent me a pm requesting how to change the vertical order of your icons in the Services section. So I guess I put a post here. Before you spend time doing this you should know that every time you upgrade OMV the core plugins will lose their position again. Also, when you upgrade a given plugin the position will be lost. So you will find yourself with a seemingly unending task to make order of your service icons.


    In .5 OMV and soon to be OMV 1 you need to go to this location:


    /var/www/openmediavault/js/omv/module/admin/service


    Then in this service folder you will have folders for all the plugins. You need to go into a given service folder, let's say antivirus (which is the clamav folder because that is the name of the program for antivirus) and look for the node file. The node file in the clamav folder is ClamAV.js in .5 and I think it is Clamav.js in OMV 1. Each of these files have a header. I am not going to show headers but I'll show what is important in the file. Here is the contents of ClamAV.js:


    Code
    // require("js/omv/WorkspaceManager.js")
    
    
    OMV.WorkspaceManager.registerNode({
    	id: "clamav",
    	path: "/service",
    	text: _("Antivirus"),
    	icon16: "images/antivirus.png",
    	iconSvg: "images/antivirus.svg"
    });


    If you look this line it shows the name that will appear in the services section of the web-gui:

    Code
    text: _("Antivirus"),


    Since the word Antivirus is used and not ClamAV you will probably want this node to appear first in the services section, if you want things alphabetically.
    You achieve this by adding a comma at the end of the last line which is:

    Code
    iconSvg: "images/antivirus.svg",


    Then you need to add a position line after it. The last line in these files does not require the comma, thus:

    Code
    position: 10


    So the final edited file should look like this:


    Now in my services section the next node is Backup, which is the rsnapshot plugin. In the rsnapshot folder the node file is Rsnapshot.js and is as such:

    Code
    // require("js/omv/WorkspaceManager.js")
    
    
    OMV.WorkspaceManager.registerNode({
        id      : "rsnapshot",
        path    : "/service",
        text    : _("Backup"),
        icon16  : "images/rsnapshot.png",
        iconSvg : "images/rsnapshot.svg"
    });


    To fix the position of this node the edited file will be:


    And you just continue on down the list adding a comma to the iconSvg line and then adding the position line.


    That's it. You do not have to use increments of 10 but that is what we use.


    I recommend installing and using webmin's filemanager if you want to make such edits. I use this filemanager all the time for editing files, chmod, chown, etc., etc....


    http://www.webmin.com/deb.html


    You can go to this link for webmin and copy and paste install lines right into putty. I usually do this:


    mkdir scratch
    cd /scratch

    Code
    wget http://prdownloads.sourceforge.net/webadmin/webmin_1.690_all.deb


    dpkg --install webmin_1.690_all.deb


    It takes a bit to install and then:
    rm web (first 3 letters of the package and then press TAB, for TAB Completion of the name, and hit ENTER to delete the package)


    Then there are some more dependencies that can be installed with:
    apt-get -f install


    Then you can access webmin at:
    https://ipofyouromv:10000


    Sign in with root user and root password. Once logged into webmin the File Manager is in the "Others" section under the name "File Manager".


    PS- To view any changes in the JavaScript you need to refresh your browser. You will not see the changes in order until you do!!!

  • I got here because I was looking for something stupid but it is driving me nuts. Why the subsonic plugin icon doesn't show in the WebUI? I looked this thread and in the subsonic.js file, the image points correctly to images/subsonic.png; and subsonic.png exists and it's actually the logo. In the webUI, but, the subsonic plugin has only a blank square as an icon.
    Maybe a little bug?


    Greetings,
    Guillem.

    DISCLAIMER: :!: I'm not a native English speaker, I'm sorry if I don't explain as good as you would want. :!:


    My NAS:
    Always the latest OMV Erasmus running on an AMD Sempron 3850 @1.3GHz with 4.9.0 Backports Kernel
    with 120GB Samsung SSD 850 EVO for OpenMediaVault & 2x500GB Primary Data HDD + 1TB Secondary HDD for Backup & 2TB USB 3.0 External HDD for offline backup


    Plugin list:
    Flash Memory, Locate, OMV-Extras.org, RSnapshot, Sensors, Syncthing, SMB/CIFS, SSH, USB Backup
    _____________________________________________________________________________________________________________________________


    Zitat

    The Schrödinger's code is that one which is going to work and it's full of bugs at the same time; until you test it, you won't be able to determine it.

  • This thread for changing order of your icons does not apply anymore. Volker has made it so they are automatically put in alphabetic order.


    @gsola96 Did you try clearing your browser cache??? Did you try another browser and it is doing the same thing? Did you use the apt-get clean button in OMV Extras? Is anyone else having issues with this same icon???


    If gsola's issue is resolved this thread should be closed.

  • Thanks for the reply. I tried all of that since my OMV is been running for almost 1 year and subsonic has been installed half an year ago and of course I habe cleared cache and accessed it using different browsers in differemt devices and the icon doesn't show up. I don"t care if I can't see it. It's just for having the UI beautiful.

    DISCLAIMER: :!: I'm not a native English speaker, I'm sorry if I don't explain as good as you would want. :!:


    My NAS:
    Always the latest OMV Erasmus running on an AMD Sempron 3850 @1.3GHz with 4.9.0 Backports Kernel
    with 120GB Samsung SSD 850 EVO for OpenMediaVault & 2x500GB Primary Data HDD + 1TB Secondary HDD for Backup & 2TB USB 3.0 External HDD for offline backup


    Plugin list:
    Flash Memory, Locate, OMV-Extras.org, RSnapshot, Sensors, Syncthing, SMB/CIFS, SSH, USB Backup
    _____________________________________________________________________________________________________________________________


    Zitat

    The Schrödinger's code is that one which is going to work and it's full of bugs at the same time; until you test it, you won't be able to determine it.

  • I did:

    Code
    # cd /var/www/openmediavault/images
    # stat subsonic.png


    Output:

    Code
    Fitxer: «subsonic.png»
           Mida: 3893       Blocs: 8          Bloc d’E/S: 4096   fitxer ordinari
     Dispositiu: 821h/2081d Node‐i: 49138       Enllaços: 1
          Accés: (0664/-rw-rw-r--)  UID: (  999/openmediavault)   GID: (  999/openmediavault)
          Accés: 2015-11-23 17:18:19.217666383 +0100
    Modificació: 2015-07-11 04:37:05.000000000 +0200
          Canvi: 2015-11-22 19:23:11.052905071 +0100
      Naixement: -


    Edit: It's written in catalan. If you need translation, I'll be waiting for a response, but if you are a Linux Guru, you'll know what these lines mean without needing any translation.

    DISCLAIMER: :!: I'm not a native English speaker, I'm sorry if I don't explain as good as you would want. :!:


    My NAS:
    Always the latest OMV Erasmus running on an AMD Sempron 3850 @1.3GHz with 4.9.0 Backports Kernel
    with 120GB Samsung SSD 850 EVO for OpenMediaVault & 2x500GB Primary Data HDD + 1TB Secondary HDD for Backup & 2TB USB 3.0 External HDD for offline backup


    Plugin list:
    Flash Memory, Locate, OMV-Extras.org, RSnapshot, Sensors, Syncthing, SMB/CIFS, SSH, USB Backup
    _____________________________________________________________________________________________________________________________


    Zitat

    The Schrödinger's code is that one which is going to work and it's full of bugs at the same time; until you test it, you won't be able to determine it.

  • Yes, I have it. But I have not edit/viewed it as a text file. What should this file contain?

    DISCLAIMER: :!: I'm not a native English speaker, I'm sorry if I don't explain as good as you would want. :!:


    My NAS:
    Always the latest OMV Erasmus running on an AMD Sempron 3850 @1.3GHz with 4.9.0 Backports Kernel
    with 120GB Samsung SSD 850 EVO for OpenMediaVault & 2x500GB Primary Data HDD + 1TB Secondary HDD for Backup & 2TB USB 3.0 External HDD for offline backup


    Plugin list:
    Flash Memory, Locate, OMV-Extras.org, RSnapshot, Sensors, Syncthing, SMB/CIFS, SSH, USB Backup
    _____________________________________________________________________________________________________________________________


    Zitat

    The Schrödinger's code is that one which is going to work and it's full of bugs at the same time; until you test it, you won't be able to determine it.

Jetzt mitmachen!

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