How to add a static error page to self_service?

euwe
ui

#1

Hello!

Does anyone know, how to just add my own static page. Without angularjs.
It supposed to be an error page that will be shown if there is any syntax errors in self_service.
How could I make it not to be build into index.html but stay apart?


#2

So… this is problematic … I think this has 2 parts:

  • some syntax errors are severe enough for webpack to fail compiling - in that case, you may need to change the webpack config to generate such a page for you, or change index.html to load it, or use a different file…

  • other errors will only throw on runtime, for that you’d need to listen for the error event in JS and trigger a state change (angular-ui-router states I mean) to transition to the particular screen - and that screen would have to be registered in the router (and presumably live somewhere in manageiq-ui-service/client/app/states/).

You may have a bit more flexibility if you only need this in development mode (you may be able to change the node server to override index.html when needed), but no such luck in production (you’d need to change the apache config).


#3

I see your point. Thank you very much for your response!
Errors occur if user tries to open self_service with Internet Explorer.
And there are some new constructions in code that IE does not supports.


#4

No problem :).

Errors occur if user tries to open self_service with Internet Explorer.
And there are some new constructions in code that IE does not supports

Aaah… but that’s something that could be solvable… maybe babel is simply not configured to generate compatible enough JS.

Do you have the actual errors?

(YMMV, I’m not sure we can achieve 100% feature compatibility on IE (consoles, …) , but… I’m almost sure we can make it log in and mostly work in IE9+)


#5

I think you are right concerning babel.

So, the errors are:

SCRIPT5022: [$injector:nomod] Module ‘app.services’ is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.6.6/$injector/nomod?p0=app.services

SCRIPT5022: [$injector:modulerr] Failed to instantiate module app due to:
Error: [$injector:nomod] Module ‘app’ is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.6.6/$injector/nomod?p0=app


#6

Are those the only errors?

I would expect some syntax errors … can you also check the webpack output for errors please?