debug: add console.log traces to branding extension setupExtension and removeFleetbaseWidgets
@ -1,28 +1,41 @@
|
|||||||
export default {
|
export default {
|
||||||
setupExtension(appInstance, universe) {
|
setupExtension(appInstance, universe) {
|
||||||
|
console.log('[Biibaye] setupExtension START');
|
||||||
setDocumentTitle();
|
setDocumentTitle();
|
||||||
|
console.log('[Biibaye] setDocumentTitle done');
|
||||||
injectBrandStyles();
|
injectBrandStyles();
|
||||||
|
console.log('[Biibaye] injectBrandStyles done');
|
||||||
replaceFavicon();
|
replaceFavicon();
|
||||||
|
console.log('[Biibaye] replaceFavicon done');
|
||||||
overrideAppName(appInstance);
|
overrideAppName(appInstance);
|
||||||
|
console.log('[Biibaye] overrideAppName done');
|
||||||
removeFleetbaseWidgets(appInstance);
|
removeFleetbaseWidgets(appInstance);
|
||||||
|
console.log('[Biibaye] removeFleetbaseWidgets done');
|
||||||
|
|
||||||
universe.extensionManager.ensureEngineLoaded('@biibaye/branding');
|
universe.extensionManager.ensureEngineLoaded('@biibaye/branding');
|
||||||
|
console.log('[Biibaye] setupExtension END');
|
||||||
},
|
},
|
||||||
|
|
||||||
onEngineLoaded(engineInstance, universe, appInstance) {
|
onEngineLoaded(engineInstance, universe, appInstance) {
|
||||||
|
console.log('[Biibaye] onEngineLoaded called');
|
||||||
setDocumentTitle();
|
setDocumentTitle();
|
||||||
overrideAppName(appInstance);
|
overrideAppName(appInstance);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
function overrideAppName(appInstance) {
|
function overrideAppName(appInstance) {
|
||||||
|
console.log('[Biibaye] overrideAppName enter');
|
||||||
try {
|
try {
|
||||||
const intl = appInstance.lookup('service:intl');
|
const intl = appInstance.lookup('service:intl');
|
||||||
|
console.log('[Biibaye] intl service:', intl ? 'found' : 'NULL');
|
||||||
if (intl && typeof intl.addTranslations === 'function') {
|
if (intl && typeof intl.addTranslations === 'function') {
|
||||||
intl.addTranslations('en-us', { 'app.name': 'Biibaye' });
|
intl.addTranslations('en-us', { 'app.name': 'Biibaye' });
|
||||||
|
console.log('[Biibaye] overrideAppName translation set');
|
||||||
|
} else {
|
||||||
|
console.warn('[Biibaye] overrideAppName: intl service or addTranslations not available');
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// intl service not available yet — will retry in onEngineLoaded
|
console.error('[Biibaye] overrideAppName ERROR:', e.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -32,9 +45,11 @@ function setDocumentTitle() {
|
|||||||
|
|
||||||
function injectBrandStyles() {
|
function injectBrandStyles() {
|
||||||
if (document.getElementById('biibaye-brand-styles')) {
|
if (document.getElementById('biibaye-brand-styles')) {
|
||||||
|
console.log('[Biibaye] injectBrandStyles SKIPPED (already exists)');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log('[Biibaye] injectBrandStyles injecting CSS...');
|
||||||
const style = document.createElement('style');
|
const style = document.createElement('style');
|
||||||
style.id = 'biibaye-brand-styles';
|
style.id = 'biibaye-brand-styles';
|
||||||
style.textContent = `
|
style.textContent = `
|
||||||
@ -136,22 +151,42 @@ function updateMetaTags() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function removeFleetbaseWidgets(appInstance) {
|
function removeFleetbaseWidgets(appInstance) {
|
||||||
|
console.log('[Biibaye] removeFleetbaseWidgets ENTER');
|
||||||
try {
|
try {
|
||||||
const widgetService = appInstance.lookup('service:universe/widget-service');
|
const widgetService = appInstance.lookup('service:universe/widget-service');
|
||||||
if (!widgetService || !widgetService.registry) return;
|
console.log('[Biibaye] widgetService lookup:', widgetService ? 'found' : 'NULL');
|
||||||
|
|
||||||
|
if (!widgetService) {
|
||||||
|
console.error('[Biibaye] FAIL: widgetService is null');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('[Biibaye] widgetService.registry:', widgetService.registry ? 'found' : 'NULL');
|
||||||
|
|
||||||
|
if (!widgetService.registry) {
|
||||||
|
console.error('[Biibaye] FAIL: widgetService.registry is null');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const fleetbaseWidgetKeys = ['dashboard#fleetbase-blog', 'dashboard#fleetbase-github-card'];
|
const fleetbaseWidgetKeys = ['dashboard#fleetbase-blog', 'dashboard#fleetbase-github-card'];
|
||||||
|
|
||||||
['widget', 'default-widget'].forEach((listName) => {
|
['widget', 'default-widget'].forEach((listName) => {
|
||||||
const items = widgetService.registry.getRegistry('dashboard:widgets', listName);
|
const items = widgetService.registry.getRegistry('dashboard:widgets', listName);
|
||||||
|
console.log(`[Biibaye] ${listName} list items before:`, items.length);
|
||||||
|
|
||||||
const toRemove = items.filter(
|
const toRemove = items.filter(
|
||||||
(item) => item._registryKey && fleetbaseWidgetKeys.includes(item._registryKey)
|
(item) => item._registryKey && fleetbaseWidgetKeys.includes(item._registryKey)
|
||||||
);
|
);
|
||||||
|
console.log(`[Biibaye] ${listName} toRemove count:`, toRemove.length, 'keys:', toRemove.map(i => i._registryKey));
|
||||||
|
|
||||||
if (toRemove.length) {
|
if (toRemove.length) {
|
||||||
items.removeObjects(toRemove);
|
items.removeObjects(toRemove);
|
||||||
|
const itemsAfter = widgetService.registry.getRegistry('dashboard:widgets', listName);
|
||||||
|
console.log(`[Biibaye] ${listName} list items after:`, itemsAfter.length);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
console.log('[Biibaye] removeFleetbaseWidgets SUCCESS');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// widget service or registry not available yet
|
console.error('[Biibaye] removeFleetbaseWidgets ERROR:', e.message, e.stack);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
25
fleetbase-source/docker-compose-override.yml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# Docker Compose Override Example
|
||||||
|
# Copy this file to docker-compose.override.yml and customize for your environment
|
||||||
|
|
||||||
|
version: "3.8"
|
||||||
|
services:
|
||||||
|
application:
|
||||||
|
environment:
|
||||||
|
CONSOLE_HOST: http://localhost:4200
|
||||||
|
# Add your environment-specific variables here
|
||||||
|
MAIL_MAILER: smtp # or ses, mailgun, postmark, sendgrid
|
||||||
|
OSRM_HOST: https://router.project-osrm.org
|
||||||
|
# IPINFO_API_KEY: your_api_key
|
||||||
|
# GOOGLE_MAPS_API_KEY: your_api_key
|
||||||
|
# GOOGLE_MAPS_LOCALE: us
|
||||||
|
# TWILIO_SID: your_twilio_sid
|
||||||
|
# TWILIO_TOKEN: your_twilio_token
|
||||||
|
# TWILIO_FROM: your_twilio_phone
|
||||||
|
|
||||||
|
socket:
|
||||||
|
environment:
|
||||||
|
# DEVELOPMENT: Allow localhost connections (HTTP, HTTPS, and WebSocket protocols)
|
||||||
|
SOCKETCLUSTER_OPTIONS: '{"origins":"http://localhost:*,https://localhost:*,ws://localhost:*,wss://localhost:*"}'
|
||||||
|
|
||||||
|
# PRODUCTION: Replace with your actual domain(s) - include all protocols
|
||||||
|
# SOCKETCLUSTER_OPTIONS: '{"origins":"https://yourdomain.com:*,wss://yourdomain.com:*,https://app.yourdomain.com:*,wss://app.yourdomain.com:*"}'
|
||||||
BIN
public/favicon/old favicon/android-chrome-192x192.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
public/favicon/old favicon/android-chrome-256x256.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
public/favicon/old favicon/apple-touch-icon-114x114.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
public/favicon/old favicon/apple-touch-icon-120x120.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
public/favicon/old favicon/apple-touch-icon-144x144.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
public/favicon/old favicon/apple-touch-icon-152x152.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
public/favicon/old favicon/apple-touch-icon-180x180.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
public/favicon/old favicon/apple-touch-icon-57x57.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
public/favicon/old favicon/apple-touch-icon-60x60.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
public/favicon/old favicon/apple-touch-icon-72x72.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
public/favicon/old favicon/apple-touch-icon-76x76.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
public/favicon/old favicon/apple-touch-icon.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
public/favicon/old favicon/mstile-150x150.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |