@prefecthq/prefect-ui-library 3.11.20 → 3.11.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- export declare const prefectStateNames: readonly ["Scheduled", "Late", "Resuming", "AwaitingRetry", "AwaitingConcurrencySlot", "Pending", "Paused", "Suspended", "Running", "Retrying", "Completed", "Cancelled", "Cancelling", "Crashed", "Failed", "TimedOut"];
1
+ export declare const prefectStateNames: readonly ["Scheduled", "Late", "Resuming", "AwaitingRetry", "AwaitingConcurrencySlot", "Pending", "Paused", "Suspended", "Running", "Retrying", "Completed", "Cached", "Cancelled", "Cancelling", "Crashed", "Failed", "TimedOut"];
2
2
  export type PrefectStateNames = typeof prefectStateNames[number];
3
3
  export declare const prefectStateNameTypes: {
4
4
  readonly Scheduled: "scheduled";
@@ -12,6 +12,7 @@ export declare const prefectStateNameTypes: {
12
12
  readonly Running: "running";
13
13
  readonly Retrying: "running";
14
14
  readonly Completed: "completed";
15
+ readonly Cached: "completed";
15
16
  readonly Cancelled: "cancelled";
16
17
  readonly Cancelling: "cancelling";
17
18
  readonly Crashed: "crashed";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prefecthq/prefect-ui-library",
3
- "version": "3.11.20",
3
+ "version": "3.11.21",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -57,6 +57,10 @@
57
57
  return null
58
58
  }
59
59
 
60
+ if (barsDebounced.value === 0) {
61
+ return null
62
+ }
63
+
60
64
  const base = toValue(props.filter)
61
65
  const filter: FlowRunsFilter = {
62
66
  limit: barsDebounced.value,
@@ -68,7 +72,12 @@
68
72
 
69
73
  const { flowRuns } = useFlowRuns(filter)
70
74
 
71
- const barFlowRuns = computed(() => organizeFlowRunsWithGaps(flowRuns.value))
75
+ const barFlowRuns = computed(() => {
76
+ const runsWithGaps = organizeFlowRunsWithGaps(flowRuns.value)
77
+
78
+ // organizeFlowRunsWithGaps can return more values than the number of bars requested
79
+ return runsWithGaps.slice(-bars.value)
80
+ })
72
81
 
73
82
  const maxDuration = computed(() => flowRuns.value.reduce((max, flowRun) => {
74
83
  if (flowRun.duration > max) {
@@ -144,7 +153,7 @@
144
153
  })
145
154
  : flowRuns
146
155
 
147
- // const bucketStepper = expectedStartTimeBefore.getTime() > new Date().getTime() ? 1 : -1
156
+
148
157
  function getEmptyBucket(index: number): number | null {
149
158
  if (index < 0) {
150
159
  return null
@@ -3,3 +3,15 @@
3
3
 
4
4
  @tailwind components;
5
5
  @tailwind utilities;
6
+
7
+ @layer utilities {
8
+ /* Chrome, Safari and Opera */
9
+ .no-scrollbar::-webkit-scrollbar {
10
+ display: none;
11
+ }
12
+
13
+ .no-scrollbar {
14
+ -ms-overflow-style: none; /* IE and Edge */
15
+ scrollbar-width: none; /* Firefox */
16
+ }
17
+ }
@@ -14,6 +14,7 @@ export const prefectStateNames = [
14
14
  'Running',
15
15
  'Retrying',
16
16
  'Completed',
17
+ 'Cached',
17
18
  'Cancelled',
18
19
  'Cancelling',
19
20
  'Crashed',
@@ -34,6 +35,7 @@ export const prefectStateNameTypes = {
34
35
  'Running': 'running',
35
36
  'Retrying': 'running',
36
37
  'Completed': 'completed',
38
+ 'Cached': 'completed',
37
39
  'Cancelled': 'cancelled',
38
40
  'Cancelling': 'cancelling',
39
41
  'Crashed': 'crashed',