@prefecthq/prefect-ui-library 2.10.1 → 2.10.3
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/{FlowRunsPageWithDefaultFilter-BLZb8xVV.mjs → FlowRunsPageWithDefaultFilter-BDVyTpWw.mjs} +2 -2
- package/dist/{FlowRunsPageWithDefaultFilter-BLZb8xVV.mjs.map → FlowRunsPageWithDefaultFilter-BDVyTpWw.mjs.map} +1 -1
- package/dist/{index-D7gE2dA7.mjs → index-lKU7iBpF.mjs} +3214 -3215
- package/dist/index-lKU7iBpF.mjs.map +1 -0
- package/dist/prefect-ui-library.mjs +1 -1
- package/dist/prefect-ui-library.umd.js +24 -24
- package/dist/prefect-ui-library.umd.js.map +1 -1
- package/dist/types/src/compositions/useFlowRuns.d.ts +3 -3
- package/dist/types/src/compositions/useLastFlowRun.d.ts +3 -2
- package/dist/types/src/compositions/useNextFlowRun.d.ts +3 -2
- package/dist/types/src/services/can.d.ts +1 -1
- package/package.json +1 -1
- package/src/automations/components/AutomationActionRunDeploymentInput.vue +1 -3
- package/src/components/FlowRunCreateFormV2.vue +1 -1
- package/src/components/FlowRunJobVariableOverridesLabeledInput.vue +1 -1
- package/src/compositions/useFlowRuns.ts +4 -4
- package/src/compositions/useLastFlowRun.ts +4 -3
- package/src/compositions/useNextFlowRun.ts +4 -3
- package/src/services/can.ts +0 -1
- package/dist/index-D7gE2dA7.mjs.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { MaybeReadonly } from '@prefecthq/prefect-design';
|
|
2
|
-
import { UseSubscription } from '@prefecthq/vue-compositions';
|
|
3
|
-
import { ComputedRef, MaybeRefOrGetter } from 'vue';
|
|
2
|
+
import { UseSubscription, SubscriptionOptions } from '@prefecthq/vue-compositions';
|
|
3
|
+
import { ComputedRef, MaybeRef, MaybeRefOrGetter } from 'vue';
|
|
4
4
|
import { FlowRun, FlowRunsFilter } from '../models';
|
|
5
5
|
import { WorkspaceFlowRunsApi } from '../services';
|
|
6
6
|
export type UseFlowRuns = {
|
|
7
7
|
subscription: UseSubscription<WorkspaceFlowRunsApi['getFlowRuns']>;
|
|
8
8
|
flowRuns: ComputedRef<FlowRun[]>;
|
|
9
9
|
};
|
|
10
|
-
export declare function useFlowRuns(filter?: MaybeRefOrGetter<MaybeReadonly<FlowRunsFilter> | null | undefined>): UseFlowRuns;
|
|
10
|
+
export declare function useFlowRuns(filter?: MaybeRefOrGetter<MaybeReadonly<FlowRunsFilter> | null | undefined>, options?: MaybeRef<SubscriptionOptions>): UseFlowRuns;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SubscriptionOptions } from '@prefecthq/vue-compositions';
|
|
2
|
+
import { ComputedRef, MaybeRef, MaybeRefOrGetter } from 'vue';
|
|
2
3
|
import { UseFlowRuns } from '../compositions/useFlowRuns';
|
|
3
4
|
import { FlowRun, UnionFilter } from '../models';
|
|
4
5
|
export type UseLastFlowRun = Pick<UseFlowRuns, 'subscription'> & {
|
|
5
6
|
flowRun: ComputedRef<FlowRun | undefined>;
|
|
6
7
|
};
|
|
7
|
-
export declare function useLastFlowRun(filter: MaybeRefOrGetter<UnionFilter | null | undefined>): UseLastFlowRun;
|
|
8
|
+
export declare function useLastFlowRun(filter: MaybeRefOrGetter<UnionFilter | null | undefined>, options?: MaybeRef<SubscriptionOptions>): UseLastFlowRun;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SubscriptionOptions } from '@prefecthq/vue-compositions';
|
|
2
|
+
import { ComputedRef, MaybeRef, MaybeRefOrGetter } from 'vue';
|
|
2
3
|
import { UseFlowRuns } from '../compositions/useFlowRuns';
|
|
3
4
|
import { FlowRun, UnionFilter } from '../models';
|
|
4
5
|
export type UseNextFlowRun = Pick<UseFlowRuns, 'subscription'> & {
|
|
5
6
|
flowRun: ComputedRef<FlowRun | undefined>;
|
|
6
7
|
};
|
|
7
|
-
export declare function useNextFlowRun(filter: MaybeRefOrGetter<UnionFilter | null | undefined>): UseNextFlowRun;
|
|
8
|
+
export declare function useNextFlowRun(filter: MaybeRefOrGetter<UnionFilter | null | undefined>, options?: MaybeRef<SubscriptionOptions>): UseNextFlowRun;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InjectionKey } from 'vue';
|
|
2
2
|
import { MaybeRef } from '../types/reactivity';
|
|
3
|
-
export declare const workspaceFeatureFlags: readonly ["access:deploymentStatus", "access:workQueueStatus", "access:
|
|
3
|
+
export declare const workspaceFeatureFlags: readonly ["access:deploymentStatus", "access:workQueueStatus", "access:deploymentScheduleFlowRunInfraOverrides"];
|
|
4
4
|
export type WorkspaceFeatureFlag = typeof workspaceFeatureFlags[number];
|
|
5
5
|
export declare const workspacePermissions: readonly ["create:artifact", "create:automation", "create:block", "create:concurrency_limit", "create:deployment", "create:flow_run", "create:flow", "create:log", "create:notification_policy", "create:saved_search", "create:task_run", "create:variable", "create:work_queue", "create:work_pool_queue", "create:work_pool", "create:workspace_bot_access", "create:workspace_user_access", "delete:artifact", "delete:automation", "delete:block", "delete:concurrency_limit", "delete:deployment", "delete:flow_run", "delete:flow", "delete:notification_policy", "delete:saved_search", "delete:task_run", "delete:work_queue", "delete:work_pool_queue", "delete:work_pool", "delete:workspace_bot_access", "delete:workspace_user_access", "delete:variable", "read:artifact", "read:automation", "read:block", "read:concurrency_limit", "read:deployment", "read:flow_run", "read:flow", "read:log", "read:notification_policy", "read:saved_search", "read:task_run", "read:variable", "read:work_queue", "read:work_pool_queue", "read:work_pool", "read:workspace_bot_access", "read:workspace_settings", "read:workspace_user_access", "run:deployment", "update:automation", "update:block", "update:concurrency_limit", "update:deployment", "update:flow_run", "update:flow", "update:notification_policy", "update:task_run", "update:variable", "update:work_queue", "update:work_pool_queue", "update:work_pool", "update:workspace_bot_access", "update:workspace_settings", "update:workspace_user_access", "update:workspace"];
|
|
6
6
|
export type WorkspacePermission = typeof workspacePermissions[number];
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
parameters from the current schema. Possibly a bug in the schemaV2 form.
|
|
14
14
|
-->
|
|
15
15
|
<AutomationActionRunDeploymentParameters :key="deploymentId" v-model:values="parameters" :deployment="deployment" />
|
|
16
|
-
<FlowRunJobVariableOverridesLabeledInput
|
|
16
|
+
<FlowRunJobVariableOverridesLabeledInput :model-value="jobVariables" @update:model-value="updateJobVariables" />
|
|
17
17
|
</template>
|
|
18
18
|
</p-content>
|
|
19
19
|
</template>
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
import { AutomationActionRunDeployment } from '@/automations/types/actions'
|
|
26
26
|
import FlowRunJobVariableOverridesLabeledInput from '@/components/FlowRunJobVariableOverridesLabeledInput.vue'
|
|
27
27
|
import { useWorkspaceApi } from '@/compositions'
|
|
28
|
-
import { useCan } from '@/compositions/useCan'
|
|
29
28
|
import { Deployment } from '@/models/Deployment'
|
|
30
29
|
import { SchemaValues } from '@/schemas/types/schemaValues'
|
|
31
30
|
import { isString } from '@/utilities'
|
|
@@ -39,7 +38,6 @@
|
|
|
39
38
|
(event: 'update:action', value: Partial<AutomationActionRunDeployment>): void,
|
|
40
39
|
}>()
|
|
41
40
|
|
|
42
|
-
const can = useCan()
|
|
43
41
|
const api = useWorkspaceApi()
|
|
44
42
|
const parametersMap = new Map<string, SchemaValues>()
|
|
45
43
|
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
const workQueueName = ref<string | null>(props.deployment.workQueueName)
|
|
125
125
|
const retries = ref<number | null>(null)
|
|
126
126
|
const retryDelay = ref<number | null>(null)
|
|
127
|
-
const jobVariables = ref<string | undefined>(
|
|
127
|
+
const jobVariables = ref<string | undefined>('{}')
|
|
128
128
|
|
|
129
129
|
const { errors, validate: validateParameters } = useSchemaValidation(schema, parameters)
|
|
130
130
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<p-label
|
|
2
|
+
<p-label :message="jobVariablesError" :state="jobVariablesState">
|
|
3
3
|
<template #label>
|
|
4
4
|
<span class="flow-run-job-variable-overrides-labeled-input__label">
|
|
5
5
|
Job Variables (Optional)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MaybeReadonly } from '@prefecthq/prefect-design'
|
|
2
|
-
import { UseSubscription, useSubscriptionWithDependencies } from '@prefecthq/vue-compositions'
|
|
3
|
-
import { ComputedRef, MaybeRefOrGetter, computed, toRef, toValue } from 'vue'
|
|
2
|
+
import { UseSubscription, useSubscriptionWithDependencies, SubscriptionOptions } from '@prefecthq/vue-compositions'
|
|
3
|
+
import { ComputedRef, MaybeRef, MaybeRefOrGetter, computed, toRef, toValue } from 'vue'
|
|
4
4
|
import { useCan } from '@/compositions/useCan'
|
|
5
5
|
import { useWorkspaceApi } from '@/compositions/useWorkspaceApi'
|
|
6
6
|
import { FlowRun, FlowRunsFilter } from '@/models'
|
|
@@ -12,7 +12,7 @@ export type UseFlowRuns = {
|
|
|
12
12
|
flowRuns: ComputedRef<FlowRun[]>,
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
export function useFlowRuns(filter?: MaybeRefOrGetter<MaybeReadonly<FlowRunsFilter> | null | undefined>): UseFlowRuns {
|
|
15
|
+
export function useFlowRuns(filter?: MaybeRefOrGetter<MaybeReadonly<FlowRunsFilter> | null | undefined>, options?: MaybeRef<SubscriptionOptions>): UseFlowRuns {
|
|
16
16
|
const api = useWorkspaceApi()
|
|
17
17
|
const can = useCan()
|
|
18
18
|
|
|
@@ -31,7 +31,7 @@ export function useFlowRuns(filter?: MaybeRefOrGetter<MaybeReadonly<FlowRunsFilt
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
const parametersRef = toRef(parameters)
|
|
34
|
-
const subscription = useSubscriptionWithDependencies(api.flowRuns.getFlowRuns, parametersRef)
|
|
34
|
+
const subscription = useSubscriptionWithDependencies(api.flowRuns.getFlowRuns, parametersRef, options)
|
|
35
35
|
const flowRuns = computed(() => subscription.response ?? [])
|
|
36
36
|
|
|
37
37
|
return {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { SubscriptionOptions } from '@prefecthq/vue-compositions'
|
|
1
2
|
import merge from 'lodash.merge'
|
|
2
|
-
import { computed, ComputedRef, MaybeRefOrGetter, toValue } from 'vue'
|
|
3
|
+
import { computed, ComputedRef, MaybeRef, MaybeRefOrGetter, toValue } from 'vue'
|
|
3
4
|
import { useCan } from '@/compositions/useCan'
|
|
4
5
|
import { UseFlowRuns, useFlowRuns } from '@/compositions/useFlowRuns'
|
|
5
6
|
import { FlowRun, FlowRunsFilter, UnionFilter } from '@/models'
|
|
@@ -8,7 +9,7 @@ export type UseLastFlowRun = Pick<UseFlowRuns, 'subscription'> & {
|
|
|
8
9
|
flowRun: ComputedRef<FlowRun | undefined>,
|
|
9
10
|
}
|
|
10
11
|
|
|
11
|
-
export function useLastFlowRun(filter: MaybeRefOrGetter<UnionFilter | null | undefined>): UseLastFlowRun {
|
|
12
|
+
export function useLastFlowRun(filter: MaybeRefOrGetter<UnionFilter | null | undefined>, options?: MaybeRef<SubscriptionOptions>): UseLastFlowRun {
|
|
12
13
|
const can = useCan()
|
|
13
14
|
|
|
14
15
|
const getter = (): FlowRunsFilter | null => {
|
|
@@ -29,7 +30,7 @@ export function useLastFlowRun(filter: MaybeRefOrGetter<UnionFilter | null | und
|
|
|
29
30
|
return merge({}, filterValue, latestFilter)
|
|
30
31
|
}
|
|
31
32
|
|
|
32
|
-
const { flowRuns, subscription } = useFlowRuns(getter)
|
|
33
|
+
const { flowRuns, subscription } = useFlowRuns(getter, options)
|
|
33
34
|
const flowRun = computed(() => flowRuns.value.at(0))
|
|
34
35
|
|
|
35
36
|
return {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { SubscriptionOptions } from '@prefecthq/vue-compositions'
|
|
1
2
|
import merge from 'lodash.merge'
|
|
2
|
-
import { computed, ComputedRef, MaybeRefOrGetter, toValue } from 'vue'
|
|
3
|
+
import { computed, ComputedRef, MaybeRef, MaybeRefOrGetter, toValue } from 'vue'
|
|
3
4
|
import { useCan } from '@/compositions/useCan'
|
|
4
5
|
import { UseFlowRuns, useFlowRuns } from '@/compositions/useFlowRuns'
|
|
5
6
|
import { FlowRun, FlowRunsFilter, UnionFilter } from '@/models'
|
|
@@ -8,7 +9,7 @@ export type UseNextFlowRun = Pick<UseFlowRuns, 'subscription'> & {
|
|
|
8
9
|
flowRun: ComputedRef<FlowRun | undefined>,
|
|
9
10
|
}
|
|
10
11
|
|
|
11
|
-
export function useNextFlowRun(filter: MaybeRefOrGetter<UnionFilter | null | undefined>): UseNextFlowRun {
|
|
12
|
+
export function useNextFlowRun(filter: MaybeRefOrGetter<UnionFilter | null | undefined>, options?: MaybeRef<SubscriptionOptions>): UseNextFlowRun {
|
|
12
13
|
const can = useCan()
|
|
13
14
|
|
|
14
15
|
const getter = (): FlowRunsFilter | null => {
|
|
@@ -30,7 +31,7 @@ export function useNextFlowRun(filter: MaybeRefOrGetter<UnionFilter | null | und
|
|
|
30
31
|
return merge({}, filterValue, nextFlowRunFilter)
|
|
31
32
|
}
|
|
32
33
|
|
|
33
|
-
const { flowRuns, subscription } = useFlowRuns(getter)
|
|
34
|
+
const { flowRuns, subscription } = useFlowRuns(getter, options)
|
|
34
35
|
const flowRun = computed(() => flowRuns.value.at(0))
|
|
35
36
|
|
|
36
37
|
return {
|
package/src/services/can.ts
CHANGED
|
@@ -4,7 +4,6 @@ import { MaybeRef } from '@/types/reactivity'
|
|
|
4
4
|
export const workspaceFeatureFlags = [
|
|
5
5
|
'access:deploymentStatus',
|
|
6
6
|
'access:workQueueStatus',
|
|
7
|
-
'access:flowRunInfraOverrides',
|
|
8
7
|
'access:deploymentScheduleFlowRunInfraOverrides',
|
|
9
8
|
] as const satisfies Readonly<`access:${string}`[]>
|
|
10
9
|
|