diff --git a/share/html/Dashboards/Elements/ShowPortlet/dashboard b/share/html/Dashboards/Elements/ShowPortlet/dashboard
index 14b343bb28a..a15be262bbf 100644
--- a/share/html/Dashboards/Elements/ShowPortlet/dashboard
+++ b/share/html/Dashboards/Elements/ShowPortlet/dashboard
@@ -77,6 +77,13 @@ Abort("Possible recursive dashboard detected.") if $Depth > 8;
<%perl>
local $session{CurrentUser} = $session{ContextUser};
for my $portlet (@panes) {
+
+ my $skip_portlet = 0;
+ $m->callback(CallbackName => 'BeforeComponent', Dashboard => $Dashboard,
+ HasResults => $HasResults, Portlet => $portlet, ARGSRef => \%ARGS,
+ SkipPortlet => \$skip_portlet);
+ next if $skip_portlet;
+
$m->comp($portlet->{portlet_type},
Portlet => $portlet,
Rows => $Rows,
@@ -86,6 +93,10 @@ for my $portlet (@panes) {
Depth => $Depth + 1,
HasResults => $HasResults
);
+
+ $m->callback(CallbackName => 'AfterComponent', Dashboard => $Dashboard,
+ HasResults => $HasResults, Portlet => $portlet, ARGSRef => \%ARGS);
+
}
%perl>