From 61137a6f65c429607eefcaf11a7d57cbae41d290 Mon Sep 17 00:00:00 2001 From: acognet Date: Fri, 18 Mar 2022 11:02:04 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B04479=20-=20Impact=20analysis=20:=20Displ?= =?UTF-8?q?ay=20and=20apply=20filter=20before=20display=20impact=20analysi?= =?UTF-8?q?s=20graphical=20-=20Fix=20dictionnary?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/displayablegraph.class.inc.php | 17 +++++++++-------- .../de.dict.itop-config-mgmt.php | 2 ++ .../es_cr.dict.itop-config-mgmt.php | 2 ++ .../hu.dict.itop-config-mgmt.php | 2 ++ .../it.dict.itop-config-mgmt.php | 2 ++ .../ja.dict.itop-config-mgmt.php | 2 ++ .../nl.dict.itop-config-mgmt.php | 2 ++ .../pt_br.dict.itop-config-mgmt.php | 2 ++ .../ru.dict.itop-config-mgmt.php | 2 ++ .../sk.dict.itop-config-mgmt.php | 2 ++ .../tr.dict.itop-config-mgmt.php | 2 ++ .../zh_cn.dict.itop-config-mgmt.php | 2 ++ pages/UI.php | 6 +++--- 13 files changed, 34 insertions(+), 11 deletions(-) diff --git a/core/displayablegraph.class.inc.php b/core/displayablegraph.class.inc.php index 25513f4c5..66cd7e660 100644 --- a/core/displayablegraph.class.inc.php +++ b/core/displayablegraph.class.inc.php @@ -1431,13 +1431,14 @@ class DisplayableGraph extends SimpleGraph * @param int $iObjKey * @param string $sContextKey * @param array $aContextParams + * @param bool $bLazyLoading since 2.7.7 3.0.1 * * @throws \CoreException * @throws \DictExceptionMissingString */ - function Display(WebPage $oP, $aResults, $sRelation, ApplicationContext $oAppContext, $aExcludedObjects, $sObjClass, $iObjKey, $sContextKey, $aContextParams = array(), $sLazyLoading = false) + function Display(WebPage $oP, $aResults, $sRelation, ApplicationContext $oAppContext, $aExcludedObjects, $sObjClass, $iObjKey, $sContextKey, $aContextParams = array(), $bLazyLoading = false) { - list($aExcludedByClass, $aAdditionalContexts) = $this->DisplayFiltering($sContextKey, $aContextParams, $aExcludedObjects, $oP, $aResults, $sLazyLoading); + list($aExcludedByClass, $aAdditionalContexts) = $this->DisplayFiltering($sContextKey, $aContextParams, $aExcludedObjects, $oP, $aResults, $bLazyLoading); $iGroupingThreshold = utils::ReadParam('g', 5); $oP->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/fraphael.js'); @@ -1527,11 +1528,11 @@ class DisplayableGraph extends SimpleGraph // Export as Attachment requires GD (for building the PDF) AND a valid objclass/objkey couple unset($aParams['export_as_attachment']); } - if ($oP->IsPrintableVersion() || !$sLazyLoading) { + if ($oP->IsPrintableVersion() || !$bLazyLoading) { $oP->add_ready_script(" $('#$sId').simple_graph(".json_encode($aParams).");"); } else { $oP->add_script("function Load(){var aExcluded = []; $('input[name^=excluded]').each( function() {if (!$(this).prop('checked')) { aExcluded.push($(this).val()); }} ); var params= $.extend(".json_encode($aParams).", {excluded_classes: aExcluded}); $('#$sId').simple_graph(params);}"); - $oP->add_ready_script("$('#impacted_objects_lists').html('".Dict::S('Relation:impacts/NoFilteredData')."');$('#impacted_groups').html('".Dict::S('Relation:impacts/NoFilteredData')."');"); + $oP->add_ready_script("$('#impacted_objects_lists').html('".utils::TextToHtml(Dict::S('Relation:impacts/NoFilteredData'))."');$('#impacted_groups').html('".utils::TextToHtml(Dict::S('Relation:impacts/NoFilteredData'))."');"); } @@ -1573,14 +1574,14 @@ EOF * @param array $aExcludedObjects * @param \WebPage $oP * @param array $aResults - * @param bool $sLazyLoading + * @param bool $bLazyLoading * * @return array * @throws \CoreException * @throws \DictExceptionMissingString * @since 2.7.7 & 3.0.1 */ - protected function DisplayFiltering($sContextKey, $aContextParams, $aExcludedObjects, $oP, $aResults, $sLazyLoading) + protected function DisplayFiltering($sContextKey, $aContextParams, $aExcludedObjects, $oP, $aResults, $bLazyLoading) { $aContextDefs = static::GetContextDefinitions($sContextKey, true, $aContextParams); $aExcludedByClass = array(); @@ -1610,7 +1611,7 @@ EOF $('#ReloadMovieBtn').button().button('disable'); EOF ); - if ($sLazyLoading) { + if ($bLazyLoading) { $oP->add_ready_script("$('#ReloadMovieBtn').button('enable');"); } else { $oP->add_ready_script("$('#dh_flash').addClass('closed');"); @@ -1629,7 +1630,7 @@ EOF $oP->add(" "); $idx++; } - if ($sLazyLoading) { + if ($bLazyLoading) { $sOnCLick = "Load(); $('#ReloadMovieBtn').attr('onclick','DoReload()');$('#ReloadMovieBtn').html('".Dict::S('UI:Button:Refresh')."');"; $oP->add("

"); } else { diff --git a/datamodels/2.x/itop-config-mgmt/de.dict.itop-config-mgmt.php b/datamodels/2.x/itop-config-mgmt/de.dict.itop-config-mgmt.php index 55d6ffe22..963a100c6 100755 --- a/datamodels/2.x/itop-config-mgmt/de.dict.itop-config-mgmt.php +++ b/datamodels/2.x/itop-config-mgmt/de.dict.itop-config-mgmt.php @@ -32,6 +32,8 @@ Dict::Add('DE DE', 'German', 'Deutsch', array( 'Relation:depends on/Description' => 'Elemente, von denen dieses Element abhängt.', 'Relation:depends on/DownStream' => 'Hängt ab von ...', 'Relation:depends on/UpStream' => 'Wirkt auf ...', + 'Relation:impacts/LoadData' => 'Load data~~', + 'Relation:impacts/NoFilteredData' => 'please select objects in Graphical view tag~~', )); diff --git a/datamodels/2.x/itop-config-mgmt/es_cr.dict.itop-config-mgmt.php b/datamodels/2.x/itop-config-mgmt/es_cr.dict.itop-config-mgmt.php index 754691066..7efe51135 100755 --- a/datamodels/2.x/itop-config-mgmt/es_cr.dict.itop-config-mgmt.php +++ b/datamodels/2.x/itop-config-mgmt/es_cr.dict.itop-config-mgmt.php @@ -37,6 +37,8 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array( 'Relation:depends on/Description' => 'Elementos de los cuales depende', 'Relation:depends on/DownStream' => 'Depende de...', 'Relation:depends on/UpStream' => 'Impactos...', + 'Relation:impacts/LoadData' => 'Load data~~', + 'Relation:impacts/NoFilteredData' => 'please select objects in Graphical view tag~~', )); diff --git a/datamodels/2.x/itop-config-mgmt/hu.dict.itop-config-mgmt.php b/datamodels/2.x/itop-config-mgmt/hu.dict.itop-config-mgmt.php index 2ca28d6f1..986d008e7 100755 --- a/datamodels/2.x/itop-config-mgmt/hu.dict.itop-config-mgmt.php +++ b/datamodels/2.x/itop-config-mgmt/hu.dict.itop-config-mgmt.php @@ -29,6 +29,8 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', array( 'Relation:depends on/Description' => 'Konfigurációs elemtől függnek', 'Relation:depends on/DownStream' => 'Függőségek', 'Relation:depends on/UpStream' => 'Hatások', + 'Relation:impacts/LoadData' => 'Load data~~', + 'Relation:impacts/NoFilteredData' => 'please select objects in Graphical view tag~~', )); diff --git a/datamodels/2.x/itop-config-mgmt/it.dict.itop-config-mgmt.php b/datamodels/2.x/itop-config-mgmt/it.dict.itop-config-mgmt.php index 18ea081d2..2caa7b41a 100755 --- a/datamodels/2.x/itop-config-mgmt/it.dict.itop-config-mgmt.php +++ b/datamodels/2.x/itop-config-mgmt/it.dict.itop-config-mgmt.php @@ -29,6 +29,8 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array( 'Relation:depends on/Description' => 'Elementi di questo elemento dipende da', 'Relation:depends on/DownStream' => 'Dipende da...', 'Relation:depends on/UpStream' => 'Impatto...', + 'Relation:impacts/LoadData' => 'Load data~~', + 'Relation:impacts/NoFilteredData' => 'please select objects in Graphical view tag~~', )); diff --git a/datamodels/2.x/itop-config-mgmt/ja.dict.itop-config-mgmt.php b/datamodels/2.x/itop-config-mgmt/ja.dict.itop-config-mgmt.php index a3d97ae14..e74b6f5a1 100755 --- a/datamodels/2.x/itop-config-mgmt/ja.dict.itop-config-mgmt.php +++ b/datamodels/2.x/itop-config-mgmt/ja.dict.itop-config-mgmt.php @@ -29,6 +29,8 @@ Dict::Add('JA JP', 'Japanese', '日本語', array( 'Relation:depends on/Description' => 'この要素が依存している要素', 'Relation:depends on/DownStream' => '依存...', 'Relation:depends on/UpStream' => 'インパクト...', + 'Relation:impacts/LoadData' => 'Load data~~', + 'Relation:impacts/NoFilteredData' => 'please select objects in Graphical view tag~~', )); diff --git a/datamodels/2.x/itop-config-mgmt/nl.dict.itop-config-mgmt.php b/datamodels/2.x/itop-config-mgmt/nl.dict.itop-config-mgmt.php index c4932932f..94b05b57e 100644 --- a/datamodels/2.x/itop-config-mgmt/nl.dict.itop-config-mgmt.php +++ b/datamodels/2.x/itop-config-mgmt/nl.dict.itop-config-mgmt.php @@ -41,6 +41,8 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', array( 'Relation:depends on/Description' => 'Elementen waarvan dit object afhankelijk van is', 'Relation:depends on/DownStream' => 'Is afhankelijk van...', 'Relation:depends on/UpStream' => 'Impact op...', + 'Relation:impacts/LoadData' => 'Load data~~', + 'Relation:impacts/NoFilteredData' => 'please select objects in Graphical view tag~~', )); diff --git a/datamodels/2.x/itop-config-mgmt/pt_br.dict.itop-config-mgmt.php b/datamodels/2.x/itop-config-mgmt/pt_br.dict.itop-config-mgmt.php index 8e08db5f6..db3edd766 100755 --- a/datamodels/2.x/itop-config-mgmt/pt_br.dict.itop-config-mgmt.php +++ b/datamodels/2.x/itop-config-mgmt/pt_br.dict.itop-config-mgmt.php @@ -35,6 +35,8 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array( 'Relation:depends on/Description' => 'Elementos estes, que dependem deste elemento', 'Relation:depends on/DownStream' => 'Depende de...', 'Relation:depends on/UpStream' => 'Impactos...', + 'Relation:impacts/LoadData' => 'Load data~~', + 'Relation:impacts/NoFilteredData' => 'please select objects in Graphical view tag~~', )); diff --git a/datamodels/2.x/itop-config-mgmt/ru.dict.itop-config-mgmt.php b/datamodels/2.x/itop-config-mgmt/ru.dict.itop-config-mgmt.php index 62d1ea3bc..760d3785d 100755 --- a/datamodels/2.x/itop-config-mgmt/ru.dict.itop-config-mgmt.php +++ b/datamodels/2.x/itop-config-mgmt/ru.dict.itop-config-mgmt.php @@ -22,6 +22,8 @@ Dict::Add('RU RU', 'Russian', 'Русский', array( 'Relation:depends on/Description' => 'Элементы, от которых зависит', 'Relation:depends on/DownStream' => 'Зависит от...', 'Relation:depends on/UpStream' => 'Влияет на...', + 'Relation:impacts/LoadData' => 'Load data~~', + 'Relation:impacts/NoFilteredData' => 'please select objects in Graphical view tag~~', )); diff --git a/datamodels/2.x/itop-config-mgmt/sk.dict.itop-config-mgmt.php b/datamodels/2.x/itop-config-mgmt/sk.dict.itop-config-mgmt.php index 0674f0707..97ad2810c 100644 --- a/datamodels/2.x/itop-config-mgmt/sk.dict.itop-config-mgmt.php +++ b/datamodels/2.x/itop-config-mgmt/sk.dict.itop-config-mgmt.php @@ -34,6 +34,8 @@ Dict::Add('SK SK', 'Slovak', 'Slovenčina', array( 'Relation:depends on/Description' => 'Prvky, od ktorých závisí tento prvok', 'Relation:depends on/DownStream' => 'Depends on...~~', 'Relation:depends on/UpStream' => 'Impacts...~~', + 'Relation:impacts/LoadData' => 'Load data~~', + 'Relation:impacts/NoFilteredData' => 'please select objects in Graphical view tag~~', )); diff --git a/datamodels/2.x/itop-config-mgmt/tr.dict.itop-config-mgmt.php b/datamodels/2.x/itop-config-mgmt/tr.dict.itop-config-mgmt.php index 812777850..5b831613a 100755 --- a/datamodels/2.x/itop-config-mgmt/tr.dict.itop-config-mgmt.php +++ b/datamodels/2.x/itop-config-mgmt/tr.dict.itop-config-mgmt.php @@ -36,6 +36,8 @@ Dict::Add('TR TR', 'Turkish', 'Türkçe', array( 'Relation:depends on/Description' => 'Bu kaleme bağımlı olan kalemler', 'Relation:depends on/DownStream' => 'Bağımlı olanlar...', 'Relation:depends on/UpStream' => 'Etkiledikleri...', + 'Relation:impacts/LoadData' => 'Load data~~', + 'Relation:impacts/NoFilteredData' => 'please select objects in Graphical view tag~~', )); diff --git a/datamodels/2.x/itop-config-mgmt/zh_cn.dict.itop-config-mgmt.php b/datamodels/2.x/itop-config-mgmt/zh_cn.dict.itop-config-mgmt.php index afc78b7be..dd3b58465 100755 --- a/datamodels/2.x/itop-config-mgmt/zh_cn.dict.itop-config-mgmt.php +++ b/datamodels/2.x/itop-config-mgmt/zh_cn.dict.itop-config-mgmt.php @@ -34,6 +34,8 @@ Dict::Add('ZH CN', 'Chinese', '简体中文', array( 'Relation:depends on/Description' => '该元素依赖的元素...', 'Relation:depends on/DownStream' => '依赖于...', 'Relation:depends on/UpStream' => '影响...', + 'Relation:impacts/LoadData' => 'Load data~~', + 'Relation:impacts/NoFilteredData' => 'please select objects in Graphical view tag~~', )); diff --git a/pages/UI.php b/pages/UI.php index 6535f389d..8272c59dc 100644 --- a/pages/UI.php +++ b/pages/UI.php @@ -1898,7 +1898,7 @@ EOF $oP->SetCurrentTabContainer('Navigator'); $sFirstTab = MetaModel::GetConfig()->Get('impact_analysis_first_tab'); - $sLazyLoading = MetaModel::GetConfig()->Get('impact_analysis_lazy_loading'); + $bLazyLoading = MetaModel::GetConfig()->Get('impact_analysis_lazy_loading') ; $sContextKey = "itop-config-mgmt/relation_context/$sClass/$sRelation/$sDirection"; // Check if the current object supports Attachments, similar to AttachmentPlugin::IsTargetObject @@ -1922,13 +1922,13 @@ EOF { DisplayNavigatorListTab($oP, $aResults, $sRelation, $sDirection, $oObj); $oP->SetCurrentTab('UI:RelationshipGraph'); - $oDisplayGraph->Display($oP, $aResults, $sRelation, $oAppContext, array(), $sClassForAttachment, $iIdForAttachment, $sContextKey, array('this' => $oObj),$sLazyLoading); + $oDisplayGraph->Display($oP, $aResults, $sRelation, $oAppContext, array(), $sClassForAttachment, $iIdForAttachment, $sContextKey, array('this' => $oObj),$bLazyLoading); DisplayNavigatorGroupTab($oP); } else { $oP->SetCurrentTab('UI:RelationshipGraph'); - $oDisplayGraph->Display($oP, $aResults, $sRelation, $oAppContext, array(), $sClassForAttachment, $iIdForAttachment, $sContextKey, array('this' => $oObj),$sLazyLoading); + $oDisplayGraph->Display($oP, $aResults, $sRelation, $oAppContext, array(), $sClassForAttachment, $iIdForAttachment, $sContextKey, array('this' => $oObj),$bLazyLoading); DisplayNavigatorListTab($oP, $aResults, $sRelation, $sDirection, $oObj); DisplayNavigatorGroupTab($oP); }