Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add itemtype, item ans path injection for Database instance #432

Merged
merged 8 commits into from
Nov 29, 2024
4 changes: 3 additions & 1 deletion inc/databaseinstanceinjection.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function isPrimaryType()
public function connectedTo()
{

return [];
return [\Glpi\Inventory\Asset\Computer::class];
}


Expand All @@ -64,11 +64,13 @@ public function getOptions($primary_type = '')
{

$tab = Search::getOptions(get_parent_class($this));
$tab[5]['linkfield'] = 'items_id'; // 5 = databaseinstance items_id Search option

//Remove some options because some fields cannot be imported
$blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this));
$notimportable = [];
$options['ignore_fields'] = array_merge($blacklist, $notimportable);
$options['displaytype'] = ["dropdown" => [40]];


return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this);
Expand Down