Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display all parameter values a flow run was triggered with in the UI (defaults and overrides) #7697

Merged
merged 3 commits into from Nov 30, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 9 additions & 9 deletions orion-ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion orion-ui/package.json
Expand Up @@ -10,7 +10,7 @@
"test": "playwright test"
},
"dependencies": {
"@prefecthq/orion-design": "1.1.15",
"@prefecthq/orion-design": "1.1.20",
"@prefecthq/prefect-design": "1.1.32",
"@prefecthq/vue-compositions": "1.0.0",
"@types/lodash.debounce": "4.0.7",
Expand Down
12 changes: 8 additions & 4 deletions orion-ui/src/pages/FlowRun.vue
Expand Up @@ -43,7 +43,9 @@
FlowRunSubFlows,
JsonView,
useFavicon,
useWorkspaceApi
useWorkspaceApi,
useDeployment,
getSchemaValuesWithDefaultsJson
} from '@prefecthq/orion-design'
import { media } from '@prefecthq/prefect-design'
import { useSubscription, useRouteParam } from '@prefecthq/vue-compositions'
Expand Down Expand Up @@ -75,16 +77,18 @@
const api = useWorkspaceApi()
const flowRunDetailsSubscription = useSubscription(api.flowRuns.getFlowRun, [flowRunId], { interval: 30000 })
const flowRun = computed(() => flowRunDetailsSubscription.response)
const deploymentId = computed(() => flowRun.value?.deploymentId)
const deployment = useDeployment(deploymentId)

watch(flowRunId, (oldFlowRunId, newFlowRunId) => {
if (oldFlowRunId !== newFlowRunId) {
selectedTab.value = 'Logs'
}
})

const parameters = computed(() => {
return flowRun.value?.parameters ? JSON.stringify(flowRun.value.parameters, undefined, 2) : '{}'
})
const flowRunParameters = computed(() => flowRun.value?.parameters ?? {})
const deploymentParameters = computed(() => deployment.value?.parameterOpenApiSchema ?? {})
const parameters = computed(() => getSchemaValuesWithDefaultsJson(flowRunParameters.value, deploymentParameters.value))
marichka-offen marked this conversation as resolved.
Show resolved Hide resolved

function goToFlowRuns(): void {
router.push(routes.flowRuns())
Expand Down