Formatting

This commit is contained in:
iamBadgers
2026-04-11 15:47:11 -07:00
parent c7905cdcb5
commit 5ae9afc89f
3 changed files with 40 additions and 27 deletions

View File

@@ -46,23 +46,23 @@ function stopTable(tableId: number) {
}
function buildButtonModel(id: number) {
return [{
label: 'Edit', command: () => {
route.push({ name: 'edit', params: { id: id } })
}
},
{ label: 'Restart' },
{ label: 'Force Stop' },
{ separator: true },
{ label: 'Delete' }
return [
{
label: 'Edit',
command: () => {
route.push({ name: 'edit', params: { id: id } })
},
},
{ label: 'Restart' },
{ label: 'Force Stop' },
{ separator: true },
{ label: 'Delete' },
]
}
function createTable() {
axios.post("http://localhost/api/tables",
{ table_name: "table name", table_link: "table link" })
axios.post('http://localhost/api/tables', { table_name: 'table name', table_link: 'table link' })
}
</script>
<style>
@@ -128,8 +128,7 @@ function createTable() {
<template #content>
<DataTable class="Tables" :value="allTables">
<Column field="table_name" header="Table Name">
</Column>
<Column field="table_name" header="Table Name"> </Column>
<Column field="table_link" header="Table Link">
<template #body="slotProps">
<a v-if="slotProps.data.active" :href="'/' + slotProps.data.table_link">
@@ -139,12 +138,14 @@ function createTable() {
http://localhost/{{ slotProps.data.table_link }}
</div>
</template>
</Column>
<Column header="Close">
<template #body="slotProps">
<SplitButton label="Start" @click="startTable(slotProps.data.id)"
:model="buildButtonModel(slotProps.data.id)" />
<SplitButton
label="Start"
@click="startTable(slotProps.data.id)"
:model="buildButtonModel(slotProps.data.id)"
/>
</template>
</Column>
</DataTable>