Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added configurable board title #355

Merged
merged 5 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ see "Example with docker-compose" section for example with env parameters
* `BULL_PREFIX` - prefix to your bull queue name (bull by default)
* `BULL_VERSION` - version of bull lib to use 'BULLMQ' or 'BULL' ('BULLMQ' by default)
* `PROXY_PATH` - proxyPath for bull board, e.g. https://<server_name>/my-base-path/queues [docs] ('' by default)
* `BOARD_TITLE` - title displayed on the bull board (defaults to 'Bull Board')
* `USER_LOGIN` - login to restrict access to bull-board interface (disabled by default)
* `USER_PASSWORD` - password to restrict access to bull-board interface (disabled by default)

Expand Down
1 change: 1 addition & 0 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const config = {
PROXY_PATH: PROXY_PATH,
USER_LOGIN: process.env.USER_LOGIN,
USER_PASSWORD: process.env.USER_PASSWORD,
BOARD_TITLE: process.env.BOARD_TITLE || 'Bull Board',

AUTH_ENABLED: Boolean(process.env.USER_LOGIN && process.env.USER_PASSWORD),
HOME_PAGE: PROXY_PATH || '/',
Expand Down
8 changes: 7 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,15 @@ const redisConfig = {
},
};

const options = {
uiConfig: {
boardTitle: config.BOARD_TITLE,
},
};

const serverAdapter = new ExpressAdapter();
const client = redis.createClient(redisConfig.redis);
const {setQueues} = createBullBoard({queues: [], serverAdapter});
const {setQueues} = createBullBoard({queues: [], serverAdapter, options});
const router = serverAdapter.getRouter();

client.KEYS(`${config.BULL_PREFIX}:*`, (err, keys) => {
Expand Down