Menu

Create New Drawer in iTop Homepage UI

2021-03-29
2021-04-06
  • Uaifo Uduehi

    Uaifo Uduehi - 2021-03-29

    I am trying to add a new drawer item on the iTop homepage.
    I want to duplicate iTop drawer "Problem Management" and name is as "Security Management"

     
  • Uaifo Uduehi

    Uaifo Uduehi - 2021-03-29

    picture show what i am trying to achieve

     
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2021-03-30

    Have you already tried to create an iTop extension? You'd definitely need to read up on that if you want to do this yourself.

    This page is very useful too: https://www.itophub.io/wiki/page?id=latest%3Acustomization%3Axml_reference#fields

    The "drawer" is a "MenuGroup".

     
  • Uaifo Uduehi

    Uaifo Uduehi - 2021-03-30

    Thanks Jeffery,
    I created an iTop extension for the module i wanted to add to the dashboard and got it working.

    Now i just need to change the reference letter for the module and make it start from zero, say T-004849 to X-00001

    finally add a logo

    thanks!

     
  • Uaifo Uduehi

    Uaifo Uduehi - 2021-03-30

    i have figured out the logo, still need help to change ref letter and start from X-00001

     
  • Pierre Goiffon

    Pierre Goiffon - 2021-03-30

    Hello,

    About ref field value generation, I imagine your class is a child of the Ticket class, right ?
    Also, what is your iTop version, is it post 2.7.0 ?

    If the answer to both question is yes, take a look at : Ticket Ref generation
    Also about the possibility to reset the counter so it starts back at 1, there was a recent thread about this : https://sourceforge.net/p/itop/discussion/922360/thread/a05ea12b8f/#3246

     
  • Uaifo Uduehi

    Uaifo Uduehi - 2021-03-30

    Hi Pierre.

    Yes, my class is a child of ticket class and iTop version is 2.7.1

    i have read the links you gave and cannot still make out how to change the reference letter and make it start from X-00001

    Attaching my datamodel

     
  • Uaifo Uduehi

    Uaifo Uduehi - 2021-03-30

    Thanks Pierre,

    I was able to change the reference letter by editing the itop-request-mgmnt.xml file in the production path. However putting this file in the extensions directory doesn't change the ref letter.

    Maybe i am creating the extension in the wrong way?

     
  • Uaifo Uduehi

    Uaifo Uduehi - 2021-03-30

    managed to fix it... problem was i was using a module from an old iTop version as an extension and didnt contain the GetTicketRefFormat string in it

    sorry for the bother.. and thanks...

    i will try to reset the ref counter in MySQL and let you know

     
  • Uaifo Uduehi

    Uaifo Uduehi - 2021-03-30

    Hi Pierre,

    Thanks for your help so far, to reset ref counter, i dont get any changes using MySql command below:

    ALTER TABLE ticket_security auto_increment = 1;

    Can you suggest an example MySQL command to reset?

    Thanks

     
  • Uaifo Uduehi

    Uaifo Uduehi - 2021-03-30

    i am new to using MySQL

     
  • Pierre Goiffon

    Pierre Goiffon - 2021-03-31

    Hello,

    Nice to hear you managed to create your module ! Don't hesitate to carefully read the dedicated documentation : Customizing iTop [iTop Documentation]

    About the counter reset, the key_value_store table has two columns, you'll just have to reset a field value. Actually we're not using auto increment anymore, as mentioned in the other thread I've linked.

    So, you said your class was named "Security", the below query should work ok. Beware that no class instances should exists before running it !!

    UPDATE key_value_store
       SET value = 0
       WHERE namespace = 'ItopCounter'
          AND key_name = 'Security';
    
     
  • Pierre Goiffon

    Pierre Goiffon - 2021-03-31

    I asked previously if you were running iTop 2.7.0+ but you didn't answer, can you confirm this ?
    If the answer is yes, what are the different values in DB for key_value_store.key_name ?
    If the answer is no, we'll have to change plans :)

    i however don't understand what you meant by "Beware that no class instances should exist before running it"

    I meant if you have any record for this class that has a reference number, and resets the ref counter you will soon or later generate a duplicate.

     
  • Uaifo Uduehi

    Uaifo Uduehi - 2021-03-31

    i did respond that i am running iTop version 2.7.1

    Values in DB for key_value_store is attached.

    Thanks for explaining what you meant, this is what i understood it to be but just wanted to be sure. I deleted all Security tickets created before trying to update database.

     
  • Pierre Goiffon

    Pierre Goiffon - 2021-03-31

    i did respond that i am running iTop version 2.7.1

    Woops I missed that, my apologies. Now I'm sure :)

    Values in DB for key_value_store is attached.

    Ok, I wanted to see the distinct values for the key_name column so :

    SELECT DISTINCT key_name FROM key_value_store;

     
  • Uaifo Uduehi

    Uaifo Uduehi - 2021-03-31

    attached...

     
  • Pierre Goiffon

    Pierre Goiffon - 2021-04-01

    I'm confused, seems like not a single Security record was created, right ?

     
  • Uaifo Uduehi

    Uaifo Uduehi - 2021-04-01

    correct, i copied the "problem" module and modified to "security" and it seems to be getting info from the "problem" database.

    I see know this as the security ref number sequence continues from where the problem sequence number ends.

    I have created a custom sample-security-module and updating it line by line as i should have done in the first place.

    Have also installed the toolkit

     
  • Uaifo Uduehi

    Uaifo Uduehi - 2021-04-05

    All done!

    Thanks Pierre!

     
  • Pierre Goiffon

    Pierre Goiffon - 2021-04-06

    Super ! Thanks & enjoy !

     

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.