Skip to content

Commit

Permalink
Display all parameter values a flow run was triggered with in the UI …
Browse files Browse the repository at this point in the history
…(defaults and overrides) (#7697)

Co-authored-by: pleek91 <pleek91@gmail.com>
  • Loading branch information
2 people authored and github-actions[bot] committed Dec 1, 2022
1 parent 02604b0 commit 68cad21
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
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 deploymentSchema = computed(() => deployment.value?.parameterOpenApiSchema ?? {})
const parameters = computed(() => getSchemaValuesWithDefaultsJson(flowRunParameters.value, deploymentSchema.value))
function goToFlowRuns(): void {
router.push(routes.flowRuns())
Expand Down

0 comments on commit 68cad21

Please sign in to comment.