- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2022 07:06 AM
Hello !
I'm using the widget report on my service portal.
I can display report but i want remove/disable the click on the report to avoid to display record. Just like a simple report/graph. I'm searching the solution since a moment but doesn't find a solution...
The report before the click :
The record display after the click :
Can you help me ?
Thx in advance !
Solved! Go to Solution.
- Labels:
-
Performance Analytics

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2022 11:45 PM
Hi
You can fetch the current user's role in the server script and store it in a variable that can be used in the HTML body to conditionally render the main report widget. Add a "class" in each of the div holding the report and then apply CSS based on that class.
In server sidde code, you can try using below code:
data.result = false;
if (gs.hasRole("itil")){
data.result= true;
}
then use it in HTML script like:
<div ng-if=data.result class="itilReports"> //Here you can add a class in the div and then apply the CSS on this class to enable pointer event
<!-- Try adding the report widget main content here -->
</div>
<div ng-if=!data.result class="otherReport"> //Here you can add a class in the div and then apply the CSS on this class to disable pointer event
<!-- Try adding the report widget main content here -->
</div>
Please mark my answer as helpful or correct if it helped you in any way.
Thanks & Regards,
Aishwarya

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2022 07:16 AM
Hi
In your report widget, try using below code in CSS section -
.report_content {
pointer-events: none;
}
Please mark my answer as helpful or correct if it helped you in any way.
Thanks & Regards,
Aishwarya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2022 07:33 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2022 11:45 PM
Hi
You can fetch the current user's role in the server script and store it in a variable that can be used in the HTML body to conditionally render the main report widget. Add a "class" in each of the div holding the report and then apply CSS based on that class.
In server sidde code, you can try using below code:
data.result = false;
if (gs.hasRole("itil")){
data.result= true;
}
then use it in HTML script like:
<div ng-if=data.result class="itilReports"> //Here you can add a class in the div and then apply the CSS on this class to enable pointer event
<!-- Try adding the report widget main content here -->
</div>
<div ng-if=!data.result class="otherReport"> //Here you can add a class in the div and then apply the CSS on this class to disable pointer event
<!-- Try adding the report widget main content here -->
</div>
Please mark my answer as helpful or correct if it helped you in any way.
Thanks & Regards,
Aishwarya

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2022 03:54 AM
Hi
Did it resolve your issue?
Please mark my answers as helpful or correct if they helped you in any way.
Thanks & Regards,
Aishwarya