Skip to content

Commit

Permalink
fix: Some bugs and tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
dogukanoksuz committed Nov 1, 2023
1 parent c2ba8de commit 9446d6a
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 6 deletions.
8 changes: 8 additions & 0 deletions public/locales/tr/servers.json
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,14 @@
"title": "Hata",
"description": "Yetkili kullanıcı eklenirken bir hata oluştu."
}
},
"success": {
"title": "Başarılı",
"description": "Yetkili kullanıcı başarıyla silindi."
},
"fail": {
"title": "Hata",
"description": "Yetkili kullanıcı silinirken bir hata oluştu."
}
},
"page_header": {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/data-table/data-table-pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function DataTablePagination<TData>({
const { t } = useTranslation("components")

return (
<div className="flex items-center justify-between px-8">
<div className="flex items-center justify-between px-8 pb-5">
<div className="flex-1 text-sm text-muted-foreground">
{selectable && (
<>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/servers/[server_id]/access_logs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ function AccessLogDetailsWindow({ id }: { id: string }) {
<AccordionItem value={index + 1} key={index + 1}>
<AccordionTrigger>{item.title}</AccordionTrigger>
<AccordionContent>
<pre>{item.message}</pre>
<pre className="max-w-0">{item.message}</pre>
</AccordionContent>
</AccordionItem>
)
Expand Down
10 changes: 10 additions & 0 deletions src/pages/servers/[server_id]/open_ports/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ export default function ServerExtensionPage() {
<DataTableColumnHeader
column={column}
title={t("open_ports.accessor_ip_type_title")}
showFilterAsSelect
filterPresets={[
{ key: "ipv4", value: "IPv4" },
{ key: "ipv6", value: "IPv6" },
]}
/>
),
title: t("open_ports.accessor_ip_type_title"),
Expand All @@ -52,6 +57,11 @@ export default function ServerExtensionPage() {
<DataTableColumnHeader
column={column}
title={t("open_ports.accessor_packet_type_title")}
showFilterAsSelect
filterPresets={[
{ key: "tcp", value: "TCP" },
{ key: "udp", value: "UDP" },
]}
/>
),
title: t("open_ports.accessor_packet_type_title"),
Expand Down
11 changes: 11 additions & 0 deletions src/pages/servers/[server_id]/services/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,17 @@ export default function ServerExtensionPage() {
</Badge>
</div>
),
accessorFn: (row) => {
return `${
row.status.running === "running"
? t("services.status.running.yes")
: t("services.status.running.no")
} ${
row.status.active
? t("services.status.active.yes")
: t("services.status.active.no")
}`
},
},
]

Expand Down
2 changes: 1 addition & 1 deletion src/pages/servers/[server_id]/users/local.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ function CreateLocalUser() {
render={({ field }) => (
<div className="grid grid-cols-4 items-center gap-4">
<Label htmlFor="password_confirmation" className="text-right">
{t("users.local.dialog.form_labels.confirm_passsword")}
{t("users.local.dialog.form_labels.confirm_password")}
</Label>
<div className="col-span-3">
<Input
Expand Down
6 changes: 3 additions & 3 deletions src/pages/servers/[server_id]/users/sudoers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,23 +133,23 @@ export default function Sudoers() {
if (res.status === 200) {
toast({
title: t("users.sudoers.toasts.success.title"),
description: t("users.sudoers.toasts.success"),
description: t("users.sudoers.toasts.success.description"),
})
fetchData()
tableRef.current?.resetRowSelection()
setSelected([])
} else {
toast({
title: t("users.sudoers.toasts.fail.title"),
description: t("users.sudoers.toasts.fail"),
description: t("users.sudoers.toasts.fail.description"),
variant: "destructive",
})
}
})
.catch(() => {
toast({
title: t("users.sudoers.toasts.fail.title"),
description: t("users.sudoers.toasts.fail"),
description: t("users.sudoers.toasts.fail.description"),
variant: "destructive",
})
})
Expand Down
1 change: 1 addition & 0 deletions src/pages/servers/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export default function Servers() {
),
title: t("index.table.extension_count"),
sortingFn: compareNumericString,
filterFn: "weakEquals",
},
{
id: "actions",
Expand Down

0 comments on commit 9446d6a

Please sign in to comment.