@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.
Files changed (28) hide show
  1. package/dist/{RunsPageWithDefaultFilter-DqZhn-34.mjs → RunsPageWithDefaultFilter-CbPsd6R-.mjs} +2 -2
  2. package/dist/{RunsPageWithDefaultFilter-DqZhn-34.mjs.map → RunsPageWithDefaultFilter-CbPsd6R-.mjs.map} +1 -1
  3. package/dist/{WorkQueueToWorkPoolQueueRedirect-C1hHVQHS.mjs → WorkQueueToWorkPoolQueueRedirect-2BJbmFrA.mjs} +2 -2
  4. package/dist/{WorkQueueToWorkPoolQueueRedirect-C1hHVQHS.mjs.map → WorkQueueToWorkPoolQueueRedirect-2BJbmFrA.mjs.map} +1 -1
  5. package/dist/{index-BMivAKIs.mjs → index-CrGeQXPN.mjs} +5619 -5592
  6. package/dist/{index-BMivAKIs.mjs.map → index-CrGeQXPN.mjs.map} +1 -1
  7. package/dist/prefect-ui-library.mjs +1 -1
  8. package/dist/prefect-ui-library.umd.js +22 -22
  9. package/dist/prefect-ui-library.umd.js.map +1 -1
  10. package/dist/types/src/maps/index.d.ts +1 -0
  11. package/dist/types/src/models/Deployment.d.ts +2 -0
  12. package/dist/types/src/models/DeploymentCreate.d.ts +1 -0
  13. package/dist/types/src/models/DeploymentUpdate.d.ts +2 -0
  14. package/dist/types/src/models/api/DeploymentCreateRequest.d.ts +1 -0
  15. package/dist/types/src/models/api/DeploymentResponse.d.ts +1 -0
  16. package/dist/types/src/models/api/DeploymentUpdateRequest.d.ts +1 -0
  17. package/dist/types/src/services/Mapper.d.ts +1 -0
  18. package/package.json +3 -3
  19. package/src/components/DeploymentDetails.vue +2 -0
  20. package/src/components/DeploymentForm.vue +14 -0
  21. package/src/maps/deployment.ts +3 -0
  22. package/src/mocks/deployment.ts +1 -0
  23. package/src/models/Deployment.ts +3 -0
  24. package/src/models/DeploymentCreate.ts +1 -0
  25. package/src/models/DeploymentUpdate.ts +2 -0
  26. package/src/models/api/DeploymentCreateRequest.ts +1 -0
  27. package/src/models/api/DeploymentResponse.ts +1 -0
  28. package/src/models/api/DeploymentUpdateRequest.ts +1 -0
@@ -165,6 +165,7 @@ export declare const maps: {
165
165
  work_pool_name: string | null;
166
166
  job_variables: Record<string, unknown> | null;
167
167
  enforce_parameter_schema: boolean;
168
+ concurrency_limit: number | null;
168
169
  }>>;
169
170
  };
170
171
  EmpiricalPolicy: {
@@ -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;
@@ -20,4 +20,5 @@ export type DeploymentCreate = {
20
20
  workPoolName: string | null;
21
21
  enforceParameterSchema: boolean;
22
22
  pullSteps: unknown;
23
+ concurrencyLimit: number | null;
23
24
  };
@@ -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 {};
@@ -19,4 +19,5 @@ export type DeploymentCreateRequest = {
19
19
  entrypoint: string | null;
20
20
  version: string | null;
21
21
  paused: boolean;
22
+ concurrency_limit: number | null;
22
23
  };
@@ -34,4 +34,5 @@ export type DeploymentResponse = {
34
34
  pull_steps: unknown;
35
35
  status: ServerDeploymentStatus;
36
36
  disabled?: boolean;
37
+ concurrency_limit: number | null;
37
38
  };
@@ -14,4 +14,5 @@ export type DeploymentUpdateRequest = Partial<{
14
14
  work_pool_name: string | null;
15
15
  job_variables: Record<string, unknown> | null;
16
16
  enforce_parameter_schema: boolean;
17
+ concurrency_limit: number | null;
17
18
  }>;
@@ -189,6 +189,7 @@ export declare const mapper: Mapper<{
189
189
  work_pool_name: string | null;
190
190
  job_variables: Record<string, unknown> | null;
191
191
  enforce_parameter_schema: boolean;
192
+ concurrency_limit: number | null;
192
193
  }>>;
193
194
  };
194
195
  EmpiricalPolicy: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prefecthq/prefect-ui-library",
3
- "version": "3.8.0",
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.0",
60
+ "@types/node": "^22.5.2",
61
61
  "@types/prismjs": "^1.26.4",
62
- "@vitejs/plugin-vue": "5.1.2",
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",
@@ -85,6 +85,8 @@
85
85
 
86
86
  <p-key-value label="Path" :value="deployment.path" :alternate="alternate" />
87
87
 
88
+ <p-key-value label="Concurrency Limit" :value="deployment.concurrencyLimit" :alternate="alternate" />
89
+
88
90
  <p-divider />
89
91
 
90
92
  <template v-if="can.read.flow">
@@ -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
  }
@@ -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
  }
@@ -40,6 +40,7 @@ export const randomDeployment: MockFunction<Deployment, [Partial<Deployment>?]>
40
40
  can: createObjectLevelCan(),
41
41
  status: this.create('deploymentStatus'),
42
42
  disabled: disabled,
43
+ concurrencyLimit: null,
43
44
  ...overrides,
44
45
  }
45
46
  }
@@ -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 {
@@ -21,4 +21,5 @@ export type DeploymentCreate = {
21
21
  workPoolName: string | null,
22
22
  enforceParameterSchema: boolean,
23
23
  pullSteps: unknown,
24
+ concurrencyLimit: number | null,
24
25
  }
@@ -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
@@ -20,4 +20,5 @@ export type DeploymentCreateRequest = {
20
20
  entrypoint: string | null,
21
21
  version: string | null,
22
22
  paused: boolean,
23
+ concurrency_limit: number | null,
23
24
  }
@@ -35,4 +35,5 @@ export type DeploymentResponse = {
35
35
  pull_steps: unknown,
36
36
  status: ServerDeploymentStatus,
37
37
  disabled?: boolean,
38
+ concurrency_limit: number | null,
38
39
  }
@@ -15,4 +15,5 @@ export type DeploymentUpdateRequest = Partial<{
15
15
  work_pool_name: string | null,
16
16
  job_variables: Record<string, unknown> | null,
17
17
  enforce_parameter_schema: boolean,
18
+ concurrency_limit: number | null,
18
19
  }>