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

    Additional Information in Hosts

    Scheduled Pinned Locked Moved
    General
    2
    10
    936
    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

      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

        @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

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

          1 Reply Last reply Reply Quote 0
          • S
            Sebastian Roth Moderator
            last edited by

            @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 Reply Quote 0
            • O
              Oleg @Sebastian Roth
              last edited by

              @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

                @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 Reply Quote 0
                • O
                  Oleg @Sebastian Roth
                  last edited by

                  @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

                    @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 Reply Quote 0
                    • O
                      Oleg @Sebastian Roth
                      last edited by

                      @sebastian-roth Thanks!

                      1 Reply Last reply Reply Quote 0
                      • S
                        Sebastian Roth Moderator
                        last edited by Sebastian Roth

                        @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
                        • First post
                          Last post

                        264

                        Online

                        12.0k

                        Users

                        17.3k

                        Topics

                        155.2k

                        Posts
                        Copyright © 2012-2024 FOG Project