Skip to content

Commit

Permalink
feat(#117): forbid multiple ending jfr recording
Browse files Browse the repository at this point in the history
  • Loading branch information
lukashornych committed Oct 16, 2024
1 parent 113e466 commit 6410b55
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/modules/jfr-viewer/components/EndRecordingButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,25 @@ const emit = defineEmits<{
}>()
const showEndRecordingDialog = ref<boolean>(false)
const endRequested = ref<boolean>(false)
function onEnd(): void {
endRequested.value = true
emit('end')
}
</script>

<template>
<EndRecordingDialog
v-model="showEndRecordingDialog"
:connection="connection"
@end="emit('end')"
@end="onEnd"
>
<template #activator="{ props }">
<VBtn
v-if="task.state === TaskState.Running"
icon
:disabled="endRequested"
@click="showEndRecordingDialog = true"
v-bind="props"
>
Expand Down

0 comments on commit 6410b55

Please sign in to comment.