Skip to content

Commit 79fd422

Browse files
committed
fix routing
1 parent 56bc66d commit 79fd422

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

webui/src/components/dashboard/Actions.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { useRoute } from 'vue-router'
55
import SourceView from './SourceView.vue'
66
import { usePrettyLanguage } from '@/composables/usePrettyLanguage'
77
import { usePrettyText } from '@/composables/usePrettyText'
8+
import { getRouteName } from '@/composables/dashboard'
89
910
defineProps({
1011
actions: { type: Object as PropType<Action[]>, required: true },
@@ -155,7 +156,7 @@ function getStatus(action: Action) {
155156
<tr>
156157
<td>{{ key }}</td>
157158
<td>
158-
<router-link v-if="key === 'file' && action.tags.fileKey" :to="{ name: 'config', params: { id: action.tags.fileKey }, query: { refresh: route.query.refresh }}">
159+
<router-link v-if="key === 'file' && action.tags.fileKey" :to="{ name: getRouteName('config').value, params: { id: action.tags.fileKey } }">
159160
{{ value }}
160161
</router-link>
161162
<span v-else>{{ value }}</span>

webui/src/components/dashboard/JobCard.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ import { useRoute } from 'vue-router'
55
import dayjs from 'dayjs'
66
import duration from 'dayjs/plugin/duration'
77
import { usePrettyText } from '@/composables/usePrettyText'
8-
import { useDashboard } from '@/composables/dashboard'
8+
import { getRouteName, useDashboard } from '@/composables/dashboard'
99
1010
const { dashboard } = useDashboard()
1111
const { events, close } = dashboard.value.getEvents('job')
1212
const { format, duration: prettyDuration } = usePrettyDates()
1313
const { parseUrls } = usePrettyText()
14-
const route = useRoute()
1514
dayjs.extend(duration)
1615
1716
const now = ref(dayjs())
@@ -199,7 +198,7 @@ function getStatus(data: JobExecution) {
199198
<tr>
200199
<td>{{ key }}</td>
201200
<td>
202-
<router-link v-if="key === 'file' && data.tags.fileKey" :to="{ name: 'config', params: { id: data.tags.fileKey }, query: { refresh: route.query.refresh }}">
201+
<router-link v-if="key === 'file' && data.tags.fileKey" :to="{ name: getRouteName('config').value, params: { id: data.tags.fileKey } }">
203202
{{ value }}
204203
</router-link>
205204
<span v-else>{{ value }}</span>

0 commit comments

Comments
 (0)