Comments (3)
Solution:
We need to make mdi.svg available on any mode of deployment. And we should not send the request to server to get this kind of resource like we did for templates.
And because we have 2 places to set default icon for material at core and inbox
So solution is serving the mdi.svg in frontend and having 1 global config block to set default icon
Steps:
- Serve
mdi.svg
inesn-frontend-common-libs
- Have 1 config block to set default icon in esn.material module
- Require esn.material module in SPAs
- Remove the config in inbox & esn.user-profile modules
from esn-frontend-common-libs.
Information: This error appears only on dev platform with production deployment
from esn-frontend-common-libs.
The reason, in the frontend, we setup default icon for angular material:
$mdIconProvider.defaultIconSet('images/mdi/mdi.svg', 24);
And this performs a request to ESN backend to get the mdi.svg
resource.
Why does it work on devServer?
Because with Webpack devServer proxy, we forward the request from localhost:9900
to server base URL, then the request is:
https://dev.open-paas.org/images/mdi/mdi.svg
And it works like before in the old code base
Why production deployment on DEV server doesn't work?
Because the base URL of SPA has additional route: https://dev.open-paas.org/contacts/ Then the mdi request becomes:
https://dev.open-paas.org/contacts/images/mdi/mdi.svg
And the request is 404
from esn-frontend-common-libs.
Related Issues (20)
- Update webpack common to be able to proxify each spa locally
- Update old dependences links of openpaas-suite HOT 1
- Update OIDC signinRedirect configuration to remove state params in the url HOT 2
- Fix unit tests
- test
- Use relative path from image
- Integrate OpenPaaS with UPN preprod
- Integrate OpenPaaS with UPN preprod
- Allow base path to be configurable
- $.notify is not a function(calendar SPA)
- resolve path of account avatar
- Be able to configure base href in SPA container
- Forbidden and malformed access_token on UPN preprod
- save locations path in storage to keep participation state
- Application grid cannot load when openpaas.js empty or not provided
- add side menu button to the header
- use JWT instead of ESNTOKEN when authenticating websocket
- remove ESNToken usage from frontend apps
- Fix project build issue due to dependency change
- Upgrade dependencies to Fix project build issue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esn-frontend-common-libs.