Skip to content

Commit

Permalink
Refactored page component names and directory structure
Browse files Browse the repository at this point in the history
  • Loading branch information
salilponde committed Dec 24, 2023
1 parent 69bc79e commit f14354b
Show file tree
Hide file tree
Showing 41 changed files with 111 additions and 111 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ``
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -285,7 +285,7 @@ export default function CreateGitHubComposeProject() {
</PopoverContent>
</Popover>
</FormControl>
<AddGitHubPATDialog buttonCaption="Add New" />
<GitHubPATAddDialog buttonCaption="Add New" />
</div>
<FormMessage />
</FormItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down Expand Up @@ -336,7 +336,7 @@ export default function EditGitHubComposeProject() {
</PopoverContent>
</Popover>
</FormControl>
<AddGitHubPATDialog buttonCaption="Add New" />
<GitHubPATAddDialog buttonCaption="Add New" />
</div>
<FormMessage />
</FormItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -297,7 +297,7 @@ export default function AddGitHubCompose() {
</PopoverContent>
</Popover>
</FormControl>
<AddGitHubPATDialog buttonCaption="Add New" />
<GitHubPATAddDialog buttonCaption="Add New" />
</div>
<FormMessage />
</FormItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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!)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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!)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -348,7 +348,7 @@ export default function ComposeDefinitionGitHub() {
</PopoverContent>
</Popover>
</FormControl>
<AddGitHubPATDialog buttonCaption="Add New" />
<GitHubPATAddDialog buttonCaption="Add New" />
</div>
<FormMessage />
</FormItem>
Expand Down
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -62,7 +62,7 @@ export default function NodeCompose() {
>
Add from GitHub
</Button>
<AddNodeComposeProjectDialog />
<ComposeAddProjectDialog />
</TopBarActions>
</TopBar>
<MainContent>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -73,7 +73,7 @@ export default function ComposeVariableEditor({
return (
<div>
{editVariableOpen && (
<EditComposeVariableDialog
<ComposeVariableEditDialog
openState={editVariableOpen}
setOpenState={setEditVariableOpen}
variable={variable!}
Expand Down Expand Up @@ -147,7 +147,7 @@ export default function ComposeVariableEditor({
))}
</TableBody>
</Table>
<AddComposeVariableDialog
<ComposeVariableAddDialog
nodeId={nodeId}
nodeComposeProjectId={nodeComposeProjectId}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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!)

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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] =
Expand Down Expand Up @@ -83,14 +83,14 @@ export default function Credentials() {
return (
<MainArea>
{editCredentialSecretOpen && (
<EditGithubPATSecretDialog
<GithubPATSecretEditDialog
openState={editCredentialSecretOpen}
setOpenState={setEditCredentialSecretOpen}
credentialHead={credentialHead!}
/>
)}
{editCredentialOpen && (
<EditGithubPATDetailsDialog
<GithubPATDetailsEditDialog
openState={editCredentialOpen}
setOpenState={setEditCredentialOpen}
credentialHead={credentialHead!}
Expand All @@ -112,7 +112,7 @@ export default function Credentials() {
<BreadcrumbCurrent>Credentials</BreadcrumbCurrent>
</Breadcrumb>
<TopBarActions>
<AddGitHubPATDialog buttonCaption="Add GitHub Token" />
<GitHubPATAddDialog buttonCaption="Add GitHub Token" />
</TopBarActions>
</TopBar>
<MainContent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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<IEnvironmentHead | null>(null)
Expand Down Expand Up @@ -78,7 +78,7 @@ export default function Environments() {
return (
<MainArea>
{editEnvironmentOpen && (
<EditEnvironmentDialog
<EnvironmentEditDialog
openState={editEnvironmentOpen}
setOpenState={setEditEnvironmentOpen}
environmentHead={environmentHead!}
Expand All @@ -100,7 +100,7 @@ export default function Environments() {
<BreadcrumbCurrent>Environments</BreadcrumbCurrent>
</Breadcrumb>
<TopBarActions>
<AddEnvironmentDialog />
<EnvironmentAddDialog />
</TopBarActions>
</TopBar>
<MainContent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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!)
Expand Down
Loading

0 comments on commit f14354b

Please sign in to comment.