-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[UI v2] feat: Starts page layout for concurrency page
- Loading branch information
1 parent
6308207
commit 469a91f
Showing
12 changed files
with
88 additions
and
4 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
ui-v2/src/components/concurrency/concurrency-page-title.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { | ||
Breadcrumb, | ||
BreadcrumbItem, | ||
BreadcrumbList, | ||
} from "@/components/ui/breadcrumb"; | ||
|
||
export const ConcurrencyPageTitle = () => ( | ||
<Breadcrumb> | ||
<BreadcrumbList> | ||
<BreadcrumbItem className="text-xl font-semibold"> | ||
Concurrency | ||
</BreadcrumbItem> | ||
</BreadcrumbList> | ||
</Breadcrumb> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { useState } from "react"; | ||
import { ConcurrencyPageTitle } from "./concurrency-page-title"; | ||
import { ConcurrencyTabs } from "./concurrency-tabs"; | ||
import { GlobalConcurrencyView } from "./global-concurrency-view"; | ||
import { TaskRunConcurrencyView } from "./task-run-concurrenct-view"; | ||
|
||
type Tab = "Global" | "Task Run"; | ||
|
||
export const ConcurrencyPage = (): JSX.Element => { | ||
// TODO: Use URL query instead | ||
const [tab, setTab] = useState<Tab>("Global"); | ||
|
||
return ( | ||
<div className="flex flex-col gap-4"> | ||
<ConcurrencyPageTitle /> | ||
<div className="flex flex-col gap-6"> | ||
<ConcurrencyTabs | ||
value={tab} | ||
onValueChange={setTab} | ||
globalView={<GlobalConcurrencyView />} | ||
taskRunView={<TaskRunConcurrencyView />} | ||
/> | ||
</div> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; | ||
|
||
type Tabs = "Global" | "Task Run"; | ||
|
||
type Props = { | ||
globalView: React.ReactNode; | ||
onValueChange: (value: Tabs) => void; | ||
taskRunView: React.ReactNode; | ||
value: Tabs; | ||
}; | ||
|
||
// TODO: Move Tabs for navigation to a generic styled component | ||
|
||
export const ConcurrencyTabs = ({ | ||
globalView, | ||
onValueChange, | ||
taskRunView, | ||
value, | ||
}: Props): JSX.Element => { | ||
return ( | ||
<Tabs | ||
defaultValue="Global" | ||
className="w-[400px]" | ||
value={value} | ||
onValueChange={(value) => onValueChange(value as Tabs)} | ||
> | ||
<TabsList className="grid w-full grid-cols-2"> | ||
<TabsTrigger value="Global">Global</TabsTrigger> | ||
<TabsTrigger value="Task Run">Task Run</TabsTrigger> | ||
</TabsList> | ||
<TabsContent value="Global">{globalView}</TabsContent> | ||
<TabsContent value="Task Run">{taskRunView}</TabsContent> | ||
</Tabs> | ||
); | ||
}; |
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
ui-v2/src/components/concurrency/global-concurrency-view/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const GlobalConcurrencyView = () => { | ||
return <div>🚧🚧 Pardon our dust! 🚧🚧</div>; | ||
}; |
3 changes: 3 additions & 0 deletions
3
ui-v2/src/components/concurrency/task-run-concurrenct-view/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const TaskRunConcurrencyView = () => { | ||
return <div>🚧🚧 Pardon our dust! 🚧🚧</div>; | ||
}; |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
import { createFileRoute } from "@tanstack/react-router"; | ||
|
||
import { ConcurrencyPage } from "@/components/concurrency/concurrency-page"; | ||
|
||
export const Route = createFileRoute("/concurrency-limits")({ | ||
component: RouteComponent, | ||
}); | ||
|
||
function RouteComponent() { | ||
return "🚧🚧 Pardon our dust! 🚧🚧"; | ||
return <ConcurrencyPage />; | ||
} |