From ba2af7ed63a7366c2d9706afd811e5622d35fe1b Mon Sep 17 00:00:00 2001 From: Vincent Dumas <42336698+v-dumas@users.noreply.github.com> Date: Thu, 21 May 2026 11:22:10 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B09604=20-=20add=20"flowmaps"=20as=20a=20n?= =?UTF-8?q?ew=20neighbour=20(#914)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Set DataFlow as FunctionalCI * Use class name for Badge ID on DataFlow and Container classes including Typology * Improve DataFlow summary --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- .../datamodel.itop-container-mgmt.xml | 12 +- .../itop-flow-map/datamodel.itop-flow-map.xml | 343 ++++++------------ .../dictionaries/en.dict.itop-flow-map.php | 31 +- .../dictionaries/fr.dict.itop-flow-map.php | 33 +- 4 files changed, 137 insertions(+), 282 deletions(-) diff --git a/datamodels/2.x/itop-container-mgmt/datamodel.itop-container-mgmt.xml b/datamodels/2.x/itop-container-mgmt/datamodel.itop-container-mgmt.xml index 3347fc4962..6120647263 100644 --- a/datamodels/2.x/itop-container-mgmt/datamodel.itop-container-mgmt.xml +++ b/datamodels/2.x/itop-container-mgmt/datamodel.itop-container-mgmt.xml @@ -1480,19 +1480,19 @@ 1 - + 5 ContainerApplication - + 6 ContainerHost - + 7 ContainerCluster - + 8 ContainerImage @@ -1507,11 +1507,11 @@ 0 - + 21 ContainerType - + 22 ContainerImageType diff --git a/datamodels/2.x/itop-flow-map/datamodel.itop-flow-map.xml b/datamodels/2.x/itop-flow-map/datamodel.itop-flow-map.xml index 01a2be920c..1335da7d4b 100644 --- a/datamodels/2.x/itop-flow-map/datamodel.itop-flow-map.xml +++ b/datamodels/2.x/itop-flow-map/datamodel.itop-flow-map.xml @@ -2,7 +2,7 @@ - cmdbAbstractObject + FunctionalCI bizmodel,searchable false @@ -14,6 +14,10 @@ + + + + @@ -32,23 +36,9 @@ - - name - - false - - - org_id - - - false - Organization - DEL_MANUAL - all - source_id - + false FunctionalCI @@ -74,7 +64,7 @@ destination_id - + false FunctionalCI @@ -107,12 +97,6 @@ DEL_MANUAL all - - description - - true - all - status @@ -141,27 +125,6 @@ list all - - rank - - - high - 10 - - - medium - 20 - - - low - 30 - - - business_criticity - low - false - list - rank @@ -199,24 +162,36 @@ false list - - lnkContactToDataFlow - dataflow_id - 0 - 0 - contact_id - - - - lnkDocumentToDataFlow - dataflow_id - 0 - 0 - document_id - - - + + + EVENT_DB_CHECK_TO_WRITE + 10 + evtCheckSourceAndDestination + + + + + /** + * Ensure that the source and destination of a data flow are not DataFlow themselves + * + */ + false + public + EventListener + Get('source_id'), false, true); + $oDestination = MetaModel::GetObject(FunctionalCI::class, $this->Get('destination_id'), false, true); + if ($oSource instanceof DataFlow) { + $this->AddCheckIssue(Dict::Format('Class:DataFlow/Error:CheckSource', $oSource->GetName())); + } + if ($oDestination instanceof DataFlow) { + $this->AddCheckIssue(Dict::Format('Class:DataFlow/Error:CheckDestination', $oDestination->GetName())); + } + } ]]> + + @@ -257,7 +232,7 @@ - + 10 @@ -302,14 +277,25 @@ - + - + 10 10 + + + + 10 + + + 20 + + + 20 + 20 @@ -342,201 +328,46 @@ - + 10 - + 20 + + 30 + + + 40 + - + destination_impact = 'yes' AND id = :this->destination_id]]> id]]> both - + contacts_list down + + + + destination_id]]> + id]]> + both + + + - - cmdbAbstractObject - - 1 - bizmodel - false - autoincrement - lnkdocumenttodataflow - id - - - - - - - - - - - - - - - - - - - - - - false - true - - - - - - dataflow_id - DataFlow - false - DEL_AUTO - - - document_id - Document - false - DEL_AUTO - - - - -
- - - 10 - - - 20 - - -
- - - - 10 - - - 20 - - - - - - - 10 - - - 20 - - - -
-
- - cmdbAbstractObject - - 1 - bizmodel - false - autoincrement - lnkcontacttodataflow - id - - - - - - - - - - - - - - - - - - - - - - false - true - - - - - - dataflow_id - DataFlow - false - DEL_AUTO - - - contact_id - Contact - false - DEL_AUTO - - - - -
- - - 10 - - - 20 - - -
- - - - 10 - - - 20 - - - - - - - 10 - - - 20 - - - -
-
Typology @@ -554,6 +385,16 @@ + + + + + + + false + true + + @@ -629,6 +470,15 @@ + + + + id]]> + id]]> + both + + + @@ -726,7 +576,7 @@ - + 20 DataFlow @@ -735,6 +585,21 @@ + + + + + 0 + + + 23 + DataFlowType + + + + + + diff --git a/datamodels/2.x/itop-flow-map/dictionaries/en.dict.itop-flow-map.php b/datamodels/2.x/itop-flow-map/dictionaries/en.dict.itop-flow-map.php index 415129609b..e1d46dbb8a 100644 --- a/datamodels/2.x/itop-flow-map/dictionaries/en.dict.itop-flow-map.php +++ b/datamodels/2.x/itop-flow-map/dictionaries/en.dict.itop-flow-map.php @@ -9,21 +9,25 @@ Dict::Add('EN US', 'English', 'English', [ + 'Relation:dataflows/Description' => 'DataFlows between CIs', + 'Relation:dataflows/DownStream' => 'Outbound flows...', + 'Relation:dataflows/DownStream+' => 'Outbound flows map from', + 'Relation:dataflows/UpStream' => 'Inbound flows...', + 'Relation:dataflows/UpStream+' => 'Inbound flows map to', + 'Class:FunctionalCI/Attribute:dataflows' => 'Data flows', 'Class:FunctionalCI/Attribute:dataflows+' => 'Data flows for which this object is the source or the destination', 'FunctionalCI:DataFlow:Title' => 'Data flows', 'FunctionalCI:DataFlow:Inbound' => 'Inbound flows', 'FunctionalCI:DataFlow:Outbound' => 'Outbound flows', - 'DataFlow:baseinfo' => 'General information', - 'DataFlow:otherinfo' => 'Other information', 'DataFlow:moreinfo' => 'Flow specifics', 'Class:DataFlow' => 'Flow', 'Class:DataFlow+' => 'For application flow for example', - 'Class:DataFlow/Name' => '%1$s', + 'Class:DataFlow/ComplementaryName' => '%1$s - %2$s', 'Class:DataFlow/Attribute:name' => 'Name', - 'Class:DataFlow/Attribute:name_id+' => 'Data that are transferred', + 'Class:DataFlow/Attribute:name+' => 'Identify the transferred data flow', 'Class:DataFlow/Attribute:source_id' => 'Source', 'Class:DataFlow/Attribute:source_id+' => 'Source Ci of the flow', 'Class:DataFlow/Attribute:source_impact' => 'Source impacts?', @@ -42,22 +46,10 @@ Dict::Add('EN US', 'English', 'English', [ 'Class:DataFlow/Attribute:destination_impact/Value:no+' => 'If the flow stops, the destination is not impacted', 'Class:DataFlow/Attribute:dataflowtype_id' => 'Flow type', 'Class:DataFlow/Attribute:dataflowtype_id+' => 'Typology of Flow.', - 'Class:DataFlow/Attribute:description' => 'Description', - 'Class:DataFlow/Attribute:description+' => '', 'Class:DataFlow/Attribute:status' => 'Status', 'Class:DataFlow/Attribute:status+' => '', 'Class:DataFlow/Attribute:status/Value:active' => 'active', 'Class:DataFlow/Attribute:status/Value:inactive' => 'inactive', - 'Class:DataFlow/Attribute:org_id' => 'Organization', - 'Class:DataFlow/Attribute:org_id+' => '', - 'Class:DataFlow/Attribute:business_criticity' => 'Business criticality', - 'Class:DataFlow/Attribute:business_criticity+' => '', - 'Class:DataFlow/Attribute:business_criticity/Value:high' => 'high', - 'Class:DataFlow/Attribute:business_criticity/Value:high+' => '', - 'Class:DataFlow/Attribute:business_criticity/Value:low' => 'low', - 'Class:DataFlow/Attribute:business_criticity/Value:low+' => '', - 'Class:DataFlow/Attribute:business_criticity/Value:medium' => 'medium', - 'Class:DataFlow/Attribute:business_criticity/Value:medium+' => '', 'Class:DataFlow/Attribute:execution_frequency' => 'Execution frequency', 'Class:DataFlow/Attribute:execution_frequency+' => 'How often the data flow is executed', 'Class:DataFlow/Attribute:execution_frequency/Value:realtime' => 'real-time', @@ -74,10 +66,13 @@ Dict::Add('EN US', 'English', 'English', [ 'Class:DataFlow/Attribute:execution_frequency/Value:monthly+' => '', 'Class:DataFlow/Attribute:execution_frequency/Value:yearly' => 'yearly', 'Class:DataFlow/Attribute:execution_frequency/Value:yearly+' => '', - 'Class:DataFlow/Attribute:documents_list' => 'Documents', 'Class:DataFlow/Attribute:documents_list+' => 'Eg: technical specifications, runbooks, etc.', - 'Class:DataFlow/Attribute:contacts_list' => 'Contacts', 'Class:DataFlow/Attribute:contacts_list+' => 'Eg: flow owner, technical support, etc.', + 'Class:DataFlow/Error:CheckSource' => 'The source of a data flow cannot be a data flow itself. Choose another source CI than %1$s', + 'Class:DataFlow/Error:CheckDestination' => 'The destination of a data flow cannot be a data flow itself. Choose another destination CI than %1$s', + + 'Class:DataFlowType' => 'Data Flow Type', + 'Class:DataFlowType+' => 'Typology of Data Flow', /* 'Class:DataFlow/Attribute:source_id_friendlyname' => 'source_id_friendlyname', diff --git a/datamodels/2.x/itop-flow-map/dictionaries/fr.dict.itop-flow-map.php b/datamodels/2.x/itop-flow-map/dictionaries/fr.dict.itop-flow-map.php index ea4e4afcaf..c7fc8c19b1 100644 --- a/datamodels/2.x/itop-flow-map/dictionaries/fr.dict.itop-flow-map.php +++ b/datamodels/2.x/itop-flow-map/dictionaries/fr.dict.itop-flow-map.php @@ -9,21 +9,25 @@ Dict::Add('FR FR', 'French', 'Français', [ + 'Relation:dataflows/Description' => 'Flux de données entre CIs', + 'Relation:dataflows/DownStream' => 'Flux sortants...', + 'Relation:dataflows/DownStream+' => 'Carte des flux sortants depuis', + 'Relation:dataflows/UpStream' => 'Flux entrants...', + 'Relation:dataflows/UpStream+' => 'Carte des flux entrants vers', + 'Class:FunctionalCI/Attribute:dataflows' => 'Flux de données', 'Class:FunctionalCI/Attribute:dataflows+' => 'Flux de données dont cet objet est la source ou la destination', 'FunctionalCI:DataFlow:Title' => 'Flux de données', 'FunctionalCI:DataFlow:Inbound' => 'Flux entrants', 'FunctionalCI:DataFlow:Outbound' => 'Flux sortants', - 'DataFlow:baseinfo' => 'Informations générales', - 'DataFlow:otherinfo' => 'Autres informations', 'DataFlow:moreinfo' => 'Spécificités du flux', 'Class:DataFlow' => 'Flux de Données', - 'Class:DataFlow+' => 'Modélise les données transférées entre instances d\'application', - 'Class:DataFlow/Name' => '%1$s', + 'Class:DataFlow+' => 'Modélise les données transférées entre instances d\'application ou plus généralement entre CIs.', + 'Class:DataFlow/ComplementaryName' => '%1$s - %2$s', 'Class:DataFlow/Attribute:name' => 'Nom', - 'Class:DataFlow/Attribute:name_id+' => 'Type de données transferées', + 'Class:DataFlow/Attribute:name+' => 'Identifie le flux de données', 'Class:DataFlow/Attribute:source_id' => 'Source', 'Class:DataFlow/Attribute:source_id+' => 'Instance d\application à la source du flux de données', 'Class:DataFlow/Attribute:source_impact' => 'Source impactante ?', @@ -42,22 +46,10 @@ Dict::Add('FR FR', 'French', 'Français', [ 'Class:DataFlow/Attribute:destination_impact/Value:no+' => 'Si le flux s\'arrête, le destinataire n\'est pas impacté', 'Class:DataFlow/Attribute:dataflowtype_id' => 'Type de flux', 'Class:DataFlow/Attribute:dataflowtype_id+' => 'Typologie du flux', - 'Class:DataFlow/Attribute:description' => 'Description', - 'Class:DataFlow/Attribute:description+' => '', 'Class:DataFlow/Attribute:status' => 'Etat', 'Class:DataFlow/Attribute:status+' => '', 'Class:DataFlow/Attribute:status/Value:active' => 'actif', 'Class:DataFlow/Attribute:status/Value:inactive' => 'inactif', - 'Class:DataFlow/Attribute:org_id' => 'Organisation', - 'Class:DataFlow/Attribute:org_id+' => '', - 'Class:DataFlow/Attribute:business_criticity' => 'Criticité', - 'Class:DataFlow/Attribute:business_criticity+' => '', - 'Class:DataFlow/Attribute:business_criticity/Value:high' => 'haute', - 'Class:DataFlow/Attribute:business_criticity/Value:high+' => '', - 'Class:DataFlow/Attribute:business_criticity/Value:low' => 'basse', - 'Class:DataFlow/Attribute:business_criticity/Value:low+' => '', - 'Class:DataFlow/Attribute:business_criticity/Value:medium' => 'moyenne', - 'Class:DataFlow/Attribute:business_criticity/Value:medium+' => '', 'Class:DataFlow/Attribute:execution_frequency' => 'Fréquence d\'exécution', 'Class:DataFlow/Attribute:execution_frequency+' => 'À quelle fréquence le transfert de données est-il exécuté', 'Class:DataFlow/Attribute:execution_frequency/Value:realtime' => 'temps réel', @@ -74,10 +66,13 @@ Dict::Add('FR FR', 'French', 'Français', [ 'Class:DataFlow/Attribute:execution_frequency/Value:monthly+' => '', 'Class:DataFlow/Attribute:execution_frequency/Value:yearly' => 'annuelle', 'Class:DataFlow/Attribute:execution_frequency/Value:yearly+' => '', - 'Class:DataFlow/Attribute:documents_list' => 'Documents', 'Class:DataFlow/Attribute:documents_list+' => 'Eg: technical specifications, runbooks, etc.', - 'Class:DataFlow/Attribute:contacts_list' => 'Contacts', 'Class:DataFlow/Attribute:contacts_list+' => 'Eg: flow owner, technical support, etc.', + 'Class:DataFlow/Error:CheckSource' => 'La source d\'un flux de données ne peut pas être un flux de données elle-même. Choisissez un autre CI source que %1$s', + 'Class:DataFlow/Error:CheckDestination' => 'La destination d\'un flux de données ne peut pas être un flux de données elle-même. Choisissez un autre CI destination que %1$s', + + 'Class:DataFlowType' => 'Type de flux', + 'Class:DataFlowType+' => 'Typologie des flux de données', /* 'Class:DataFlow/Attribute:source_id_friendlyname' => 'source_id_friendlyname',