-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsidebar-content.tsx
More file actions
123 lines (114 loc) · 2.35 KB
/
sidebar-content.tsx
File metadata and controls
123 lines (114 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
// Copyright 2025 NetApp, Inc. All Rights Reserved.
"use client"
import {
IconFileText,
IconHelp,
IconUsers,
IconListCheck,
IconActivity,
IconSettings,
IconFileSearch,
IconFolders,
IconFolderCode,
// IconArrowsJoin,
IconFolderShare,
IconFiles,
} from "@tabler/icons-react"
import {
SidebarContent,
} from "@/components/ui/sidebar"
// internal components
import {
NavMain
} from "@/components/navs/main"
const data = {
navMain: [
// {
// name: "Connector",
// url: "#/connector",
// icon: IconArrowsJoin,
// },
{
name: "Monitoring",
url: "#/monitoring",
icon: IconActivity,
},
{
name: "Tasks",
url: "#/tasks",
icon: IconListCheck,
},
],
navDataEstate: [
{
name: "Sources",
url: "#/shares",
icon: IconFolderShare,
},
{
name: "Data Corpus",
url: "#/my-datasets/data-corpus",
icon: IconFiles,
},
],
navDiscovery: [
{
name: "Content Search",
url: "#/my-datasets/content-search",
icon: IconFileSearch,
},
],
navDatasets: [
{
name: "My Datasets",
url: "#/my-datasets/my-datasets",
icon: IconFolders,
},
],
navSecondary: [
{
name: "Users",
url: "#/users",
icon: IconUsers,
},
{
name: "Settings",
url: "#/settings",
icon: IconSettings,
},
{
name: "Logs",
url: "#/logs",
icon: IconFileText,
},
{
name: "Help",
url: "#/help",
icon: IconHelp,
},
],
}
import type { Dataset } from "@/services/models"
interface AppSidebarContentProps extends React.ComponentProps<typeof SidebarContent> {
datasets?: Dataset[]
}
export function AppSidebarContent({ datasets = [], ...props }: AppSidebarContentProps) {
const datasetItems = datasets.map((dataset) => ({
name: dataset.name,
url: `#/my-datasets/${dataset.id}`,
icon: IconFolderCode,
}))
const navDatasets = [
...data.navDatasets,
...datasetItems
]
return (
<SidebarContent {...props}>
<NavMain items={data.navMain} />
<NavMain items={data.navDataEstate} label="Data Estate" />
<NavMain items={data.navDiscovery} label="Discovery" />
<NavMain items={navDatasets} label="Datasets" />
<NavMain items={data.navSecondary} className="mt-auto" />
</SidebarContent>
)
}