Skip to content

Commit 45b798e

Browse files
chore: wip
1 parent 9764184 commit 45b798e

File tree

6 files changed

+31
-19
lines changed

6 files changed

+31
-19
lines changed

packages/devtools/src/components/job-table.stx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
<script>
2-
interface JobTableRow {
3-
id: string
4-
queue: string
5-
name: string
6-
status: string
7-
attempts: number
8-
maxAttempts: number
9-
createdAt: string
10-
duration?: number
11-
}
2+
import type { JobTableRow } from '../types/components'
123

134
const jobs: JobTableRow[] = []
145
</script>

packages/devtools/src/components/queue-status.stx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
<script>
2-
interface QueueStatusData {
3-
name: string
4-
paused: boolean
5-
waiting: number
6-
active: number
7-
completed: number
8-
failed: number
9-
}
2+
import type { QueueStatusData } from '../types/components'
103

114
const queue: QueueStatusData = {
125
name: '',

packages/devtools/src/components/stat-card.stx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script>
2-
type StatVariant = 'active' | 'completed' | 'failed' | ''
2+
import type { StatVariant } from '../types/components'
33

44
const label: string = ''
55
const value: number = 0

packages/devtools/src/types.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,9 @@ export type {
4242
EventTemplate,
4343
MonitoringEvent,
4444
} from './types/monitoring'
45+
46+
export type {
47+
StatVariant,
48+
QueueStatusData,
49+
JobTableRow,
50+
} from './types/components'
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
export type StatVariant = 'active' | 'completed' | 'failed' | ''
2+
3+
export interface QueueStatusData {
4+
name: string
5+
paused: boolean
6+
waiting: number
7+
active: number
8+
completed: number
9+
failed: number
10+
}
11+
12+
export interface JobTableRow {
13+
id: string
14+
queue: string
15+
name: string
16+
status: string
17+
attempts: number
18+
maxAttempts: number
19+
createdAt: string
20+
duration?: number
21+
}

packages/devtools/src/types/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ export type { JobGroup } from './group'
66
export type { DependencyNode, DependencyLink, DependencyGraph } from './dependency'
77
export type { MetricsData, MetricsPoint, ThroughputData } from './metrics'
88
export type { EventTemplate, MonitoringEvent } from './monitoring'
9+
export type { StatVariant, QueueStatusData, JobTableRow } from './components'

0 commit comments

Comments
 (0)