agenda/agendash

Agendash not loading properly

Closed this issue · 1 comments

Hi,

I am using Agendash version 2.1.1. But it's not loading the page properly. I am trying to embedding it through iframe.

<iframe srcDoc={dashHtml} </iframe>

dashHtml is the html response coming from agendash's "/dash" API.

I am following the agendash document to make "/dash", following

  "/dash",
  (req, res, next) => {
    if (req.user && req.user.is_admin) {
      return next();
    } else {
      return res.sendStatus(403);
    }
  },
  Agendash(agenda)
);

When I am trying to load page it's showing blank page with following console errors...please see attached file

image

I can see in network tab, the all libraries URLs (like Jquery, bootstrap so on) which are in agendash HTML response going to my Frontend host not on my server host.

Please see screenshot of my network tab with status code of "/dash"

image

And screenshot of the some libraries URLs (like Jquery, bootstrap so on) which are in agendash HTML response

image

Also please note when I am using "/dash" without middleware permission/authorization then it's working fine.

What I am doing wrong here ? How I can fix this problem.

FYI: When I am using agendash 1.0.0, facing same issues.

Thanks

The bug is in your code! Please find it and report back to this issue. Other people would also want to know how you managed to fix it.