From f14354b3dd1c1dc12899e9b4aea9cff3f2214bc5 Mon Sep 17 00:00:00 2001 From: Salil Ponde Date: Sun, 24 Dec 2023 18:32:58 +0530 Subject: [PATCH] Refactored page component names and directory structure --- ...ose-library-create-filesystem-project.tsx} | 2 +- ...compose-library-create-github-project.tsx} | 6 +- ...mpose-library-edit-filesystem-project.tsx} | 2 +- ...> compose-library-edit-github-project.tsx} | 6 +- ...ary-items.tsx => compose-library-list.tsx} | 2 +- .../actions.tsx => compose-actions.tsx} | 0 ...hub-compose.tsx => compose-add-github.tsx} | 6 +- ...ocal-compose.tsx => compose-add-local.tsx} | 2 +- ...ect.tsx => compose-add-project-dialog.tsx} | 2 +- ...tainers.tsx => compose-container-list.tsx} | 4 +- ...thub.tsx => compose-definition-github.tsx} | 4 +- ...local.tsx => compose-definition-local.tsx} | 0 .../definition.tsx => compose-definition.tsx} | 4 +- .../{node-compose.tsx => compose-list.tsx} | 6 +- .../{compose/logs.tsx => compose-logs.tsx} | 0 .../compose-variable-add-dialog.tsx} | 2 +- .../compose-variable-edit-dialog.tsx} | 2 +- .../compose-variable-editor.tsx | 8 +- .../{containers.tsx => container-list.tsx} | 4 +- .../logs.tsx => container-logs.tsx} | 0 .../terminal.tsx => container-terminal.tsx} | 0 .../{credentials.tsx => credential-list.tsx} | 14 ++-- ...t-dialog.tsx => github-pat-add-dialog.tsx} | 2 +- ...tsx => github-pat-details-edit-dialog.tsx} | 2 +- ....tsx => github-pat-secret-edit-dialog.tsx} | 2 +- ...-dialog.tsx => environment-add-dialog.tsx} | 2 +- ...dialog.tsx => environment-edit-dialog.tsx} | 2 +- ...{environments.tsx => environment-list.tsx} | 10 +-- .../app/images/{images.tsx => image-list.tsx} | 2 +- .../{networks.tsx => network-list.tsx} | 2 +- ...g.tsx => containerbaseurl-edit-dialog.tsx} | 2 +- ...dd-node-dialog.tsx => node-add-dialog.tsx} | 2 +- .../app/nodes/{nodes.tsx => node-list.tsx} | 14 ++-- ...de-dialog.tsx => node-register-dialog.tsx} | 2 +- ...l-dialog.tsx => serverurl-edit-dialog.tsx} | 2 +- ...ble-dialog.tsx => variable-add-dialog.tsx} | 2 +- ...le-dialog.tsx => variable-edit-dialog.tsx} | 2 +- .../{variables.tsx => variable-list.tsx} | 14 ++-- ...log.tsx => variable-value-edit-dialog.tsx} | 2 +- .../volumes/{volumes.tsx => volume-list.tsx} | 2 +- web/src/router.tsx | 78 +++++++++---------- 41 files changed, 111 insertions(+), 111 deletions(-) rename web/src/app/compose-library/{create-filesystem-compose-project.tsx => compose-library-create-filesystem-project.tsx} (98%) rename web/src/app/compose-library/{create-github-compose-project.tsx => compose-library-create-github-project.tsx} (98%) rename web/src/app/compose-library/{edit-filesystem-compose-project.tsx => compose-library-edit-filesystem-project.tsx} (99%) rename web/src/app/compose-library/{edit-github-compose-project.tsx => compose-library-edit-github-project.tsx} (98%) rename web/src/app/compose-library/{compose-library-items.tsx => compose-library-list.tsx} (98%) rename web/src/app/compose/{compose/actions.tsx => compose-actions.tsx} (100%) rename web/src/app/compose/{add-github-compose.tsx => compose-add-github.tsx} (98%) rename web/src/app/compose/{add-local-compose.tsx => compose-add-local.tsx} (99%) rename web/src/app/compose/{dialogs/add-node-compose-project.tsx => compose-add-project-dialog.tsx} (99%) rename web/src/app/compose/{compose/containers.tsx => compose-container-list.tsx} (96%) rename web/src/app/compose/{compose/definition-github.tsx => compose-definition-github.tsx} (99%) rename web/src/app/compose/{compose/definition-local.tsx => compose-definition-local.tsx} (100%) rename web/src/app/compose/{compose/definition.tsx => compose-definition.tsx} (77%) rename web/src/app/compose/{node-compose.tsx => compose-list.tsx} (96%) rename web/src/app/compose/{compose/logs.tsx => compose-logs.tsx} (100%) rename web/src/app/compose/{compose/variable-editor/add-compose-variable-dialog.tsx => variable-editor/compose-variable-add-dialog.tsx} (99%) rename web/src/app/compose/{compose/variable-editor/edit-compose-variable-dialog.tsx => variable-editor/compose-variable-edit-dialog.tsx} (99%) rename web/src/app/compose/{compose => }/variable-editor/compose-variable-editor.tsx (96%) rename web/src/app/containers/{containers.tsx => container-list.tsx} (98%) rename web/src/app/containers/{container/logs.tsx => container-logs.tsx} (100%) rename web/src/app/containers/{container/terminal.tsx => container-terminal.tsx} (100%) rename web/src/app/credentials/{credentials.tsx => credential-list.tsx} (93%) rename web/src/app/credentials/{dialogs/add-github-pat-dialog.tsx => github-pat-add-dialog.tsx} (99%) rename web/src/app/credentials/{dialogs/edit-github-pat-details-dialog.tsx => github-pat-details-edit-dialog.tsx} (98%) rename web/src/app/credentials/{dialogs/edit-github-pat-secret-dialog.tsx => github-pat-secret-edit-dialog.tsx} (98%) rename web/src/app/environments/{dialogs/add-environment-dialog.tsx => environment-add-dialog.tsx} (98%) rename web/src/app/environments/{dialogs/edit-environment-dialog.tsx => environment-edit-dialog.tsx} (98%) rename web/src/app/environments/{environments.tsx => environment-list.tsx} (94%) rename web/src/app/images/{images.tsx => image-list.tsx} (99%) rename web/src/app/networks/{networks.tsx => network-list.tsx} (99%) rename web/src/app/nodes/{dialogs/edit-containerbaseurl-dialog.tsx => containerbaseurl-edit-dialog.tsx} (98%) rename web/src/app/nodes/{dialogs/add-node-dialog.tsx => node-add-dialog.tsx} (99%) rename web/src/app/nodes/{nodes.tsx => node-list.tsx} (94%) rename web/src/app/nodes/{dialogs/register-node-dialog.tsx => node-register-dialog.tsx} (98%) rename web/src/app/nodes/{dialogs/edit-serverurl-dialog.tsx => serverurl-edit-dialog.tsx} (98%) rename web/src/app/variables/{dialogs/add-variable-dialog.tsx => variable-add-dialog.tsx} (99%) rename web/src/app/variables/{dialogs/edit-variable-dialog.tsx => variable-edit-dialog.tsx} (99%) rename web/src/app/variables/{variables.tsx => variable-list.tsx} (95%) rename web/src/app/variables/{dialogs/edit-variable-value-dialog.tsx => variable-value-edit-dialog.tsx} (98%) rename web/src/app/volumes/{volumes.tsx => volume-list.tsx} (99%) diff --git a/web/src/app/compose-library/create-filesystem-compose-project.tsx b/web/src/app/compose-library/compose-library-create-filesystem-project.tsx similarity index 98% rename from web/src/app/compose-library/create-filesystem-compose-project.tsx rename to web/src/app/compose-library/compose-library-create-filesystem-project.tsx index 45261ea..7b61563 100644 --- a/web/src/app/compose-library/create-filesystem-compose-project.tsx +++ b/web/src/app/compose-library/compose-library-create-filesystem-project.tsx @@ -42,7 +42,7 @@ import type monaco from "monaco-editor" import { Input } from "@/components/ui/input" import { useTheme } from "@/components/ui/theme-provider" -export default function CreateFileSystemComposeProject() { +export default function ComposeLibraryCreateFileSystemProject() { const navigate = useNavigate() const [isSaving, setIsSaving] = useState(false) const definitionDefaultValue = `` diff --git a/web/src/app/compose-library/create-github-compose-project.tsx b/web/src/app/compose-library/compose-library-create-github-project.tsx similarity index 98% rename from web/src/app/compose-library/create-github-compose-project.tsx rename to web/src/app/compose-library/compose-library-create-github-project.tsx index 2f20ce7..9c63d14 100644 --- a/web/src/app/compose-library/create-github-compose-project.tsx +++ b/web/src/app/compose-library/compose-library-create-github-project.tsx @@ -55,9 +55,9 @@ import { CommandItem, } from "@/components/ui/command" import useCredentials from "@/hooks/useCredentials" -import AddGitHubPATDialog from "../credentials/dialogs/add-github-pat-dialog" +import GitHubPATAddDialog from "../credentials/github-pat-add-dialog" -export default function CreateGitHubComposeProject() { +export default function ComposeLibraryCreateGitHubProject() { const navigate = useNavigate() const [isSaving, setIsSaving] = useState(false) const { credentials } = useCredentials() @@ -285,7 +285,7 @@ export default function CreateGitHubComposeProject() { - + diff --git a/web/src/app/compose-library/edit-filesystem-compose-project.tsx b/web/src/app/compose-library/compose-library-edit-filesystem-project.tsx similarity index 99% rename from web/src/app/compose-library/edit-filesystem-compose-project.tsx rename to web/src/app/compose-library/compose-library-edit-filesystem-project.tsx index 3c6f161..b19a270 100644 --- a/web/src/app/compose-library/edit-filesystem-compose-project.tsx +++ b/web/src/app/compose-library/compose-library-edit-filesystem-project.tsx @@ -45,7 +45,7 @@ import useComposeLibraryItemList from "@/hooks/useComposeLibraryItemList" import { useTheme } from "@/components/ui/theme-provider" import DeleteDialog from "@/components/delete-dialog" -export default function EditFileSystemComposeProject() { +export default function ComposeLibraryEditFileSystemProject() { const { composeProjectName } = useParams() const { fileSystemComposeLibraryItem: composeLibraryItem, diff --git a/web/src/app/compose-library/edit-github-compose-project.tsx b/web/src/app/compose-library/compose-library-edit-github-project.tsx similarity index 98% rename from web/src/app/compose-library/edit-github-compose-project.tsx rename to web/src/app/compose-library/compose-library-edit-github-project.tsx index 13557f6..4615533 100644 --- a/web/src/app/compose-library/edit-github-compose-project.tsx +++ b/web/src/app/compose-library/compose-library-edit-github-project.tsx @@ -55,12 +55,12 @@ import { CommandItem, } from "@/components/ui/command" import useCredentials from "@/hooks/useCredentials" -import AddGitHubPATDialog from "../credentials/dialogs/add-github-pat-dialog" +import GitHubPATAddDialog from "../credentials/github-pat-add-dialog" import useGitHubComposeLibraryItem from "@/hooks/useGitHubComposeLibraryItem" import DeleteDialog from "@/components/delete-dialog" import useComposeLibraryItemList from "@/hooks/useComposeLibraryItemList" -export default function EditGitHubComposeProject() { +export default function ComposeLibraryEditGitHubProject() { const { composeProjectId } = useParams() const { gitHubComposeLibraryItem } = useGitHubComposeLibraryItem( composeProjectId! @@ -336,7 +336,7 @@ export default function EditGitHubComposeProject() { - + diff --git a/web/src/app/compose-library/compose-library-items.tsx b/web/src/app/compose-library/compose-library-list.tsx similarity index 98% rename from web/src/app/compose-library/compose-library-items.tsx rename to web/src/app/compose-library/compose-library-list.tsx index 23d76e3..4c98499 100644 --- a/web/src/app/compose-library/compose-library-items.tsx +++ b/web/src/app/compose-library/compose-library-list.tsx @@ -18,7 +18,7 @@ import useComposeLibraryItemList from "@/hooks/useComposeLibraryItemList" import { CLASSES_CLICKABLE_TABLE_ROW } from "@/lib/utils" import { TableNoData } from "@/components/widgets/table-no-data" -export default function ComposeLibraryItems() { +export default function ComposeLibraryList() { const navigate = useNavigate() const { isLoading, composeLibraryItems } = useComposeLibraryItemList() diff --git a/web/src/app/compose/compose/actions.tsx b/web/src/app/compose/compose-actions.tsx similarity index 100% rename from web/src/app/compose/compose/actions.tsx rename to web/src/app/compose/compose-actions.tsx diff --git a/web/src/app/compose/add-github-compose.tsx b/web/src/app/compose/compose-add-github.tsx similarity index 98% rename from web/src/app/compose/add-github-compose.tsx rename to web/src/app/compose/compose-add-github.tsx index 53adabb..a3c0fe8 100644 --- a/web/src/app/compose/add-github-compose.tsx +++ b/web/src/app/compose/compose-add-github.tsx @@ -55,10 +55,10 @@ import { CommandItem, } from "@/components/ui/command" import useCredentials from "@/hooks/useCredentials" -import AddGitHubPATDialog from "../credentials/dialogs/add-github-pat-dialog" +import GitHubPATAddDialog from "../credentials/github-pat-add-dialog" import useNodeHead from "@/hooks/useNodeHead" -export default function AddGitHubCompose() { +export default function ComposeAddGitHub() { const { nodeId } = useParams() const { nodeHead } = useNodeHead(nodeId!) const navigate = useNavigate() @@ -297,7 +297,7 @@ export default function AddGitHubCompose() { - + diff --git a/web/src/app/compose/add-local-compose.tsx b/web/src/app/compose/compose-add-local.tsx similarity index 99% rename from web/src/app/compose/add-local-compose.tsx rename to web/src/app/compose/compose-add-local.tsx index d883408..9de9b42 100644 --- a/web/src/app/compose/add-local-compose.tsx +++ b/web/src/app/compose/compose-add-local.tsx @@ -43,7 +43,7 @@ import { Input } from "@/components/ui/input" import { useTheme } from "@/components/ui/theme-provider" import useNodeHead from "@/hooks/useNodeHead" -export default function AddLocalCompose() { +export default function ComposeAddLocal() { const { nodeId } = useParams() const { nodeHead } = useNodeHead(nodeId!) const navigate = useNavigate() diff --git a/web/src/app/compose/dialogs/add-node-compose-project.tsx b/web/src/app/compose/compose-add-project-dialog.tsx similarity index 99% rename from web/src/app/compose/dialogs/add-node-compose-project.tsx rename to web/src/app/compose/compose-add-project-dialog.tsx index f78e24d..929274e 100644 --- a/web/src/app/compose/dialogs/add-node-compose-project.tsx +++ b/web/src/app/compose/compose-add-project-dialog.tsx @@ -47,7 +47,7 @@ import { import useComposeLibraryItemList from "@/hooks/useComposeLibraryItemList" import useNodeComposeList from "@/hooks/useNodeComposeList" -export default function AddNodeComposeProjectDialog() { +export default function ComposeAddProjectDialog() { const { nodeId } = useParams() const { composeLibraryItems } = useComposeLibraryItemList() const { mutateNodeComposeList } = useNodeComposeList(nodeId!) diff --git a/web/src/app/compose/compose/containers.tsx b/web/src/app/compose/compose-container-list.tsx similarity index 96% rename from web/src/app/compose/compose/containers.tsx rename to web/src/app/compose/compose-container-list.tsx index 220428e..b20c7de 100644 --- a/web/src/app/compose/compose/containers.tsx +++ b/web/src/app/compose/compose-container-list.tsx @@ -28,10 +28,10 @@ import { getContainerUrlFromPortMapping } from "@/lib/utils" import useNodeHead from "@/hooks/useNodeHead" import useNodeComposeItem from "@/hooks/useNodeComposeItem" import { ArrowUpRight } from "lucide-react" -import EditContainerBaseUrlDialog from "@/app/nodes/dialogs/edit-containerbaseurl-dialog" +import EditContainerBaseUrlDialog from "@/app/nodes/containerbaseurl-edit-dialog" import { TableNoData } from "@/components/widgets/table-no-data" -export default function ComposeContainers() { +export default function ComposeContainerList() { const { nodeId, composeProjectId } = useParams() const { nodeHead } = useNodeHead(nodeId!) const { nodeComposeItem } = useNodeComposeItem(nodeId!, composeProjectId!) diff --git a/web/src/app/compose/compose/definition-github.tsx b/web/src/app/compose/compose-definition-github.tsx similarity index 99% rename from web/src/app/compose/compose/definition-github.tsx rename to web/src/app/compose/compose-definition-github.tsx index 78b3c98..6c7fa16 100644 --- a/web/src/app/compose/compose/definition-github.tsx +++ b/web/src/app/compose/compose-definition-github.tsx @@ -56,7 +56,7 @@ import { } from "@/components/ui/command" import useCredentials from "@/hooks/useCredentials" import useNodeHead from "@/hooks/useNodeHead" -import AddGitHubPATDialog from "@/app/credentials/dialogs/add-github-pat-dialog" +import GitHubPATAddDialog from "@/app/credentials/github-pat-add-dialog" import useNodeComposeItem from "@/hooks/useNodeComposeItem" import ComposeVariableEditor from "./variable-editor/compose-variable-editor" @@ -348,7 +348,7 @@ export default function ComposeDefinitionGitHub() { - + diff --git a/web/src/app/compose/compose/definition-local.tsx b/web/src/app/compose/compose-definition-local.tsx similarity index 100% rename from web/src/app/compose/compose/definition-local.tsx rename to web/src/app/compose/compose-definition-local.tsx diff --git a/web/src/app/compose/compose/definition.tsx b/web/src/app/compose/compose-definition.tsx similarity index 77% rename from web/src/app/compose/compose/definition.tsx rename to web/src/app/compose/compose-definition.tsx index 954634e..16af018 100644 --- a/web/src/app/compose/compose/definition.tsx +++ b/web/src/app/compose/compose-definition.tsx @@ -1,7 +1,7 @@ import { useParams } from "react-router-dom" import useNodeComposeItem from "@/hooks/useNodeComposeItem" -import ComposeDefinitionGitHub from "./definition-github" -import ComposeDefinitionLocal from "./definition-local" +import ComposeDefinitionGitHub from "./compose-definition-github" +import ComposeDefinitionLocal from "./compose-definition-local" export default function ComposeDefinition() { const { nodeId } = useParams() diff --git a/web/src/app/compose/node-compose.tsx b/web/src/app/compose/compose-list.tsx similarity index 96% rename from web/src/app/compose/node-compose.tsx rename to web/src/app/compose/compose-list.tsx index 6cd2c34..0189ef9 100644 --- a/web/src/app/compose/node-compose.tsx +++ b/web/src/app/compose/compose-list.tsx @@ -21,13 +21,13 @@ import useNodeComposeList from "@/hooks/useNodeComposeList" import { Badge } from "@/components/ui/badge" import { useNavigate, useParams } from "react-router-dom" import useNodeHead from "@/hooks/useNodeHead" -import AddNodeComposeProjectDialog from "./dialogs/add-node-compose-project" +import ComposeAddProjectDialog from "./compose-add-project-dialog" import { ArrowUpRight } from "lucide-react" import { CLASSES_CLICKABLE_TABLE_ROW } from "@/lib/utils" import { Button } from "@/components/ui/button" import { TableNoData } from "@/components/widgets/table-no-data" -export default function NodeCompose() { +export default function ComposeList() { const { nodeId } = useParams() const { nodeHead } = useNodeHead(nodeId!) const navigate = useNavigate() @@ -62,7 +62,7 @@ export default function NodeCompose() { > Add from GitHub - + diff --git a/web/src/app/compose/compose/logs.tsx b/web/src/app/compose/compose-logs.tsx similarity index 100% rename from web/src/app/compose/compose/logs.tsx rename to web/src/app/compose/compose-logs.tsx diff --git a/web/src/app/compose/compose/variable-editor/add-compose-variable-dialog.tsx b/web/src/app/compose/variable-editor/compose-variable-add-dialog.tsx similarity index 99% rename from web/src/app/compose/compose/variable-editor/add-compose-variable-dialog.tsx rename to web/src/app/compose/variable-editor/compose-variable-add-dialog.tsx index 750bc1e..bdc0190 100644 --- a/web/src/app/compose/compose/variable-editor/add-compose-variable-dialog.tsx +++ b/web/src/app/compose/variable-editor/compose-variable-add-dialog.tsx @@ -32,7 +32,7 @@ import { Checkbox } from "@/components/ui/checkbox" import apiBaseUrl from "@/lib/api-base-url" import useNodeComposeVariables from "@/hooks/useNodeComposeVariables" -export default function AddComposeVariableDialog({ +export default function ComposeVariableAddDialog({ nodeId, nodeComposeProjectId, }: { diff --git a/web/src/app/compose/compose/variable-editor/edit-compose-variable-dialog.tsx b/web/src/app/compose/variable-editor/compose-variable-edit-dialog.tsx similarity index 99% rename from web/src/app/compose/compose/variable-editor/edit-compose-variable-dialog.tsx rename to web/src/app/compose/variable-editor/compose-variable-edit-dialog.tsx index 3147bae..c8c11d8 100644 --- a/web/src/app/compose/compose/variable-editor/edit-compose-variable-dialog.tsx +++ b/web/src/app/compose/variable-editor/compose-variable-edit-dialog.tsx @@ -32,7 +32,7 @@ import apiBaseUrl from "@/lib/api-base-url" import { INodeComposeVariable } from "@/lib/api-models" import useNodeComposeVariables from "@/hooks/useNodeComposeVariables" -export default function EditComposeVariableDialog({ +export default function ComposeVariableEditDialog({ openState, setOpenState, variable, diff --git a/web/src/app/compose/compose/variable-editor/compose-variable-editor.tsx b/web/src/app/compose/variable-editor/compose-variable-editor.tsx similarity index 96% rename from web/src/app/compose/compose/variable-editor/compose-variable-editor.tsx rename to web/src/app/compose/variable-editor/compose-variable-editor.tsx index 8b6c3a7..a59b428 100644 --- a/web/src/app/compose/compose/variable-editor/compose-variable-editor.tsx +++ b/web/src/app/compose/variable-editor/compose-variable-editor.tsx @@ -7,14 +7,14 @@ import { TableRow, } from "@/components/ui/table" import useNodeComposeVariables from "@/hooks/useNodeComposeVariables" -import AddComposeVariableDialog from "./add-compose-variable-dialog" +import ComposeVariableAddDialog from "./compose-variable-add-dialog" import { Checkbox } from "@/components/ui/checkbox" import { Button } from "@/components/ui/button" import { PencilIcon, TrashIcon } from "@heroicons/react/24/outline" import { CLASSES_TABLE_ACTION_ICON } from "@/lib/utils" import { INodeComposeVariable } from "@/lib/api-models" import { useState } from "react" -import EditComposeVariableDialog from "./edit-compose-variable-dialog" +import ComposeVariableEditDialog from "./compose-variable-edit-dialog" import apiBaseUrl from "@/lib/api-base-url" import DeleteDialog from "@/components/delete-dialog" @@ -73,7 +73,7 @@ export default function ComposeVariableEditor({ return (
{editVariableOpen && ( - - diff --git a/web/src/app/containers/containers.tsx b/web/src/app/containers/container-list.tsx similarity index 98% rename from web/src/app/containers/containers.tsx rename to web/src/app/containers/container-list.tsx index 559190f..2ea7d0a 100644 --- a/web/src/app/containers/containers.tsx +++ b/web/src/app/containers/container-list.tsx @@ -28,7 +28,7 @@ import { useNavigate, useParams } from "react-router-dom" import axios from "axios" import useNodeHead from "@/hooks/useNodeHead" import { ArrowUpRight } from "lucide-react" -import EditContainerBaseUrlDialog from "../nodes/dialogs/edit-containerbaseurl-dialog" +import EditContainerBaseUrlDialog from "../nodes/containerbaseurl-edit-dialog" import { CLASSES_CLICKABLE_TABLE_ROW, toastFailed, @@ -38,7 +38,7 @@ import TableButtonDelete from "@/components/widgets/table-button-delete" import { TableNoData } from "@/components/widgets/table-no-data" import DeleteDialog from "@/components/delete-dialog" -export default function Containers() { +export default function ContainerList() { const { nodeId } = useParams() const { nodeHead } = useNodeHead(nodeId!) diff --git a/web/src/app/containers/container/logs.tsx b/web/src/app/containers/container-logs.tsx similarity index 100% rename from web/src/app/containers/container/logs.tsx rename to web/src/app/containers/container-logs.tsx diff --git a/web/src/app/containers/container/terminal.tsx b/web/src/app/containers/container-terminal.tsx similarity index 100% rename from web/src/app/containers/container/terminal.tsx rename to web/src/app/containers/container-terminal.tsx diff --git a/web/src/app/credentials/credentials.tsx b/web/src/app/credentials/credential-list.tsx similarity index 93% rename from web/src/app/credentials/credentials.tsx rename to web/src/app/credentials/credential-list.tsx index 73783ae..ef9c2da 100644 --- a/web/src/app/credentials/credentials.tsx +++ b/web/src/app/credentials/credential-list.tsx @@ -13,23 +13,23 @@ import TopBar from "@/components/widgets/top-bar" import TopBarActions from "@/components/widgets/top-bar-actions" import MainContent from "@/components/widgets/main-content" import useCredentials from "@/hooks/useCredentials" -import AddGitHubPATDialog from "./dialogs/add-github-pat-dialog" +import GitHubPATAddDialog from "./github-pat-add-dialog" import { Button } from "@/components/ui/button" import { useState } from "react" import { ICredentialHead } from "@/lib/api-models" -import EditGithubPATDetailsDialog from "./dialogs/edit-github-pat-details-dialog" +import GithubPATDetailsEditDialog from "./github-pat-details-edit-dialog" import { CLASSES_CLICKABLE_TABLE_ROW, toastFailed, toastSuccess, } from "@/lib/utils" -import EditGithubPATSecretDialog from "./dialogs/edit-github-pat-secret-dialog" +import GithubPATSecretEditDialog from "./github-pat-secret-edit-dialog" import TableButtonDelete from "@/components/widgets/table-button-delete" import { TableNoData } from "@/components/widgets/table-no-data" import apiBaseUrl from "@/lib/api-base-url" import DeleteDialog from "@/components/delete-dialog" -export default function Credentials() { +export default function CredentialList() { const { isLoading, credentials, mutateCredentials } = useCredentials() const [editCredentialOpen, setEditCredentialOpen] = useState(false) const [editCredentialSecretOpen, setEditCredentialSecretOpen] = @@ -83,14 +83,14 @@ export default function Credentials() { return ( {editCredentialSecretOpen && ( - )} {editCredentialOpen && ( - Credentials - + diff --git a/web/src/app/credentials/dialogs/add-github-pat-dialog.tsx b/web/src/app/credentials/github-pat-add-dialog.tsx similarity index 99% rename from web/src/app/credentials/dialogs/add-github-pat-dialog.tsx rename to web/src/app/credentials/github-pat-add-dialog.tsx index 50acb12..48be1ef 100644 --- a/web/src/app/credentials/dialogs/add-github-pat-dialog.tsx +++ b/web/src/app/credentials/github-pat-add-dialog.tsx @@ -33,7 +33,7 @@ import { import useCredentials from "@/hooks/useCredentials" import apiBaseUrl from "@/lib/api-base-url" -export default function AddGitHubPATDialog({ +export default function GitHubPATAddDialog({ buttonCaption, }: { buttonCaption: string diff --git a/web/src/app/credentials/dialogs/edit-github-pat-details-dialog.tsx b/web/src/app/credentials/github-pat-details-edit-dialog.tsx similarity index 98% rename from web/src/app/credentials/dialogs/edit-github-pat-details-dialog.tsx rename to web/src/app/credentials/github-pat-details-edit-dialog.tsx index 741860e..90eb483 100644 --- a/web/src/app/credentials/dialogs/edit-github-pat-details-dialog.tsx +++ b/web/src/app/credentials/github-pat-details-edit-dialog.tsx @@ -34,7 +34,7 @@ import apiBaseUrl from "@/lib/api-base-url" import { ICredentialHead } from "@/lib/api-models" import useCredential from "@/hooks/useCredential" -export default function EditGithubPATDetailsDialog({ +export default function GithubPATDetailsEditDialog({ openState, setOpenState, credentialHead, diff --git a/web/src/app/credentials/dialogs/edit-github-pat-secret-dialog.tsx b/web/src/app/credentials/github-pat-secret-edit-dialog.tsx similarity index 98% rename from web/src/app/credentials/dialogs/edit-github-pat-secret-dialog.tsx rename to web/src/app/credentials/github-pat-secret-edit-dialog.tsx index b21b220..72125b7 100644 --- a/web/src/app/credentials/dialogs/edit-github-pat-secret-dialog.tsx +++ b/web/src/app/credentials/github-pat-secret-edit-dialog.tsx @@ -24,7 +24,7 @@ import { cn, toastSomethingWentWrong, toastSuccess } from "@/lib/utils" import apiBaseUrl from "@/lib/api-base-url" import { ICredentialHead } from "@/lib/api-models" -export default function EditGithubPATSecretDialog({ +export default function GithubPATSecretEditDialog({ openState, setOpenState, credentialHead, diff --git a/web/src/app/environments/dialogs/add-environment-dialog.tsx b/web/src/app/environments/environment-add-dialog.tsx similarity index 98% rename from web/src/app/environments/dialogs/add-environment-dialog.tsx rename to web/src/app/environments/environment-add-dialog.tsx index c38fc72..b2fdac4 100644 --- a/web/src/app/environments/dialogs/add-environment-dialog.tsx +++ b/web/src/app/environments/environment-add-dialog.tsx @@ -33,7 +33,7 @@ import { import useEnvironments from "@/hooks/useEnvironments" import apiBaseUrl from "@/lib/api-base-url" -export default function AddEnvironmentDialog() { +export default function EnvironmentAddDialog() { const [open, setOpen] = useState(false) const [isSaving, setIsSaving] = useState(false) const { mutateEnvironments } = useEnvironments() diff --git a/web/src/app/environments/dialogs/edit-environment-dialog.tsx b/web/src/app/environments/environment-edit-dialog.tsx similarity index 98% rename from web/src/app/environments/dialogs/edit-environment-dialog.tsx rename to web/src/app/environments/environment-edit-dialog.tsx index 41e3301..0b8fceb 100644 --- a/web/src/app/environments/dialogs/edit-environment-dialog.tsx +++ b/web/src/app/environments/environment-edit-dialog.tsx @@ -33,7 +33,7 @@ import useEnvironments from "@/hooks/useEnvironments" import apiBaseUrl from "@/lib/api-base-url" import { IEnvironmentHead } from "@/lib/api-models" -export default function EditEnvironmentDialog({ +export default function EnvironmentEditDialog({ openState, setOpenState, environmentHead, diff --git a/web/src/app/environments/environments.tsx b/web/src/app/environments/environment-list.tsx similarity index 94% rename from web/src/app/environments/environments.tsx rename to web/src/app/environments/environment-list.tsx index aa9a03d..1878202 100644 --- a/web/src/app/environments/environments.tsx +++ b/web/src/app/environments/environment-list.tsx @@ -13,10 +13,10 @@ import TopBar from "@/components/widgets/top-bar" import TopBarActions from "@/components/widgets/top-bar-actions" import MainContent from "@/components/widgets/main-content" import useEnvironments from "@/hooks/useEnvironments" -import AddEnvironmentDialog from "./dialogs/add-environment-dialog" +import EnvironmentAddDialog from "./environment-add-dialog" import { useState } from "react" import { IEnvironmentHead } from "@/lib/api-models" -import EditEnvironmentDialog from "./dialogs/edit-environment-dialog" +import EnvironmentEditDialog from "./environment-edit-dialog" import { CLASSES_CLICKABLE_TABLE_ROW, toastFailed, @@ -27,7 +27,7 @@ import { TableNoData } from "@/components/widgets/table-no-data" import apiBaseUrl from "@/lib/api-base-url" import DeleteDialog from "@/components/delete-dialog" -export default function Environments() { +export default function EnvironmentList() { const { isLoading, environments, mutateEnvironments } = useEnvironments() const [environmentHead, setEnvironmentHead] = useState(null) @@ -78,7 +78,7 @@ export default function Environments() { return ( {editEnvironmentOpen && ( - Environments - + diff --git a/web/src/app/images/images.tsx b/web/src/app/images/image-list.tsx similarity index 99% rename from web/src/app/images/images.tsx rename to web/src/app/images/image-list.tsx index a5ca570..12959c3 100644 --- a/web/src/app/images/images.tsx +++ b/web/src/app/images/image-list.tsx @@ -28,7 +28,7 @@ import { TableNoData } from "@/components/widgets/table-no-data" import apiBaseUrl from "@/lib/api-base-url" import DeleteDialog from "@/components/delete-dialog" -export default function Images() { +export default function ImageList() { const { nodeId } = useParams() const { nodeHead } = useNodeHead(nodeId!) const { isLoading, images, mutateImages } = useImages(nodeId!) diff --git a/web/src/app/networks/networks.tsx b/web/src/app/networks/network-list.tsx similarity index 99% rename from web/src/app/networks/networks.tsx rename to web/src/app/networks/network-list.tsx index 851f4f8..d5fdeba 100644 --- a/web/src/app/networks/networks.tsx +++ b/web/src/app/networks/network-list.tsx @@ -28,7 +28,7 @@ import { toastFailed, toastSuccess } from "@/lib/utils" import apiBaseUrl from "@/lib/api-base-url" import DeleteDialog from "@/components/delete-dialog" -export default function Networks() { +export default function NetworkList() { const { nodeId } = useParams() const { nodeHead } = useNodeHead(nodeId!) const { isLoading, networks, mutateNetworks } = useNetworks(nodeId!) diff --git a/web/src/app/nodes/dialogs/edit-containerbaseurl-dialog.tsx b/web/src/app/nodes/containerbaseurl-edit-dialog.tsx similarity index 98% rename from web/src/app/nodes/dialogs/edit-containerbaseurl-dialog.tsx rename to web/src/app/nodes/containerbaseurl-edit-dialog.tsx index 0267c79..6a2a519 100644 --- a/web/src/app/nodes/dialogs/edit-containerbaseurl-dialog.tsx +++ b/web/src/app/nodes/containerbaseurl-edit-dialog.tsx @@ -32,7 +32,7 @@ import { useParams } from "react-router" import { INodeContainerBaseUrlUpdateRequest } from "@/lib/api-models" import { apiNodesContainerBaseUrlUpdate } from "@/lib/api" -export default function EditContainerBaseUrlDialog() { +export default function ContainerBaseUrlEditDialog() { const { nodeId } = useParams() const { nodeHead, mutateNodeHead } = useNodeHead(nodeId!) const [open, setOpen] = useState(false) diff --git a/web/src/app/nodes/dialogs/add-node-dialog.tsx b/web/src/app/nodes/node-add-dialog.tsx similarity index 99% rename from web/src/app/nodes/dialogs/add-node-dialog.tsx rename to web/src/app/nodes/node-add-dialog.tsx index 7c6ed2f..1c47143 100644 --- a/web/src/app/nodes/dialogs/add-node-dialog.tsx +++ b/web/src/app/nodes/node-add-dialog.tsx @@ -47,7 +47,7 @@ import useEnvironments from "@/hooks/useEnvironments" import { INodeCreateRequest } from "@/lib/api-models" import { apiNodesCreate } from "@/lib/api" -export default function AddNodeDialog({ disabled }: { disabled: boolean }) { +export default function NodeAddDialog({ disabled }: { disabled: boolean }) { const [open, setOpen] = useState(false) const [isSaving, setIsSaving] = useState(false) const { mutateNodes } = useNodes() diff --git a/web/src/app/nodes/nodes.tsx b/web/src/app/nodes/node-list.tsx similarity index 94% rename from web/src/app/nodes/nodes.tsx rename to web/src/app/nodes/node-list.tsx index 4f90547..efa370a 100644 --- a/web/src/app/nodes/nodes.tsx +++ b/web/src/app/nodes/node-list.tsx @@ -13,10 +13,10 @@ import MainArea from "@/components/widgets/main-area" import TopBar from "@/components/widgets/top-bar" import TopBarActions from "@/components/widgets/top-bar-actions" import MainContent from "@/components/widgets/main-content" -import AddNodeDialog from "./dialogs/add-node-dialog" +import NodeAddDialog from "./node-add-dialog" import { Button } from "@/components/ui/button" -import RegisterNodeDialog from "./dialogs/register-node-dialog" -import EditServerUrlDialog from "./dialogs/edit-serverurl-dialog" +import NodeRegisterDialog from "./node-register-dialog" +import ServerUrlEditDialog from "./serverurl-edit-dialog" import { INodeHead } from "@/lib/api-models" import { apiNodesDelete, apiNodesGenerateToken } from "@/lib/api" import { @@ -33,7 +33,7 @@ import useSetting from "@/hooks/useSetting" import { TableNoData } from "@/components/widgets/table-no-data" import DeleteDialog from "@/components/delete-dialog" -export default function Nodes() { +export default function NodeList() { const navigate = useNavigate() const { isLoading, nodes, mutateNodes } = useNodes() const { setting } = useSetting("SERVER_URL") @@ -102,14 +102,14 @@ export default function Nodes() { Nodes - - - + + diff --git a/web/src/app/nodes/dialogs/register-node-dialog.tsx b/web/src/app/nodes/node-register-dialog.tsx similarity index 98% rename from web/src/app/nodes/dialogs/register-node-dialog.tsx rename to web/src/app/nodes/node-register-dialog.tsx index 2ba243b..4a476dd 100644 --- a/web/src/app/nodes/dialogs/register-node-dialog.tsx +++ b/web/src/app/nodes/node-register-dialog.tsx @@ -9,7 +9,7 @@ import { import { Button } from "@/components/ui/button" import useSetting from "@/hooks/useSetting" -export default function RegisterNodeDialog({ +export default function NodeRegisterDialog({ open, setOpen, token, diff --git a/web/src/app/nodes/dialogs/edit-serverurl-dialog.tsx b/web/src/app/nodes/serverurl-edit-dialog.tsx similarity index 98% rename from web/src/app/nodes/dialogs/edit-serverurl-dialog.tsx rename to web/src/app/nodes/serverurl-edit-dialog.tsx index 4ca4927..951c624 100644 --- a/web/src/app/nodes/dialogs/edit-serverurl-dialog.tsx +++ b/web/src/app/nodes/serverurl-edit-dialog.tsx @@ -31,7 +31,7 @@ import useSetting from "@/hooks/useSetting" import { ISettingUpdateRequest } from "@/lib/api-models" import { apiSettingsUpdate } from "@/lib/api" -export default function EditServerUrlDialog() { +export default function ServerUrlEditDialog() { const { setting, mutateSetting } = useSetting("SERVER_URL") const [open, setOpen] = useState(false) const [isSaving, setIsSaving] = useState(false) diff --git a/web/src/app/variables/dialogs/add-variable-dialog.tsx b/web/src/app/variables/variable-add-dialog.tsx similarity index 99% rename from web/src/app/variables/dialogs/add-variable-dialog.tsx rename to web/src/app/variables/variable-add-dialog.tsx index 6ba2016..14ec5f0 100644 --- a/web/src/app/variables/dialogs/add-variable-dialog.tsx +++ b/web/src/app/variables/variable-add-dialog.tsx @@ -32,7 +32,7 @@ import useVariables from "@/hooks/useVariables" import { Checkbox } from "@/components/ui/checkbox" import apiBaseUrl from "@/lib/api-base-url" -export default function AddVariableDialog() { +export default function VariableAddDialog() { const [open, setOpen] = useState(false) const [isSaving, setIsSaving] = useState(false) const { mutateVariables } = useVariables() diff --git a/web/src/app/variables/dialogs/edit-variable-dialog.tsx b/web/src/app/variables/variable-edit-dialog.tsx similarity index 99% rename from web/src/app/variables/dialogs/edit-variable-dialog.tsx rename to web/src/app/variables/variable-edit-dialog.tsx index c9a38c3..d6f86df 100644 --- a/web/src/app/variables/dialogs/edit-variable-dialog.tsx +++ b/web/src/app/variables/variable-edit-dialog.tsx @@ -32,7 +32,7 @@ import { Checkbox } from "@/components/ui/checkbox" import apiBaseUrl from "@/lib/api-base-url" import { IVariableHead } from "@/lib/api-models" -export default function EditVariableDialog({ +export default function VariableEditDialog({ openState, setOpenState, variableHead, diff --git a/web/src/app/variables/variables.tsx b/web/src/app/variables/variable-list.tsx similarity index 95% rename from web/src/app/variables/variables.tsx rename to web/src/app/variables/variable-list.tsx index 22d753b..cb60518 100644 --- a/web/src/app/variables/variables.tsx +++ b/web/src/app/variables/variable-list.tsx @@ -13,20 +13,20 @@ import TopBar from "@/components/widgets/top-bar" import TopBarActions from "@/components/widgets/top-bar-actions" import MainContent from "@/components/widgets/main-content" import useVariables from "@/hooks/useVariables" -import AddVariableDialog from "./dialogs/add-variable-dialog" +import VariableAddDialog from "./variable-add-dialog" import { useState } from "react" import { IVariableHead } from "@/lib/api-models" import useEnvironmentsMap from "@/hooks/useEnvironmentsMap" import { Checkbox } from "@/components/ui/checkbox" -import EditVariableDialog from "./dialogs/edit-variable-dialog" -import EditVariableValueDialog from "./dialogs/edit-variable-value-dialog" +import VariableEditDialog from "./variable-edit-dialog" +import VariableValueEditDialog from "./variable-value-edit-dialog" import TableButtonDelete from "@/components/widgets/table-button-delete" import TableButtonEdit from "@/components/widgets/table-button-edit" import { TableNoData } from "@/components/widgets/table-no-data" import DeleteDialog from "@/components/delete-dialog" import apiBaseUrl from "@/lib/api-base-url" -export default function Variables() { +export default function VariableList() { const { isLoading: mapIsLoading, environmentsMap } = useEnvironmentsMap() const { isLoading, variables, mutateVariables } = useVariables() const [editVariableOpen, setEditVariableOpen] = useState(false) @@ -82,14 +82,14 @@ export default function Variables() { return ( {editVariableOpen && ( - )} {editVariableValueOpen && ( - Variables - + diff --git a/web/src/app/variables/dialogs/edit-variable-value-dialog.tsx b/web/src/app/variables/variable-value-edit-dialog.tsx similarity index 98% rename from web/src/app/variables/dialogs/edit-variable-value-dialog.tsx rename to web/src/app/variables/variable-value-edit-dialog.tsx index c2ebf94..bd0ea8a 100644 --- a/web/src/app/variables/dialogs/edit-variable-value-dialog.tsx +++ b/web/src/app/variables/variable-value-edit-dialog.tsx @@ -25,7 +25,7 @@ import useVariables from "@/hooks/useVariables" import { IVariableHead } from "@/lib/api-models" import apiBaseUrl from "@/lib/api-base-url" -export default function EditVariableValueDialog({ +export default function VariableValueEditDialog({ openState, setOpenState, variableHead, diff --git a/web/src/app/volumes/volumes.tsx b/web/src/app/volumes/volume-list.tsx similarity index 99% rename from web/src/app/volumes/volumes.tsx rename to web/src/app/volumes/volume-list.tsx index f30ab0b..b675170 100644 --- a/web/src/app/volumes/volumes.tsx +++ b/web/src/app/volumes/volume-list.tsx @@ -28,7 +28,7 @@ import DeleteDialog from "@/components/delete-dialog" import { convertByteToMb, toastFailed, toastSuccess } from "@/lib/utils" import apiBaseUrl from "@/lib/api-base-url" -export default function Volumes() { +export default function VolumeList() { const { nodeId } = useParams() const { nodeHead } = useNodeHead(nodeId!) const { isLoading, volumes, mutateVolumes } = useVolumes(nodeId!) diff --git a/web/src/router.tsx b/web/src/router.tsx index 15de320..42045f0 100644 --- a/web/src/router.tsx +++ b/web/src/router.tsx @@ -2,32 +2,32 @@ import { createBrowserRouter, Navigate } from "react-router-dom" import "./index.css" import Root from "@/app/root" import ErrorPage from "./error-page" -import Containers from "./app/containers/containers" -import Images from "./app/images/images" -import ContainerLogs from "./app/containers/container/logs" -import ContainerTerminal from "./app/containers/container/terminal" -import Volumes from "./app/volumes/volumes" -import Networks from "./app/networks/networks" +import ContainerList from "./app/containers/container-list" +import ImageList from "./app/images/image-list" +import ContainerLogs from "./app/containers/container-logs" +import ContainerTerminal from "./app/containers/container-terminal" +import VolumeList from "./app/volumes/volume-list" +import NetworkList from "./app/networks/network-list" import ChangePassword from "./app/auth/change-password" import Login from "./app/auth/login" import Setup from "./app/auth/setup" -import ComposeLibraryItems from "./app/compose-library/compose-library-items" -import ComposeContainers from "./app/compose/compose/containers" -import ComposeLogs from "./app/compose/compose/logs" -import ComposeActions from "./app/compose/compose/actions" -import CreateFileSystemComposeProject from "./app/compose-library/create-filesystem-compose-project" -import EditFileSystemComposeProject from "./app/compose-library/edit-filesystem-compose-project" -import NodeCompose from "./app/compose/node-compose" -import Nodes from "./app/nodes/nodes" +import ComposeLibraryList from "./app/compose-library/compose-library-list" +import ComposeContainerList from "./app/compose/compose-container-list" +import ComposeLogs from "./app/compose/compose-logs" +import ComposeActions from "./app/compose/compose-actions" +import ComposeLibraryCreateFileSystemProject from "./app/compose-library/compose-library-create-filesystem-project" +import ComposeLibraryEditFileSystemProject from "./app/compose-library/compose-library-edit-filesystem-project" +import ComposeList from "./app/compose/compose-list" +import NodeList from "./app/nodes/node-list" import NodeDetails from "./app/nodes/node-details" -import Environments from "./app/environments/environments" -import Variables from "./app/variables/variables" -import CreateGitHubComposeProject from "./app/compose-library/create-github-compose-project" -import Credentials from "./app/credentials/credentials" -import EditGitHubComposeProject from "./app/compose-library/edit-github-compose-project" -import AddGitHubCompose from "./app/compose/add-github-compose" -import ComposeDefinition from "./app/compose/compose/definition" -import AddLocalCompose from "./app/compose/add-local-compose" +import EnvironmentList from "./app/environments/environment-list" +import VariableList from "./app/variables/variable-list" +import ComposeLibraryCreateGitHubProject from "./app/compose-library/compose-library-create-github-project" +import CredentialList from "./app/credentials/credential-list" +import ComposeLibraryEditGitHubProject from "./app/compose-library/compose-library-edit-github-project" +import ComposeAddGitHub from "./app/compose/compose-add-github" +import ComposeDefinition from "./app/compose/compose-definition" +import ComposeAddLocal from "./app/compose/compose-add-local" const router = createBrowserRouter([ { @@ -53,11 +53,11 @@ const router = createBrowserRouter([ children: [ { path: "nodes", - element: , + element: , }, { path: "nodes/:nodeId/containers", - element: , + element: , }, { path: "nodes/:nodeId/containers/:containerId/logs", @@ -69,15 +69,15 @@ const router = createBrowserRouter([ }, { path: "nodes/:nodeId/images", - element: , + element: , }, { path: "nodes/:nodeId/volumes", - element: , + element: , }, { path: "nodes/:nodeId/networks", - element: , + element: , }, { path: "nodes/:nodeId/details", @@ -85,15 +85,15 @@ const router = createBrowserRouter([ }, { path: "nodes/:nodeId/compose", - element: , + element: , }, { path: "nodes/:nodeId/compose/create/github", - element: , + element: , }, { path: "nodes/:nodeId/compose/create/local", - element: , + element: , }, { path: "nodes/:nodeId/compose/:composeProjectId/actions", @@ -105,7 +105,7 @@ const router = createBrowserRouter([ }, { path: "nodes/:nodeId/compose/:composeProjectId/containers", - element: , + element: , }, { path: "nodes/:nodeId/compose/:composeProjectId/logs", @@ -113,35 +113,35 @@ const router = createBrowserRouter([ }, { path: "composelibrary", - element: , + element: , }, { path: "composelibrary/filesystem/create", - element: , + element: , }, { path: "composelibrary/github/create", - element: , + element: , }, { path: "composelibrary/filesystem/:composeProjectName/edit", - element: , + element: , }, { path: "composelibrary/github/:composeProjectId/edit", - element: , + element: , }, { path: "environments", - element: , + element: , }, { path: "variables", - element: , + element: , }, { path: "credentials", - element: , + element: , }, ], },