-
-
Notifications
You must be signed in to change notification settings - Fork 370
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add queue description option and show the queue name on the board.
- Loading branch information
Showing
11 changed files
with
135 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,52 @@ | ||
.header { | ||
z-index: 99; | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
background: white; | ||
transition: box-shadow 0.5s ease-in-out; | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
height: var(--header-height); | ||
box-sizing: border-box; | ||
border-bottom: 1px solid #e6e7e8; | ||
z-index: 99; | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
background: white; | ||
transition: box-shadow 0.5s ease-in-out; | ||
display: flex; | ||
height: var(--header-height); | ||
box-sizing: border-box; | ||
border-bottom: 1px solid #e6e7e8; | ||
} | ||
|
||
.header > .logo { | ||
width: var(--menu-width); | ||
flex-basis: var(--menu-width); | ||
flex-shrink: 0; | ||
white-space: nowrap; | ||
text-align: center; | ||
font-size: 1.728rem; | ||
height: inherit; | ||
line-height: var(--header-height); | ||
background-color: hsl(217, 22%, 24%); | ||
color: #f5f8fa; | ||
border-bottom: 1px solid rgba(0, 0, 0, 0.4); | ||
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1); | ||
z-index: 2; | ||
box-sizing: content-box; | ||
width: var(--menu-width); | ||
flex-basis: var(--menu-width); | ||
flex-shrink: 0; | ||
white-space: nowrap; | ||
text-align: center; | ||
font-size: 1.728rem; | ||
height: inherit; | ||
line-height: var(--header-height); | ||
background-color: hsl(217, 22%, 24%); | ||
color: #f5f8fa; | ||
border-bottom: 1px solid rgba(0, 0, 0, 0.4); | ||
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1); | ||
z-index: 2; | ||
} | ||
|
||
.header > .logo > img { | ||
width: 1.2em; | ||
margin-right: 0.3em; | ||
margin-bottom: -0.2em; | ||
width: 1.2em; | ||
margin-right: 0.3em; | ||
margin-bottom: -0.2em; | ||
} | ||
|
||
.header .content { | ||
flex: 1; | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
padding: 0 2rem; | ||
overflow: hidden; | ||
} | ||
|
||
.content.positionRight { | ||
justify-content: flex-end; | ||
} | ||
|
||
.header + main { | ||
padding-top: var(--header-height); | ||
padding-top: var(--header-height); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
packages/ui/src/components/QueueTitle/QueueTitle.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
.queueTitle { | ||
color: #718096; | ||
overflow: hidden; | ||
} | ||
|
||
.name { | ||
font-size: 1.2rem; | ||
font-weight: 400; | ||
} | ||
|
||
.description { | ||
margin: 0; | ||
opacity: 0.85; | ||
font-size: 0.85rem; | ||
font-weight: 200; | ||
white-space: nowrap; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { AppQueue } from '@bull-board/api/typings/app'; | ||
import React from 'react'; | ||
import s from './QueueTitle.module.css'; | ||
|
||
interface QueueTitleProps { | ||
queue: AppQueue; | ||
} | ||
export const QueueTitle = ({ queue }: QueueTitleProps) => ( | ||
<div className={s.queueTitle}> | ||
<h1 className={s.name}>{queue.name}</h1> | ||
{!!queue.description && <p className={s.description}>{queue.description}</p>} | ||
</div> | ||
); |
29 changes: 15 additions & 14 deletions
29
packages/ui/src/components/RedisStats/RedisStats.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,26 @@ | ||
.stats { | ||
padding: 0 1rem 0.5rem; | ||
display: flex; | ||
color: #718096; | ||
font-weight: 200; | ||
align-items: center; | ||
padding-bottom: 0.5rem; | ||
display: flex; | ||
color: #718096; | ||
font-weight: 200; | ||
align-items: center; | ||
flex-shrink: 0; | ||
} | ||
|
||
.stats > div { | ||
text-align: center; | ||
margin: 0 0.5rem; | ||
position: relative; | ||
text-align: center; | ||
margin: 0 0.5rem; | ||
position: relative; | ||
} | ||
|
||
.stats span { | ||
display: block; | ||
font-size: 1.44rem; | ||
margin-top: 0.125em; | ||
display: block; | ||
font-size: 1.44rem; | ||
margin-top: 0.125em; | ||
} | ||
|
||
.stats small { | ||
position: absolute; | ||
white-space: nowrap; | ||
left: 0; | ||
position: absolute; | ||
white-space: nowrap; | ||
left: 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,24 @@ | ||
import { AppQueue } from '@bull-board/api/dist/typings/app'; | ||
import { matchPath } from 'react-router'; | ||
import { useLocation } from 'react-router-dom'; | ||
import { Store } from './useStore'; | ||
|
||
export function useActiveQueue(): string | undefined { | ||
export function useActiveQueue(data: Store['state']['data']): AppQueue | null { | ||
const { pathname } = useLocation(); | ||
|
||
if (!data) { | ||
return null; | ||
} | ||
|
||
const match = matchPath<{ name: string }>(pathname, { | ||
path: '/queue/:name', | ||
exact: true, | ||
strict: true, | ||
}); | ||
|
||
return decodeURIComponent(match?.params.name || '') || undefined; | ||
const activeQueueName = decodeURIComponent(match?.params.name || ''); | ||
|
||
const activeQueue = data?.queues?.find((q) => q.name === activeQueueName); | ||
|
||
return activeQueue || null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters