mirror of
https://github.com/Combodo/iTop.git
synced 2026-03-04 16:44:11 +01:00
Fixed some interdependencies of the CMDB modules.
SVN:trunk[2357]
This commit is contained in:
@@ -1992,10 +1992,15 @@
|
||||
switch ($sRelCode)
|
||||
{
|
||||
case "depends on":
|
||||
$aRels = array(
|
||||
"Enclosure" => array("sQuery"=>"SELECT Enclosure WHERE id = :this->enclosure_id", "bPropagate"=>true, "iDistance"=>10),
|
||||
"SANSwitch" => array("sQuery"=>"SELECT SANSwitch AS san JOIN lnkSanToDatacenterDevice AS l1 ON l1.san_id = san.id WHERE l1.datacenterdevice_id = :this->id", "bPropagate"=>true, "iDistance"=>10),
|
||||
);
|
||||
$aRels = array();
|
||||
if (class_exists('Enclosure'))
|
||||
{
|
||||
$aRels['Enclosure'] = array("sQuery"=>"SELECT Enclosure WHERE id = :this->enclosure_id", "bPropagate"=>true, "iDistance"=>10);
|
||||
}
|
||||
if (class_exists('SANSwitch'))
|
||||
{
|
||||
$aRels['SANSwitch'] = array("sQuery"=>"SELECT SANSwitch AS san JOIN lnkSanToDatacenterDevice AS l1 ON l1.san_id = san.id WHERE l1.datacenterdevice_id = :this->id", "bPropagate"=>true, "iDistance"=>10);
|
||||
}
|
||||
return array_merge($aRels, parent::GetRelationQueries($sRelCode));
|
||||
break;
|
||||
default:
|
||||
@@ -2527,10 +2532,13 @@
|
||||
switch ($sRelCode)
|
||||
{
|
||||
case "impacts":
|
||||
$aRels = array(
|
||||
$aRels = array();
|
||||
if (class_exists('Hypervisor'))
|
||||
{
|
||||
$aRels = array(
|
||||
"device" => array("sQuery"=>"SELECT Hypervisor WHERE server_id = :this->id", "bPropagate"=>true, "iDistance"=>10),
|
||||
|
||||
);
|
||||
);
|
||||
}
|
||||
return array_merge($aRels, parent::GetRelationQueries($sRelCode));
|
||||
break;
|
||||
|
||||
@@ -6778,111 +6786,6 @@
|
||||
</list>
|
||||
</presentation>
|
||||
</class>
|
||||
<class id="LogicalInterface" _delta="define">
|
||||
<parent>IPinterface</parent>
|
||||
<properties>
|
||||
<category>bizmodel,searchable</category>
|
||||
<abstract>false</abstract>
|
||||
<key_type>autoincrement</key_type>
|
||||
<db_table>logicalinterface</db_table>
|
||||
<db_key_field>id</db_key_field>
|
||||
<db_final_class_field/>
|
||||
<naming>
|
||||
<format>%1$s %2$s</format>
|
||||
<attributes>
|
||||
<attribute id="name"/>
|
||||
<attribute id="virtualmachine_name"/>
|
||||
</attributes>
|
||||
</naming>
|
||||
<display_template/>
|
||||
<icon>images/interface.png</icon>
|
||||
<reconciliation>
|
||||
<attributes>
|
||||
<attribute id="name"/>
|
||||
<attribute id="virtualmachine_id"/>
|
||||
<attribute id="virtualmachine_name"/>
|
||||
</attributes>
|
||||
</reconciliation>
|
||||
</properties>
|
||||
<fields>
|
||||
<field id="virtualmachine_id" xsi:type="AttributeExternalKey">
|
||||
<sql>virtualmachine_id</sql>
|
||||
<target_class>VirtualMachine</target_class>
|
||||
<is_null_allowed>false</is_null_allowed>
|
||||
<on_target_delete>DEL_AUTO</on_target_delete>
|
||||
</field>
|
||||
<field id="virtualmachine_name" xsi:type="AttributeExternalField">
|
||||
<extkey_attcode>virtualmachine_id</extkey_attcode>
|
||||
<target_attcode>name</target_attcode>
|
||||
</field>
|
||||
</fields>
|
||||
<methods/>
|
||||
<presentation>
|
||||
<details>
|
||||
<items>
|
||||
<item id="ipaddress">
|
||||
<rank>10</rank>
|
||||
</item>
|
||||
<item id="macaddress">
|
||||
<rank>20</rank>
|
||||
</item>
|
||||
<item id="comment">
|
||||
<rank>30</rank>
|
||||
</item>
|
||||
<item id="ipgateway">
|
||||
<rank>40</rank>
|
||||
</item>
|
||||
<item id="ipmask">
|
||||
<rank>50</rank>
|
||||
</item>
|
||||
<item id="speed">
|
||||
<rank>60</rank>
|
||||
</item>
|
||||
<item id="virtualmachine_id">
|
||||
<rank>70</rank>
|
||||
</item>
|
||||
</items>
|
||||
</details>
|
||||
<search>
|
||||
<items>
|
||||
<item id="ipaddress">
|
||||
<rank>10</rank>
|
||||
</item>
|
||||
<item id="macaddress">
|
||||
<rank>20</rank>
|
||||
</item>
|
||||
<item id="ipgateway">
|
||||
<rank>30</rank>
|
||||
</item>
|
||||
<item id="ipmask">
|
||||
<rank>40</rank>
|
||||
</item>
|
||||
</items>
|
||||
</search>
|
||||
<list>
|
||||
<items>
|
||||
<item id="ipaddress">
|
||||
<rank>10</rank>
|
||||
</item>
|
||||
<item id="macaddress">
|
||||
<rank>20</rank>
|
||||
</item>
|
||||
<item id="comment">
|
||||
<rank>30</rank>
|
||||
</item>
|
||||
<item id="ipgateway">
|
||||
<rank>40</rank>
|
||||
</item>
|
||||
<item id="ipmask">
|
||||
<rank>50</rank>
|
||||
</item>
|
||||
<item id="speed">
|
||||
<rank>60</rank>
|
||||
</item>
|
||||
</items>
|
||||
</list>
|
||||
</presentation>
|
||||
</class>
|
||||
<class id="lnkConnectableCIToNetworkDevice" _delta="define">
|
||||
<parent>cmdbAbstractObject</parent>
|
||||
<properties>
|
||||
|
||||
@@ -1436,8 +1436,11 @@
|
||||
$aRels = array(
|
||||
// Actually this should be limited to the Software instances based on a DBServer Application type...
|
||||
"server" => array("sQuery"=>"SELECT Server AS s JOIN lnkServerToVolume AS l1 ON l1.server_id=s.id WHERE l1.volume_id = :this->id", "bPropagate"=>true, "iDistance"=>5),
|
||||
"virtualdevice" => array("sQuery"=>"SELECT VirtualDevice AS vd JOIN lnkVirtualDeviceToVolume AS l1 ON l1.virtualdevice_id=vd.id WHERE l1.volume_id = :this->id", "bPropagate"=>true, "iDistance"=>5),
|
||||
);
|
||||
if (class_exists('VirtualDevice'))
|
||||
{
|
||||
$aRels["virtualdevice"] = array("sQuery"=>"SELECT VirtualDevice AS vd JOIN lnkVirtualDeviceToVolume AS l1 ON l1.virtualdevice_id=vd.id WHERE l1.volume_id = :this->id", "bPropagate"=>true, "iDistance"=>5);
|
||||
}
|
||||
return array_merge($aRels, parent::GetRelationQueries($sRelCode));
|
||||
break;
|
||||
|
||||
|
||||
@@ -801,6 +801,111 @@
|
||||
</list>
|
||||
</presentation>
|
||||
</class>
|
||||
<class id="LogicalInterface" _delta="define">
|
||||
<parent>IPinterface</parent>
|
||||
<properties>
|
||||
<category>bizmodel,searchable</category>
|
||||
<abstract>false</abstract>
|
||||
<key_type>autoincrement</key_type>
|
||||
<db_table>logicalinterface</db_table>
|
||||
<db_key_field>id</db_key_field>
|
||||
<db_final_class_field/>
|
||||
<naming>
|
||||
<format>%1$s %2$s</format>
|
||||
<attributes>
|
||||
<attribute id="name"/>
|
||||
<attribute id="virtualmachine_name"/>
|
||||
</attributes>
|
||||
</naming>
|
||||
<display_template/>
|
||||
<icon>images/interface.png</icon>
|
||||
<reconciliation>
|
||||
<attributes>
|
||||
<attribute id="name"/>
|
||||
<attribute id="virtualmachine_id"/>
|
||||
<attribute id="virtualmachine_name"/>
|
||||
</attributes>
|
||||
</reconciliation>
|
||||
</properties>
|
||||
<fields>
|
||||
<field id="virtualmachine_id" xsi:type="AttributeExternalKey">
|
||||
<sql>virtualmachine_id</sql>
|
||||
<target_class>VirtualMachine</target_class>
|
||||
<is_null_allowed>false</is_null_allowed>
|
||||
<on_target_delete>DEL_AUTO</on_target_delete>
|
||||
</field>
|
||||
<field id="virtualmachine_name" xsi:type="AttributeExternalField">
|
||||
<extkey_attcode>virtualmachine_id</extkey_attcode>
|
||||
<target_attcode>name</target_attcode>
|
||||
</field>
|
||||
</fields>
|
||||
<methods/>
|
||||
<presentation>
|
||||
<details>
|
||||
<items>
|
||||
<item id="ipaddress">
|
||||
<rank>10</rank>
|
||||
</item>
|
||||
<item id="macaddress">
|
||||
<rank>20</rank>
|
||||
</item>
|
||||
<item id="comment">
|
||||
<rank>30</rank>
|
||||
</item>
|
||||
<item id="ipgateway">
|
||||
<rank>40</rank>
|
||||
</item>
|
||||
<item id="ipmask">
|
||||
<rank>50</rank>
|
||||
</item>
|
||||
<item id="speed">
|
||||
<rank>60</rank>
|
||||
</item>
|
||||
<item id="virtualmachine_id">
|
||||
<rank>70</rank>
|
||||
</item>
|
||||
</items>
|
||||
</details>
|
||||
<search>
|
||||
<items>
|
||||
<item id="ipaddress">
|
||||
<rank>10</rank>
|
||||
</item>
|
||||
<item id="macaddress">
|
||||
<rank>20</rank>
|
||||
</item>
|
||||
<item id="ipgateway">
|
||||
<rank>30</rank>
|
||||
</item>
|
||||
<item id="ipmask">
|
||||
<rank>40</rank>
|
||||
</item>
|
||||
</items>
|
||||
</search>
|
||||
<list>
|
||||
<items>
|
||||
<item id="ipaddress">
|
||||
<rank>10</rank>
|
||||
</item>
|
||||
<item id="macaddress">
|
||||
<rank>20</rank>
|
||||
</item>
|
||||
<item id="comment">
|
||||
<rank>30</rank>
|
||||
</item>
|
||||
<item id="ipgateway">
|
||||
<rank>40</rank>
|
||||
</item>
|
||||
<item id="ipmask">
|
||||
<rank>50</rank>
|
||||
</item>
|
||||
<item id="speed">
|
||||
<rank>60</rank>
|
||||
</item>
|
||||
</items>
|
||||
</list>
|
||||
</presentation>
|
||||
</class>
|
||||
</classes>
|
||||
<menus>
|
||||
<menu id="ConfigManagementOverview" xsi:type="DashboardMenuNode" _delta="must_exist">
|
||||
|
||||
Reference in New Issue
Block a user