I try to create a new page inside dashboard designer jaggery application in Data Analytic Server (DAS) of wso2. For this purpose I add in /themes/template a new template, in this case delete-gadget.jag, I add a new controller in /controllers with the same name delete-gadget.jag. In /themes/template I update the index.jag and add a new link for the delete-gaget.jag. When clicked this link the application say 404.
This is my code:
in /controllers/delete-gadget.jag:
<%
(function() {
if (!user) {
sendLogin();
return;
}
if(userDomain !== (urlDomain || superDomain)) {
response.sendError(401, 'designer access not authorized of this tenant');
return;
}
var configs = require('/configs/designer.json');
if (!utils.allowed(user.roles, configs.designers)) {
response.sendError(401, 'designer access not authorized');
return;
}
include(utils.resolvePath('templates/delete-gadget.jag'));
} ()); %>
Add the new link in /themes/template/index.jag:
<li><a href="<%=tenantedUrlPrefix%>delete-gadget">
<span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-delete fw-stack-1x"></i>
</span> <%= i18n.localize("delete.gadget.lable")%></a>
</li>
When I clik in this link: