Add Column in Host List

  • How can I add ‘Primary User’, tag1 from Inventory to Host list on Host list page? I am new to php.

  • Tom,
    I followed your advice. I was able to get ‘PrimaryUser’ label on the Host list but I do not know enough about PHP. I inserted sql in there but stiil could not get data from inventory table. I am learning php, I hope that will help.
    Thank you,

  • Tom,

    Thank you for the quick replay. I will try out tomorrow. I will let to you know, if that work or not.
    Thank you once more.


  • Senior Developer

    Looking into this, it’s not easy, but it certainly isn’t impossible.

    You have to first, edit the {fogwebdir}/management/includes/hosts.list.include.php to add the Column Names.

    Add the following lines after line 23:
    [php] <td width=“120”><?php print _(‘Primary User’); ?></td>
    <td width=“120”><?php print _(‘Tag 1’); ?></td> [/php]

    Then you’ll have to edit the {fogwebdir}/management/ajax/

    Add the following lines after line 95:
    [php] <td>’ . $item[‘pu’] . ‘</td>
    <td>’ . $item[‘tag1’] . '</td>[/php]

    Then you’ll want to set the $item[‘pu’] and $item[‘tag1’] to pull the information that matches the current host id from the inventory table.

    Way more work than I’m willing to get into now.

  • It is Fog .32 and on Ubuntu 12.04.

  • Senior Developer

    Is this for FOG 0.32 or FOG 0.33b? Just wondering.

  • Jaymes,
    Thank you for the replay.

    I went through the FOG FORUM and FOG USER Guide but could not find the answer. I know I have to change the php file but do not know which file & how to.

    Yes, I like to display Primary Users and Tag1 on the Host List on the web GUI + HOST Name, IP,MAC.

    Thank you,

  • Developer

    Are you asking how you would display this information on the Host List on the FOG web GUI?

    Your question is very vague, please elaborate.

Log in to reply





Looks like your connection to FOG Project was lost, please wait while we try to reconnect.