Skip to content

Commit

Permalink
Fix selection of a single scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
MaXal committed Nov 17, 2023
1 parent 2ca44fc commit e345fe2
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
class="flex flex-1 flex-col gap-6 overflow-hidden"
>
<template
v-for="scenario in scenarioConfigurator.selected.value"
v-for="scenario in scenarios"
:key="scenario"
>
<GroupProjectsChart
Expand All @@ -66,7 +66,7 @@
</template>

<script setup lang="ts">
import { provide, ref } from "vue"
import { computed, provide, ref } from "vue"
import { useRouter } from "vue-router"
import { AccidentsConfiguratorForTests } from "../../configurators/AccidentsConfigurator"
import { createBranchConfigurator } from "../../configurators/BranchConfigurator"
Expand Down Expand Up @@ -147,6 +147,14 @@ const configurators: DataQueryConfigurator[] = [branchConfigurator, machineConfi
provide(dashboardConfiguratorsKey, configurators)
const scenarios = computed(() => {
if (scenarioConfigurator.selected.value == null) return []
if (Array.isArray(scenarioConfigurator.selected.value)) {
return scenarioConfigurator.selected.value
}
return [scenarioConfigurator.selected.value]
})
const releaseConfigurator = props.withInstaller ? new ReleaseNightlyConfigurator(persistentStateManager) : null
if (releaseConfigurator != null) {
configurators.push(releaseConfigurator)
Expand Down

0 comments on commit e345fe2

Please sign in to comment.