N°7771 - Add CMDB flow map

This commit is contained in:
v-dumas
2025-12-15 12:28:36 +01:00
parent df567fb9fe
commit 77b420b7d2
7 changed files with 499 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<Set>
<FlowType alias="FlowType" id="1">
<name>http</name>
</FlowType>
<FlowType alias="FlowType" id="2">
<name>https</name>
</FlowType>
<FlowType alias="FlowType" id="3">
<name>ftp</name>
</FlowType>
<FlowType alias="FlowType" id="4">
<name>sftp</name>
</FlowType>
<FlowType alias="FlowType" id="5">
<name>AS2</name>
</FlowType>
<FlowType alias="FlowType" id="6">
<name>X.400</name>
</FlowType>
</Set>

View File

@@ -0,0 +1,308 @@
<?xml version="1.0" encoding="UTF-8"?>
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.0">
<constants>
</constants>
<classes>
<class id="Flow" _delta="define_if_not_exists">
<parent>cmdbAbstractObject</parent>
<properties>
<category>bizmodel,searchable</category>
<abstract>false</abstract>
<db_table>flow</db_table>
<style>
<icon>images/icons8-sorting-arrows-horizontal.svg</icon>
</style>
<naming>
<attributes>
<attribute id="flowtype_name"/>
<attribute id="source_name"/>
<attribute id="destination_name"/>
</attributes>
</naming>
<reconciliation>
<attributes>
<attribute id="destination_id"/>
<attribute id="org_id"/>
<attribute id="source_id"/>
<attribute id="flowtype_id"/>
</attributes>
</reconciliation>
<obsolescence>
<condition>status='inactive'</condition>
</obsolescence>
<fields_semantic>
<state_attribute>status</state_attribute>
</fields_semantic>
</properties>
<fields>
<field id="org_id" xsi:type="AttributeExternalKey">
<sql>org_id</sql>
<filter/>
<dependencies/>
<is_null_allowed>false</is_null_allowed>
<target_class>Organization</target_class>
<on_target_delete>DEL_MANUAL</on_target_delete>
<tracking_level>all</tracking_level>
</field>
<field id="source_id" xsi:type="AttributeExternalKey">
<sql>source_id</sql>
<filter/>
<dependencies/>
<is_null_allowed>false</is_null_allowed>
<target_class>FunctionalCI</target_class>
<on_target_delete>DEL_MANUAL</on_target_delete>
<tracking_level>all</tracking_level>
</field>
<field id="source_name" xsi:type="AttributeExternalField">
<extkey_attcode>source_id</extkey_attcode>
<target_attcode>name</target_attcode>
</field>
<field id="destination_id" xsi:type="AttributeExternalKey">
<sql>destination_id</sql>
<filter/>
<dependencies/>
<is_null_allowed>false</is_null_allowed>
<target_class>FunctionalCI</target_class>
<on_target_delete>DEL_MANUAL</on_target_delete>
<tracking_level>all</tracking_level>
</field>
<field id="destination_name" xsi:type="AttributeExternalField">
<extkey_attcode>destination_id</extkey_attcode>
<target_attcode>name</target_attcode>
</field>
<field id="flowtype_id" xsi:type="AttributeExternalKey">
<sql>flowtype_id</sql>
<filter/>
<dependencies/>
<is_null_allowed>false</is_null_allowed>
<target_class>FlowType</target_class>
<on_target_delete>DEL_MANUAL</on_target_delete>
<tracking_level>all</tracking_level>
</field>
<field id="flowtype_name" xsi:type="AttributeExternalField">
<extkey_attcode>flowtype_id</extkey_attcode>
<target_attcode>name</target_attcode>
</field>
<field id="description" xsi:type="AttributeText">
<sql>description</sql>
<default_value/>
<is_null_allowed>true</is_null_allowed>
<tracking_level>all</tracking_level>
</field>
<field id="status" xsi:type="AttributeEnum">
<sql>status</sql>
<values>
<value id="active">
<code>active</code>
<rank>10</rank>
<style>
<main_color>$ibo-lifecycle-active-state-primary-color</main_color>
<complementary_color>$ibo-lifecycle-active-state-secondary-color</complementary_color>
<decoration_classes/>
</style>
</value>
<value id="inactive">
<code>inactive</code>
<rank>20</rank>
<style>
<main_color>$ibo-lifecycle-inactive-state-primary-color</main_color>
<complementary_color>$ibo-lifecycle-inactive-state-secondary-color</complementary_color>
<decoration_classes/>
</style>
</value>
</values>
<sort_type>label</sort_type>
<default_value>active</default_value>
<is_null_allowed>false</is_null_allowed>
<display_style>list</display_style>
<tracking_level>all</tracking_level>
</field>
</fields>
<methods/>
<presentation>
<list>
<items>
<item id="source_id">
<rank>10</rank>
</item>
<item id="destination_id">
<rank>20</rank>
</item>
<item id="flowtype_id">
<rank>30</rank>
</item>
<item id="description">
<rank>40</rank>
</item>
</items>
</list>
<search>
<items>
<item id="org_id">
<rank>10</rank>
</item>
<item id="source_id">
<rank>20</rank>
</item>
<item id="destination_id">
<rank>30</rank>
</item>
<item id="status">
<rank>40</rank>
</item>
</items>
</search>
<details>
<items>
<item id="col:col1">
<items>
<item id="org_id">
<rank>10</rank>
</item>
<item id="source_id">
<rank>20</rank>
</item>
<item id="destination_id">
<rank>30</rank>
</item>
<item id="status">
<rank>40</rank>
</item>
<item id="flowtype_id">
<rank>50</rank>
</item>
<item id="description">
<rank>60</rank>
</item>
</items>
<rank>10</rank>
</item>
</items>
</details>
<default_search>
<items>
<item id="org_id">
<rank>10</rank>
</item>
<item id="source_id">
<rank>20</rank>
</item>
<item id="destination_id">
<rank>30</rank>
</item>
<item id="flowtype_id">
<rank>40</rank>
</item>
<item id="status">
<rank>50</rank>
</item>
</items>
</default_search>
<summary>
<items>
<item id="org_id">
<rank>10</rank>
</item>
<item id="description">
<rank>20</rank>
</item>
</items>
</summary>
</presentation>
<relations>
<relation id="flow">
<neighbours>
<neighbour id="destination">
<attribute>destination_id</attribute>
<direction>both</direction>
</neighbour>
</neighbours>
</relation>
</relations>
</class>
<class id="FlowType" _delta="define">
<parent>Typology</parent>
<properties>
<category>bizmodel,searchable</category>
<abstract>false</abstract>
<db_table>flowtype</db_table>
<naming>
<attributes>
<attribute id="name"/>
</attributes>
</naming>
<reconciliation>
<attributes>
<attribute id="name"/>
<attribute id="finalclass"/>
</attributes>
</reconciliation>
</properties>
<fields/>
<methods/>
<presentation>
<list>
<items>
<item id="finalclass">
<rank>10</rank>
</item>
</items>
</list>
<search>
<items>
<item id="name">
<rank>10</rank>
</item>
</items>
</search>
<details>
<items>
<item id="name">
<rank>10</rank>
</item>
</items>
</details>
</presentation>
</class>
<class id="FunctionalCI" _delta="must_exist">
<relations>
<relation id="flow" _delta="define_if_not_exists">
<neighbours>
<neighbour id="flow">
<query_down><![CDATA[SELECT Flow WHERE source_id = :this->id]]></query_down>
<query_up><![CDATA[SELECT FunctionalCI WHERE id = :this->source_id]]></query_up>
<direction>both</direction>
</neighbour>
</neighbours>
</relation>
</relations>
</class>
</classes>
<menus>
<menu id="ConfigManagementOverview" xsi:type="DashboardMenuNode" _delta="must_exist">
<definition>
<cells>
<cell id="3" delta="must_exist">
<dashlets>
<dashlet id="Flow" xsi:type="DashletBadge" _delta="define_if_not_exists">
<rank>12</rank>
<class>Flow</class>
</dashlet>
</dashlets>
</cell>
</cells>
</definition>
</menu>
</menus>
<user_rights>
<groups>
<group id="Configuration">
<classes>
<class id="Flow" _delta="define_if_not_exists"/>
</classes>
</group>
</groups>
<profiles>
</profiles>
</user_rights>
</itop_design>

