Skip to content
Merged
Show file tree
Hide file tree
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
9 changes: 5 additions & 4 deletions components/Charts/StorageChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ const props = defineProps(['historic']);


const categories: Record<string, BulletLegendItemInterface> = computed(() => ({
total_counters: {
name: "Counters",
color: "#607D8B" // Un gris azulado neutro para "ALL"
},
total_buffers: {
name: "Buffers",
color: "#4CAF50" // Verde brillante para "INSERT" (creación)
},

total_counters: {
name: "Counters",
color: "#607D8B" // Un gris azulado neutro para "ALL"
},
}));


Expand Down
55 changes: 51 additions & 4 deletions components/Tables/ConnectionsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@

import type { TableColumn } from '@nuxt/ui'
import type { ConnectionsItem } from '@throttr/sdk';
import { formatDate } from '~/server/throttr/utils';
import {formatDate, getHeader} from '~/server/throttr/utils';
import UDropdownMenu from "#ui/components/DropdownMenu.vue";
import UButton from "#ui/components/Button.vue";

const {t} = useI18n()

Expand All @@ -28,18 +30,63 @@ const columns: TableColumn<ConnectionsItem>[] = [
},
{
accessorKey: 'kind',
header: 'Kind',
header: ({ column }) => getHeader(column, 'Kind'),
cell: ({ row }) => row.original.kind == 0 ? `Client` : `Agent`,
},
{
accessorKey: 'type',
header: 'Type',
header: ({ column }) => getHeader(column, 'Type'),
cell: ({ row }) => row.original.type == 0 ? `TCP` : `UNIX`,
},
{
accessorKey: 'connected_at',
header: 'Connected At',
header: ({ column }) => getHeader(column, 'Connected At'),
cell: ({ row }) => formatDate(row.original.connected_at, true),
},
{
id: 'actions',
enableHiding: false,
cell: ({row}) => {
const items = [{
type: 'label',
label: 'Actions'
}, {
label: 'View',
async onSelect() {

}
}, {
label: 'Update',
async onSelect() {
}
}, {
type: 'separator'
}, {
label: 'Stats',
async onSelect() {
}
}, {
type: 'separator'
}, {
label: 'Remove',
async onSelect() {
}
}]

return h('div', {class: 'text-right'}, h(UDropdownMenu, {
'content': {
align: 'end'
},
items,
'aria-label': 'Actions dropdown'
}, () => h(UButton, {
'icon': 'i-lucide-ellipsis-vertical',
'color': 'neutral',
'variant': 'ghost',
'class': 'ml-auto',
'aria-label': 'Actions dropdown'
})))
}
}
]

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@nuxt/ui": "3.1.3",
"@nuxtjs/i18n": "^9.5.5",
"@pinia/nuxt": "0.11.1",
"@throttr/sdk": "5.1.4",
"@throttr/sdk": "5.1.6",
"@unhead/vue": "^2.0.3",
"@unovis/ts": "^1.5.2",
"eslint": "^9.0.0",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2279,10 +2279,10 @@
dependencies:
"@tanstack/virtual-core" "3.13.10"

"@throttr/sdk@5.1.4":
version "5.1.4"
resolved "https://registry.yarnpkg.com/@throttr/sdk/-/sdk-5.1.4.tgz#0471f9b4ff904ffa0e396210d8356e9c658d825e"
integrity sha512-y3ls6zwfQ0athhzx5GJRrPcAbcH/qRVlCnll+46XN7Z/BwpE+nFb8iPkeT1Z4vYKGlEEKR1C0HJd4KrDHxhe1g==
"@throttr/sdk@5.1.6":
version "5.1.6"
resolved "https://registry.yarnpkg.com/@throttr/sdk/-/sdk-5.1.6.tgz#76aaf88c1033865afd0f772029aa7508c6ca3948"
integrity sha512-aeKqcSk/vSsYfxjDzzPklKSHQya8sU2bN+xU2lc43AQD871PJ9zyHuKDQOo7q2HRHVyGGQmpBToCqLSRXF3QQQ==

"@trysound/sax@0.2.0":
version "0.2.0"
Expand Down