Skip to content

Commit

Permalink
feat: add workflow name to metric detail charts
Browse files Browse the repository at this point in the history
  • Loading branch information
paulpestov committed Dec 5, 2023
1 parent c8d2f4d commit 0dd9f26
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/Workflows.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
</div>
<div class="flex mb-3">
<SelectButton v-model="selectedOption" :options="options" optionLabel="name"></SelectButton>
<Filters class="ml-auto w-1/3"/>
<Filters class="ml-auto"/>
</div>
<div v-if="selectedOption">
<WorkflowsTimeline v-if="selectedOption.value === 'timeline'" />
Expand Down
4 changes: 3 additions & 1 deletion src/components/workflows/timeline/MetricAverageChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ const props = defineProps<{
runs: EvaluationRun[],
metric: keyof EvaluationResultsDocumentWide,
startDate: Date,
endDate: Date
endDate: Date,
workflowName: string
}>()
const data = ref<TimelineChartDataPoint[]>([])
Expand Down Expand Up @@ -82,6 +83,7 @@ function tooltipContent(d: TimelineChartDataPoint) {
}
}"
>
<h3 class="font-semibold">{{ workflowName }}</h3>
<BaseTimelineDetailedChart
:data="data"
:max-y="maxY"
Expand Down
4 changes: 3 additions & 1 deletion src/components/workflows/timeline/MetricChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const props = defineProps<{
runs: EvaluationRun[],
metric: keyof EvaluationResultsDocumentWide,
startDate: Date,
endDate: Date
endDate: Date,
workflowName: string
}>()
const data = ref([])
Expand Down Expand Up @@ -64,6 +65,7 @@ function tooltipContent(d: TimelineChartDataPoint) {
}
}"
>
<h3 class="font-semibold">{{ workflowName }}</h3>
<BaseTimelineDetailedChart
:data="data"
:max-y="maxY"
Expand Down
2 changes: 2 additions & 0 deletions src/components/workflows/timeline/TimelineItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ function hideParametersOverlay() {
<div class="w-1/2 flex justify-end">
<div class="flex overflow-x-auto">
<MetricAverageChart
:workflow-name="$t('average')"
:runs="workflowsStore.getRuns(gt.id)"
:metric="metric"
class=""
Expand Down Expand Up @@ -90,6 +91,7 @@ function hideParametersOverlay() {
<td class="overflow-x-auto">
<MetricChart
:runs="workflowsStore.getRuns(gt.id, workflow.id)"
:workflow-name="workflow.label"
:metric="metric"
:width="400"
:start-date="startDate"
Expand Down
3 changes: 2 additions & 1 deletion src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,6 @@
"pages_per_minute": "Seiten pro Minute",
"cpu_standard_deviation": "CPU Standardabweichung",
"date": "Datum",
"ground_truth": "Ground Truth"
"ground_truth": "Ground Truth",
"average": "Durchschnitt"
}
3 changes: 2 additions & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,6 @@
"pages_per_minute": "Pages per minute",
"cpu_standard_deviation": "CPU Standard Deviation",
"date": "Date",
"ground_truth": "Ground Truth"
"ground_truth": "Ground Truth",
"average": "Average"
}

0 comments on commit 0dd9f26

Please sign in to comment.