Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions src/components/tables/InstancesTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,17 @@
class="q-ml-sm"
flat
dense
:disable="props.row.enabled"
>
<q-tooltip class="bg-indigo" :offset="[10, 10]">
Destroy: destroying will delete your instance and every bit of
data.
<span v-if="props.row.enabled">
Destroy: you can only destroy a disabled instance. Please
disable it first.
</span>
<span v-else>
Destroy: destroying will delete your instance and every bit of
data.</span
>
</q-tooltip>
</q-btn>
</q-td>
Expand Down Expand Up @@ -1074,6 +1081,13 @@ export default defineComponent({
)
},
destroyInstance: function (id) {
if (this.data.find(i => i.id === id)?.enabled) {
return this.q.notify({
message:
'You can only destroy a disabled instance. Please disable it first.',
color: 'warning'
})
}
this.confirm(
`Destroy ${id}`,
'Are you sure you want to destroy?' +
Expand Down