I wanted to create another field in the itop portal menu, in my case called 'RMA' and I want it to display NetworkDevice objects, unlike the Ongoing Tickets field for example that's showing Ticket objects, is something like that even possible?
I changed the itop-portal.xml file and managed to add a new brick called RMA, now it is visible on the itop portal GUI for end users. (that's attachment1). But at the moment it is showing no data. "No item" message is displayed.
I added this piece of code to the itop-portal.xml file:
<brickid="rma"xsi:type="Combodo\iTop\Portal\Brick\ManageBrick"><active>true</active><rank><default>25</default></rank><width>6</width><title><default>RMA</default></title><description>RMA</description><decoration_class><default>fc fc-ongoing-request fc-2x</default></decoration_class><oql><![CDATA[SELECT NetworkDevice WHERE name LIKE '%RMA%']]></oql><fields><fieldid="name"/><fieldid="description"/><fieldid="org_id_friendlyname"/><fieldid="brand_name"/></fields><!-- Optional tag to add attributes to the table by their code --><data_loading>full</data_loading></brick>
If I try to run and evaluate that query (SELECT NetworkDevice WHERE name LIKE '%RMA%') , it's working and I get 2 network devices back in a list view. (that's attachment2)
To sum it up, can I get the same (the view from the attachment2 - NetworkDevice) on the end user's portal?
Yes, it's possible, and you seem to be on the right way. What you might be forgetting, is the scope (org_id) of the network device. Are you logged in with a user who belongs to the same organization as the network evices?
Also mind you need to define the rights in the XML so people can see this network device class. (it's also a "classes" node for the portal).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you so much for your reply.
Yes, I'm logged in with a user who is already part of the same organization as those network devices, so it should work without explicitly saying the org_id. Just like the ongoing or closed tickets tab, there is no org_id filtering in the oql, but I'm able to see Tickets for the organization and for that logged user.
I'll take a look and search for "classes" node. It should be defined in this itop-portal.xml?
Thanks again!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I wanted to create another field in the itop portal menu, in my case called 'RMA' and I want it to display NetworkDevice objects, unlike the Ongoing Tickets field for example that's showing Ticket objects, is something like that even possible?
I changed the itop-portal.xml file and managed to add a new brick called RMA, now it is visible on the itop portal GUI for end users. (that's attachment1). But at the moment it is showing no data. "No item" message is displayed.
I added this piece of code to the itop-portal.xml file:
If I try to run and evaluate that query (SELECT NetworkDevice WHERE name LIKE '%RMA%') , it's working and I get 2 network devices back in a list view. (that's attachment2)
To sum it up, can I get the same (the view from the attachment2 - NetworkDevice) on the end user's portal?
Thank you!
Best,
Stefan
Last edit: Stefan Djuricic 2022-12-07
Yes, it's possible, and you seem to be on the right way. What you might be forgetting, is the scope (org_id) of the network device. Are you logged in with a user who belongs to the same organization as the network evices?
Also mind you need to define the rights in the XML so people can see this network device class. (it's also a "classes" node for the portal).
Hi Jeffrey,
Thank you so much for your reply.
Yes, I'm logged in with a user who is already part of the same organization as those network devices, so it should work without explicitly saying the org_id. Just like the ongoing or closed tickets tab, there is no org_id filtering in the oql, but I'm able to see Tickets for the organization and for that logged user.
I'll take a look and search for "classes" node. It should be defined in this itop-portal.xml?
Thanks again!
For the new XML parts, make sure to create your own iTop extension so it doesn't get overruled all the time.