Formatting
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user