@prefecthq/prefect-ui-library 3.9.4 → 3.10.0
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.
- package/dist/{RunsPageWithDefaultFilter-XY72bzct.mjs → RunsPageWithDefaultFilter-Db6mg490.mjs} +2 -2
- package/dist/{RunsPageWithDefaultFilter-XY72bzct.mjs.map → RunsPageWithDefaultFilter-Db6mg490.mjs.map} +1 -1
- package/dist/{WorkQueueToWorkPoolQueueRedirect-0bzzdkMj.mjs → WorkQueueToWorkPoolQueueRedirect-H4fuerck.mjs} +2 -2
- package/dist/{WorkQueueToWorkPoolQueueRedirect-0bzzdkMj.mjs.map → WorkQueueToWorkPoolQueueRedirect-H4fuerck.mjs.map} +1 -1
- package/dist/{index-yq7SSTTV.mjs → index-BnKxvUxT.mjs} +2865 -2870
- package/dist/{index-yq7SSTTV.mjs.map → index-BnKxvUxT.mjs.map} +1 -1
- package/dist/prefect-ui-library.mjs +1 -1
- package/dist/prefect-ui-library.umd.js +48 -48
- package/dist/prefect-ui-library.umd.js.map +1 -1
- package/dist/types/src/components/BlockDocumentInput.vue.d.ts +2 -0
- package/dist/types/src/components/ConcurrencyLimitsV2UpdateModal.vue.d.ts +10 -10
- package/dist/types/src/models/EmpiricalPolicy.d.ts +10 -0
- package/dist/types/src/models/api/EmpiricalPolicyResponse.d.ts +1 -0
- package/package.json +6 -6
- package/src/components/BlockDocumentInput.vue +2 -1
- package/src/components/ConcurrencyLimitsV2UpdateModal.vue +11 -26
- package/src/components/FlowRunCreateForm.vue +1 -0
- package/src/components/TaskRunDetails.vue +3 -10
- package/src/maps/empiricalPolicy.ts +2 -0
- package/src/models/EmpiricalPolicy.ts +11 -0
- package/src/models/api/EmpiricalPolicyResponse.ts +1 -0
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
2
2
|
modelValue: string | null | undefined;
|
|
3
3
|
blockTypeSlug: string;
|
|
4
|
+
required?: boolean;
|
|
4
5
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
6
|
"update:modelValue": (value: string | null | undefined) => void;
|
|
6
7
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
7
8
|
modelValue: string | null | undefined;
|
|
8
9
|
blockTypeSlug: string;
|
|
10
|
+
required?: boolean;
|
|
9
11
|
}>>> & {
|
|
10
12
|
"onUpdate:modelValue"?: ((value: string | null | undefined) => any) | undefined;
|
|
11
13
|
}, {}, {}>;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { ConcurrencyV2Limit } from '../models/ConcurrencyV2Limit';
|
|
2
|
+
declare let __VLS_typeProps: {
|
|
3
|
+
concurrencyLimit: ConcurrencyV2Limit;
|
|
4
|
+
};
|
|
5
|
+
type __VLS_PublicProps = {
|
|
6
|
+
'showModal': boolean;
|
|
7
|
+
} & typeof __VLS_typeProps;
|
|
2
8
|
declare function __VLS_template(): {
|
|
3
9
|
slots: {
|
|
4
10
|
actions?(_: {}): any;
|
|
@@ -7,16 +13,10 @@ declare function __VLS_template(): {
|
|
|
7
13
|
attrs: Partial<{}>;
|
|
8
14
|
};
|
|
9
15
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
-
declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
11
|
-
showModal: boolean;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"update:showModal": (value: boolean) => void;
|
|
15
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
16
|
-
showModal: boolean;
|
|
17
|
-
concurrencyLimit: ConcurrencyV2Limit;
|
|
18
|
-
}>>> & {
|
|
19
|
-
"onUpdate:showModal"?: ((value: boolean) => any) | undefined;
|
|
16
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_PublicProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
"update:showModal": (showModal: boolean) => void;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_PublicProps>>> & {
|
|
19
|
+
"onUpdate:showModal"?: ((showModal: boolean) => any) | undefined;
|
|
20
20
|
}, {}, {}>;
|
|
21
21
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
22
22
|
export default _default;
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
export interface IEmpiricalPolicy {
|
|
2
2
|
retries: number | null;
|
|
3
3
|
retryDelay: number | null;
|
|
4
|
+
retryJitterFactor: number | null;
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated
|
|
7
|
+
* Use `retries` instead
|
|
8
|
+
*/
|
|
4
9
|
maxRetries: number | null;
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated
|
|
12
|
+
* Use `retryDelay` instead
|
|
13
|
+
*/
|
|
5
14
|
retryDelaySeconds: number | null;
|
|
6
15
|
}
|
|
7
16
|
export declare class EmpiricalPolicy implements IEmpiricalPolicy {
|
|
8
17
|
retries: number | null;
|
|
9
18
|
retryDelay: number | null;
|
|
19
|
+
retryJitterFactor: number | null;
|
|
10
20
|
maxRetries: number | null;
|
|
11
21
|
retryDelaySeconds: number | null;
|
|
12
22
|
constructor(empiricalPolicy: IEmpiricalPolicy);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prefecthq/prefect-ui-library",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -57,21 +57,21 @@
|
|
|
57
57
|
"@types/lodash.debounce": "4.0.9",
|
|
58
58
|
"@types/lodash.isequal": "^4.5.8",
|
|
59
59
|
"@types/lodash.merge": "4.6.9",
|
|
60
|
-
"@types/node": "^22.5.
|
|
60
|
+
"@types/node": "^22.5.5",
|
|
61
61
|
"@types/prismjs": "^1.26.4",
|
|
62
62
|
"@vitejs/plugin-vue": "5.1.3",
|
|
63
|
-
"auto-changelog": "^2.
|
|
63
|
+
"auto-changelog": "^2.5.0",
|
|
64
64
|
"autoprefixer": "10.4.20",
|
|
65
|
-
"eslint": "8.57.
|
|
65
|
+
"eslint": "8.57.1",
|
|
66
66
|
"lodash.camelcase": "4.3.0",
|
|
67
67
|
"lodash.debounce": "4.0.8",
|
|
68
68
|
"postcss": "8.4.45",
|
|
69
69
|
"tailwindcss": "3.4.10",
|
|
70
70
|
"tsc-alias": "1.8.10",
|
|
71
71
|
"typescript": "5.6.2",
|
|
72
|
-
"vite": "5.4.
|
|
72
|
+
"vite": "5.4.6",
|
|
73
73
|
"vite-svg-loader": "^5.1.0",
|
|
74
|
-
"vitest": "^2.
|
|
74
|
+
"vitest": "^2.1.1",
|
|
75
75
|
"vue-tsc": "^2.1.6"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<LogoImage v-if="blockType" :url="blockType.logoUrl" />
|
|
4
4
|
|
|
5
5
|
<template v-if="blockDocuments.length">
|
|
6
|
-
<BlockDocumentCombobox v-model:selected="model" v-bind="{ blockDocuments }" class="block-document-input__select" />
|
|
6
|
+
<BlockDocumentCombobox v-model:selected="model" :required="required" v-bind="{ blockDocuments }" class="block-document-input__select" />
|
|
7
7
|
</template>
|
|
8
8
|
<p-button v-if="blockTypeSlug" icon-append="PlusIcon" @click="open">
|
|
9
9
|
Add
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
const props = defineProps<{
|
|
26
26
|
modelValue: string | null | undefined,
|
|
27
27
|
blockTypeSlug: string,
|
|
28
|
+
required?: boolean,
|
|
28
29
|
}>()
|
|
29
30
|
|
|
30
31
|
const emit = defineEmits<{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<p-modal v-model:showModal="
|
|
2
|
+
<p-modal v-model:showModal="showModal" class="concurrency-limits-v2-update-modal" :title="updateLimitTitle">
|
|
3
3
|
<p-form class="concurrency-limits-v2-update-form" @submit="submit">
|
|
4
4
|
<p-content>
|
|
5
5
|
<p-label label="Name" :message="nameErrorMessage" :state="nameState">
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
<script lang="ts" setup>
|
|
38
38
|
import { PLabel, PNumberInput, PForm, showToast } from '@prefecthq/prefect-design'
|
|
39
39
|
import { useSubscription, useValidation, useValidationObserver } from '@prefecthq/vue-compositions'
|
|
40
|
-
import { computed, ref } from 'vue'
|
|
40
|
+
import { computed, ref, watch } from 'vue'
|
|
41
41
|
import { useWorkspaceApi } from '@/compositions'
|
|
42
42
|
import { localization } from '@/localization'
|
|
43
43
|
import { ConcurrencyV2Limit } from '@/models/ConcurrencyV2Limit'
|
|
@@ -45,12 +45,9 @@
|
|
|
45
45
|
import { isRequired, isGreaterThanZeroOrNull } from '@/utilities/formValidation'
|
|
46
46
|
|
|
47
47
|
const props = defineProps<{
|
|
48
|
-
showModal: boolean,
|
|
49
48
|
concurrencyLimit: ConcurrencyV2Limit,
|
|
50
49
|
}>()
|
|
51
|
-
const
|
|
52
|
-
(event: 'update:showModal', value: boolean): void,
|
|
53
|
-
}>()
|
|
50
|
+
const showModal = defineModel<boolean>('showModal', { required: true })
|
|
54
51
|
|
|
55
52
|
const updateLimitTitle = computed(() => `Update ${props.concurrencyLimit.name}`)
|
|
56
53
|
|
|
@@ -63,22 +60,9 @@
|
|
|
63
60
|
isGreaterThanZeroOrNull,
|
|
64
61
|
])
|
|
65
62
|
|
|
66
|
-
const active = ref(true)
|
|
67
|
-
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
const decay = ref(props.concurrencyLimit.slotDecayPerSecond)
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
const internalShowModal = computed({
|
|
75
|
-
get() {
|
|
76
|
-
return props.showModal
|
|
77
|
-
},
|
|
78
|
-
set(value: boolean) {
|
|
79
|
-
emit('update:showModal', value)
|
|
80
|
-
},
|
|
81
|
-
})
|
|
63
|
+
const active = ref(props.concurrencyLimit.active ?? true)
|
|
64
|
+
const activeSlots = ref(props.concurrencyLimit.activeSlots ?? 0)
|
|
65
|
+
const decay = ref(props.concurrencyLimit.slotDecayPerSecond ?? 0)
|
|
82
66
|
|
|
83
67
|
const api = useWorkspaceApi()
|
|
84
68
|
const concurrencyLimitSubscription = useSubscription(api.concurrencyV2Limits.getConcurrencyV2Limits)
|
|
@@ -86,11 +70,13 @@
|
|
|
86
70
|
const reset = (): void => {
|
|
87
71
|
name.value = props.concurrencyLimit.name
|
|
88
72
|
limit.value = props.concurrencyLimit.limit
|
|
89
|
-
decay.value = props.concurrencyLimit.slotDecayPerSecond ?? 0
|
|
90
73
|
active.value = props.concurrencyLimit.active ?? true
|
|
91
74
|
activeSlots.value = props.concurrencyLimit.activeSlots ?? 0
|
|
75
|
+
decay.value = props.concurrencyLimit.slotDecayPerSecond ?? 0
|
|
92
76
|
}
|
|
93
77
|
|
|
78
|
+
watch(() => props.concurrencyLimit, reset)
|
|
79
|
+
|
|
94
80
|
const { valid, pending, validate } = useValidationObserver()
|
|
95
81
|
const submit = async (): Promise<void> => {
|
|
96
82
|
await validate()
|
|
@@ -100,8 +86,8 @@
|
|
|
100
86
|
name: name.value,
|
|
101
87
|
limit: limit.value,
|
|
102
88
|
active: active.value,
|
|
103
|
-
slotDecayPerSecond: decay.value,
|
|
104
89
|
activeSlots: activeSlots.value,
|
|
90
|
+
slotDecayPerSecond: decay.value,
|
|
105
91
|
}
|
|
106
92
|
await api.concurrencyV2Limits.updateConcurrencyV2Limit(props.concurrencyLimit.id, updatedLimit)
|
|
107
93
|
concurrencyLimitSubscription.refresh()
|
|
@@ -111,8 +97,7 @@
|
|
|
111
97
|
const message = getApiErrorMessage(error, localization.error.updateConcurrencyLimit)
|
|
112
98
|
showToast(message, 'error')
|
|
113
99
|
} finally {
|
|
114
|
-
|
|
115
|
-
internalShowModal.value = false
|
|
100
|
+
showModal.value = false
|
|
116
101
|
}
|
|
117
102
|
}
|
|
118
103
|
}
|
|
@@ -60,16 +60,9 @@
|
|
|
60
60
|
|
|
61
61
|
<p-key-value label="Version" :value="taskRun.taskVersion" :alternate="alternate" />
|
|
62
62
|
|
|
63
|
-
<
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
<p-key-value label="Retry Delay" :value="secondsToApproximateString(taskRun.empiricalPolicy?.retryDelaySeconds ?? 0)" :alternate="alternate" />
|
|
67
|
-
</div>
|
|
68
|
-
<div v-else>
|
|
69
|
-
<p-key-value label="Retries" :value="taskRun.empiricalPolicy?.retries" :alternate="alternate" />
|
|
70
|
-
|
|
71
|
-
<p-key-value label="Retry Delay" :value="secondsToApproximateString(taskRun.empiricalPolicy?.retryDelay ?? 0)" :alternate="alternate" />
|
|
72
|
-
</div>
|
|
63
|
+
<p-key-value label="Retries" :value="taskRun.empiricalPolicy?.retries" :alternate="alternate" />
|
|
64
|
+
<p-key-value label="Retry Delay" :value="secondsToApproximateString(taskRun.empiricalPolicy?.retryDelay ?? 0)" :alternate="alternate" />
|
|
65
|
+
<p-key-value label="Retry Jitter Factor" :value="taskRun.empiricalPolicy?.retryJitterFactor" :alternate="alternate" />
|
|
73
66
|
|
|
74
67
|
<p-key-value label="Tags" :alternate="alternate">
|
|
75
68
|
<template v-if="taskRun.tags?.length" #value>
|
|
@@ -8,6 +8,7 @@ export const mapEmpiricalPolicyResponseToEmpiricalPolicy: MapFunction<EmpiricalP
|
|
|
8
8
|
retries: source.retries,
|
|
9
9
|
retryDelay: source.retry_delay,
|
|
10
10
|
maxRetries: source.max_retries,
|
|
11
|
+
retryJitterFactor: source.retry_jitter_factor,
|
|
11
12
|
retryDelaySeconds: source.retry_delay_seconds,
|
|
12
13
|
})
|
|
13
14
|
}
|
|
@@ -17,6 +18,7 @@ export const mapEmpiricalPolicyToEmpiricalPolicyResponse: MapFunction<EmpiricalP
|
|
|
17
18
|
retries: source.retries,
|
|
18
19
|
retry_delay: source.retryDelay,
|
|
19
20
|
max_retries: source.maxRetries,
|
|
21
|
+
retry_jitter_factor: source.retryJitterFactor,
|
|
20
22
|
retry_delay_seconds: source.retryDelaySeconds,
|
|
21
23
|
}
|
|
22
24
|
}
|
|
@@ -1,19 +1,30 @@
|
|
|
1
1
|
export interface IEmpiricalPolicy {
|
|
2
2
|
retries: number | null,
|
|
3
3
|
retryDelay: number | null,
|
|
4
|
+
retryJitterFactor: number | null,
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated
|
|
7
|
+
* Use `retries` instead
|
|
8
|
+
*/
|
|
4
9
|
maxRetries: number | null,
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated
|
|
12
|
+
* Use `retryDelay` instead
|
|
13
|
+
*/
|
|
5
14
|
retryDelaySeconds: number | null,
|
|
6
15
|
}
|
|
7
16
|
|
|
8
17
|
export class EmpiricalPolicy implements IEmpiricalPolicy {
|
|
9
18
|
public retries: number | null
|
|
10
19
|
public retryDelay: number | null
|
|
20
|
+
public retryJitterFactor: number | null
|
|
11
21
|
public maxRetries: number | null
|
|
12
22
|
public retryDelaySeconds: number | null
|
|
13
23
|
|
|
14
24
|
public constructor(empiricalPolicy: IEmpiricalPolicy) {
|
|
15
25
|
this.retries = empiricalPolicy.retries
|
|
16
26
|
this.retryDelay = empiricalPolicy.retryDelay
|
|
27
|
+
this.retryJitterFactor = empiricalPolicy.retryJitterFactor
|
|
17
28
|
this.maxRetries = empiricalPolicy.maxRetries
|
|
18
29
|
this.retryDelaySeconds = empiricalPolicy.retryDelaySeconds
|
|
19
30
|
}
|