mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
Fixed cosmetic issues (block_id) and made sure the warning would never appear again
SVN:trunk[804]
This commit is contained in:
@@ -69,8 +69,7 @@ abstract class cmdbAbstractObject extends CMDBObject
|
|||||||
$oAppContext = new ApplicationContext();
|
$oAppContext = new ApplicationContext();
|
||||||
$sExtClassNameAtt = MetaModel::GetNameAttributeCode($sObjClass);
|
$sExtClassNameAtt = MetaModel::GetNameAttributeCode($sObjClass);
|
||||||
$sPage = self::ComputeUIPage($sObjClass);
|
$sPage = self::ComputeUIPage($sObjClass);
|
||||||
$sAbsoluteUrl = utils::GetAbsoluteUrl(false); // False => Don't get the query string
|
$sAbsoluteUrl = utils::GetAbsoluteUrlPath();
|
||||||
$sAbsoluteUrl = substr($sAbsoluteUrl, 0, 1+strrpos($sAbsoluteUrl, '/')); // remove the current page, keep just the path, up to the last /
|
|
||||||
|
|
||||||
// Use the "name" of the target class as the label of the hyperlink
|
// Use the "name" of the target class as the label of the hyperlink
|
||||||
// unless it's not available in the external attributes...
|
// unless it's not available in the external attributes...
|
||||||
@@ -509,7 +508,14 @@ abstract class cmdbAbstractObject extends CMDBObject
|
|||||||
}
|
}
|
||||||
$sHtml .= '<table class="listContainer">';
|
$sHtml .= '<table class="listContainer">';
|
||||||
$sColspan = '';
|
$sColspan = '';
|
||||||
$divId = $aExtraParams['block_id'];
|
if (isset($aExtraParams['block_id']))
|
||||||
|
{
|
||||||
|
$divId = $aExtraParams['block_id'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$divId = 'missingblockid';
|
||||||
|
}
|
||||||
$sFilter = $oSet->GetFilter()->serialize();
|
$sFilter = $oSet->GetFilter()->serialize();
|
||||||
$iMinDisplayLimit = utils::GetConfig()->GetMinDisplayLimit();
|
$iMinDisplayLimit = utils::GetConfig()->GetMinDisplayLimit();
|
||||||
$sCollapsedLabel = Dict::Format('UI:TruncatedResults', $iMinDisplayLimit, $oSet->Count());
|
$sCollapsedLabel = Dict::Format('UI:TruncatedResults', $iMinDisplayLimit, $oSet->Count());
|
||||||
@@ -812,25 +818,6 @@ EOF
|
|||||||
$oPage->add("</Set>\n");
|
$oPage->add("</Set>\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// By rom
|
|
||||||
function DisplayChangesLog(WebPage $oPage)
|
|
||||||
{
|
|
||||||
$oFltChangeOps = new CMDBSearchFilter('CMDBChangeOpSetAttribute');
|
|
||||||
$oFltChangeOps->AddCondition('objkey', $this->GetKey(), '=');
|
|
||||||
$oFltChangeOps->AddCondition('objclass', get_class($this), '=');
|
|
||||||
$oSet = new CMDBObjectSet($oFltChangeOps, array('date' => false)); // order by date descending (i.e. false)
|
|
||||||
$count = $oSet->Count();
|
|
||||||
if ($count > 0)
|
|
||||||
{
|
|
||||||
$oPage->p(Dict::Format('UI:ChangesLogTitle', $count));
|
|
||||||
self::DisplaySet($oPage, $oSet);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$oPage->p(Dict::S('UI:EmptyChangesLogTitle'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function DisplaySearchForm(WebPage $oPage, CMDBObjectSet $oSet, $aExtraParams = array())
|
public static function DisplaySearchForm(WebPage $oPage, CMDBObjectSet $oSet, $aExtraParams = array())
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -472,7 +472,7 @@ class Subnet extends cmdbAbstractObject
|
|||||||
$oPage->p(Dict::Format('Class:Subnet/Tab:IPUsage-explain', $sIPMin, $sIPMax));
|
$oPage->p(Dict::Format('Class:Subnet/Tab:IPUsage-explain', $sIPMin, $sIPMax));
|
||||||
|
|
||||||
$oIfSet = new CMDBObjectSet(DBObjectSearch::FromOQL("SELECT NetworkInterface AS if WHERE INET_ATON(if.ip_address) >= INET_ATON('$sIPMin') AND INET_ATON(if.ip_address) <= INET_ATON('$sIPMax')"));
|
$oIfSet = new CMDBObjectSet(DBObjectSearch::FromOQL("SELECT NetworkInterface AS if WHERE INET_ATON(if.ip_address) >= INET_ATON('$sIPMin') AND INET_ATON(if.ip_address) <= INET_ATON('$sIPMax')"));
|
||||||
self::DisplaySet($oPage, $oIfSet);
|
self::DisplaySet($oPage, $oIfSet, array('block_id' => 'nwif'));
|
||||||
|
|
||||||
$iCountUsed = $oIfSet->Count();
|
$iCountUsed = $oIfSet->Count();
|
||||||
$iCountRange = $iIPMax - $iIPMin;
|
$iCountRange = $iIPMax - $iIPMin;
|
||||||
@@ -1050,9 +1050,9 @@ class NetworkInterface extends ConnectableCI
|
|||||||
{
|
{
|
||||||
return $this->Get('device_name').' - '.$this->Get('name');
|
return $this->Get('device_name').' - '.$this->Get('name');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static function GetRelationQueries($sRelCode)
|
public static function GetRelationQueries($sRelCode)
|
||||||
{
|
{
|
||||||
switch ($sRelCode)
|
switch ($sRelCode)
|
||||||
|
|||||||
@@ -327,22 +327,20 @@ class Service extends cmdbAbstractObject
|
|||||||
MetaModel::Init_SetZListItems('advanced_search', array('name', 'description', 'org_id', 'type', 'status'));
|
MetaModel::Init_SetZListItems('advanced_search', array('name', 'description', 'org_id', 'type', 'status'));
|
||||||
MetaModel::Init_SetZListItems('standard_search', array('name', 'description', 'org_id', 'type', 'status'));
|
MetaModel::Init_SetZListItems('standard_search', array('name', 'description', 'org_id', 'type', 'status'));
|
||||||
MetaModel::Init_SetZListItems('list', array('name', 'description', 'org_id', 'type', 'status'));
|
MetaModel::Init_SetZListItems('list', array('name', 'description', 'org_id', 'type', 'status'));
|
||||||
|
|
||||||
}
|
}
|
||||||
function DisplayBareRelations(WebPage $oPage, $bEditMode = false)
|
|
||||||
{
|
function DisplayBareRelations(WebPage $oPage, $bEditMode = false)
|
||||||
parent::DisplayBareRelations($oPage, $bEditMode);
|
{
|
||||||
$aExtraParam = array ('menu' => false);
|
parent::DisplayBareRelations($oPage, $bEditMode);
|
||||||
$ServiceID=$this->GetKey();
|
$aExtraParam = array ('menu' => false, 'block_id' => 'service');
|
||||||
if (!$bEditMode)
|
$ServiceID=$this->GetKey();
|
||||||
{
|
if (!$bEditMode)
|
||||||
$oPage->SetCurrentTab(Dict::S('Class:Service/Tab:Related_Contracts'));
|
{
|
||||||
$oCustomerContracts=new CMDBObjectSet(DBObjectSearch::FromOQL("SELECT CustomerContract AS cc JOIN lnkContractToSLA AS ln ON ln.contract_id=cc.id JOIN SLA AS sla ON ln.sla_id=sla.id WHERE sla.service_id=$ServiceID"));
|
$oPage->SetCurrentTab(Dict::S('Class:Service/Tab:Related_Contracts'));
|
||||||
self::DisplaySet($oPage,$oCustomerContracts,$aExtraParam);
|
$oCustomerContracts=new CMDBObjectSet(DBObjectSearch::FromOQL("SELECT CustomerContract AS cc JOIN lnkContractToSLA AS ln ON ln.contract_id=cc.id JOIN SLA AS sla ON ln.sla_id=sla.id WHERE sla.service_id=$ServiceID"));
|
||||||
|
self::DisplaySet($oPage,$oCustomerContracts,$aExtraParam);
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
class ServiceSubcategory extends cmdbAbstractObject
|
class ServiceSubcategory extends cmdbAbstractObject
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ if (!empty($sExpression))
|
|||||||
}
|
}
|
||||||
$sUrl = "$sProtocol://{$sServerName}{$sPort}/pages/";
|
$sUrl = "$sProtocol://{$sServerName}{$sPort}/pages/";
|
||||||
$oP->set_base($sUrl);
|
$oP->set_base($sUrl);
|
||||||
cmdbAbstractObject::DisplaySet($oP, $oSet, array('menu' => false, 'display_limit' => false, 'zlist' => 'details')); // no menu, no truncated list, "details" zlist
|
cmdbAbstractObject::DisplaySet($oP, $oSet, array('block_id' => 'expresult', 'menu' => false, 'display_limit' => false, 'zlist' => 'details')); // no menu, no truncated list, "details" zlist
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'csv':
|
case 'csv':
|
||||||
|
|||||||
Reference in New Issue
Block a user