@prefecthq/prefect-ui-library 3.8.0 → 3.8.1
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-DqZhn-34.mjs → RunsPageWithDefaultFilter-CbPsd6R-.mjs} +2 -2
- package/dist/{RunsPageWithDefaultFilter-DqZhn-34.mjs.map → RunsPageWithDefaultFilter-CbPsd6R-.mjs.map} +1 -1
- package/dist/{WorkQueueToWorkPoolQueueRedirect-C1hHVQHS.mjs → WorkQueueToWorkPoolQueueRedirect-2BJbmFrA.mjs} +2 -2
- package/dist/{WorkQueueToWorkPoolQueueRedirect-C1hHVQHS.mjs.map → WorkQueueToWorkPoolQueueRedirect-2BJbmFrA.mjs.map} +1 -1
- package/dist/{index-BMivAKIs.mjs → index-CrGeQXPN.mjs} +5619 -5592
- package/dist/{index-BMivAKIs.mjs.map → index-CrGeQXPN.mjs.map} +1 -1
- package/dist/prefect-ui-library.mjs +1 -1
- package/dist/prefect-ui-library.umd.js +22 -22
- package/dist/prefect-ui-library.umd.js.map +1 -1
- package/dist/types/src/maps/index.d.ts +1 -0
- package/dist/types/src/models/Deployment.d.ts +2 -0
- package/dist/types/src/models/DeploymentCreate.d.ts +1 -0
- package/dist/types/src/models/DeploymentUpdate.d.ts +2 -0
- package/dist/types/src/models/api/DeploymentCreateRequest.d.ts +1 -0
- package/dist/types/src/models/api/DeploymentResponse.d.ts +1 -0
- package/dist/types/src/models/api/DeploymentUpdateRequest.d.ts +1 -0
- package/dist/types/src/services/Mapper.d.ts +1 -0
- package/package.json +3 -3
- package/src/components/DeploymentDetails.vue +2 -0
- package/src/components/DeploymentForm.vue +14 -0
- package/src/maps/deployment.ts +3 -0
- package/src/mocks/deployment.ts +1 -0
- package/src/models/Deployment.ts +3 -0
- package/src/models/DeploymentCreate.ts +1 -0
- package/src/models/DeploymentUpdate.ts +2 -0
- package/src/models/api/DeploymentCreateRequest.ts +1 -0
- package/src/models/api/DeploymentResponse.ts +1 -0
- package/src/models/api/DeploymentUpdateRequest.ts +1 -0
|
@@ -31,6 +31,7 @@ export interface IDeployment {
|
|
|
31
31
|
can: ObjectLevelCan<'deployment'>;
|
|
32
32
|
status: DeploymentStatus;
|
|
33
33
|
disabled: boolean;
|
|
34
|
+
concurrencyLimit: number | null;
|
|
34
35
|
}
|
|
35
36
|
export declare class Deployment implements IDeployment {
|
|
36
37
|
readonly id: string;
|
|
@@ -61,6 +62,7 @@ export declare class Deployment implements IDeployment {
|
|
|
61
62
|
can: ObjectLevelCan<'deployment'>;
|
|
62
63
|
status: DeploymentStatus;
|
|
63
64
|
disabled: boolean;
|
|
65
|
+
concurrencyLimit: number | null;
|
|
64
66
|
constructor(deployment: IDeployment);
|
|
65
67
|
get deprecated(): boolean;
|
|
66
68
|
get appliedBy(): string | null;
|
|
@@ -7,6 +7,7 @@ type Base = {
|
|
|
7
7
|
workPoolName?: string | null;
|
|
8
8
|
jobVariables?: Record<string, unknown> | null;
|
|
9
9
|
enforceParameterSchema?: boolean;
|
|
10
|
+
concurrencyLimit?: number | null;
|
|
10
11
|
};
|
|
11
12
|
type WithoutParameters = Base & {
|
|
12
13
|
schema?: never;
|
|
@@ -16,4 +17,5 @@ type WithParameters = Base & {
|
|
|
16
17
|
parameters: SchemaValuesV2;
|
|
17
18
|
};
|
|
18
19
|
export type DeploymentUpdateV2 = WithoutParameters | WithParameters;
|
|
20
|
+
export type DeploymentUpdate = DeploymentUpdateV2;
|
|
19
21
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prefecthq/prefect-ui-library",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -57,9 +57,9 @@
|
|
|
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.2",
|
|
61
61
|
"@types/prismjs": "^1.26.4",
|
|
62
|
-
"@vitejs/plugin-vue": "5.1.
|
|
62
|
+
"@vitejs/plugin-vue": "5.1.3",
|
|
63
63
|
"auto-changelog": "^2.4.0",
|
|
64
64
|
"autoprefixer": "10.4.20",
|
|
65
65
|
"eslint": "8.57.0",
|
|
@@ -31,6 +31,10 @@
|
|
|
31
31
|
<p-tags-input v-model="tags" empty-message="Add tags" />
|
|
32
32
|
</p-label>
|
|
33
33
|
|
|
34
|
+
<p-label label="Concurrency Limit (Optional)" :state="concurrencyLimitState" :message="concurrencyLimitError">
|
|
35
|
+
<p-number-input v-model="concurrencyLimit" :state="concurrencyLimitState" placeholder="Unlimited" />
|
|
36
|
+
</p-label>
|
|
37
|
+
|
|
34
38
|
<p-divider />
|
|
35
39
|
|
|
36
40
|
<template v-if="schemaHasParameters">
|
|
@@ -99,6 +103,7 @@
|
|
|
99
103
|
const description = ref(props.deployment.description)
|
|
100
104
|
const workPoolName = ref(props.deployment.workPoolName)
|
|
101
105
|
const workQueueName = ref(props.deployment.workQueueName)
|
|
106
|
+
const concurrencyLimit = ref(props.deployment.concurrencyLimit)
|
|
102
107
|
const parameters = ref(props.deployment.parameters)
|
|
103
108
|
const tags = ref(props.deployment.tags)
|
|
104
109
|
const jobVariables = ref(stringify(props.deployment.jobVariables))
|
|
@@ -125,6 +130,13 @@
|
|
|
125
130
|
return 'Name must be different from the original deployment'
|
|
126
131
|
}
|
|
127
132
|
})
|
|
133
|
+
const { state: concurrencyLimitState, error: concurrencyLimitError } = useValidation(concurrencyLimit, (value) => {
|
|
134
|
+
if (value != null && value < 1) {
|
|
135
|
+
return 'Concurrency limit must be greater than 0. To unset, leave the field empty.'
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return true
|
|
139
|
+
})
|
|
128
140
|
|
|
129
141
|
const emit = defineEmits<{
|
|
130
142
|
(event: 'submit', value: DeploymentUpdateV2 | DeploymentCreate): void,
|
|
@@ -173,6 +185,7 @@
|
|
|
173
185
|
storageDocumentId: props.deployment.storageDocumentId,
|
|
174
186
|
infrastructureDocumentId: props.deployment.infrastructureDocumentId,
|
|
175
187
|
pullSteps: props.deployment.pullSteps,
|
|
188
|
+
concurrencyLimit: concurrencyLimit.value,
|
|
176
189
|
}
|
|
177
190
|
emit('submit', deploymentCreate)
|
|
178
191
|
} else {
|
|
@@ -184,6 +197,7 @@
|
|
|
184
197
|
tags: tags.value,
|
|
185
198
|
enforceParameterSchema: enforceParameterSchema.value,
|
|
186
199
|
jobVariables: JSON.parse(jobVariables.value),
|
|
200
|
+
concurrencyLimit: concurrencyLimit.value,
|
|
187
201
|
}
|
|
188
202
|
emit('submit', deploymentUpdate)
|
|
189
203
|
}
|
package/src/maps/deployment.ts
CHANGED
|
@@ -37,6 +37,7 @@ export const mapDeploymentResponseToDeployment: MapFunction<DeploymentResponse,
|
|
|
37
37
|
can: createObjectLevelCan(),
|
|
38
38
|
status: this.map('ServerDeploymentStatus', source.status, 'DeploymentStatus'),
|
|
39
39
|
disabled: source.disabled ?? false,
|
|
40
|
+
concurrencyLimit: source.concurrency_limit,
|
|
40
41
|
})
|
|
41
42
|
}
|
|
42
43
|
|
|
@@ -50,6 +51,7 @@ export const mapDeploymentUpdateV2ToDeploymentUpdateRequest: MapFunction<Deploym
|
|
|
50
51
|
work_pool_name: source.workPoolName,
|
|
51
52
|
job_variables: source.jobVariables,
|
|
52
53
|
enforce_parameter_schema: source.enforceParameterSchema,
|
|
54
|
+
concurrency_limit: source.concurrencyLimit,
|
|
53
55
|
}
|
|
54
56
|
}
|
|
55
57
|
|
|
@@ -90,5 +92,6 @@ export const mapDeploymentCreateToDeploymentCreateRequest: MapFunction<Deploymen
|
|
|
90
92
|
entrypoint: source.entrypoint,
|
|
91
93
|
version: source.version,
|
|
92
94
|
paused: source.paused,
|
|
95
|
+
concurrency_limit: source.concurrencyLimit,
|
|
93
96
|
}
|
|
94
97
|
}
|
package/src/mocks/deployment.ts
CHANGED
package/src/models/Deployment.ts
CHANGED
|
@@ -32,6 +32,7 @@ export interface IDeployment {
|
|
|
32
32
|
can: ObjectLevelCan<'deployment'>,
|
|
33
33
|
status: DeploymentStatus,
|
|
34
34
|
disabled: boolean,
|
|
35
|
+
concurrencyLimit: number | null,
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
export class Deployment implements IDeployment {
|
|
@@ -63,6 +64,7 @@ export class Deployment implements IDeployment {
|
|
|
63
64
|
public can: ObjectLevelCan<'deployment'>
|
|
64
65
|
public status: DeploymentStatus
|
|
65
66
|
public disabled: boolean
|
|
67
|
+
public concurrencyLimit: number | null
|
|
66
68
|
|
|
67
69
|
public constructor(deployment: IDeployment) {
|
|
68
70
|
this.id = deployment.id
|
|
@@ -92,6 +94,7 @@ export class Deployment implements IDeployment {
|
|
|
92
94
|
this.can = deployment.can
|
|
93
95
|
this.status = deployment.status
|
|
94
96
|
this.disabled = deployment.disabled
|
|
97
|
+
this.concurrencyLimit = deployment.concurrencyLimit
|
|
95
98
|
}
|
|
96
99
|
|
|
97
100
|
public get deprecated(): boolean {
|
|
@@ -8,6 +8,7 @@ type Base = {
|
|
|
8
8
|
workPoolName?: string | null,
|
|
9
9
|
jobVariables?: Record<string, unknown> | null,
|
|
10
10
|
enforceParameterSchema?: boolean,
|
|
11
|
+
concurrencyLimit?: number | null,
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
type WithoutParameters = Base & {
|
|
@@ -20,3 +21,4 @@ type WithParameters = Base & {
|
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
export type DeploymentUpdateV2 = WithoutParameters | WithParameters
|
|
24
|
+
export type DeploymentUpdate = DeploymentUpdateV2
|