diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php
index 49073cfb1..ffb41337a 100644
--- a/application/cmdbabstract.class.inc.php
+++ b/application/cmdbabstract.class.inc.php
@@ -510,11 +510,15 @@ HTML
*/
public function DisplayDashboard($oPage, $sAttCode)
{
+ // Retrieve parameters
+ /** @var bool $bIsContainerInEdition True if the container of the dashboard is currently in edition; meaning that the dashboard could not be up-to-date with data changed in the container (eg. when editing an object and adding linkedset items) */
+ $bIsContainerInEdition = (utils::ReadParam('host_container_in_edition', 'false') === 'true');
+
$sClass = get_class($this);
$oAttDef = MetaModel::GetAttributeDef($sClass, $sAttCode);
- if (!$oAttDef instanceof AttributeDashboard)
- {
+ // Consistency checks
+ if (!$oAttDef instanceof AttributeDashboard) {
throw new CoreException(Dict::S('UI:Error:InvalidDashboard'));
}
@@ -526,6 +530,10 @@ HTML
$bCanEdit = UserRights::IsAdministrator() || $oAttDef->IsUserEditable();
$sDivId = $oDashboard->GetId();
+
+ if ($bIsContainerInEdition) {
+ $oPage->AddUiBlock(AlertUIBlockFactory::MakeForInformation(Dict::S('UI:Dashboard:NotUpToDateUntilContainerSaved')));
+ }
$oPage->add('
');
$aExtraParams = array(
'query_params' => $this->ToArgsForQuery(),
@@ -561,17 +569,12 @@ HTML
$aList = array_keys(MetaModel::ListAttributeDefs(get_class($this)));
}
$sClass = get_class($this);
- foreach($aList as $sAttCode)
- {
+ foreach($aList as $sAttCode) {
$oAttDef = MetaModel::GetAttributeDef(get_class($this), $sAttCode);
- if ($oAttDef instanceof AttributeDashboard)
- {
- if ($bEditMode)
- {
- continue;
- }
+ if ($oAttDef instanceof AttributeDashboard) {
+ $sHostContainerInEditionUrlParam = ($bEditMode) ? '&host_container_in_edition=true' : '';
$oPage->AddAjaxTab($oAttDef->GetLabel(),
- utils::GetAbsoluteUrlAppRoot().'pages/ajax.render.php?operation=dashboard&class='.get_class($this).'&id='.$this->GetKey().'&attcode='.$oAttDef->GetCode(),
+ utils::GetAbsoluteUrlAppRoot().'pages/ajax.render.php?operation=dashboard&class='.get_class($this).'&id='.$this->GetKey().'&attcode='.$oAttDef->GetCode().$sHostContainerInEditionUrlParam,
true,
'Class:'.$sClass.'/Attribute:'.$sAttCode,
AjaxTab::ENUM_TAB_PLACEHOLDER_DASHBOARD);
diff --git a/dictionaries/cs.dictionary.itop.ui.php b/dictionaries/cs.dictionary.itop.ui.php
index dab87f741..7d3436213 100755
--- a/dictionaries/cs.dictionary.itop.ui.php
+++ b/dictionaries/cs.dictionary.itop.ui.php
@@ -1204,6 +1204,7 @@ Dict::Add('CS CZ', 'Czech', 'Čeština', array(
'UI:ImportDashboardTitle' => 'Import ze souboru',
'UI:ImportDashboardText' => 'Vyberte šablonu dashboardu k importu:',
'UI:Dashboard:Actions' => 'Dashboard actions~~',
+ 'UI:Dashboard:NotUpToDateUntilContainerSaved' => 'This dashboard displays information that does not include the on-going changes.~~',
'UI:DashletCreation:Title' => 'Vytvořit nový dashlet',
diff --git a/dictionaries/da.dictionary.itop.ui.php b/dictionaries/da.dictionary.itop.ui.php
index f63caa64f..f8b40981b 100644
--- a/dictionaries/da.dictionary.itop.ui.php
+++ b/dictionaries/da.dictionary.itop.ui.php
@@ -1195,6 +1195,7 @@ Ved tilknytningen til en trigger, bliver hver handling tildelt et "rækkefølge"
'UI:ImportDashboardTitle' => 'Importer Fra Fil',
'UI:ImportDashboardText' => 'Vælg en dashboard fil til import:',
'UI:Dashboard:Actions' => 'Dashboard actions~~',
+ 'UI:Dashboard:NotUpToDateUntilContainerSaved' => 'This dashboard displays information that does not include the on-going changes.~~',
'UI:DashletCreation:Title' => 'Opret en ny Dashlet',
diff --git a/dictionaries/de.dictionary.itop.ui.php b/dictionaries/de.dictionary.itop.ui.php
index a99f994a9..c7d1c7745 100644
--- a/dictionaries/de.dictionary.itop.ui.php
+++ b/dictionaries/de.dictionary.itop.ui.php
@@ -1194,6 +1194,7 @@ Wenn Aktionen mit Trigger verknüpft sind, bekommt jede Aktion eine Auftragsnumm
'UI:ImportDashboardTitle' => 'Import aus einer Datei',
'UI:ImportDashboardText' => 'Wählen Sie eine Dashboard-Datei zum Import:',
'UI:Dashboard:Actions' => 'Dashboard actions~~',
+ 'UI:Dashboard:NotUpToDateUntilContainerSaved' => 'This dashboard displays information that does not include the on-going changes.~~',
'UI:DashletCreation:Title' => 'Neues ashlet erzeugen',
diff --git a/dictionaries/en.dictionary.itop.ui.php b/dictionaries/en.dictionary.itop.ui.php
index 5b309a9e8..fa464c90a 100644
--- a/dictionaries/en.dictionary.itop.ui.php
+++ b/dictionaries/en.dictionary.itop.ui.php
@@ -1219,6 +1219,7 @@ When associated with a trigger, each action is given an "order" number, specifyi
'UI:ImportDashboardTitle' => 'Import From a File',
'UI:ImportDashboardText' => 'Select a dashboard file to import:',
'UI:Dashboard:Actions' => 'Dashboard actions',
+ 'UI:Dashboard:NotUpToDateUntilContainerSaved' => 'This dashboard displays information that does not include the on-going changes.',
'UI:DashletCreation:Title' => 'Create a new Dashlet',
diff --git a/dictionaries/es_cr.dictionary.itop.ui.php b/dictionaries/es_cr.dictionary.itop.ui.php
index 24bca37cb..d5d186eb3 100644
--- a/dictionaries/es_cr.dictionary.itop.ui.php
+++ b/dictionaries/es_cr.dictionary.itop.ui.php
@@ -1208,6 +1208,7 @@ Cuando se asocien con un disparador, cada acción recibe un número de "orden",
'UI:ImportDashboardTitle' => 'Importar de un Archivo',
'UI:ImportDashboardText' => 'Seleccione el Archivo de Panel de Control a Importar:',
'UI:Dashboard:Actions' => 'Dashboard actions~~',
+ 'UI:Dashboard:NotUpToDateUntilContainerSaved' => 'This dashboard displays information that does not include the on-going changes.~~',
'UI:DashletCreation:Title' => 'Crear Dashlet',
diff --git a/dictionaries/fr.dictionary.itop.ui.php b/dictionaries/fr.dictionary.itop.ui.php
index d0089b7e4..6cc0449b3 100644
--- a/dictionaries/fr.dictionary.itop.ui.php
+++ b/dictionaries/fr.dictionary.itop.ui.php
@@ -1201,6 +1201,7 @@ Lors de l\'association à un déclencheur, on attribue à chaque action un numé
'UI:ImportDashboardTitle' => 'Importation depuis un fichier',
'UI:ImportDashboardText' => 'Choisissez un fichier de définition de tableau de bord :',
'UI:Dashboard:Actions' => 'Actions du tableau de bord',
+ 'UI:Dashboard:NotUpToDateUntilContainerSaved' => 'Ce tableau de bord affiche des informations qui ne reflète pas les modifications en cours.',
'UI:DashletCreation:Title' => 'Créer un Indicateur',
diff --git a/dictionaries/hu.dictionary.itop.ui.php b/dictionaries/hu.dictionary.itop.ui.php
index 0ebf045fb..5af295197 100755
--- a/dictionaries/hu.dictionary.itop.ui.php
+++ b/dictionaries/hu.dictionary.itop.ui.php
@@ -1194,6 +1194,7 @@ Akció kiváltó okhoz rendelésekor kap egy sorszámot , amely meghatározza az
'UI:ImportDashboardTitle' => 'Import From a File~~',
'UI:ImportDashboardText' => 'Select a dashboard file to import:~~',
'UI:Dashboard:Actions' => 'Dashboard actions~~',
+ 'UI:Dashboard:NotUpToDateUntilContainerSaved' => 'This dashboard displays information that does not include the on-going changes.~~',
'UI:DashletCreation:Title' => 'Create a new Dashlet~~',
diff --git a/dictionaries/it.dictionary.itop.ui.php b/dictionaries/it.dictionary.itop.ui.php
index d65a0537f..f51c6a746 100644
--- a/dictionaries/it.dictionary.itop.ui.php
+++ b/dictionaries/it.dictionary.itop.ui.php
@@ -1207,6 +1207,7 @@ Quando è associata a un trigger, ad ogni azione è assegnato un numero "ordine"
'UI:ImportDashboardTitle' => 'Import From a File~~',
'UI:ImportDashboardText' => 'Select a dashboard file to import:~~',
'UI:Dashboard:Actions' => 'Dashboard actions~~',
+ 'UI:Dashboard:NotUpToDateUntilContainerSaved' => 'This dashboard displays information that does not include the on-going changes.~~',
'UI:DashletCreation:Title' => 'Create a new Dashlet~~',
diff --git a/dictionaries/ja.dictionary.itop.ui.php b/dictionaries/ja.dictionary.itop.ui.php
index 673cd0401..ed399a30b 100644
--- a/dictionaries/ja.dictionary.itop.ui.php
+++ b/dictionaries/ja.dictionary.itop.ui.php
@@ -1195,6 +1195,7 @@ Dict::Add('JA JP', 'Japanese', '日本語', array(
'UI:ImportDashboardTitle' => 'ファイルからインポート',
'UI:ImportDashboardText' => 'インポートするダッシュボードファイルを選択ください。:',
'UI:Dashboard:Actions' => 'Dashboard actions~~',
+ 'UI:Dashboard:NotUpToDateUntilContainerSaved' => 'This dashboard displays information that does not include the on-going changes.~~',
'UI:DashletCreation:Title' => '新しいダッシュレットを作成',
diff --git a/dictionaries/nl.dictionary.itop.ui.php b/dictionaries/nl.dictionary.itop.ui.php
index b9a6181b5..26f66f7f0 100644
--- a/dictionaries/nl.dictionary.itop.ui.php
+++ b/dictionaries/nl.dictionary.itop.ui.php
@@ -1209,6 +1209,7 @@ Bij die koppeling wordt aan elke actie een volgorde-nummer gegeven. Dit bepaalt
'UI:ImportDashboardTitle' => 'Importeer vanuit een bestand',
'UI:ImportDashboardText' => 'Selecteer een bestand van het dashboard om te importeren:',
'UI:Dashboard:Actions' => 'Dashboard actions~~',
+ 'UI:Dashboard:NotUpToDateUntilContainerSaved' => 'This dashboard displays information that does not include the on-going changes.~~',
'UI:DashletCreation:Title' => 'Maak een nieuwe Dashlet aan',
diff --git a/dictionaries/pt_br.dictionary.itop.ui.php b/dictionaries/pt_br.dictionary.itop.ui.php
index 8651b993c..5e9919cf0 100644
--- a/dictionaries/pt_br.dictionary.itop.ui.php
+++ b/dictionaries/pt_br.dictionary.itop.ui.php
@@ -1206,6 +1206,7 @@ When associated with a trigger, each action is given an "order" number, specifyi
'UI:ImportDashboardTitle' => 'Importar por um arquivo',
'UI:ImportDashboardText' => 'Selecione um arquivo do painel para importar:',
'UI:Dashboard:Actions' => 'Dashboard actions~~',
+ 'UI:Dashboard:NotUpToDateUntilContainerSaved' => 'This dashboard displays information that does not include the on-going changes.~~',
'UI:DashletCreation:Title' => 'Criar um novo Painel',
diff --git a/dictionaries/ru.dictionary.itop.ui.php b/dictionaries/ru.dictionary.itop.ui.php
index 5b7649ba0..599eb3e75 100644
--- a/dictionaries/ru.dictionary.itop.ui.php
+++ b/dictionaries/ru.dictionary.itop.ui.php
@@ -1206,6 +1206,7 @@ Dict::Add('RU RU', 'Russian', 'Русский', array(
'UI:ImportDashboardTitle' => 'Импорт из файла',
'UI:ImportDashboardText' => 'Выберите файл дашборда для импорта:',
'UI:Dashboard:Actions' => 'Dashboard actions~~',
+ 'UI:Dashboard:NotUpToDateUntilContainerSaved' => 'This dashboard displays information that does not include the on-going changes.~~',
'UI:DashletCreation:Title' => 'Создать новый дашлет',
diff --git a/dictionaries/sk.dictionary.itop.ui.php b/dictionaries/sk.dictionary.itop.ui.php
index af96c1210..8606dbc07 100644
--- a/dictionaries/sk.dictionary.itop.ui.php
+++ b/dictionaries/sk.dictionary.itop.ui.php
@@ -1197,6 +1197,7 @@ Keď sú priradené spúštačom, každej akcii je dané číslo "príkazu", šp
'UI:ImportDashboardTitle' => 'Importovať zo súboru',
'UI:ImportDashboardText' => 'Zvoľte panel súboru na importovanie:',
'UI:Dashboard:Actions' => 'Dashboard actions~~',
+ 'UI:Dashboard:NotUpToDateUntilContainerSaved' => 'This dashboard displays information that does not include the on-going changes.~~',
'UI:DashletCreation:Title' => 'Vytvoriť a nový Dashlet',
diff --git a/dictionaries/tr.dictionary.itop.ui.php b/dictionaries/tr.dictionary.itop.ui.php
index e06d5aff9..26806c3dc 100644
--- a/dictionaries/tr.dictionary.itop.ui.php
+++ b/dictionaries/tr.dictionary.itop.ui.php
@@ -1206,6 +1206,7 @@ Tetikleme gerçekleştiriğinde işlemler tanımlanan sıra numarası ile gerçe
'UI:ImportDashboardTitle' => 'Import From a File~~',
'UI:ImportDashboardText' => 'Select a dashboard file to import:~~',
'UI:Dashboard:Actions' => 'Dashboard actions~~',
+ 'UI:Dashboard:NotUpToDateUntilContainerSaved' => 'This dashboard displays information that does not include the on-going changes.~~',
'UI:DashletCreation:Title' => 'Create a new Dashlet~~',
diff --git a/dictionaries/zh_cn.dictionary.itop.ui.php b/dictionaries/zh_cn.dictionary.itop.ui.php
index 7e4b7e06a..ace146dbd 100644
--- a/dictionaries/zh_cn.dictionary.itop.ui.php
+++ b/dictionaries/zh_cn.dictionary.itop.ui.php
@@ -1205,6 +1205,7 @@ Dict::Add('ZH CN', 'Chinese', '简体中文', array(
'UI:ImportDashboardTitle' => '从文件导入',
'UI:ImportDashboardText' => '选择要导入的仪表盘文件:',
'UI:Dashboard:Actions' => 'Dashboard actions~~',
+ 'UI:Dashboard:NotUpToDateUntilContainerSaved' => 'This dashboard displays information that does not include the on-going changes.~~',
'UI:DashletCreation:Title' => '创建新组件',