From b336df6ed0067819d88562115f0e488eddbf33c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matheus=20Lu=C3=ADs?= Date: Mon, 5 Aug 2024 14:27:44 -0300 Subject: [PATCH] formatting.. --- README.md | 5 +- .../src/components/avatar-dropdown.tsx | 4 +- apps/deepsirius-ui/src/components/footer.tsx | 2 +- .../deepsirius-ui/src/components/nautilus.tsx | 26 ++-- .../src/components/theme-toggle.tsx | 4 +- .../src/components/ui/accordion.tsx | 22 +-- .../src/components/ui/avatar.tsx | 18 +-- .../src/components/ui/command.tsx | 40 +++--- .../src/components/ui/dropdown-menu.tsx | 52 +++---- .../deepsirius-ui/src/components/ui/label.tsx | 12 +- .../src/components/ui/skeleton.tsx | 6 +- .../src/components/ui/textarea.tsx | 20 +-- .../src/components/ui/tooltip.tsx | 24 ++-- .../workboard/augmentation-node.tsx | 64 +++++++-- .../workboard/create-new-workspace.tsx | 5 +- .../src/components/workboard/dataset-node.tsx | 5 +- .../components/workboard/inference-node.tsx | 5 +- .../src/components/workboard/network-node.tsx | 5 +- .../workboard/node-components/node-card.tsx | 4 +- .../src/components/workboard/status-badge.tsx | 10 +- .../workboard/workspace-flow-controller.tsx | 131 +++++++++--------- .../src/pages/api/auth/[...nextauth].ts | 4 +- apps/deepsirius-ui/src/pages/index.tsx | 8 +- .../pages/u/[user]/[workspace]/gallery.tsx | 2 +- .../src/pages/u/[user]/index.tsx | 10 +- .../src/server/api/routers/deepsirius-job.ts | 26 +++- .../src/server/api/routers/ssh.ts | 2 +- apps/docs/app/_components/node.tsx | 10 +- apps/docs/app/_components/providers.tsx | 2 +- apps/docs/app/_components/search.tsx | 2 +- apps/docs/app/_components/ui/card.tsx | 28 ++-- .../_components/ui/pros-and-cons-table.tsx | 52 +++---- apps/docs/app/api/search/route.ts | 6 +- apps/docs/app/docs/[[...slug]]/page.tsx | 8 +- apps/docs/app/source.ts | 10 +- apps/docs/mdx-components.tsx | 4 +- 36 files changed, 358 insertions(+), 280 deletions(-) diff --git a/README.md b/README.md index 696ac71..df4df12 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ In a workspace, the user can create any number of components of each type, and c When a component is created and focused by the user it displays a form with the parameters of the component, which the user can fill and submit to the server. The server will then create a slurm job in the Sirius cluster with the parameters of the component, and update the state of the component in the interface as the job runs. The user can check the status of the job as the component changes itself. All of these changes are reflected in the database, so that the user can logoff and close the browser, and the jobs will continue to run in the cluster. -When the user logs in again and opens its workspace, the previous state of the +When the user logs in again and opens its workspace, the previous state of the components will be loaded from the database, compared to the current state of the jobs in the cluster, and then updated in the interface. > Note: In order to use the app the user must be registered in the CNPEM LDAP server and have access to the Sirius cluster, with permissions to run slurm jobs in the appropriate queue. @@ -82,7 +82,8 @@ Requirements satisfied, you can start the development environment with: Then, open [http://localhost:3000](http://localhost:3000) with your browser to see the result. ### Documentation -The documentation for the app can be found in the [docs](./apps/docs) folder. + +The documentation for the app can be found in the [docs](./apps/docs) folder. Start the documentation server with: ```shell diff --git a/apps/deepsirius-ui/src/components/avatar-dropdown.tsx b/apps/deepsirius-ui/src/components/avatar-dropdown.tsx index f952fc9..5cd5714 100644 --- a/apps/deepsirius-ui/src/components/avatar-dropdown.tsx +++ b/apps/deepsirius-ui/src/components/avatar-dropdown.tsx @@ -125,7 +125,9 @@ export function AvatarDrop() { > - {resolvedTheme === 'light' ? 'Dark' : 'Light'} + + {resolvedTheme === 'light' ? 'Dark' : 'Light'} +
- © 2023{" "} + © 2023{' '} {
{Array.from({ length: 7 }).map((_, i) => (
-
+
))}
@@ -149,8 +149,8 @@ const Nautilus = ({ onSelect }: { onSelect: (p: string) => void }) => { return (
-
- +
+

selected:{' '} @@ -169,7 +169,7 @@ const Nautilus = ({ onSelect }: { onSelect: (p: string) => void }) => { Select

-
+
| {shortcuts.map((shortcut) => ( @@ -211,7 +211,7 @@ const Nautilus = ({ onSelect }: { onSelect: (p: string) => void }) => { Path -
+
@@ -246,9 +246,9 @@ const Nautilus = ({ onSelect }: { onSelect: (p: string) => void }) => { onClick={() => setDisplay(display === 'grid' ? 'list' : 'grid')} > {display === 'grid' ? ( - + ) : ( - + )}
@@ -275,17 +275,17 @@ const Nautilus = ({ onSelect }: { onSelect: (p: string) => void }) => { }} key={item.name} className={cn( - 'flex items-center rounded-lg px-2 py-1 h-fit hover:bg-violet-100 data-[selected=true]:hover:bg-violet-100 data-[selected=true]:bg-violet-200 hover:cursor-pointer dark:hover:bg-violet-800 dark:data-[selected=true]:hover:bg-violet-800 dark:data-[selected=true]:bg-violet-900', + 'flex h-fit items-center rounded-lg px-2 py-1 hover:cursor-pointer hover:bg-violet-100 data-[selected=true]:bg-violet-200 data-[selected=true]:hover:bg-violet-100 dark:hover:bg-violet-800 dark:data-[selected=true]:bg-violet-900 dark:data-[selected=true]:hover:bg-violet-800', display === 'grid' ? 'flex-col' : 'flex-row gap-2', )} > {item.type === 'directory' && ( - + )} {item.type === 'file' && ( - + )} - + {item.name}
diff --git a/apps/deepsirius-ui/src/components/theme-toggle.tsx b/apps/deepsirius-ui/src/components/theme-toggle.tsx index 4819a74..1b4c522 100644 --- a/apps/deepsirius-ui/src/components/theme-toggle.tsx +++ b/apps/deepsirius-ui/src/components/theme-toggle.tsx @@ -13,11 +13,11 @@ export function ControlThemeButton() { return ( setTheme(theme === 'light' ? 'dark' : 'light')} > - + Toggle theme ); diff --git a/apps/deepsirius-ui/src/components/ui/accordion.tsx b/apps/deepsirius-ui/src/components/ui/accordion.tsx index 310ccb2..0de89b0 100644 --- a/apps/deepsirius-ui/src/components/ui/accordion.tsx +++ b/apps/deepsirius-ui/src/components/ui/accordion.tsx @@ -1,10 +1,10 @@ -"use client"; +'use client'; -import * as React from "react"; -import * as AccordionPrimitive from "@radix-ui/react-accordion"; -import { ChevronDown } from "lucide-react"; +import * as React from 'react'; +import * as AccordionPrimitive from '@radix-ui/react-accordion'; +import { ChevronDown } from 'lucide-react'; -import { cn } from "~/lib/utils"; +import { cn } from '~/lib/utils'; const Accordion = AccordionPrimitive.Root; @@ -14,11 +14,11 @@ const AccordionItem = React.forwardRef< >(({ className, ...props }, ref) => ( )); -AccordionItem.displayName = "AccordionItem"; +AccordionItem.displayName = 'AccordionItem'; const AccordionTrigger = React.forwardRef< React.ElementRef, @@ -28,8 +28,8 @@ const AccordionTrigger = React.forwardRef< svg]:rotate-180", - className + 'flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180', + className, )} {...props} > @@ -47,8 +47,8 @@ const AccordionContent = React.forwardRef< diff --git a/apps/deepsirius-ui/src/components/ui/avatar.tsx b/apps/deepsirius-ui/src/components/ui/avatar.tsx index 1c11571..76245a1 100644 --- a/apps/deepsirius-ui/src/components/ui/avatar.tsx +++ b/apps/deepsirius-ui/src/components/ui/avatar.tsx @@ -1,9 +1,9 @@ -"use client"; +'use client'; -import * as React from "react"; -import * as AvatarPrimitive from "@radix-ui/react-avatar"; +import * as React from 'react'; +import * as AvatarPrimitive from '@radix-ui/react-avatar'; -import { cn } from "~/lib/utils"; +import { cn } from '~/lib/utils'; const Avatar = React.forwardRef< React.ElementRef, @@ -12,8 +12,8 @@ const Avatar = React.forwardRef< @@ -26,7 +26,7 @@ const AvatarImage = React.forwardRef< >(({ className, ...props }, ref) => ( )); @@ -39,8 +39,8 @@ const AvatarFallback = React.forwardRef< diff --git a/apps/deepsirius-ui/src/components/ui/command.tsx b/apps/deepsirius-ui/src/components/ui/command.tsx index 9094df0..880b10b 100644 --- a/apps/deepsirius-ui/src/components/ui/command.tsx +++ b/apps/deepsirius-ui/src/components/ui/command.tsx @@ -1,12 +1,12 @@ -"use client"; +'use client'; -import * as React from "react"; -import { type DialogProps } from "@radix-ui/react-dialog"; -import { Command as CommandPrimitive } from "cmdk"; -import { Search } from "lucide-react"; +import * as React from 'react'; +import { type DialogProps } from '@radix-ui/react-dialog'; +import { Command as CommandPrimitive } from 'cmdk'; +import { Search } from 'lucide-react'; -import { cn } from "~/lib/utils"; -import { Dialog, DialogContent } from "~/components/ui/dialog"; +import { cn } from '~/lib/utils'; +import { Dialog, DialogContent } from '~/components/ui/dialog'; const Command = React.forwardRef< React.ElementRef, @@ -15,8 +15,8 @@ const Command = React.forwardRef< @@ -49,8 +49,8 @@ const CommandInput = React.forwardRef< @@ -65,7 +65,7 @@ const CommandList = React.forwardRef< >(({ className, ...props }, ref) => ( )); @@ -92,8 +92,8 @@ const CommandGroup = React.forwardRef< @@ -107,7 +107,7 @@ const CommandSeparator = React.forwardRef< >(({ className, ...props }, ref) => ( )); @@ -120,8 +120,8 @@ const CommandItem = React.forwardRef< @@ -136,14 +136,14 @@ const CommandShortcut = ({ return ( ); }; -CommandShortcut.displayName = "CommandShortcut"; +CommandShortcut.displayName = 'CommandShortcut'; export { Command, diff --git a/apps/deepsirius-ui/src/components/ui/dropdown-menu.tsx b/apps/deepsirius-ui/src/components/ui/dropdown-menu.tsx index 6df7717..40ef10d 100644 --- a/apps/deepsirius-ui/src/components/ui/dropdown-menu.tsx +++ b/apps/deepsirius-ui/src/components/ui/dropdown-menu.tsx @@ -1,10 +1,10 @@ -"use client"; +'use client'; -import * as React from "react"; -import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"; -import { Check, ChevronRight, Circle } from "lucide-react"; +import * as React from 'react'; +import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'; +import { Check, ChevronRight, Circle } from 'lucide-react'; -import { cn } from "~/lib/utils"; +import { cn } from '~/lib/utils'; const DropdownMenu = DropdownMenuPrimitive.Root; @@ -27,9 +27,9 @@ const DropdownMenuSubTrigger = React.forwardRef< @@ -47,8 +47,8 @@ const DropdownMenuSubContent = React.forwardRef< @@ -65,8 +65,8 @@ const DropdownMenuContent = React.forwardRef< ref={ref} sideOffset={sideOffset} className={cn( - "z-50 min-w-[8rem] overflow-hidden rounded-md border border-slate-100 bg-white p-1 text-slate-700 shadow-md animate-in data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-slate-800 dark:bg-slate-800 dark:text-slate-400", - className + 'z-50 min-w-[8rem] overflow-hidden rounded-md border border-slate-100 bg-white p-1 text-slate-700 shadow-md animate-in data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-slate-800 dark:bg-slate-800 dark:text-slate-400', + className, )} {...props} /> @@ -83,9 +83,9 @@ const DropdownMenuItem = React.forwardRef< @@ -99,8 +99,8 @@ const DropdownMenuCheckboxItem = React.forwardRef< @@ -147,9 +147,9 @@ const DropdownMenuLabel = React.forwardRef< @@ -162,7 +162,7 @@ const DropdownMenuSeparator = React.forwardRef< >(({ className, ...props }, ref) => ( )); @@ -175,14 +175,14 @@ const DropdownMenuShortcut = ({ return ( ); }; -DropdownMenuShortcut.displayName = "DropdownMenuShortcut"; +DropdownMenuShortcut.displayName = 'DropdownMenuShortcut'; export { DropdownMenu, diff --git a/apps/deepsirius-ui/src/components/ui/label.tsx b/apps/deepsirius-ui/src/components/ui/label.tsx index 081b380..ee7acd3 100644 --- a/apps/deepsirius-ui/src/components/ui/label.tsx +++ b/apps/deepsirius-ui/src/components/ui/label.tsx @@ -1,9 +1,9 @@ -"use client"; +'use client'; -import * as React from "react"; -import * as LabelPrimitive from "@radix-ui/react-label"; +import * as React from 'react'; +import * as LabelPrimitive from '@radix-ui/react-label'; -import { cn } from "~/lib/utils"; +import { cn } from '~/lib/utils'; const Label = React.forwardRef< React.ElementRef, @@ -12,8 +12,8 @@ const Label = React.forwardRef< diff --git a/apps/deepsirius-ui/src/components/ui/skeleton.tsx b/apps/deepsirius-ui/src/components/ui/skeleton.tsx index 2e1de8e..835a97e 100644 --- a/apps/deepsirius-ui/src/components/ui/skeleton.tsx +++ b/apps/deepsirius-ui/src/components/ui/skeleton.tsx @@ -1,4 +1,4 @@ -import { cn } from "~/lib/utils"; +import { cn } from '~/lib/utils'; function Skeleton({ className, @@ -7,8 +7,8 @@ function Skeleton({ return (
diff --git a/apps/deepsirius-ui/src/components/ui/textarea.tsx b/apps/deepsirius-ui/src/components/ui/textarea.tsx index 347dd85..c8d885a 100644 --- a/apps/deepsirius-ui/src/components/ui/textarea.tsx +++ b/apps/deepsirius-ui/src/components/ui/textarea.tsx @@ -1,23 +1,23 @@ -import * as React from "react" +import * as React from 'react'; -import { cn } from "~/lib/utils" +import { cn } from '~/lib/utils'; -export type TextareaProps = React.TextareaHTMLAttributes +export type TextareaProps = React.TextareaHTMLAttributes; const Textarea = React.forwardRef( ({ className, ...props }, ref) => { return (