Menu

itop - ITSM & CMDB interface

mhmn
2017-10-11
2020-10-08
  • mhmn

    mhmn - 2017-10-11

    Hi,
    I'm Harith. I'm still new in iTop and php. I have question on how to edit iTop front page interface.
    Let say I want to change 'Tape Library' word to 'Backup' in front page. It seems like simple html tag, but I cannot find any 'html' tag.
    I have the source code, but don't know where to begin. I already have a look at file UI.php, but cannot do anything.

    Appreciate all the help. Tq in advance.

     
    • insdeshell

      insdeshell - 2017-10-11

      Hi,

      iTop is object oriented and each class has an identifier and a label (just like the attributes). To change the label, you have to:

      • Edit the datamodels/2.x/itop-config-mgmt/en.dict.itop-config-mgmt.php file and modifiy the corresponding value of the class identified by TapeLibrary:
      Dict::Add('EN US', 'English', 'English', array(
          'Class:TapeLibrary' => 'Backup',
          ...
      
      • Or create an extension with a separate dictionary file which contains the previous lines. This is the preferred solution since the change will automatically be applied on every iTop update. See add-class-sample but ignore the datamodel file.

      To take into account the change in the app, you have to re-run the setup or execute the toolkit.

       

      Last edit: insdeshell 2017-10-11
  • mhmn

    mhmn - 2017-10-12

    Ok, I edit file en.dict.itop-config-mgmt.php, run toolkit and now able to change from Tape Library to Backup.
    But, if I want to use the extension method, do I need to copy file en.dict.itop-config-mgmt.php (include the lines Dict::Add(.., array('Class:TapeLibrary' => 'Backup') to folder extension? Is that what you mean?

     
    • insdeshell

      insdeshell - 2017-10-12

      No, you do not need to copy this file, just the relevant lines. To sum up, the structure should be:

      extensions/
         change-label/
              en.dict.change-label.php
              model.change-label.php
              module.change-label.php
      

      And your en.dict.change-label.php file should contain:

      Dict::Add('EN US', 'English', 'English', array(
          'Class:TapeLibrary' => 'Backup',
       ));
      

      Good thing is you can change other labels from this extension. To install an extension, you need to re-run the set up. Once it is installed, you can change it and apply your changes from the toolkit.

       

      Last edit: insdeshell 2017-10-12
      • mhmn

        mhmn - 2017-10-12

        So it require re-install the setup to use extension.
        I think for now I just change line in the en.dist.change-lable.php file only. Afraid if I re-run the setup it will change another previous setting.
        Anyway, TQVM econym for your help. It really helps me a lot. Anything I will ask again. Thank you again for your help. :)

         

        Last edit: mhmn 2017-10-12
        • insdeshell

          insdeshell - 2017-10-12

          You're welcome. It is required to re-run the setup but only one time in order to install the new extension. Then:

          Once it is installed, you can change it and apply your changes from the toolkit.

          I advise you to write and install the extension (Denis said why). You won't loose your previous settings if you reinstall iTop.

           
  • Denis

    Denis - 2017-10-12

    Creating your own extension will make your next upgrade of iTop much simpler.

     
  • mhmn

    mhmn - 2017-10-13

    Ok, noted. I will try to create the extension later. Thanks econym, Denis..

     
  • mhmn

    mhmn - 2017-10-28

    Hi,
    Not sure I still can use this thread or not. I want to ask about the extension.
    Based on the link that you provide previously, I try to create the new 'Monitor' class using the extension. Others are ok, except table 'Monitor' not created when I run the toolkit (not display as picture attached). Already check the sql, confirmed no table Monitor created.
    Do you have any idea why?

     
  • Wasim

    Wasim - 2018-04-04

    Hi can anybody help me i got struck in one issue....i want to change the format of asset_number getting stored in table "physicaldevice" ...in which all files i need to make changes?

     
    • Kirk Thompson

      Kirk Thompson - 2020-10-08

      Hi Wasim.

      I am having the same problem with no table being created. Did you ever find a solution?

      Thnx.
      -K

       

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.