Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: felixmosh/bull-board
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v5.9.2
Choose a base ref
...
head repository: felixmosh/bull-board
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v5.10.0
Choose a head ref
  • 5 commits
  • 38 files changed
  • 2 contributors

Commits on Nov 24, 2023

  1. chore(deps-dev): bump axios from 0.26.1 to 1.6.0 (#644)

    Bumps [axios](https://github.com/axios/axios) from 0.26.1 to 1.6.0.
    - [Release notes](https://github.com/axios/axios/releases)
    - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
    - [Commits](axios/axios@v0.26.1...v1.6.0)
    
    ---
    updated-dependencies:
    - dependency-name: axios
      dependency-type: direct:development
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Nov 24, 2023
    Copy the full SHA
    3d9ee8f View commit details

Commits on Nov 29, 2023

  1. Copy the full SHA
    615daa4 View commit details
  2. fix: reduce bundle size

    felixmosh committed Nov 29, 2023
    Copy the full SHA
    396bf70 View commit details
  3. feat: add bundle-analyzer

    felixmosh committed Nov 29, 2023
    Copy the full SHA
    de5350d View commit details
  4. Release 5.10.0

    felixmosh committed Nov 29, 2023
    Copy the full SHA
    ea75f2e View commit details
Showing with 608 additions and 220 deletions.
  1. +10 −0 CHANGELOG.md
  2. +1 −1 package.json
  3. +2 −2 packages/api/package.json
  4. +1 −0 packages/api/typings/app.ts
  5. +3 −3 packages/express/package.json
  6. +3 −3 packages/fastify/package.json
  7. +3 −3 packages/hapi/package.json
  8. +3 −3 packages/koa/package.json
  9. +6 −6 packages/nestjs/package.json
  10. +9 −3 packages/ui/package.json
  11. +2 −3 packages/ui/src/components/Button/Button.module.css
  12. +4 −2 packages/ui/src/components/ConfirmModal/ConfirmModal.tsx
  13. +1 −1 packages/ui/src/components/Header/Header.tsx
  14. +3 −1 packages/ui/src/components/JobCard/Details/Details.tsx
  15. +6 −4 packages/ui/src/components/JobCard/Details/DetailsContent/DetailsContent.tsx
  16. +3 −1 packages/ui/src/components/JobCard/Details/DetailsContent/JobLogs/JobLogs.tsx
  17. +3 −1 packages/ui/src/components/JobCard/JobActions/JobActions.tsx
  18. +45 −39 packages/ui/src/components/JobCard/JobCard.tsx
  19. +48 −21 packages/ui/src/components/JobCard/Timeline/Timeline.tsx
  20. +5 −1 packages/ui/src/components/Loader/Loader.tsx
  21. +6 −3 packages/ui/src/components/Menu/Menu.tsx
  22. +3 −1 packages/ui/src/components/Modal/Modal.tsx
  23. +5 −3 packages/ui/src/components/QueueActions/QueueActions.tsx
  24. +3 −1 packages/ui/src/components/QueueCard/QueueStats/QueueStats.tsx
  25. +38 −34 packages/ui/src/components/QueueDropdownActions/QueueDropdownActions.tsx
  26. +13 −11 packages/ui/src/components/RedisStatsModal/RedisStatsModal.tsx
  27. +20 −18 packages/ui/src/components/SettingsModal/SettingsModal.tsx
  28. +13 −9 packages/ui/src/components/StatusLegend/StatusLegend.tsx
  29. +3 −1 packages/ui/src/components/StatusMenu/StatusMenu.tsx
  30. +3 −1 packages/ui/src/hooks/useConfirm.ts
  31. +8 −7 packages/ui/src/hooks/useQueues.ts
  32. +17 −11 packages/ui/src/index.tsx
  33. +5 −3 packages/ui/src/pages/JobPage/JobPage.tsx
  34. +3 −1 packages/ui/src/pages/QueuePage/QueuePage.tsx
  35. +34 −0 packages/ui/src/services/i18n.ts
  36. +115 −0 packages/ui/src/static/locales/en/messages.json
  37. +9 −6 packages/ui/webpack.config.js
  38. +149 −12 yarn.lock
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -4,10 +4,20 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v5.10.0](https://github.com/felixmosh/bull-board/compare/v5.9.2...v5.10.0)

- chore(deps-dev): bump axios from 0.26.1 to 1.6.0 [`#644`](https://github.com/felixmosh/bull-board/pull/644)
- feat: add translation ability, #653 [`615daa4`](https://github.com/felixmosh/bull-board/commit/615daa4f156f1c14cf048c2f43db6f648e864e49)
- feat: add bundle-analyzer [`de5350d`](https://github.com/felixmosh/bull-board/commit/de5350d85bc18002dd92c9cb5a0d3a014b8e40a9)
- fix: reduce bundle size [`396bf70`](https://github.com/felixmosh/bull-board/commit/396bf702a398d8e06d8b677ebcb5393f2ffbe11c)

#### [v5.9.2](https://github.com/felixmosh/bull-board/compare/v5.9.1...v5.9.2)

> 24 November 2023
- Update QueueAdapterOptions typing [`#652`](https://github.com/felixmosh/bull-board/pull/652)
- upgrade-express-ex: upgrade express example [`#648`](https://github.com/felixmosh/bull-board/pull/648)
- Release 5.9.2 [`03afb90`](https://github.com/felixmosh/bull-board/commit/03afb903c1636621286ef4a22e370e4bcabd947d)

#### [v5.9.1](https://github.com/felixmosh/bull-board/compare/v5.9.0...v5.9.1)

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bull-board/root",
"version": "5.9.2",
"version": "5.10.0",
"private": true,
"description": "Bull queue UI for inspecting jobs",
"keywords": [
4 changes: 2 additions & 2 deletions packages/api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bull-board/api",
"version": "5.9.2",
"version": "5.10.0",
"description": "A Dashboard server API built on top of bull or bullmq.",
"keywords": [
"bull",
@@ -39,7 +39,7 @@
"supertest": "^6.3.3"
},
"peerDependencies": {
"@bull-board/ui": "5.9.2"
"@bull-board/ui": "5.10.0"
},
"publishConfig": {
"access": "public"
1 change: 1 addition & 0 deletions packages/api/typings/app.ts
Original file line number Diff line number Diff line change
@@ -199,6 +199,7 @@ export type UIConfig = Partial<{
boardLogo: { path: string; width?: number | string; height?: number | string };
miscLinks: Array<IMiscLink>;
favIcon: FavIcon;
locale: { lng?: string };
}>;

export type FavIcon = {
6 changes: 3 additions & 3 deletions packages/express/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bull-board/express",
"version": "5.9.2",
"version": "5.10.0",
"description": "A Express.js server adapter for Bull-Board dashboard.",
"keywords": [
"bull",
@@ -28,8 +28,8 @@
"clean": "rm -rf dist"
},
"dependencies": {
"@bull-board/api": "5.9.2",
"@bull-board/ui": "5.9.2",
"@bull-board/api": "5.10.0",
"@bull-board/ui": "5.10.0",
"ejs": "3.1.7",
"express": "4.17.3"
},
6 changes: 3 additions & 3 deletions packages/fastify/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bull-board/fastify",
"version": "5.9.2",
"version": "5.10.0",
"description": "A Fastify.js server adapter for Bull-Board dashboard.",
"keywords": [
"bull",
@@ -28,8 +28,8 @@
"clean": "rm -rf dist"
},
"dependencies": {
"@bull-board/api": "5.9.2",
"@bull-board/ui": "5.9.2",
"@bull-board/api": "5.10.0",
"@bull-board/ui": "5.10.0",
"@fastify/static": "^6.11.2",
"@fastify/view": "^8.1.0",
"ejs": "^3.1.9"
6 changes: 3 additions & 3 deletions packages/hapi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bull-board/hapi",
"version": "5.9.2",
"version": "5.10.0",
"description": "A Hapi.js server adapter for Bull-Board dashboard.",
"keywords": [
"bull",
@@ -29,8 +29,8 @@
"clean": "rm -rf dist"
},
"dependencies": {
"@bull-board/api": "5.9.2",
"@bull-board/ui": "5.9.2",
"@bull-board/api": "5.10.0",
"@bull-board/ui": "5.10.0",
"@hapi/inert": "^6.0.5",
"@hapi/vision": "^6.1.0",
"ejs": "^3.1.7"
6 changes: 3 additions & 3 deletions packages/koa/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bull-board/koa",
"version": "5.9.2",
"version": "5.10.0",
"description": "A Koa.js server adapter for Bull-Board dashboard.",
"keywords": [
"bull",
@@ -28,8 +28,8 @@
"clean": "rm -rf dist"
},
"dependencies": {
"@bull-board/api": "5.9.2",
"@bull-board/ui": "5.9.2",
"@bull-board/api": "5.10.0",
"@bull-board/ui": "5.10.0",
"ejs": "^3.1.7",
"koa": "^2.13.1",
"koa-mount": "^4.0.0",
12 changes: 6 additions & 6 deletions packages/nestjs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bull-board/nestjs",
"version": "5.9.2",
"version": "5.10.0",
"description": "A NestJS module for Bull-Board dashboard.",
"keywords": [
"bull",
@@ -19,9 +19,9 @@
"clean": "rm -rf dist"
},
"devDependencies": {
"@bull-board/api": "^5.9.2",
"@bull-board/express": "^5.9.2",
"@bull-board/fastify": "^5.9.2",
"@bull-board/api": "^5.10.0",
"@bull-board/express": "^5.10.0",
"@bull-board/fastify": "^5.10.0",
"@nestjs/bullmq": "^10.0.0",
"@nestjs/common": "^10.0.1",
"@nestjs/core": "^10.0.1",
@@ -36,8 +36,8 @@
"@nestjs/bull-shared": "^10.0.0"
},
"peerDependencies": {
"@bull-board/api": "^5.9.2",
"@bull-board/express": "^5.9.2",
"@bull-board/api": "^5.10.0",
"@bull-board/express": "^5.10.0",
"@nestjs/common": "^9.0.0 || ^10.0.0",
"@nestjs/core": "^9.0.0 || ^10.0.0",
"reflect-metadata": "^0.1.13",
12 changes: 9 additions & 3 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bull-board/ui",
"version": "5.9.2",
"version": "5.10.0",
"description": "A Dashboard UI built on top of bull or bullmq.",
"keywords": [
"bull",
@@ -24,10 +24,11 @@
"scripts": {
"start": "NODE_ENV=development webpack serve",
"build": "NODE_ENV=production webpack --mode=production",
"build:analyze": "NODE_ENV=production ANALYZE=true webpack --mode=production",
"clean": "rm -rf dist"
},
"dependencies": {
"@bull-board/api": "5.9.2"
"@bull-board/api": "5.10.0"
},
"devDependencies": {
"@babel/core": "^7.17.9",
@@ -47,7 +48,7 @@
"@types/react-dom": "^17.0.14",
"@types/react-paginate": "^7.1.1",
"@types/react-router-dom": "^5.3.3",
"axios": "^0.26.1",
"axios": "^1.6.0",
"babel-loader": "^9.1.3",
"clean-webpack-plugin": "^4.0.0",
"clsx": "^1.1.1",
@@ -58,6 +59,9 @@
"fork-ts-checker-webpack-plugin": "^7.2.7",
"highlight.js": "^11.5.1",
"html-webpack-plugin": "^5.5.0",
"i18next": "^23.7.7",
"i18next-hmr": "^3.0.3",
"i18next-http-backend": "^2.4.2",
"mini-css-extract-plugin": "^2.6.0",
"nanoid": "^4.0.1",
"postcss": "^8.4.12",
@@ -66,6 +70,7 @@
"pretty-bytes": "^6.0.0",
"react": "^17.0.0",
"react-dom": "^17.0.0",
"react-i18next": "^13.5.0",
"react-paginate": "^8.1.3",
"react-refresh": "^0.12.0",
"react-router-dom": "^5.3.1",
@@ -74,6 +79,7 @@
"webpack": "^5.72.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1",
"webpack-bundle-analyzer": "^4.10.1",
"zustand": "^4.1.1"
},
"publishConfig": {
5 changes: 2 additions & 3 deletions packages/ui/src/components/Button/Button.module.css
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
cursor: pointer;
outline: none;
white-space: nowrap;
padding: .65em .92857143em;
padding: 0.65em 0.92857143em;
color: inherit;
font-family: inherit;
vertical-align: baseline;
@@ -18,7 +18,7 @@
}

.button + .button {
margin-inline-start: 0.25em;
margin-inline-start: 0.5rem;
}

.button.default > svg {
@@ -81,4 +81,3 @@
.button.primary:focus {
background-color: hsl(216, 15%, 37%);
}

6 changes: 4 additions & 2 deletions packages/ui/src/components/ConfirmModal/ConfirmModal.tsx
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ import {
} from '@radix-ui/react-alert-dialog';
import cn from 'clsx';
import React from 'react';
import { useTranslation } from 'react-i18next';
import s from './ConfirmModal.module.css';
import modalStyles from '../Modal/Modal.module.css';
import { Button } from '../Button/Button';
@@ -23,6 +24,7 @@ export interface ConfirmProps {
}

export const ConfirmModal = ({ open, onConfirm, title, onCancel, description }: ConfirmProps) => {
const { t } = useTranslation();
const closeOnOpenChange = (open: boolean) => {
if (!open) {
onCancel();
@@ -44,12 +46,12 @@ export const ConfirmModal = ({ open, onConfirm, title, onCancel, description }:
<div className={modalStyles.actions}>
<Action asChild>
<Button theme="primary" onClick={onConfirm}>
Confirm
{t('CONFIRM.CONFIRM_BTN')}
</Button>
</Action>
<Cancel asChild>
<Button theme="basic" onClick={onCancel}>
Cancel
{t('CONFIRM.CANCEL_BTN')}
</Button>
</Cancel>
</div>
2 changes: 1 addition & 1 deletion packages/ui/src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ export const Header = ({ children }: PropsWithChildren<any>) => {

return (
<header className={s.header}>
<NavLink to={'/'} className={s.logo}>
<NavLink to="/" className={s.logo}>
{!!logoPath && (
<img
src={logoPath}
4 changes: 3 additions & 1 deletion packages/ui/src/components/JobCard/Details/Details.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import { useDetailsTabs } from '../../../hooks/useDetailsTabs';
import { Button } from '../../Button/Button';
import s from './Details.module.css';
@@ -13,6 +14,7 @@ interface DetailsProps {

export const Details = ({ status, job, actions }: DetailsProps) => {
const { tabs, selectedTab } = useDetailsTabs(status, job.isFailed);
const { t } = useTranslation();

if (tabs.length === 0) {
return null;
@@ -24,7 +26,7 @@ export const Details = ({ status, job, actions }: DetailsProps) => {
{tabs.map((tab) => (
<li key={tab.title}>
<Button onClick={tab.selectTab} isActive={tab.isActive}>
{tab.title}
{t(`JOB.TABS.${tab.title.toUpperCase()}`)}
</Button>
</li>
))}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { AppJob } from '@bull-board/api/typings/app';
import React, { useState } from 'react';
import { useTranslation } from 'react-i18next';
import { TabsType } from '../../../../hooks/useDetailsTabs';
import { useSettingsStore } from '../../../../hooks/useSettings';
import { Highlight } from '../../../Highlight/Highlight';
@@ -16,6 +17,7 @@ interface DetailsContentProps {
}

export const DetailsContent = ({ selectedTab, job, actions }: DetailsContentProps) => {
const { t } = useTranslation();
const { collapseJobData, collapseJobOptions, collapseJobError } = useSettingsStore();
const [collapseState, setCollapse] = useState({ data: false, options: false, error: false });
const { stacktrace, data, returnValue, opts, failedReason } = job;
@@ -24,27 +26,27 @@ export const DetailsContent = ({ selectedTab, job, actions }: DetailsContentProp
case 'Data':
return collapseJobData && !collapseState.data ? (
<Button onClick={() => setCollapse({ ...collapseState, data: true })}>
Show data <ArrowDownIcon />
{t('JOB.SHOW_DATA_BTN')} <ArrowDownIcon />
</Button>
) : (
<Highlight language="json">{JSON.stringify({ data, returnValue }, null, 2)}</Highlight>
);
case 'Options':
return collapseJobOptions && !collapseState.options ? (
<Button onClick={() => setCollapse({ ...collapseState, options: true })}>
Show options <ArrowDownIcon />
{t('JOB.SHOW_OPTIONS_BTN')} <ArrowDownIcon />
</Button>
) : (
<Highlight language="json">{JSON.stringify(opts, null, 2)}</Highlight>
);
case 'Error':
if (stacktrace.length === 0) {
return <div className="error">{!!failedReason ? failedReason : 'NA'}</div>;
return <div className="error">{!!failedReason ? failedReason : t('JOB.NA')}</div>;
}

return collapseJobError && !collapseState.error ? (
<Button onClick={() => setCollapse({ ...collapseState, error: true })}>
Show errors <ArrowDownIcon />
{t('JOB.SHOW_ERRORS_BTN')} <ArrowDownIcon />
</Button>
) : (
<Highlight language="stacktrace" key="stacktrace">
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { AppJob } from '@bull-board/api/typings/app';
import React, { SyntheticEvent, useEffect, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useInterval } from '../../../../../hooks/useInterval';
import { InputField } from '../../../../Form/InputField/InputField';
import { FullscreenIcon } from '../../../../Icons/Fullscreen';
@@ -39,6 +40,7 @@ function formatLogs(logs: string[]) {
}

export const JobLogs = ({ actions, job }: JobLogsProps) => {
const { t } = useTranslation();
const [logs, setLogs] = useState<LogType[]>([]);
const [liveLogs, setLiveLogs] = useState(false);
const [keyword, setKeyword] = useState('');
@@ -96,7 +98,7 @@ export const JobLogs = ({ actions, job }: JobLogsProps) => {
className={s.searchBar}
name="searchQuery"
type="search"
placeholder="Filters"
placeholder={t('JOB.LOGS.FILTER_PLACEHOLDER')}
onChange={onSearch}
/>
</form>
4 changes: 3 additions & 1 deletion packages/ui/src/components/JobCard/JobActions/JobActions.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { STATUSES } from '@bull-board/api/src/constants/statuses';
import { Status } from '@bull-board/api/typings/app';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { Button } from '../../Button/Button';
import { PromoteIcon } from '../../Icons/Promote';
import { RetryIcon } from '../../Icons/Retry';
@@ -39,6 +40,7 @@ const statusToButtonsMap: Record<string, ButtonType[]> = {

export const JobActions = ({ actions, status, allowRetries }: JobActionsProps) => {
let buttons = statusToButtonsMap[status];
const { t } = useTranslation();
if (!buttons) {
return null;
}
@@ -51,7 +53,7 @@ export const JobActions = ({ actions, status, allowRetries }: JobActionsProps) =
<ul className={s.jobActions}>
{buttons.map((type) => (
<li key={type.title}>
<Tooltip title={type.title}>
<Tooltip title={t(`JOB.ACTIONS.${type.title.toUpperCase()}`)}>
<Button onClick={actions[type.actionKey]} className={s.button}>
<type.Icon />
</Button>
Loading