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

Additional Information in Hosts

Scheduled Pinned Locked Moved
General
2
10
944
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.
  • O
    Oleg
    last edited by Dec 10, 2020, 2:08 PM

    Hello guys,

    is it possible to add an additional column with the information from host-inventory?
    For example the “System Product”.
    That could safe multiple steps to find out, which image should be assigned to which host.

    Thanks

    1 Reply Last reply Reply Quote 0
    • S
      Sebastian Roth Moderator
      last edited by Dec 10, 2020, 4:39 PM

      @Oleg Do you mean a new column in the database or just showing it in the web UI (host list/overview)?

      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
      • O
        Oleg
        last edited by Dec 11, 2020, 10:16 AM

        @Sebastian-Roth
        Yes just show it in the Web-UI

        1 Reply Last reply Reply Quote 0
        • S
          Sebastian Roth Moderator
          last edited by Dec 11, 2020, 11:59 AM

          @Oleg Don’t think we’ll add that to the official code as it would spawn a discussion on which fields should be added for everbody’s like.

          But I can give you some instructions for you to modify the code. Would you be interested in that? Which version of FOG do you use?

          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

          O 1 Reply Last reply Dec 15, 2020, 8:29 AM Reply Quote 0
          • O
            Oleg @Sebastian Roth
            last edited by Dec 15, 2020, 8:29 AM

            @sebastian-roth That would be nice - we use 1.5.8/9 currently.

            1 Reply Last reply Reply Quote 0
            • S
              Sebastian Roth Moderator
              last edited by Dec 15, 2020, 11:23 AM

              @Oleg What do you mean by 1.5.8/9? More than one installation and different versions or a 1.5.8 install with manual adjustments towards 1.5.9 added?

              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

              O 1 Reply Last reply Dec 15, 2020, 12:54 PM Reply Quote 0
              • O
                Oleg @Sebastian Roth
                last edited by Dec 15, 2020, 12:54 PM

                @sebastian-roth we have multiple installations - the most are currently on 1.5.8 and some on 1.5.9. But the changes in the web-ui shouldn’t be that huge

                1 Reply Last reply Reply Quote 0
                • S
                  Sebastian Roth Moderator
                  last edited by Dec 15, 2020, 9:13 PM

                  @Oleg I will post the information as soon as I find some more time. Probably on Friday this week.

                  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

                  O 1 Reply Last reply Dec 16, 2020, 10:02 AM Reply Quote 0
                  • O
                    Oleg @Sebastian Roth
                    last edited by Dec 16, 2020, 10:02 AM

                    @sebastian-roth Thanks!

                    1 Reply Last reply Reply Quote 0
                    • S
                      Sebastian Roth Moderator
                      last edited by Sebastian Roth Dec 19, 2020, 10:09 AM Dec 19, 2020, 4:06 PM

                      @Oleg I hope you can read patch/diff information. Here are the changes you need to make to /var/www/html/fog/lib/pages/hostmanagementpage.class.php to add the “System Product” column to the host list output - this is for FOG 1.5.9 and would probably work in 1.5.8 just as well:

                      --- fogproject-master/packages/web/lib/pages/hostmanagementpage.class.php	2020-09-14 01:00:12.000000000 +0200
                      +++ /var/www/html/fog/lib/pages/hostmanagementpage.class.php	2020-12-19 17:03:24.225580767 +0100
                      @@ -175,7 +175,8 @@
                                   _('Host'),
                                   _('Imaged'),
                                   _('Task'),
                      -            _('Assigned Image')
                      +            _('Assigned Image'),
                      +            _('System Product')
                               );
                               $this->templates = array(
                                   '<i class="icon fa fa-question hand"></i>',
                      @@ -223,7 +224,9 @@
                                       _('Goto task list')
                                   ),
                                   '<small><a href="?node=image&sub=edit&id=${image_id}">'
                      -            . '${image_name}</a></small>'
                      +            . '${image_name}</a></small>',
                      +            '${inventory}'
                      +            
                               );
                               unset($up, $down, $mc);
                               $this->attributes = array(
                      @@ -259,6 +262,9 @@
                                   ),
                                   array(
                                       'width' => 20
                      +            ),
                      +            array(
                      +                'width' => 120
                                   )
                               );
                               /**
                      @@ -281,6 +287,7 @@
                                       'image_id' => $Host->imageID,
                                       'image_name' => $Host->imagename,
                                       'pingstatus' => $Host->pingstatus,
                      +                'inventory' => $Host->inventory->sysproduct,
                                   );
                                   unset($Host);
                               };
                      

                      I suggest you keep a copy of this information somewhere so you can apply the changes whenever you update to a new version of FOG.

                      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
                      • 1 / 1
                      1 / 1
                      • First post
                        7/10
                        Last post

                      180

                      Online

                      12.0k

                      Users

                      17.3k

                      Topics

                      155.2k

                      Posts
                      Copyright © 2012-2024 FOG Project