felixmosh / bull-board

🎯 Queue background jobs inspector
MIT License
2.14k stars 342 forks source link

serverInfo: show server info at MenuFooter #694

Closed ivnnv closed 4 months ago

ivnnv commented 4 months ago

This PR does 2 things (I can split this in two if you want) as I started thinking I could place the connection information next to the Title, so I refactored to avoid prop-drilling and each component to use exactly the info they need via hooks.

Then realized that would be better placed at the side just above the version so its not getting that much attention, this is mainly to be 100% sure of where your app is connected, as many times you are switching between local/qa/prod so need to be extra careful sometimes on what you are doing.

Screenshot 2024-02-26 at 00 43 41

felixmosh commented 4 months ago

I'm closing this since you can pass uiConfig.boardTitle, and even uiConfig.boardLogo to make this distiguish between boards.

createBullBoard({
    queues: [new BullMQAdapter(exampleBullMq), new BullAdapter(exampleBull)],
    serverAdapter,
    options: {
      uiConfig: { boardTitle: 'MY Server ID' },
    },
  });

image

ivnnv commented 4 months ago

yeah that could work, what do you think about the prop drilling fixing it was also proposed here?

felixmosh commented 4 months ago

Regarding prop drilling, it looks OK, Can you prepare a clean, focused only on this task, PR?

ivnnv commented 4 months ago

focused 😆

sure mate :)