mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
⚡ Add new measure points for KPI logger
This commit is contained in:
@@ -1115,7 +1115,9 @@ HTML
|
|||||||
|
|
||||||
// Note: DisplayBareHeader is called before adding $oObjectDetails to the page, so it can inject HTML before it through $oPage.
|
// Note: DisplayBareHeader is called before adding $oObjectDetails to the page, so it can inject HTML before it through $oPage.
|
||||||
/** @var \iTopWebPage $oPage */
|
/** @var \iTopWebPage $oPage */
|
||||||
|
$oKPI = new ExecutionKPI();
|
||||||
$aHeadersBlocks = $this->DisplayBareHeader($oPage, $bEditMode);
|
$aHeadersBlocks = $this->DisplayBareHeader($oPage, $bEditMode);
|
||||||
|
$oKPI->ComputeStatsForExtension($this, 'DisplayBareHeader');
|
||||||
if (false === empty($aHeadersBlocks['subtitle'])) {
|
if (false === empty($aHeadersBlocks['subtitle'])) {
|
||||||
$oObjectDetails->AddSubTitleBlocks($aHeadersBlocks['subtitle']);
|
$oObjectDetails->AddSubTitleBlocks($aHeadersBlocks['subtitle']);
|
||||||
}
|
}
|
||||||
@@ -1128,8 +1130,12 @@ HTML
|
|||||||
$oPage->AddTabContainer(OBJECT_PROPERTIES_TAB, '', $oObjectDetails);
|
$oPage->AddTabContainer(OBJECT_PROPERTIES_TAB, '', $oObjectDetails);
|
||||||
$oPage->SetCurrentTabContainer(OBJECT_PROPERTIES_TAB);
|
$oPage->SetCurrentTabContainer(OBJECT_PROPERTIES_TAB);
|
||||||
$oPage->SetCurrentTab('UI:PropertiesTab');
|
$oPage->SetCurrentTab('UI:PropertiesTab');
|
||||||
|
$oKPI = new ExecutionKPI();
|
||||||
$this->DisplayBareProperties($oPage, $bEditMode);
|
$this->DisplayBareProperties($oPage, $bEditMode);
|
||||||
|
$oKPI->ComputeStatsForExtension($this, 'DisplayBareProperties');
|
||||||
|
$oKPI = new ExecutionKPI();
|
||||||
$this->DisplayBareRelations($oPage, $bEditMode);
|
$this->DisplayBareRelations($oPage, $bEditMode);
|
||||||
|
$oKPI->ComputeStatsForExtension($this, 'DisplayBareRelations');
|
||||||
|
|
||||||
|
|
||||||
// Note: Adding the JS snippet which enables the image upload should have been done directly by the ActivityPanel which would have kept the independance principle
|
// Note: Adding the JS snippet which enables the image upload should have been done directly by the ActivityPanel which would have kept the independance principle
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ use DBObject;
|
|||||||
use DBObjectSearch;
|
use DBObjectSearch;
|
||||||
use DBObjectSet;
|
use DBObjectSet;
|
||||||
use Exception;
|
use Exception;
|
||||||
|
use ExecutionKPI;
|
||||||
use IssueLog;
|
use IssueLog;
|
||||||
use MetaModel;
|
use MetaModel;
|
||||||
|
|
||||||
@@ -58,6 +59,7 @@ class ActivityPanelFactory
|
|||||||
*/
|
*/
|
||||||
public static function MakeForObjectDetails(DBObject $oObject, string $sMode = cmdbAbstractObject::DEFAULT_DISPLAY_MODE)
|
public static function MakeForObjectDetails(DBObject $oObject, string $sMode = cmdbAbstractObject::DEFAULT_DISPLAY_MODE)
|
||||||
{
|
{
|
||||||
|
$oKPI = new ExecutionKPI();
|
||||||
$sObjClass = get_class($oObject);
|
$sObjClass = get_class($oObject);
|
||||||
$sObjId = $oObject->GetKey();
|
$sObjId = $oObject->GetKey();
|
||||||
|
|
||||||
@@ -171,6 +173,8 @@ class ActivityPanelFactory
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$oKPI->ComputeStatsForExtension(new ActivityPanelFactory(), 'MakeForObjectDetails');
|
||||||
|
|
||||||
return $oActivityPanel;
|
return $oActivityPanel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -46,6 +46,8 @@ class ModuleService
|
|||||||
$sExtension = $this->GetModuleNameFromObject($oReflectionClass->getName());
|
$sExtension = $this->GetModuleNameFromObject($oReflectionClass->getName());
|
||||||
if (strlen($sExtension) !== 0) {
|
if (strlen($sExtension) !== 0) {
|
||||||
$sSignature .= '['.$sExtension.'] ';
|
$sSignature .= '['.$sExtension.'] ';
|
||||||
|
} else {
|
||||||
|
$sSignature .= '[core] ';
|
||||||
}
|
}
|
||||||
$sSignature .= $oReflectionClass->getShortName().'::'.$sMethod.'()';
|
$sSignature .= $oReflectionClass->getShortName().'::'.$sMethod.'()';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user