There is an API to change the class icon depending on a field value, it is typically what is used to a "fire flam" hint on the user requests icon when the reach a threshold. Would that be ok?
Depending on the color / meaning that you want, you could also play with the "GetHighlightColor" API, which can highlight the object in lists by giving its whole row an orange or red color.
Hope this helps,
Guillaume
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello Guillaume,
My goal is, on the sheet of a server, to have a visual effect (color or icon) indicating if the server is Production to differentiate them from non-production quickly.
I will look at GetHighlightColor()
Thanks,
Xavier
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Which version of iTop are you using? If you have iTop 3.0, then you style the "status" attribute, the same way it is done for the status on UserRequest for example.
There are different ways for you to choose from:
- Style the status attribute (displayed both in lists and object sheet)
- Style the icon (displayed only in object sheet)
- Style the highlight color (displayed only in list)
Guillaume
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For status, it's allways done & working. Following your advice, I will therefore look at the icon part. Because it is on the object sheet, and not necessarily linked to the status but another field, its environment.
Version is 3.0.2-1-9957 (and Datacenter view extended 1.7 :))
❤️
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I was about to point you to the application/applicationextension.inc.php file, especially the AbstractApplicationUIExtension::GetIcon() and AbstractApplicationUIExtension::GetHilightClass() methods; but it seems that this doesn't work with iTop 3.0 anymore... 😥
The only way you can override the icon will be by overriding the Server::GetIcon() method in XML directly. Do you how to make an extension an alter the XML DataModel?
Cheers,
Guillaume
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, at a intermediate level (some basic function).
First, i will check if "fields_semantic" can make the job. But don't find any documentation on this.
I have this error in Toolkit : You may define its allowed_values property as [new ValueSetEnum('')
Apreciate you help.
Xavier
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
je cherche un customiseur la couleur soit de la page, soit du titre d'un serveur en fonction de la valeur d'un champ précis. Auriez-vous une piste ?
Regards,
Xavier
I am looking to customize the color either of the page or of the title of a server according to the value of a specific field. Do you have a lead?
Where exactly? The object details page?
Which iTop version are you using?
Hello Xavier,
There is an API to change the class icon depending on a field value, it is typically what is used to a "fire flam" hint on the user requests icon when the reach a threshold. Would that be ok?
Depending on the color / meaning that you want, you could also play with the "GetHighlightColor" API, which can highlight the object in lists by giving its whole row an orange or red color.
Hope this helps,
Guillaume
Hello Guillaume,
My goal is, on the sheet of a server, to have a visual effect (color or icon) indicating if the server is Production to differentiate them from non-production quickly.
I will look at GetHighlightColor()
Thanks,
Xavier
Which version of iTop are you using? If you have iTop 3.0, then you style the "status" attribute, the same way it is done for the status on UserRequest for example.
There are different ways for you to choose from:
- Style the status attribute (displayed both in lists and object sheet)
- Style the icon (displayed only in object sheet)
- Style the highlight color (displayed only in list)
Guillaume
For status, it's allways done & working. Following your advice, I will therefore look at the icon part. Because it is on the object sheet, and not necessarily linked to the status but another field, its environment.
Version is 3.0.2-1-9957 (and Datacenter view extended 1.7 :))
I was about to point you to the
application/applicationextension.inc.php
file, especially theAbstractApplicationUIExtension::GetIcon()
andAbstractApplicationUIExtension::GetHilightClass()
methods; but it seems that this doesn't work with iTop 3.0 anymore... 😥The only way you can override the icon will be by overriding the
Server::GetIcon()
method in XML directly. Do you how to make an extension an alter the XML DataModel?Cheers,
Guillaume
Yes, at a intermediate level (some basic function).
First, i will check if "fields_semantic" can make the job. But don't find any documentation on this.
I have this error in Toolkit : You may define its allowed_values property as [new ValueSetEnum('')
Apreciate you help.
Xavier
fields_semantic is working (some error on toolkit, You may define its allowed_values property as [new ValueSetEnum(''), but it's working)
Can you share the XML of your module?