View File

@@ -0,0 +1,49 @@
<?php
/**
* Module combodo-flow-map
*
* @copyright Copyright (C) 2013 XXXXX
* @license http://opensource.org/licenses/AGPL-3.0
*/
Dict::Add('EN US', 'English', 'English', array(
'Relation:flow/Description' => 'Flow maps',
'Relation:flow/DownStream' => 'Impacts flow...',
'Relation:flow/UpStream' => 'Depends flow...',
'Class:Flow' => 'Flow',
'Class:Flow+' => 'For application flow for example',
'Class:Flow/Name' =>'%1$s %2$s %3$s',
'Class:Flow/Attribute:source_id' => 'Source',
'Class:Flow/Attribute:source_id+' => 'Source Ci of the flow',
'Class:Flow/Attribute:source_name' => 'Source name',
'Class:Flow/Attribute:source_name+' => 'Name of the source Ci of the flow',
'Class:Flow/Attribute:destination_id' => 'Destination',
'Class:Flow/Attribute:destination_id+' => 'Destination Ci for the flow',
'Class:Flow/Attribute:destination_name' => 'Destination name',
'Class:Flow/Attribute:destination_name+' => 'Name of the destination CI for the flow',
'Class:Flow/Attribute:type_id' => 'Flow type',
'Class:Flow/Attribute:type_id+' => 'Flow type such as : http, https, ftp..., will appear in the friendlyname',
'Class:Flow/Attribute:description' => 'Description',
'Class:Flow/Attribute:description+' => 'Flow description, will appear in the summary card',
'Class:Flow/Attribute:source_id_friendlyname' => 'source_id_friendlyname',
'Class:Flow/Attribute:source_id_friendlyname+' => 'Full name',
'Class:Flow/Attribute:source_id_finalclass_recall' => 'source_id->CI sub-class',
'Class:Flow/Attribute:source_id_finalclass_recall+' => 'Name of the final class',
'Class:Flow/Attribute:source_id_obsolescence_flag' => 'source_id->Obsolete',
'Class:Flow/Attribute:source_id_obsolescence_flag+' => 'Computed dynamically on other attributes',
'Class:Flow/Attribute:destination_id_friendlyname' => 'destination_id_friendlyname',
'Class:Flow/Attribute:destination_id_friendlyname+' => 'Full name',
'Class:Flow/Attribute:destination_id_finalclass_recall' => 'destination_id->CI sub-class',
'Class:Flow/Attribute:destination_id_finalclass_recall+' => 'Name of the final class',
'Class:Flow/Attribute:destination_id_obsolescence_flag' => 'destination_id->Obsolete',
'Class:Flow/Attribute:destination_id_obsolescence_flag+' => 'Computed dynamically on other attributes',
'Class:Flow/Attribute:status' => 'Status',
'Class:Flow/Attribute:status+' => '',
'Class:Flow/Attribute:status/Value:active' => 'Active',
'Class:Flow/Attribute:status/Value:inactive' => 'Inactive',
'Class:Flow/Attribute:org_id' => 'Organization',
'Class:Flow/Attribute:org_id+' => '',
));
?>

