Menu

CI "impacts"/"depends on" graphical view tooltip data customization

ray
2021-06-22
2021-06-24
  • ray

    ray - 2021-06-22

    Hi All,

    I hope all of you are well.

    I'm trying to add additional info about the NetworkDevice object (network port and device port) in the CI "impacts"/"depends on" graphical view tooltip (please refer to attached image).

    Based on researching the code, it seems that there are 2 relevant files:
    1. pages/UI.php
    Relevant code is under case 'swf_navigator':
    2. js/simple_graph.js
    2.1. Relevant code under $( ".popupMenuTarget" ).tooltip({
    2.2. Relevant code under _get_tooltip_content: function(sNodeId)

    I would really appreciate if someone could point me to a guide/reference/extension for customizing this.

    Thank you very much in advance!

    Kind regards,
    Ray

    EDIT:
    -Fix indenting issue

     

    Last edit: ray 2021-06-22
  • Pierre Goiffon

    Pierre Goiffon - 2021-06-22

    Hello,

    The tooltips content are generated server side with a call to pages/ajax.render.php and operation=relation_json. Content is generated more precisely in \DisplayableNode::GetTooltip : you can see that elements added are from the class 'list' zlist.

    This zlist can be modified easily with a custom module and some XML.

    If you never did some customization, then read with care the dedicated chapter in the documentation, there is some learning to do before being able to begin : https://www.itophub.io/wiki/page?id=2_7_0%3Acustomization%3Astart
    Note that Combodo customers get access to the ITSM Designer, a Saas GUI which allow to customize multiple iTop instances with great ease.

    The node to change is in classes/class/presentation/list, check XML reference

     
    • ray

      ray - 2021-06-22

      Hi Pierre,

      Thank you very much for the help and guidance!

      It seems that zlist (used in core/displayablegraph.class.inc.php) is the <list> tag under <presentation> in datamodel extension. I believe if the field is as part of the class, could add the field in <list> and it might be displayed in the tooltip (e.g. for NetworkDevice, simply add the desired field in list tag).

      If it's not too much to ask, I'm just wondering if it's possible to get the field network_port and device_port in lnkConnectableCIToNetworkDevice from the NetworkDevice class by using extension? (i.e. get reference to those 2 fields in <fields> of the NetworkDevice xml datamodel so that I could add it to <list> for display in the tooltip.

      Finally, while I would really love to have the ITSM designer for easier development, my situation is currently very limited...

      Thank you once again for the help!

      Kind regards,
      Ray

       
      • Pierre Goiffon

        Pierre Goiffon - 2021-06-23

        It seems that zlist (used in core/displayablegraph.class.inc.php) is the <list> tag under <presentation> in datamodel extension.</presentation></list>

        Yes, that's what I was saying in my previous message :)

        I believe if the field is as part of the class, could add the field in <list> and it might be displayed in the tooltip (e.g. for NetworkDevice, simply add the desired field in list tag).</list>

        Perfectly right !
        Be careful on the _delta attributes locations !

        If it's not too much to ask, I'm just wondering if it's possible to get the field network_port and device_port in lnkConnectableCIToNetworkDevice from the NetworkDevice class by using extension?

        Take a look at AttributeExternalField : https://www.itophub.io/wiki/page?id=2_7_0%3Acustomization%3Axml_reference#fields

         
        • ray

          ray - 2021-06-24

          Thank you for the help Pierre!

           
          • Pierre Goiffon

            Pierre Goiffon - 2021-06-24

            You're welcome !

             

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.