major: frontend federation

This commit is contained in:
Jean-Baptiste Pasquier
2021-06-15 21:55:06 +02:00
parent a2123f07df
commit a5730680d0
39 changed files with 1621 additions and 764 deletions

View File

@ -1,23 +0,0 @@
window.orbit.getRoute = (type, returnFirst = false) => {
let availables = window.orbit.components.filter(c => c.type == type || c.uniq == type);
window.orbit.components.forEach(c => {
if (c.extensions) {
c.extensions.forEach(e => {
if (e.type == type || e.uniq == type) {
availables.push(e);
}
});
}
});
if (availables.length > 1) {
if (returnFirst) {
return availables[0].route;
} else {
return availables[availables.length - 1].route;
}
} else if (availables.length < 1) {
console.error(`No component found for route ${type}`);
} else {
return availables[0].route;
}
}

View File

@ -1,8 +0,0 @@
if (typeof Sentry !== 'undefined') {
Sentry.init({
dsn: 'https://b4b29557689049a39168599577adb940@sentry.startinblox.com/4',
integrations: [new Sentry.Integrations.BrowserTracing()],
environment: document.location.hostname,
tracesSampleRate: 0.2,
});
}