Skip to content

Commit

Permalink
fix: use new color scheme for execution stats on flows list
Browse files Browse the repository at this point in the history
related to #6175

better refactor to come later during cooldown
  • Loading branch information
elevatebart committed Jan 27, 2025
1 parent bd82f5e commit 1c08176
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions ui/src/components/flows/Flows.vue
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,9 @@
<template #default="scope">
<!-- TODO: Replace the usage of StateChart with one of the new chart components -->
<state-chart
:duration="true"
v-if="dailyGroupByFlowReady"
:namespace="scope.row.namespace"
:flow-id="scope.row.id"
v-if="dailyGroupByFlowReady"
:data="chartData(scope.row)"
/>
</template>
Expand Down
7 changes: 4 additions & 3 deletions ui/src/components/stats/StateChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
import {useRoute, useRouter} from "vue-router"
import {Bar} from "vue-chartjs";
import Utils from "../../utils/utils.js";
import {defaultConfig, tooltip, chartClick, backgroundFromState, getFormat} from "../../utils/charts.js";
import {getScheme} from "../../utils/scheme.js";
import {defaultConfig, tooltip, chartClick, getFormat} from "../../utils/charts.js";
import {useI18n} from "vue-i18n";
export default defineComponent({
Expand Down Expand Up @@ -68,6 +69,7 @@
const dataReady = computed(() => props.data.length > 0)
const options = computed(() => defaultConfig({
barThickness: 4,
onClick: (e, elements) => {
if (elements.length > 0 && elements[0].index !== undefined && elements[0].datasetIndex !== undefined) {
chartClick(
Expand Down Expand Up @@ -128,8 +130,7 @@
if (accumulator[state] === undefined) {
accumulator[state] = {
label: state,
backgroundColor: backgroundFromState(state),
borderRadius: 4,
backgroundColor: getScheme(state),
yAxisID: "y",
data: []
};
Expand Down

0 comments on commit 1c08176

Please sign in to comment.