• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Add Column in Host List

Scheduled Pinned Locked Moved
FOG Problems
3
8
2.4k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N
    Newbie
    last edited by Dec 6, 2013, 8:51 PM

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

    1 Reply Last reply Reply Quote 0
    • J
      Jaymes Driver Developer
      last edited by Dec 9, 2013, 12:15 PM

      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.

      WARNING TO USERS: My comments are written completely devoid of emotion, do not mistake my concise to the point manner as a personal insult or attack.

      1 Reply Last reply Reply Quote 0
      • N
        Newbie
        last edited by Dec 9, 2013, 3:29 PM

        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,
        Niewbie.

        1 Reply Last reply Reply Quote 0
        • T
          Tom Elliott
          last edited by Dec 9, 2013, 3:44 PM

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

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

          1 Reply Last reply Reply Quote 0
          • N
            Newbie
            last edited by Dec 9, 2013, 3:48 PM

            It is Fog .32 and on Ubuntu 12.04.

            1 Reply Last reply Reply Quote 0
            • T
              Tom Elliott
              last edited by Dec 9, 2013, 4:36 PM

              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/host.search.php.

              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.

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

              Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

              Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

              1 Reply Last reply Reply Quote 0
              • N
                Newbie
                last edited by Dec 9, 2013, 7:09 PM

                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.

                Newbie

                1 Reply Last reply Reply Quote 0
                • N
                  Newbie
                  last edited by Dec 11, 2013, 1:34 PM

                  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,
                  Newbie

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  1 / 1
                  • First post
                    3/8
                    Last post

                  257

                  Online

                  12.0k

                  Users

                  17.3k

                  Topics

                  155.2k

                  Posts
                  Copyright © 2012-2024 FOG Project