View File

@@ -0,0 +1,50 @@
<?php
/**
* Module combodo-flow-map
*
* @copyright Copyright (C) 2013 XXXXX
* @license http://opensource.org/licenses/AGPL-3.0
*/
Dict::Add('FR FR', 'French', 'Français', array(
'Relation:flow/Description' => 'Carte des fluxs',
'Relation:flow/DownStream' => 'Impacte flux...',
'Relation:flow/UpStream' => 'Dépend de flux...',
'Class:Flow' => 'Flux',
'Class:Flow+' => 'Pour les fluxs applicatifs par exemple',
'Class:Flow/Name' =>'%1$s %2$s %3$s',
'Class:Flow/Attribute:source_id' => 'Source',
'Class:Flow/Attribute:source_id+' => 'Ci source du flux',
'Class:Flow/Attribute:source_name' => 'Nom de la source ',
'Class:Flow/Attribute:source_name+' => 'Nom du CI à la source du flux',
'Class:Flow/Attribute:destination_id' => 'Destination',
'Class:Flow/Attribute:destination_id+' => 'Ci destinataire du flux',
'Class:Flow/Attribute:destination_name' => 'Nom du destinataire',
'Class:Flow/Attribute:destination_name+' => 'Nom du Ci destinataire du flux',
'Class:Flow/Attribute:type_id' => 'Type de flux',
'Class:Flow/Attribute:type_id+' => 'Type de flux : http, https, ftp..., apparaitra dans le nom commun',
'Class:Flow/Attribute:description' => 'Description',
'Class:Flow/Attribute:description+' => 'Description du flux, apparaitra dans les informations résumées ',
'Class:Flow/Attribute:source_id_friendlyname' => 'source_id_friendlyname',
'Class:Flow/Attribute:source_id_friendlyname+' => 'Nom complet',
'Class:Flow/Attribute:source_id_finalclass_recall' => 'source_id->CI sub-class',
'Class:Flow/Attribute:source_id_finalclass_recall+' => 'Classe finale',
'Class:Flow/Attribute:source_id_obsolescence_flag' => 'source_id->Obsolete',
'Class:Flow/Attribute:source_id_obsolescence_flag+' => 'Computed dynamically on other attributes',
'Class:Flow/Attribute:destination_id_friendlyname' => 'destination_id_friendlyname',
'Class:Flow/Attribute:destination_id_friendlyname+' => 'Nom complet',
'Class:Flow/Attribute:destination_id_finalclass_recall' => 'destination_id->CI sub-class',
'Class:Flow/Attribute:destination_id_finalclass_recall+' => 'Classe finale',
'Class:Flow/Attribute:destination_id_obsolescence_flag' => 'destination_id->Obsolete',
'Class:Flow/Attribute:destination_id_obsolescence_flag+' => 'Computed dynamically on other attributes',
'Class:Flow/Attribute:status' => 'Etat',
'Class:Flow/Attribute:status+' => '',
'Class:Flow/Attribute:status/Value:active' => 'Actif',
'Class:Flow/Attribute:status/Value:inactive' => 'Inactif',
'Class:Flow/Attribute:org_id' => 'Organisation',
'Class:Flow/Attribute:org_id+' => '',
));
?>

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="96px" height="96px"><linearGradient id="mv_DwPz_GcV~datTQ_sP3a" x1="27.258" x2="38.501" y1="18.189" y2="44.314" gradientTransform="rotate(90 23.5 24)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#32bdef"/><stop offset="1" stop-color="#1ea2e4"/></linearGradient><path fill="url(#mv_DwPz_GcV~datTQ_sP3a)" d="M14,41.19V37h14c0.552,0,1-0.448,1-1v-4c0-0.552-0.448-1-1-1H14v-4.19 c0-0.72-0.87-1.08-1.379-0.571L5.92,32.939c-0.586,0.586-0.586,1.536,0,2.121l6.701,6.701C13.13,42.271,14,41.91,14,41.19z"/><linearGradient id="mv_DwPz_GcV~datTQ_sP3b" x1="32.674" x2="34.456" y1="9.581" y2="13.722" gradientTransform="rotate(90 23.5 24)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#32bdef"/><stop offset="1" stop-color="#1ea2e4"/></linearGradient><path fill="url(#mv_DwPz_GcV~datTQ_sP3b)" d="M35,36v-4c0-0.552,0.448-1,1-1l0,0c0.552,0,1,0.448,1,1v4c0,0.552-0.448,1-1,1l0,0 C35.448,37,35,36.552,35,36z"/><linearGradient id="mv_DwPz_GcV~datTQ_sP3c" x1="32.674" x2="34.456" y1="5.581" y2="9.722" gradientTransform="rotate(90 23.5 24)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#32bdef"/><stop offset="1" stop-color="#1ea2e4"/></linearGradient><path fill="url(#mv_DwPz_GcV~datTQ_sP3c)" d="M39,36v-4c0-0.552,0.448-1,1-1l0,0c0.552,0,1,0.448,1,1v4c0,0.552-0.448,1-1,1l0,0 C39.448,37,39,36.552,39,36z"/><linearGradient id="mv_DwPz_GcV~datTQ_sP3d" x1="32.674" x2="34.456" y1="13.581" y2="17.722" gradientTransform="rotate(90 23.5 24)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#32bdef"/><stop offset="1" stop-color="#1ea2e4"/></linearGradient><path fill="url(#mv_DwPz_GcV~datTQ_sP3d)" d="M31,36v-4c0-0.552,0.448-1,1-1h0c0.552,0,1,0.448,1,1v4c0,0.552-0.448,1-1,1h0 C31.448,37,31,36.552,31,36z"/><linearGradient id="mv_DwPz_GcV~datTQ_sP3e" x1="551.258" x2="562.501" y1="-252.291" y2="-226.167" gradientTransform="rotate(-90 421.24 151.26)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#1ea2e4"/><stop offset="1" stop-color="#32bdef"/></linearGradient><path fill="url(#mv_DwPz_GcV~datTQ_sP3e)" d="M33,7.81V12H19c-0.552,0-1,0.448-1,1v4c0,0.552,0.448,1,1,1h14v4.19 c0,0.72,0.87,1.08,1.379,0.571l6.701-6.701c0.586-0.586,0.586-1.536,0-2.121l-6.701-6.701C33.87,6.729,33,7.09,33,7.81z"/><linearGradient id="mv_DwPz_GcV~datTQ_sP3f" x1="556.674" x2="558.456" y1="-260.899" y2="-256.759" gradientTransform="rotate(-90 421.24 151.26)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#1ea2e4"/><stop offset="1" stop-color="#32bdef"/></linearGradient><path fill="url(#mv_DwPz_GcV~datTQ_sP3f)" d="M12,13v4c0,0.552-0.448,1-1,1h0c-0.552,0-1-0.448-1-1v-4c0-0.552,0.448-1,1-1h0 C11.552,12,12,12.448,12,13z"/><linearGradient id="mv_DwPz_GcV~datTQ_sP3g" x1="556.674" x2="558.456" y1="-264.899" y2="-260.759" gradientTransform="rotate(-90 421.24 151.26)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#1ea2e4"/><stop offset="1" stop-color="#32bdef"/></linearGradient><path fill="url(#mv_DwPz_GcV~datTQ_sP3g)" d="M8,13v4c0,0.552-0.448,1-1,1h0c-0.552,0-1-0.448-1-1v-4c0-0.552,0.448-1,1-1h0 C7.552,12,8,12.448,8,13z"/><linearGradient id="mv_DwPz_GcV~datTQ_sP3h" x1="556.674" x2="558.456" y1="-256.899" y2="-252.758" gradientTransform="rotate(-90 421.24 151.26)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#1ea2e4"/><stop offset="1" stop-color="#32bdef"/></linearGradient><path fill="url(#mv_DwPz_GcV~datTQ_sP3h)" d="M16,13v4c0,0.552-0.448,1-1,1h0c-0.552,0-1-0.448-1-1v-4c0-0.552,0.448-1,1-1h0 C15.552,12,16,12.448,16,13z"/></svg>

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@@ -0,0 +1,17 @@
<?php
// PHP Data Model definition file
// WARNING - WARNING - WARNING
// DO NOT EDIT THIS FILE (unless you know what you are doing)
//
// If you provide a datamodel.xxxx.xml file with your module,
// this file WILL BE overwritten by the compilation of the
// module (during the setup) if the datamodel.xxxx.xml file
// contains the definition of new classes or menus.
//
// The recommended way to define new classes (for iTop 2.0 and later) is via the XML definition.
// This file remains in the module's template only for the cases where there is:
// - either no new class or menu defined in the XML file
// - or no XML file at all supplied by the module

View File

@@ -0,0 +1,53 @@
<?php
//
// iTop module definition file
//
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'itop-flow-map/1.0.0',
array(
// Identification
//
'label' => 'Add flow map in iTop',
'category' => 'business',
// Setup
//
'dependencies' => array(
'itop-config-mgmt/3.2.0'
),
'mandatory' => false,
'visible' => true,
// Components
//
'datamodel' => array(
'vendor/autoload.php',
'model.itop-flow-map.php', // Contains the PHP code generated by the "compilation" of datamodel.Combodo-flow-map.xml
),
'webservice' => array(
),
'data.struct' => array(
'data/en_us.data.itop-flow-map.xml',
),
'data.sample' => array(
// add your sample data XML files here,
),
// Documentation
//
'doc.manual_setup' => '', // hyperlink to manual setup documentation, if any
'doc.more_information' => '', // hyperlink to more information, if any
// Default settings
//
'settings' => array(
// Module specific settings go here, if any
),
)
);
?>