Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Search
    1. Home
    2. robert.sommer
    3. Posts
    R
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 2
    • Best 0
    • Controversial 0
    • Groups 0

    Posts made by robert.sommer

    • I-doIT importiert Software die in OCS auf "ignorieren" gesetzt ist

      Hallo,

      beim importieren von Linux Maschinen unter der Verwendung von OCS habe ich festgestellt, dass Software-Objekte die auf dem OCS Inventory NG Server Web Frontend (/ocsreports) auf "ignoriert" gesetzt waren trotzdem importiert werden.

      Dies kann durch folgende Anpassung von /var/www/idoit/src/classes/components/isys_component_dao_ocs.class.php gelöst werden.
      Wenn Version 1.8.0 (Pro) ist das Problem immer noch vorhanden.

      
      public function getSoftware($p_hardwareID, $p_snmp = false) {
                  if ($p_snmp)
                  {
                              $l_query = "SELECT * FROM snmp_softwares WHERE SNMP_ID = " . $this->convert_sql_id($p_hardwareID);
                  }
                  else
                  {
                              $l_query = "SELECT * FROM hardware " . "INNER JOIN softwares ON softwares.HARDWARE_ID = hardware.ID AND softwares.NAME != '' AND softwares.NAME not in (select dico_ignored.EXTRACTED from dico_ignored) " . "WHERE hardware.ID = " . $this->convert_sql_id(
                                                      $p_hardwareID
                                          ) . " AND hardware.OSNAME != softwares.NAME";
                  } // if
      
                  return $this->retrieve($l_query); }
      
      /**
      * Get all applications only from hardware
      *
      * @return isys_component_dao_result
      */
      public function getAllSoftware()
      {
                  $l_query = "SELECT DISTINCT(softwares.NAME) FROM softwares " . "LEFT JOIN hardware ON hardware.OSNAME = softwares.NAME " . "WHERE hardware.OSNAME IS NULL AND softwares.NAME not in (select dico_ignored.EXTRACTED from dico_ignored)";
      
                  return $this->retrieve($l_query); }
      
      

      Wobei konkret folgender Einschub das Problem löst.

      
      AND softwares.NAME not in (select dico_ignored.EXTRACTED from dico_ignored)
      
      

      Kann dies eventuell in der folgenden Version berücksichtigt werden?

      Danke im Voraus.

      Gruß
      Robert

      posted in Entwicklung
      R
      robert.sommer
    • OCS Import - Ignored Software NOT recognized

      Dears,

      When importing Linux hosts using OCS Import method I was recognizing that Ignored Software Items - defined in OCS Inventory NG Server Web Frontend (/ocsreports) - still result in Application Objects and Software assignments in i-doIT.
      From my point of view the following addition at /var/www/idoit/src/classes/components/isys_component_dao_ocs.class.php would fix this issue.

      In fact AND softwares.NAME not in (select dico_ignored.EXTRACTED from dico_ignored) is doing the trick.

      
      public function getSoftware($p_hardwareID, $p_snmp = false) {
                  if ($p_snmp)
                  {
                              $l_query = "SELECT * FROM snmp_softwares WHERE SNMP_ID = " . $this->convert_sql_id($p_hardwareID);
                  }
                  else
                  {
                              $l_query = "SELECT * FROM hardware " . "INNER JOIN softwares ON softwares.HARDWARE_ID = hardware.ID AND softwares.NAME != '' AND softwares.NAME not in (select dico_ignored.EXTRACTED from dico_ignored) " . "WHERE hardware.ID = " . $this->convert_sql_id(
                                                      $p_hardwareID
                                          ) . " AND hardware.OSNAME != softwares.NAME";
                  } // if
      
                  return $this->retrieve($l_query); }
      
      /**
      * Get all applications only from hardware
      *
      * @return isys_component_dao_result
      */
      public function getAllSoftware()
      {
                  $l_query = "SELECT DISTINCT(softwares.NAME) FROM softwares " . "LEFT JOIN hardware ON hardware.OSNAME = softwares.NAME " . "WHERE hardware.OSNAME IS NULL AND softwares.NAME not in (select dico_ignored.EXTRACTED from dico_ignored)";
      
                  return $this->retrieve($l_query); }
      
      

      I would really appreciate if you could fix this soon.

      Best Regards
      Robert

      posted in Development
      R
      robert.sommer