Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

[#747][#751][#752] feat(UI): add catalogs, schemas, tables pages in web (#933)

CHEYNE10852e3a7485
diff --git a/web/app/(home)/CreateMetalakeDialog.js b/web/app/(home)/CreateMetalakeDialog.js
index b70df23e9e..44ca1523d9 100644
--- a/web/app/(home)/CreateMetalakeDialog.js
+++ b/web/app/(home)/CreateMetalakeDialog.js
@@ -22,6 +22,9 @@ import {
import Icon from '@/components/Icon'
+import { useAppDispatch } from '@/lib/hooks/useStore'
+import { createMetalake } from '@/lib/store/metalakes'
+
import * as yup from 'yup'
import { useForm, Controller } from 'react-hook-form'
import { yupResolver } from '@hookform/resolvers/yup'
@@ -42,9 +45,10 @@ const Transition = forwardRef(function Transition(props, ref) {
})
const CreateMetalakeDialog = props => {
- const { open, setOpen, data = {}, store, dispatch, createMetalake, updateMetalake, type = 'create' } = props
+ const { open, setOpen, data = {}, updateMetalake, type = 'create' } = props
+
+ const dispatch = useAppDispatch()
- // const [type, setType] = useState('create')
const [innerProps, setInnerProps] = useState([])
const [cacheData, setCacheData] = useState()
diff --git a/web/app/(home)/MetalakeList.js b/web/app/(home)/MetalakeList.js
index 40523e7ec1..6d03123718 100644
--- a/web/app/(home)/MetalakeList.js
+++ b/web/app/(home)/MetalakeList.js
@@ -12,7 +12,7 @@ import { DataGrid } from '@mui/x-data-grid'
import Icon from '@/components/Icon'
-import { useDispatch, useSelector } from 'react-redux'
+import { useAppDispatch, useAppSelector } from '@/lib/hooks/useStore'
import { fetchMetalakes, setFilteredMetalakes, deleteMetalake, updateMetalake } from '@/lib/store/metalakes'
import { formatToDateTime } from '@/lib/utils/date'
@@ -22,8 +22,8 @@ import CreateMetalakeDialog from './CreateMetalakeDialog'
import ConfirmDeleteDialog from '@/components/ConfirmDeleteDialog'
const MetalakeList = () => {
- const dispatch = useDispatch()
- const store = useSelector(state => state.metalakes)
+ const dispatch = useAppDispatch()
+ const store = useAppSelector(state => state.metalakes)
const [value, setValue] = useState('')
const [paginationModel, setPaginationModel] = useState({ page: 0, pageSize: 10 })
@@ -91,7 +91,7 @@ const MetalakeList = () => {
<Typography
noWrap
component={Link}
- href={`/metalakes/${name}`}
+ href={`/metalakes/?metalake=${name}`}
sx={{
fontWeight: 500,
color: 'primary.main',
@@ -199,7 +199,6 @@ const MetalakeList = () => {
<CreateMetalakeDialog
open={openDialog}
setOpen={setOpenDialog}
- dispatch={dispatch}
updateMetalake={updateMetalake}
data={dialogData}
type={dialogType}
diff --git a/web/app/metalakes/DetailsView.js b/web/app/metalakes/DetailsView.js
new file mode 100644
index 0000000000..118ac75815
--- /dev/null
+++ b/web/app/metalakes/DetailsView.js
@@ -0,0 +1,109 @@
+/*
+ * Copyright 2023 Datastrato.
+ * This software is licensed under the Apache License version 2.
+ */
+
+import Box from '@mui/material/Box'
+import Grid from '@mui/material/Grid'
+import Typography from '@mui/material/Typography'
+import Table from '@mui/material/Table'
+import TableHead from '@mui/material/TableHead'
+import TableBody from '@mui/material/TableBody'
+import TableRow from '@mui/material/TableRow'
+import TableCell from '@mui/material/TableCell'
+import TableContainer from '@mui/material/TableContainer'
+
+import { formatToDateTime } from '@/lib/utils/date'
+
+const DetailsView = props => {
+ const { store, data = {} } = props
+
+ const activatedItem = store.activatedDetails
+
+ const audit = activatedItem?.audit || {}
+
+ const properties = Object.keys(activatedItem?.properties || []).map(item => {
+ return {
+ key: item,
+ value: activatedItem?.properties[item]
+ }
+ })
+
+ return (
+ <Box sx={{ p: 4 }}>
+ <Grid container spacing={6}>
+ <Grid item xs={12} sx={{ mb: [0, 5] }}>
+ <Typography variant='body2' sx={{ mb: 2 }}>
+ Comment
+ </Typography>
+ <Typography sx={{ fontWeight: 500 }}>{activatedItem.comment}</Typography>
+ </Grid>
+
+ <Grid item xs={12} md={6} sx={{ mb: [0, 5] }}>
+ <Typography variant='body2' sx={{ mb: 2 }}>
+ Created by
+ </Typography>
+ <Typography sx={{ fontWeight: 500 }}>{audit?.creator ? audit.creator : ''}</Typography>
+ </Grid>
+
+ <Grid item xs={12} md={6} sx={{ mb: [0, 5] }}>
+ <Typography variant='body2' sx={{ mb: 2 }}>
+ Created at
+ </Typography>
+ <Typography sx={{ fontWeight: 500 }}>
+ {audit?.createTime ? formatToDateTime(audit?.createTime) : ''}
+ </Typography>
+ </Grid>
+
+ <Grid item xs={12} md={6} sx={{ mb: [0, 5] }}>
+ <Typography variant='body2' sx={{ mb: 2 }}>
+ Last modified by
+ </Typography>
+ <Typography sx={{ fontWeight: 500 }}>{audit?.lastModifier ? audit.lastModifier : ''}</Typography>
+ </Grid>
+
+ <Grid item xs={12} md={6} sx={{ mb: [0, 5] }}>
+ <Typography variant='body2' sx={{ mb: 2 }}>
+ Last modified at
+ </Typography>
+ <Typography sx={{ fontWeight: 500 }}>
+ {audit?.lastModifiedTime ? formatToDateTime(audit?.lastModifiedTime) : ''}
+ </Typography>
+ </Grid>
+
+ <Grid item xs={12} sx={{ mb: [0, 5] }}>
+ <Typography variant='body2' sx={{ mb: 2 }}>
+ Properties
+ </Typography>
+
+ <TableContainer>
+ <Table>
+ <TableHead
+ sx={{
+ backgroundColor: theme => theme.palette.action.hover
+ }}
+ >
+ <TableRow>
+ <TableCell sx={{ py: 2 }}>Key</TableCell>
+ <TableCell sx={{ py: 2 }}>Value</TableCell>
+ </TableRow>
+ </TableHead>
+ <TableBody>
+ {properties.map((item, index) => {
+ return (
+ <TableRow key={index}>
+ <TableCell sx={{ py: theme => `${theme.spacing(2.75)} !important` }}>{item.key}</TableCell>
+ <TableCell sx={{ py: theme => `${theme.spacing(2.75)} !important` }}>{item.value}</TableCell>
+ </TableRow>
+ )
+ })}
+ </TableBody>
+ </Table>
+ </TableContainer>
+ </Grid>
+ </Grid>
+ </Box>
+ )
+}
+
+export default DetailsView
diff --git a/web/app/metalakes/LeftContent.js b/web/app/metalakes/LeftContent.js
new file mode 100644
index 0000000000..6e794db943
--- /dev/null
+++ b/web/app/metalakes/LeftContent.js
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2023 Datastrato.
+ * This software is licensed under the Apache License version 2.
+ */
+
+'use client'
+
+import { Box } from '@mui/material'
+
+import MetalakeTree from './MetalakeTree'
+
+const SidebarLeft = props => {
+ const { routeParams } = props
+
+ return (
+ <Box className={`twc-bg-customs-white`} sx={{ borderRight: theme => `1px solid ${theme.palette.divider}` }}>
+ <Box className={`twc-w-[340px] twc-h-full round-tl-md round-bl-md twc-overflow-hidden`}>
+ <Box className={'twc-px-5 twc-py-3 twc-flex twc-items-center'}></Box>
+
+ <Box
+ className={`twc-overflow-y-auto`}
+ sx={{ p: theme => theme.spacing(2.5, 2.5, 2.5), height: `calc(100% - 4rem)` }}
+ >
+ <MetalakeTree routeParams={routeParams} />
+ </Box>
+ </Box>
+ </Box>
+ )
+}
+
+export default SidebarLeft
diff --git a/web/app/metalakes/MetalakePath.js b/web/app/metalakes/MetalakePath.js
new file mode 100644
index 0000000000..d6f646ea7b
--- /dev/null
+++ b/web/app/metalakes/MetalakePath.js
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2023 Datastrato.
+ * This software is licensed under the Apache License version 2.
+ */
+
+'use client'
+
+import Link from 'next/link'
+import { useRouter } from 'next/navigation'
+
+import MUILink from '@mui/material/Link'
+import Breadcrumbs from '@mui/material/Breadcrumbs'
+
+import Icon from '@/components/Icon'
+
+const MetalakePath = props => {
+ const { routeParams } = props
+
+ const { metalake, catalog, schema, table } = routeParams
+
+ const router = useRouter()
+
+ const metalakeUrl = `?metalake=${metalake}`
+ const catalogUrl = `?metalake=${metalake}&catalog=${catalog}`
+ const schemaUrl = `?metalake=${metalake}&catalog=${catalog}&schema=${schema}`
+ const tableUrl = `?metalake=${metalake}&catalog=${catalog}&schema=${schema}&table=${table}`
+
+ const handleClick = (event, path) => {
+ router.asPath === path && event.preventDefault()
+ }
+
+ return (
+ <Breadcrumbs
+ sx={{
+ mt: 0,
+ '& a': { display: 'flex', alignItems: 'center' },
+ '& ol > li:last-of-type': {
+ color: theme => `${theme.palette.text.primary} !important`
+ }
+ }}
+ >
+ {metalake && (
+ <MUILink
+ component={Link}
+ href={metalakeUrl}
+ onClick={event => handleClick(event, metalakeUrl)}
+ underline='hover'
+ >
+ {metalake}
+ </MUILink>
+ )}
+ {catalog && (
+ <MUILink component={Link} href={catalogUrl} onClick={event => handleClick(event, catalogUrl)} underline='hover'>
+ <Icon icon='bx:book' fontSize={20} />
+ {catalog}
+ </MUILink>
+ )}
+ {schema && (
+ <MUILink component={Link} href={schemaUrl} onClick={event => handleClick(event, schemaUrl)} underline='hover'>
+ <Icon icon='bx:coin-stack' fontSize={20} />
+ {schema}
+ </MUILink>
+ )}
+ {table && (
+ <MUILink component={Link} href={tableUrl} onClick={event => handleClick(event, tableUrl)} underline='hover'>
+ <Icon icon='bx:table' fontSize={20} />
+ {table}
+ </MUILink>
+ )}
+ </Breadcrumbs>
+ )
+}
+
+export default MetalakePath
diff --git a/web/app/metalakes/MetalakeTree.js b/web/app/metalakes/MetalakeTree.js
new file mode 100644
index 0000000000..65e6b166b3
--- /dev/null
+++ b/web/app/metalakes/MetalakeTree.js
@@ -0,0 +1,231 @@
+/*
+ * Copyright 2023 Datastrato.
+ * This software is licensed under the Apache License version 2.
+ */
+
+'use client'
+
+import { forwardRef } from 'react'
+
+import Link from 'next/link'
+
+import { Box, styled, Typography, Skeleton } from '@mui/material'
+import { TreeView } from '@mui/x-tree-view/TreeView'
+import { TreeItem, useTreeItem } from '@mui/x-tree-view/TreeItem'
+
+import Icon from '@/components/Icon'
+
+import clsx from 'clsx'
+
+import { useAppDispatch, useAppSelector } from '@/lib/hooks/useStore'
+import { setExpandedTreeNode, setIntoTreeAction } from '@/lib/store/metalakes'
+
+const StyledLink = styled(Link)(({ theme }) => ({
+ textDecoration: 'none'
+}))
+
+const CustomContent = forwardRef(function CustomContent(props, ref) {
+ const { classes, className, label, nodeId, icon: iconProp, expansionIcon, displayIcon } = props
+
+ const { disabled, expanded, selected, focused, handleExpansion, handleSelection, preventSelection } =
+ useTreeItem(nodeId)
+
+ const icon = iconProp || expansionIcon || displayIcon
+
+ const handleMouseDown = event => {
+ preventSelection(event)
+ }
+
+ const handleExpansionClick = event => {
+ handleExpansion(event)
+ }
+
+ const handleSelectionClick = event => {
+ handleSelection(event)
+ }
+
+ return (
+ <div
+ className={clsx(className, classes.root, {
+ [classes.expanded]: expanded,
+ [classes.selected]: selected,
+ [classes.focused]: focused,
+ [classes.disabled]: disabled
+ })}
+ onMouseDown={handleMouseDown}
+ ref={ref}
+ >
+ <div onClick={handleExpansionClick} className={classes.iconContainer} data-node-id={nodeId}>
+ {icon}
+ </div>
+ <Typography onClick={handleSelectionClick} component='div' className={classes.label}>
+ {label}
+ </Typography>
+ </div>
+ )
+})
+
+const StyledTreeItemRoot = styled(TreeItem)(({ theme, level = 0 }) => ({
+ '&:hover > .MuiTreeItem-content:not(.Mui-selected)': {
+ backgroundColor: theme.palette.action.hover
+ },
+ '& .MuiTreeItem-content': {
+ paddingRight: theme.spacing(3),
+ fontWeight: theme.typography.fontWeightMedium
+ },
+ '& .MuiTreeItem-label': {
+ fontWeight: 'inherit',
+ paddingRight: theme.spacing(3)
+ },
+ '& .MuiTreeItem-group': {
+ marginLeft: 0,
+ '& .MuiTreeItem-content': {
+ paddingLeft: theme.spacing(4 + level * 4),
+ fontWeight: theme.typography.fontWeightRegular
+ }
+ }
+}))
+
+const StyledTreeItem = props => {
+ const { labelText, labelIcon, labelInfo, href, dispatch, ...other } = props
+
+ return (
+ <StyledTreeItemRoot
+ {...other}
+ label={
+ <Box sx={{ py: 1, display: 'flex', alignItems: 'center', '& svg': { mr: 1 } }}>
+ <Icon icon={labelIcon} color='inherit' />
+ <Typography
+ variant='body2'
+ sx={{ flexGrow: 1, fontWeight: 'inherit' }}
+ {...(href
+ ? {
+ component: StyledLink,
+ href
+ }
+ : {})}
+ >
+ {labelText}
+ </Typography>
+ {labelInfo ? (
+ <Typography variant='caption' color='inherit'>
+ {labelInfo}
+ </Typography>
+ ) : null}
+ </Box>
+ }
+ />
+ )
+}
+
+const CustomTreeItem = forwardRef(function CustomTreeItem(props, ref) {
+ return <StyledTreeItem ContentComponent={CustomContent} {...props} ref={ref} />
+})
+
+const CatalogTreeItem = props => {
+ return <CustomTreeItem labelIcon='bx:book' level={0} {...props} />
+}
+
+const SchemaTreeItem = props => {
+ return <CustomTreeItem labelIcon='bx:coin-stack' level={1} {...props} />
+}
+
+const TableTreeItem = props => {
+ return <CustomTreeItem labelIcon='bx:table' level={2} {...props} />
+}
+
+const MetalakeTree = props => {
+ const { routeParams } = props
+ const dispatch = useAppDispatch()
+ const store = useAppSelector(state => state.metalakes)
+
+ const handleToggle = async (event, nodeIds) => {
+ const isExpanding = nodeIds.some(nodeId => !store.expendedTreeNode.includes(nodeId))
+
+ if (isExpanding) {
+ dispatch(setIntoTreeAction(nodeIds))
+ }
+
+ dispatch(setExpandedTreeNode(nodeIds))
+ }
+
+ const handleSelect = (event, nodeId) => {
+ event.stopPropagation()
+ }
+
+ return (
+ <TreeView
+ onNodeToggle={handleToggle}
+ onNodeSelect={handleSelect}
+ expanded={store.expendedTreeNode}
+ selected={store.selectedTreeNode}
+ defaultExpandIcon={
+ <Box sx={{ display: 'flex' }}>
+ <Icon icon='bx:chevron-right' />
+ </Box>
+ }
+ defaultCollapseIcon={
+ <Box sx={{ display: 'flex' }}>
+ <Icon icon='bx:chevron-down' />
+ </Box>
+ }
+ >
+ {store.isLoadedTree ? (
+ store.metalakeTree.length !== 0 ? (
+ (store.metalakeTree || []).map((catalog, catalogIndex) => {
+ return (
+ <CatalogTreeItem key={catalogIndex} nodeId={catalog.id} labelText={catalog.name} href={catalog.path}>
+ {catalog.schemas.length === 0 ? (
+ <SchemaTreeItem
+ key={`${catalog.name}-${catalogIndex}-no-schema`}
+ nodeId={`${catalog.name}-${catalogIndex}-no-schema`}
+ labelIcon=''
+ labelText={'No Schemas'}
+ disabled
+ />
+ ) : (
+ (catalog.schemas || []).map((schema, schemaIndex) => {
+ return (
+ <SchemaTreeItem key={schemaIndex} nodeId={schema.id} labelText={schema.name} href={schema.path}>
+ {schema.tables.length === 0 ? (
+ <TableTreeItem
+ key={`${catalog.name}-${catalogIndex}-${schema.name}-${schemaIndex}-no-schema`}
+ nodeId={`${catalog.name}-${catalogIndex}-${schema.name}-${schemaIndex}-no-schema`}
+ labelIcon=''
+ labelText={'No Tables'}
+ disabled
+ />
+ ) : (
+ (schema.tables || []).map((table, tableIndex) => {
+ return (
+ <TableTreeItem
+ key={tableIndex}
+ nodeId={table.id}
+ labelText={table.name}
+ href={table.path}
+ />
+ )
+ })
+ )}
+ </SchemaTreeItem>
+ )
+ })
+ )}
+ </CatalogTreeItem>
+ )
+ })
+ ) : (
+ <Box className={`twc-text-center`}>No Data</Box>
+ )
+ ) : (
+ <Box className={`twc-w-full twc-text-center twc-h-full`}>
+ {Array.from(new Array(4)).map((item, index) => {
+ return <Skeleton sx={{ mx: 'auto' }} width={'80%'} key={index} height={'2.8rem'} animation='wave' />
+ })}
+ </Box>
+ )}
+ </TreeView>
+ )
+}
+
+export default MetalakeTree
diff --git a/web/app/metalakes/MetalakeView.js b/web/app/metalakes/MetalakeView.js
new file mode 100644
index 0000000000..7d131c0ec7
--- /dev/null
+++ b/web/app/metalakes/MetalakeView.js
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2023 Datastrato.
+ * This software is licensed under the Apache License version 2.
+ */
+
+'use client'
+
+import { useEffect } from 'react'
+
+import { Box } from '@mui/material'
+
+import { useAppSelector, useAppDispatch } from '@/lib/hooks/useStore'
+
+import LeftContent from './LeftContent'
+import RightContent from './RightContent'
+
+import {
+ initMetalakeTree,
+ fetchCatalogs,
+ fetchSchemas,
+ fetchTables,
+ getMetalakeDetails,
+ getCatalogDetails,
+ getSchemaDetails,
+ getTableDetails,
+ setSelectedTreeNode
+} from '@/lib/store/metalakes'
+
+const MetalakeView = props => {
+ const { page, tableTitle, routeParams } = props
+
+ const dispatch = useAppDispatch()
+ const store = useAppSelector(state => state.metalakes)
+
+ useEffect(() => {
+ const { metalake, catalog, schema, table } = routeParams
+
+ if (store.metalakeTree.length === 0) {
+ dispatch(initMetalakeTree({ metalake, catalog, schema, table }))
+ }
+
+ switch (page) {
+ case 'metalakes':
+ dispatch(fetchCatalogs({ init: true, page, metalake }))
+ dispatch(getMetalakeDetails({ metalake }))
+
+ break
+ case 'catalogs':
+ dispatch(fetchSchemas({ init: true, page, metalake, catalog }))
+ dispatch(getCatalogDetails({ metalake, catalog }))
+
+ break
+ case 'schemas':
+ dispatch(fetchTables({ init: true, page, metalake, catalog, schema }))
+ dispatch(getSchemaDetails({ metalake, catalog, schema }))
+
+ break
+ case 'tables':
+ dispatch(fetchColumns({ init: true, page, metalake, catalog, schema, table }))
+ dispatch(getTableDetails({ metalake, catalog, schema, table }))
+ break
+ default:
+ break
+ }
+
+ dispatch(
+ setSelectedTreeNode(
+ routeParams.catalog
+ ? `${routeParams.metalake}____${routeParams.catalog}${routeParams.schema ? `____${routeParams.schema}` : ''}${
+ routeParams.table ? `____${routeParams.table}` : ''
+ }`
+ : null
+ )
+ )
+
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, [page, dispatch, routeParams])
+
+ return (
+ <Box className='app-metalake twc-w-full twc-h-full twc-flex twc-rounded-lg twc-overflow-auto twc-relative shadow-md'>
+ <LeftContent routeParams={routeParams} />
+ <RightContent tableTitle={tableTitle} routeParams={routeParams} page={page} />
+ </Box>
+ )
+}
+
+export default MetalakeView
diff --git a/web/app/metalakes/RightContent.js b/web/app/metalakes/RightContent.js
new file mode 100644
index 0000000000..2bc7992d4c
--- /dev/null
+++ b/web/app/metalakes/RightContent.js
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2023 Datastrato.
+ * This software is licensed under the Apache License version 2.
+ */
+
+'use client'
+
+import Link from 'next/link'
+
+import { Box, Button, IconButton } from '@mui/material'
+
+import Icon from '@/components/Icon'
+
+import { useAppSelector } from '@/lib/hooks/useStore'
+
+import TabsContent from './TabsContent'
+import MetalakePath from './MetalakePath'
+
+const RightContent = props => {
+ const { tableTitle, routeParams, page } = props
+
+ const store = useAppSelector(state => state.metalakes)
+
+ return (
+ <Box className={`twc-w-0 twc-grow twc-h-full twc-bg-customs-white twc-overflow-hidden`}>
+ <Box
+ className={`twc-py-3 twc-px-5 twc-flex twc-items-center twc-justify-between`}
+ sx={{
+ borderBottom: theme => `1px solid ${theme.palette.divider}`
+ }}
+ >
+ <Box className={`twc-flex twc-items-center`}>
+ <Box className={`twc-flex twc-items-center twc-justify-between`}>
+ <Box className={`twc-flex twc-items-center`}>
+ <IconButton color='primary' component={Link} href='/' sx={{ mr: 2 }}>
+ <Icon icon='mdi:arrow-left' />
+ </IconButton>
+ <MetalakePath routeParams={routeParams} />
+ </Box>
+ </Box>
+ </Box>
+
+ {page === 'metalake' && (
+ <Box className={`twc-flex twc-items-center`}>
+ <Button variant='contained' startIcon={<Icon icon='mdi:plus-box' />}>
+ Create Catalog
+ </Button>
+ </Box>
+ )}
+ </Box>
+
+ <Box sx={{ height: 'calc(100% - 4rem)' }}>
+ <TabsContent tableTitle={tableTitle} store={store} />
+ </Box>
+ </Box>
+ )
+}
+
+export default RightContent
diff --git a/web/app/metalakes/TableView.js b/web/app/metalakes/TableView.js
new file mode 100644
index 0000000000..5cf54f92c0
--- /dev/null
+++ b/web/app/metalakes/TableView.js
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2023 Datastrato.
+ * This software is licensed under the Apache License version 2.
+ */
+
+import { useState } from 'react'
+
+import Link from 'next/link'
+
+import { Box, Typography } from '@mui/material'
+import { DataGrid } from '@mui/x-data-grid'
+import { useAppSelector } from '@/lib/hooks/useStore'
+
+const columns = [
+ {
+ flex: 0.1,
+ minWidth: 60,
+ field: 'id',
+ headerName: 'Name',
+ renderCell: ({ row }) => {
+ const { name, path } = row
+
+ return (
+ <Box sx={{ display: 'flex', alignItems: 'center' }}>
+ <Typography
+ noWrap
+ component={Link}
+ href={path}
+ sx={{
+ fontWeight: 500,
+ color: 'primary.main',
+ textDecoration: 'none',
+ '&:hover': { color: 'primary.main', textDecoration: 'underline' }
+ }}
+ >
+ {name}
+ </Typography>
+ </Box>
+ )
+ }
+ }
+]
+
+const TableView = props => {
+ const defaultPaginationConfig = { pageSize: 10, page: 0 }
+ const pageSizeOptions = [10, 25, 50]
+
+ const [paginationModel, setPaginationModel] = useState(defaultPaginationConfig)
+ const store = useAppSelector(state => state.metalakes)
+
+ return (
+ <DataGrid
+ sx={{
+ '& .MuiDataGrid-columnHeaders': {
+ borderTopLeftRadius: 0,
+ borderTopRightRadius: 0,
+ borderTop: 0
+ }
+ }}
+ autoHeight
+ rows={store.tableData}
+ getRowId={row => row?.name}
+ columns={columns}
+ disableRowSelectionOnClick
+ pageSizeOptions={pageSizeOptions}
+ paginationModel={paginationModel}
+ onPaginationModelChange={setPaginationModel}
+ />
+ )
+}
+
+export default TableView
diff --git a/web/app/metalakes/TabsContent.js b/web/app/metalakes/TabsContent.js
new file mode 100644
index 0000000000..6e7e73f2c1
--- /dev/null
+++ b/web/app/metalakes/TabsContent.js
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2023 Datastrato.
+ * This software is licensed under the Apache License version 2.
+ */
+
+import { useState } from 'react'
+
+import Box from '@mui/material/Box'
+import Tab from '@mui/material/Tab'
+import TabContext from '@mui/lab/TabContext'
+import TabList from '@mui/lab/TabList'
+import TabPanel from '@mui/lab/TabPanel'
+import Typography from '@mui/material/Typography'
+
+import Icon from '@/components/Icon'
+
+import TableView from './TableView'
+import DetailsView from './DetailsView'
+
+const CustomTab = props => {
+ const { icon, label, value, ...others } = props
+
+ return (
+ <Tab
+ label={
+ <Box sx={{ display: 'flex', alignItems: 'center' }}>
+ <Icon icon={icon} />
+ <Typography sx={{ ml: 1 }} color={'inherit'}>
+ {label}
+ </Typography>
+ </Box>
+ }
+ value={value}
+ {...others}
+ />
+ )
+}
+
+const CustomTabPanel = props => {
+ const { value, children, ...others } = props
+
+ return (
+ <TabPanel
+ value={value}
+ sx={{ boxShadow: 'none', height: 'calc(100% - 4rem)', overflowY: 'auto', p: 0 }}
+ {...others}
+ >
+ {children}
+ </TabPanel>
+ )
+}
+
+const TabsContent = props => {
+ const { tableTitle, store } = props
+ const [tab, setTab] = useState('table')
+
+ const handleChangeTab = (event, newValue) => {
+ setTab(newValue)
+ }
+
+ return (
+ <TabContext value={tab}>
+ <Box sx={{ px: 6, py: 2, borderBottom: 1, borderColor: 'divider' }}>
+ <TabList onChange={handleChangeTab} aria-label='tabs'>
+ <CustomTab icon='mdi:list-box-outline' label={tableTitle} value='table' />
+ <CustomTab icon='mdi:clipboard-text-outline' label='Details' value='details' />
+ </TabList>
+ </Box>
+ <CustomTabPanel value='table'>
+ <TableView />
+ </CustomTabPanel>
+ <CustomTabPanel value='details'>
+ <DetailsView store={store} />
+ </CustomTabPanel>
+ </TabContext>
+ )
+}
+
+export default TabsContent
diff --git a/web/app/metalakes/page.js b/web/app/metalakes/page.js
new file mode 100644
index 0000000000..a60919a986
--- /dev/null
+++ b/web/app/metalakes/page.js
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2023 Datastrato.
+ * This software is licensed under the Apache License version 2.
+ */
+
+'use client'
+
+import { useEffect, useState } from 'react'
+import { useSearchParams } from 'next/navigation'
+
+import MetalakeView from '@/app/metalakes/MetalakeView'
+
+const MetalakePage = () => {
+ const params = useSearchParams()
+
+ const [routeParams, setRouteParams] = useState({
+ metalake: params.get('metalake'),
+ catalog: params.get('catalog'),
+ schema: params.get('schema'),
+ table: params.get('table')
+ })
+
+ useEffect(() => {
+ setRouteParams({
+ metalake: params.get('metalake'),
+ catalog: params.get('catalog'),
+ schema: params.get('schema'),
+ table: params.get('table')
+ })
+ console.log(params)
+ }, [params])
+
+ // console.log(params.get('metalake'))
+
+ // console.log(params.keys().includes('metalake'))
+ const getProps = () => {
+ if (params.size === 1 && params.has('metalake')) {
+ return {
+ page: 'metalakes',
+ title: 'Catalogs'
+ }
+ } else if (params.size === 2 && params.has('catalog')) {
+ return {
+ page: 'catalogs',
+ title: 'Schemas'
+ }
+ } else if (params.size === 3 && params.has('schema')) {
+ return {
+ page: 'schemas',
+ title: 'Tables'
+ }
+ } else if (params.size === 4 && params.has('table')) {
+ return {
+ page: 'tables',
+ title: 'Columns'
+ }
+ } else {
+ return {
+ page: null,
+ title: null
+ }
+ }
+ }
+
+ return <MetalakeView page={getProps().page} tableTitle={getProps().title} routeParams={routeParams} />
+}
+
+export default MetalakePage
diff --git a/web/app/metalakes/template.js b/web/app/metalakes/template.js
new file mode 100644
index 0000000000..78fce54d68
--- /dev/null
+++ b/web/app/metalakes/template.js
@@ -0,0 +1,16 @@
+/*
+ * Copyright 2023 Datastrato.
+ * This software is licensed under the Apache License version 2.
+ */
+
+import { Box } from '@mui/material'
+
+const Template = ({ children }) => {
+ return (
+ <Box className={'metalake-template'} style={{ height: 'calc(100vh - 11rem)' }}>
+ {children}
+ </Box>
+ )
+}
+
+export default Template
diff --git a/web/app/template.js b/web/app/template.js
index 19f3b0e5bf..1db4f6bdcb 100644
--- a/web/app/template.js
+++ b/web/app/template.js
@@ -4,7 +4,7 @@
*/
const Template = ({ children }) => {
- return <div className={'root-template'}>{children}</div>
+ return <div className={'root-template twc-h-full'}>{children}</div>
}
export default Template
diff --git a/web/lib/api/catalogs/index.js b/web/lib/api/catalogs/index.js
index 7a4ea3343f..63af760edf 100644
--- a/web/lib/api/catalogs/index.js
+++ b/web/lib/api/catalogs/index.js
@@ -6,9 +6,8 @@
import axios from 'axios'
const Apis = {
- GET: ({ metalake }) => {
- return `/api/metalakes/${metalake}/catalogs`
- }
+ GET: ({ metalake }) => `/api/metalakes/${metalake}/catalogs`,
+ GET_DETAIL: ({ metalake, catalog }) => `/api/metalakes/${metalake}/catalogs/${catalog}`
}
export const getCatalogsApi = params => {
@@ -20,3 +19,13 @@ export const getCatalogsApi = params => {
}
})
}
+
+export const getCatalogDetailsApi = ({ metalake, catalog }) => {
+ return axios({
+ url: `${Apis.GET_DETAIL({ metalake, catalog })}`,
+ method: 'get',
+ headers: {
+ Accept: 'application/vnd.gravitino.v1+json'
+ }
+ })
+}
diff --git a/web/lib/api/metalakes/index.js b/web/lib/api/metalakes/index.js
index ca329748dd..3e6c872dc1 100644
--- a/web/lib/api/metalakes/index.js
+++ b/web/lib/api/metalakes/index.js
@@ -22,6 +22,16 @@ export const getMetalakesApi = () => {
})
}
+export const getMetalakeDetailsApi = name => {
+ return axios({
+ url: `${Apis.GET}/${name}`,
+ method: 'get',
+ headers: {
+ Accept: 'application/vnd.gravitino.v1+json'
+ }
+ })
+}
+
export const createMetalakeApi = data => {
return axios({
url: `${Apis.CREATE}`,
diff --git a/web/lib/api/schemas/index.js b/web/lib/api/schemas/index.js
index 62e59eb82c..169c923cd4 100644
--- a/web/lib/api/schemas/index.js
+++ b/web/lib/api/schemas/index.js
@@ -6,9 +6,8 @@
import axios from 'axios'
const Apis = {
- GET: ({ metalake, catalog }) => {
- return `/api/metalakes/${metalake}/catalogs/${catalog}/schemas`
- }
+ GET: ({ metalake, catalog }) => `/api/metalakes/${metalake}/catalogs/${catalog}/schemas`,
+ GET_DETAIL: ({ metalake, catalog, schema }) => `/api/metalakes/${metalake}/catalogs/${catalog}/schemas/${schema}`
}
export const getSchemasApi = params => {
@@ -20,3 +19,13 @@ export const getSchemasApi = params => {
}
})
}
+
+export const getSchemaDetailsApi = ({ metalake, catalog, schema }) => {
+ return axios({
+ url: `${Apis.GET_DETAIL({ metalake, catalog, schema })}`,
+ method: 'get',
+ headers: {
+ Accept: 'application/vnd.gravitino.v1+json'
+ }
+ })
+}
diff --git a/web/lib/api/tables/index.js b/web/lib/api/tables/index.js
index 418e446f69..4ca8a43068 100644
--- a/web/lib/api/tables/index.js
+++ b/web/lib/api/tables/index.js
@@ -6,9 +6,9 @@
import axios from 'axios'
const Apis = {
- GET: ({ metalake, catalog, schema }) => {
- return `/api/metalakes/${metalake}/catalogs/${catalog}/schemas/${schema}/tables`
- }
+ GET: ({ metalake, catalog, schema }) => `/api/metalakes/${metalake}/catalogs/${catalog}/schemas/${schema}/tables`,
+ GET_DETAIL: ({ metalake, catalog, schema, table }) =>
+ `/api/metalakes/${metalake}/catalogs/${catalog}/schemas/${schema}/tables/${table}`
}
export const getTablesApi = params => {
@@ -20,3 +20,13 @@ export const getTablesApi = params => {
}
})
}
+
+export const getTableDetailsApi = ({ metalake, catalog, schema, table }) => {
+ return axios({
+ url: `${Apis.GET_DETAIL({ metalake, catalog, schema, table })}`,
+ method: 'get',
+ headers: {
+ Accept: 'application/vnd.gravitino.v1+json'
+ }
+ })
+}
diff --git a/web/lib/layout/MainContent.js b/web/lib/layout/MainContent.js
index d06de94e3f..dfe30bffc7 100644
--- a/web/lib/layout/MainContent.js
+++ b/web/lib/layout/MainContent.js
@@ -6,9 +6,7 @@
const MainContent = ({ children }) => {
return (
<main
- className={
- 'layout-main twc-grow twc-w-full twc-px-[1.5rem] sm:twc-px-6 twc-p-8 twc-transition-[padding] twc-duration-300 twc-ease-in-out twc-mx-auto [@media(min-width:1440px)]:twc-max-w-[1440px] [@media(min-width:1200px)]:twc-max-w-full'
- }
+ className={`layout-main twc-grow twc-w-full twc-px-[1.5rem] sm:twc-px-6 twc-p-8 twc-transition-[padding] twc-duration-300 twc-ease-in-out twc-mx-auto [@media(min-width:1440px)]:twc-max-w-[1440px] [@media(min-width:1200px)]:twc-max-w-full twc-max-h-[100vh]`}
>
{children}
</main>
diff --git a/web/lib/layout/VersionView.js b/web/lib/layout/VersionView.js
index 3a16799c10..b5b43a3a93 100644
--- a/web/lib/layout/VersionView.js
+++ b/web/lib/layout/VersionView.js
@@ -4,24 +4,15 @@
*/
'use client'
-import { useRef, useEffect } from 'react'
+import { useEffect } from 'react'
import Typography from '@mui/material/Typography'
-import { useAppStore, useAppDispatch } from '../hooks/useStore'
-
-import { useDispatch, useSelector } from 'react-redux'
+import { useAppStore, useAppDispatch, useAppSelector } from '@/lib/hooks/useStore'
import { initialVersion, setVersion } from '@/lib/store/version'
const VersionView = () => {
- const store = useAppStore()
- const initialized = useRef(false)
- if (!initialized.current) {
- store.dispatch(initialVersion())
- initialized.current = true
- }
-
- const version = useSelector(state => state.version)
+ const version = useAppSelector(state => state.version)
const dispatch = useAppDispatch()
useEffect(() => {
diff --git a/web/lib/provider/emotion.js b/web/lib/provider/emotion.js
index e51c816ca6..edd38ee5c8 100644
--- a/web/lib/provider/emotion.js
+++ b/web/lib/provider/emotion.js
@@ -5,25 +5,21 @@
'use client'
-import { useState, useEffect, Fragment } from 'react'
-
-import { useServerInsertedHTML } from 'next/navigation'
-
-import { CacheProvider as DefaultProvider } from '@emotion/react'
+import { CacheProvider } from '@emotion/react'
import createCache from '@emotion/cache'
+import { useServerInsertedHTML } from 'next/navigation'
+import { useState } from 'react'
-function EmotionProvider(props) {
- const { options = { key: 'css', prepend: true }, CacheProvider = DefaultProvider, children } = props
-
- const [registry] = useState(() => {
- const cache = createCache(options)
+export default function EmotionProvider({ children }) {
+ const [{ cache, flush }] = useState(() => {
+ const cache = createCache({ key: 'css', prepend: true })
cache.compat = true
const prevInsert = cache.insert
let inserted = []
cache.insert = (...args) => {
- const [selector, serialized] = args
+ const serialized = args[1]
if (cache.inserted[serialized.name] === undefined) {
- inserted.push({ name: serialized.name, isGlobal: !selector })
+ inserted.push({ name: serialized.name, global: !args[0] })
}
return prevInsert(...args)
@@ -39,58 +35,41 @@ function EmotionProvider(props) {
return { cache, flush }
})
- useEffect(() => {
- const jssStyles = document.querySelector('#jss-server-side')
- if (jssStyles) {
- jssStyles.parentElement.removeChild(jssStyles)
- }
- }, [])
-
useServerInsertedHTML(() => {
- const inserted = registry.flush()
- if (inserted.length === 0) {
- return null
- }
- let styles = ''
- let dataEmotionAttribute = registry.cache.key
-
- const globals = []
-
- inserted.forEach(({ name, isGlobal }) => {
- const style = registry.cache.inserted[name]
+ const names = flush()
+ if (names.length === 0) return null
- if (typeof style !== 'boolean') {
- if (isGlobal) {
- globals.push({ name, style })
- } else {
- styles += style
- dataEmotionAttribute += ` ${name}`
- }
+ const nonGlobalNames = []
+ const globalStyles = []
+ let styles = ''
+ for (const { name, global } of names) {
+ if (global) {
+ globalStyles.push({ name, css: cache.inserted[name] })
+ } else {
+ nonGlobalNames.push(name)
+ styles += cache.inserted[name]
}
- })
+ }
- return (
- <Fragment>
- {globals.map(({ name, style }) => (
- <style
- key={name}
- data-emotion={`${registry.cache.key}-global ${name}`}
- // eslint-disable-next-line react/no-danger
- dangerouslySetInnerHTML={{ __html: style }}
- />
- ))}
- {styles && (
- <style
- data-emotion={dataEmotionAttribute}
- // eslint-disable-next-line react/no-danger
- dangerouslySetInnerHTML={{ __html: styles }}
- />
- )}
- </Fragment>
- )
+ return [
+ ...globalStyles.map((style, i) => (
+ <style
+ key={style.name}
+ data-emotion={`${cache.key}-global`}
+ dangerouslySetInnerHTML={{
+ __html: style.css
+ }}
+ />
+ )),
+ <style
+ key='css'
+ data-emotion={`${cache.key} ${nonGlobalNames.join(' ')}`}
+ dangerouslySetInnerHTML={{
+ __html: styles
+ }}
+ />
+ ]
})
- return <CacheProvider value={registry.cache}>{children}</CacheProvider>
+ return <CacheProvider value={cache}>{children}</CacheProvider>
}
-
-export default EmotionProvider
diff --git a/web/lib/provider/store.js b/web/lib/provider/store.js
index c90d1f5734..c9f19b2833 100644
--- a/web/lib/provider/store.js
+++ b/web/lib/provider/store.js
@@ -8,12 +8,12 @@
import { useRef } from 'react'
import { Provider } from 'react-redux'
-import { makeStore } from '../store'
+import store from '@/lib/store'
const StoreProvider = ({ children }) => {
const storeRef = useRef()
if (!storeRef.current) {
- storeRef.current = makeStore()
+ storeRef.current = store
}
return <Provider store={storeRef.current}>{children}</Provider>
diff --git a/web/lib/store/index.js b/web/lib/store/index.js
index 3f2bc62e51..aafbd47af7 100644
--- a/web/lib/store/index.js
+++ b/web/lib/store/index.js
@@ -3,6 +3,8 @@
* This software is licensed under the Apache License version 2.
*/
+'use client'
+
import { configureStore } from '@reduxjs/toolkit'
import { isDevEnv } from '@/lib/utils'
@@ -10,16 +12,16 @@ import { isDevEnv } from '@/lib/utils'
import version from './version'
import metalakes from './metalakes'
-export const makeStore = () => {
- return configureStore({
- reducer: {
- version,
- metalakes
- },
- devTools: true,
- middleware: getDefaultMiddleware =>
- getDefaultMiddleware({
- serializableCheck: isDevEnv
- })
- })
-}
+export const store = configureStore({
+ reducer: {
+ version,
+ metalakes
+ },
+ devTools: true,
+ middleware: getDefaultMiddleware =>
+ getDefaultMiddleware({
+ serializableCheck: isDevEnv
+ })
+})
+
+export default store
diff --git a/web/lib/store/metalakes/index.js b/web/lib/store/metalakes/index.js
index 53d931ceaf..625f26190e 100644
--- a/web/lib/store/metalakes/index.js
+++ b/web/lib/store/metalakes/index.js
@@ -5,7 +5,17 @@
import { createSlice, createAsyncThunk } from '@reduxjs/toolkit'
-import { createMetalakeApi, getMetalakesApi, deleteMetalakeApi, updateMetalakeApi } from '@/lib/api/metalakes'
+import {
+ createMetalakeApi,
+ getMetalakesApi,
+ deleteMetalakeApi,
+ updateMetalakeApi,
+ getMetalakeDetailsApi
+} from '@/lib/api/metalakes'
+
+import { getCatalogsApi, getCatalogDetailsApi } from '@/lib/api/catalogs'
+import { getSchemasApi, getSchemaDetailsApi } from '@/lib/api/schemas'
+import { getTablesApi, getTableDetailsApi } from '@/lib/api/tables'
export const fetchMetalakes = createAsyncThunk('appMetalakes/fetchMetalakes', async (params, { getState }) => {
try {
@@ -57,24 +67,328 @@ export const updateMetalake = createAsyncThunk('appMetalakes/updateMetalake', as
}
})
+export const initMetalakeTree = createAsyncThunk(
+ 'appMetalakes/fetchMetalakeTree',
+ async ({ metalake, catalog, schema, table }, { dispatch }) => {
+ try {
+ const tree = []
+
+ const catalogsData = await getCatalogsApi({ metalake })
+
+ const { identifiers: catalogs = [] } = catalogsData.data
+
+ for (const catalogItem of catalogs) {
+ const catalogNode = {
+ ...catalogItem,
+ node: 'catalog',
+ id: `${metalake}____${catalogItem.name}`,
+ path: `?${new URLSearchParams({ metalake, catalog: catalogItem.name }).toString()}`,
+ name: catalogItem.name,
+ schemas: []
+ }
+
+ if (catalog) {
+ if (catalog === catalogNode.name) {
+ dispatch(setExpandedTreeNode([catalogNode.id]))
+
+ const schemasData = await getSchemasApi({ metalake, catalog })
+ const { identifiers: schemas = [] } = schemasData.data
+
+ for (const schemaItem of schemas) {
+ const schemaNode = {
+ ...schemaItem,
+ node: 'schema',
+ id: `${metalake}____${catalogItem.name}____${schemaItem.name}`,
+ path: `?${new URLSearchParams({
+ metalake,
+ catalog: catalogItem.name,
+ schema: schemaItem.name
+ }).toString()}`,
+ name: schemaItem.name,
+ tables: []
+ }
+
+ if (schema) {
+ if (schema === schemaNode.name) {
+ const tablesData = await getTablesApi({ metalake, catalog, schema })
+ const { identifiers: tables = [] } = tablesData.data
+
+ for (const tableItem of tables) {
+ const tableNode = {
+ ...tableItem,
+ node: 'table',
+ id: `${metalake}____${catalogItem.name}____${schemaItem.name}____${tableItem.name}`,
+ path: `?${new URLSearchParams({
+ metalake,
+ catalog: catalogItem.name,
+ schema: schemaItem.name,
+ table: tableItem.name
+ }).toString()}`,
+ name: tableItem.name
+ }
+
+ schemaNode.tables.push(tableNode)
+ }
+ }
+ }
+
+ catalogNode.schemas.push(schemaNode)
+ }
+ }
+ }
+
+ tree.push(catalogNode)
+ }
+
+ dispatch(setIsLoadedTree(true))
+
+ return tree
+ } catch (error) {
+ throw new Error(error)
+ }
+ }
+)
+
+export const setIntoTreeAction = createAsyncThunk(
+ 'appMetalakes/setIntoTreeAction',
+ async (nodeIds, { getState, dispatch }) => {
+ const nodeArr = nodeIds[0].split('____')
+ const [metalake, catalog, schema, table] = nodeArr
+
+ const data = {
+ updated: '',
+ id: nodeIds[0],
+ metalake,
+ catalog,
+ schemas: [],
+ schema,
+ tables: [],
+ table
+ }
+
+ if (nodeArr.length === 2) {
+ const schemas = await dispatch(fetchSchemas({ metalake, catalog }))
+
+ data.updated = 'catalog'
+ data.schemas = schemas.payload.schemas
+
+ return data
+ } else if (nodeArr.length === 3) {
+ const tables = await dispatch(fetchTables({ metalake, catalog, schema }))
+
+ data.updated = 'schema'
+ data.tables = tables.payload.tables
+
+ return data
+ } else {
+ return null
+ }
+ }
+)
+
+export const getMetalakeDetails = createAsyncThunk('appMetalakes/getMetalakeDetails', async ({ metalake }) => {
+ const response = await getMetalakeDetailsApi(metalake)
+
+ const { metalake: resMetalake } = response.data
+
+ return resMetalake
+})
+
+export const fetchCatalogs = createAsyncThunk(
+ 'appMetalakes/fetchCatalogs',
+ async ({ init, page, metalake }, { dispatch }) => {
+ try {
+ const response = await getCatalogsApi({ metalake })
+
+ const { identifiers = [] } = response.data
+
+ const catalogs = identifiers.map(catalog => {
+ return {
+ ...catalog,
+ node: 'catalog',
+ id: `${metalake}____${catalog.name}`,
+ path: `?${new URLSearchParams({ metalake, catalog: catalog.name }).toString()}`,
+ name: catalog.name,
+ schemas: []
+ }
+ })
+
+ return {
+ catalogs,
+ page,
+ init
+ }
+ } catch (error) {
+ throw new Error(error)
+ }
+ }
+)
+
+export const getCatalogDetails = createAsyncThunk('appMetalakes/getCatalogDetails', async ({ metalake, catalog }) => {
+ const response = await getCatalogDetailsApi({ metalake, catalog })
+
+ const { catalog: resCatalog } = response.data
+
+ return resCatalog
+})
+
+export const fetchSchemas = createAsyncThunk('appMetalakes/fetchSchemas', async ({ init, page, metalake, catalog }) => {
+ try {
+ const response = await getSchemasApi({ metalake, catalog })
+
+ const { identifiers = [] } = response.data
+
+ const schemas = identifiers.map(schema => {
+ return {
+ ...schema,
+ node: 'schema',
+ id: `${metalake}____${catalog}____${schema.name}`,
+ path: `?${new URLSearchParams({ metalake, catalog, schema: schema.name }).toString()}`,
+ name: schema.name,
+ tables: []
+ }
+ })
+
+ return { schemas, page, init }
+ } catch (error) {
+ throw new Error(error)
+ }
+})
+
+export const getSchemaDetails = createAsyncThunk(
+ 'appMetalakes/getSchemaDetails',
+ async ({ metalake, catalog, schema }) => {
+ const response = await getSchemaDetailsApi({ metalake, catalog, schema })
+
+ const { schema: resSchema } = response.data
+
+ return resSchema
+ }
+)
+
+export const fetchTables = createAsyncThunk(
+ 'appMetalakes/fetchTables',
+ async ({ init, page, metalake, catalog, schema }) => {
+ console.log(schema)
+ try {
+ const response = await getTablesApi({ metalake, catalog, schema })
+
+ const { identifiers = [] } = response.data
+
+ const tables = identifiers.map(table => {
+ return {
+ ...table,
+ node: 'table',
+ id: `${metalake}____${catalog}____${schema}____${table.name}`,
+ path: `?${new URLSearchParams({ metalake, catalog, schema, table: table.name }).toString()}`,
+ name: table.name,
+ columns: []
+ }
+ })
+
+ return { tables, page, init }
+ } catch (error) {
+ throw new Error(error)
+ }
+ }
+)
+
+export const getTableDetails = createAsyncThunk(
+ 'appMetalakes/getTableDetails',
+ async ({ metalake, catalog, schema, table }) => {
+ const response = await getTableDetailsApi({ metalake, catalog, schema, table })
+
+ const { table: resTable } = response.data
+
+ return resTable
+ }
+)
+
export const appMetalakesSlice = createSlice({
name: 'appMetalakes',
initialState: {
metalakes: [],
- filteredMetalakes: []
+ filteredMetalakes: [],
+ tableData: [],
+ catalogs: [],
+ schemas: [],
+ tables: [],
+ columns: [],
+ metalakeTree: [],
+ isLoadedTree: false,
+ selectedTreeNode: null,
+ expendedTreeNode: [],
+ activatedDetails: null,
+ clickedExpandNode: null
},
reducers: {
setFilteredMetalakes(state, action) {
state.filteredMetalakes = action.payload
- }
+ },
+ setIsLoadedTree(state, action) {
+ state.isLoadedTree = action.payload
+ },
+ setSelectedTreeNode(state, action) {
+ state.selectedTreeNode = action.payload
+ },
+ setExpandedTreeNode(state, action) {
+ state.expendedTreeNode = action.payload
+ },
+ resetMetalakeStore(state, action) {}
},
extraReducers: builder => {
builder.addCase(fetchMetalakes.fulfilled, (state, action) => {
state.metalakes = action.payload.metalakes
})
+ builder.addCase(initMetalakeTree.fulfilled, (state, action) => {
+ state.metalakeTree = action.payload
+ })
+ builder.addCase(setIntoTreeAction.fulfilled, (state, action) => {
+ if (action.payload.updated === 'catalog') {
+ const catalogIndex = state.metalakeTree.findIndex(i => i.id === action.payload.id)
+ state.metalakeTree[catalogIndex].schemas = action.payload.schemas
+ }
+
+ if (action.payload.updated === 'schema') {
+ const catalogIndex = state.metalakeTree.findIndex(i => i.name === action.payload.catalog)
+ const schemaIndex = state.metalakeTree[catalogIndex].schemas.findIndex(i => i.id === action.payload.id)
+ state.metalakeTree[catalogIndex].schemas[schemaIndex].tables = action.payload.tables
+ }
+ })
+ builder.addCase(getMetalakeDetails.fulfilled, (state, action) => {
+ state.activatedDetails = action.payload
+ })
+ builder.addCase(fetchCatalogs.fulfilled, (state, action) => {
+ state.catalogs = action.payload.catalogs
+ if (action.payload.init) {
+ state.tableData = action.payload.catalogs
+ }
+ })
+ builder.addCase(getCatalogDetails.fulfilled, (state, action) => {
+ state.activatedDetails = action.payload
+ })
+ builder.addCase(fetchSchemas.fulfilled, (state, action) => {
+ state.schemas = action.payload.schemas
+ if (action.payload.init) {
+ state.tableData = action.payload.schemas
+ }
+ })
+ builder.addCase(getSchemaDetails.fulfilled, (state, action) => {
+ state.activatedDetails = action.payload
+ })
+ builder.addCase(fetchTables.fulfilled, (state, action) => {
+ state.tables = action.payload.tables
+ if (action.payload.init) {
+ state.tableData = action.payload.tables
+ }
+ })
+ builder.addCase(getTableDetails.fulfilled, (state, action) => {
+ state.activatedDetails = action.payload
+ })
}
})
-export const { setFilteredMetalakes } = appMetalakesSlice.actions
+export const { setFilteredMetalakes, setIsLoadedTree, setSelectedTreeNode, setExpandedTreeNode, resetMetalakeStore } =
+ appMetalakesSlice.actions
export default appMetalakesSlice.reducer
diff --git a/web/lib/theme/mui.js b/web/lib/theme/mui.js
index 74afd6c120..fbfbc98f8a 100644
--- a/web/lib/theme/mui.js
+++ b/web/lib/theme/mui.js
@@ -672,7 +672,8 @@ const createMuiTheme = (config = {}) => {
paddingLeft: `${theme.spacing(3.25)} !important`
}),
columnHeaders: ({ theme }) => ({
- borderTop: `1px solid ${theme.palette.divider}`
+ borderTop: `1px solid ${theme.palette.divider}`,
+ backgroundColor: theme.palette.action.hover
}),
columnHeader: ({ theme }) => ({
'&:not(.MuiDataGrid-columnHeaderCheckbox)': {
diff --git a/web/lib/theme/screens.js b/web/lib/theme/screens.js
index 509062fd85..90b391472b 100644
--- a/web/lib/theme/screens.js
+++ b/web/lib/theme/screens.js
@@ -8,7 +8,7 @@ const screens = {
sm: 600,
md: 900,
lg: 1200,
- xl: 1536
+ xl: 1540
}
export default screens
diff --git a/web/next.config.js b/web/next.config.js
index f8398dc2f3..f2540ac97a 100644
--- a/web/next.config.js
+++ b/web/next.config.js
@@ -23,7 +23,7 @@ const nextConfig = {
}),
output: process.env.OUTPUT_MODE || 'standalone',
distDir: 'dist',
- trailingSlash: true,
+ trailingSlash: false,
reactStrictMode: false
}
diff --git a/web/public/favicon.ico b/web/public/favicon.ico
new file mode 100644
index 0000000000..6c58625eb0
Binary files /dev/null and b/web/public/favicon.ico differ
diff --git a/web/tailwind.config.js b/web/tailwind.config.js
index 482634ea7f..71e1a8a89f 100644
--- a/web/tailwind.config.js
+++ b/web/tailwind.config.js
@@ -18,7 +18,8 @@ const tailwindConfig = {
'./app/**/*.{js,ts,jsx,tsx,mdx}',
'./components/**/*.{js,ts,jsx,tsx,mdx}',
'./lib/**/*.{js,ts,jsx,tsx,mdx}',
- './pages/**/*.{js,ts,jsx,tsx,mdx}'
+ './pages/**/*.{js,ts,jsx,tsx,mdx}',
+ './views/**/*.{js,ts,jsx,tsx,mdx}'
],
theme: tailwindTheme,
variants: {
diff --git a/web/yarn.lock b/web/yarn.lock
index a786883152..d3fac6e21c 100644
--- a/web/yarn.lock
+++ b/web/yarn.lock
@@ -46,7 +46,7 @@
chalk "^2.4.2"
js-tokens "^4.0.0"
-"@babel/runtime@^7.1.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.18.3", "@babel/runtime@^7.23.2", "@babel/runtime@^7.3.1", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.3", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2":
+"@babel/runtime@^7.1.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.18.3", "@babel/runtime@^7.23.2", "@babel/runtime@^7.23.4", "@babel/runtime@^7.3.1", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.3", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2":
version "7.23.5"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.5.tgz#11edb98f8aeec529b82b211028177679144242db"
integrity sha512-NdUTHcPe4C99WxPub+K9l9tK5/lV4UXIoaHSYgzco9BCyjKAAwzdBI+wWtYqHt7LJdbo74ZjRPJgzVweq1sz0w==
@@ -191,10 +191,10 @@
resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63"
integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==
-"@eslint/eslintrc@^2.1.3":
- version "2.1.3"
- resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.3.tgz#797470a75fe0fbd5a53350ee715e85e87baff22d"
- integrity sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==
+"@eslint/eslintrc@^2.1.4":
+ version "2.1.4"
+ resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad"
+ integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==
dependencies:
ajv "^6.12.4"
debug "^4.3.2"
@@ -206,15 +206,15 @@
minimatch "^3.1.2"
strip-json-comments "^3.1.1"
-"@eslint/[email protected]":
- version "8.54.0"
- resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.54.0.tgz#4fab9a2ff7860082c304f750e94acd644cf984cf"
- integrity sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ==
+"@eslint/[email protected]":
+ version "8.55.0"
+ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.55.0.tgz#b721d52060f369aa259cf97392403cb9ce892ec6"
+ integrity sha512-qQfo2mxH5yVom1kacMtZZJFVdW+E70mqHMJvVg6WTLo+VBuQJ4TojZlfWBjK0ve5BdEeNAVxOsl/nvNMpJOaJA==
"@floating-ui/core@^1.4.2":
- version "1.5.0"
- resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.5.0.tgz#5c05c60d5ae2d05101c3021c1a2a350ddc027f8c"
- integrity sha512-kK1h4m36DQ0UHGj5Ah4db7R0rHemTqqO0QLvUqi1/mUUp3LuAWbWxdxSIf/XsnH9VS6rRVPLJCncjRzUvyCLXg==
+ version "1.5.1"
+ resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.5.1.tgz#62707d7ec585d0929f882321a1b1f4ea9c680da5"
+ integrity sha512-QgcKYwzcc8vvZ4n/5uklchy8KVdjJwcOeI+HnnTNclJjs2nYsy23DOCf+sSV1kBwD9yDAoVKCkv/gEPzgQU3Pw==
dependencies:
"@floating-ui/utils" "^0.1.3"
@@ -306,84 +306,84 @@
"@jridgewell/resolve-uri" "^3.1.0"
"@jridgewell/sourcemap-codec" "^1.4.14"
-"@mui/[email protected]", "@mui/base@^5.0.0-beta.20":
- version "5.0.0-beta.24"
- resolved "https://registry.yarnpkg.com/@mui/base/-/base-5.0.0-beta.24.tgz#1a0638388291828dacf9547b466bc21fbaad3a2a"
- integrity sha512-bKt2pUADHGQtqWDZ8nvL2Lvg2GNJyd/ZUgZAJoYzRgmnxBL9j36MSlS3+exEdYkikcnvVafcBtD904RypFKb0w==
+"@mui/[email protected]", "@mui/base@^5.0.0-beta.20":
+ version "5.0.0-beta.25"
+ resolved "https://registry.yarnpkg.com/@mui/base/-/base-5.0.0-beta.25.tgz#e1bc39f7a2daa9851fa8d0774ae6d89f0453bdc3"
+ integrity sha512-Iiv+IcappRRv6IBlknIVmLkXxfp51NEX1+l9f+dIbBuPU4PaRULegr1lCeHKsC45KU5ruxM5xMg4R/de03aJQg==
dependencies:
- "@babel/runtime" "^7.23.2"
+ "@babel/runtime" "^7.23.4"
"@floating-ui/react-dom" "^2.0.4"
- "@mui/types" "^7.2.9"
- "@mui/utils" "^5.14.18"
+ "@mui/types" "^7.2.10"
+ "@mui/utils" "^5.14.19"
"@popperjs/core" "^2.11.8"
clsx "^2.0.0"
prop-types "^15.8.1"
-"@mui/core-downloads-tracker@^5.14.18":
- version "5.14.18"
- resolved "https://registry.yarnpkg.com/@mui/core-downloads-tracker/-/core-downloads-tracker-5.14.18.tgz#f8b187dc89756fa5c0b7d15aea537a6f73f0c2d8"
- integrity sha512-yFpF35fEVDV81nVktu0BE9qn2dD/chs7PsQhlyaV3EnTeZi9RZBuvoEfRym1/jmhJ2tcfeWXiRuHG942mQXJJQ==
+"@mui/core-downloads-tracker@^5.14.19":
+ version "5.14.19"
+ resolved "https://registry.yarnpkg.com/@mui/core-downloads-tracker/-/core-downloads-tracker-5.14.19.tgz#9c04ad047c378d857d529ef9c535b60a10b9a47c"
+ integrity sha512-y4JseIen5pmZs1n9hHy95HKKioKco8f6N2lford2AmjJigVJOv0KsU0qryiCpyuEUZmi/xCduVilHsK9DSkPcA==
"@mui/lab@^5.0.0-alpha.153":
- version "5.0.0-alpha.153"
- resolved "https://registry.yarnpkg.com/@mui/lab/-/lab-5.0.0-alpha.153.tgz#069f3a6fdd0b917da934d554bff0bb7a93e337d2"
- integrity sha512-vogVniN5JC7ltqPpPhIGYVImnvu0PnE1UbtFvbzVs3ldt3obWJ5XrhYS/OEV6H2/9dey3nUNU6i36FG1yreFDA==
- dependencies:
- "@babel/runtime" "^7.23.2"
- "@mui/base" "5.0.0-beta.24"
- "@mui/system" "^5.14.18"
- "@mui/types" "^7.2.9"
- "@mui/utils" "^5.14.18"
+ version "5.0.0-alpha.154"
+ resolved "https://registry.yarnpkg.com/@mui/lab/-/lab-5.0.0-alpha.154.tgz#c352e164e9f0313317dd8dc1bfd17236fbefbbc8"
+ integrity sha512-Rrhu8eUknjV6hhPMqq52e/p4/c6rvnu/k0AhysuljsHDZcHThYEZNe1mHFLveQ1RIje2VnJSsgmcNfcZKeOOAg==
+ dependencies:
+ "@babel/runtime" "^7.23.4"
+ "@mui/base" "5.0.0-beta.25"
+ "@mui/system" "^5.14.19"
+ "@mui/types" "^7.2.10"
+ "@mui/utils" "^5.14.19"
clsx "^2.0.0"
prop-types "^15.8.1"
"@mui/material@^5.14.18":
- version "5.14.18"
- resolved "https://registry.yarnpkg.com/@mui/material/-/material-5.14.18.tgz#d0a89be3e27afe90135d542ddbf160b3f34e869c"
- integrity sha512-y3UiR/JqrkF5xZR0sIKj6y7xwuEiweh9peiN3Zfjy1gXWXhz5wjlaLdoxFfKIEBUFfeQALxr/Y8avlHH+B9lpQ==
- dependencies:
- "@babel/runtime" "^7.23.2"
- "@mui/base" "5.0.0-beta.24"
- "@mui/core-downloads-tracker" "^5.14.18"
- "@mui/system" "^5.14.18"
- "@mui/types" "^7.2.9"
- "@mui/utils" "^5.14.18"
- "@types/react-transition-group" "^4.4.8"
+ version "5.14.19"
+ resolved "https://registry.yarnpkg.com/@mui/material/-/material-5.14.19.tgz#6b81f6248da04ee73f935a79d81e7819c7115089"
+ integrity sha512-jSPLXst/YPgDGolhiu4rbethKjLVrI1IkoK8YrFUv8ygxDuhQdsE6+ZqjSSRXk3ytTMf6ghPnQ88OFRk4XjpNw==
+ dependencies:
+ "@babel/runtime" "^7.23.4"
+ "@mui/base" "5.0.0-beta.25"
+ "@mui/core-downloads-tracker" "^5.14.19"
+ "@mui/system" "^5.14.19"
+ "@mui/types" "^7.2.10"
+ "@mui/utils" "^5.14.19"
+ "@types/react-transition-group" "^4.4.9"
clsx "^2.0.0"
csstype "^3.1.2"
prop-types "^15.8.1"
react-is "^18.2.0"
react-transition-group "^4.4.5"
-"@mui/private-theming@^5.14.18":
- version "5.14.18"
- resolved "https://registry.yarnpkg.com/@mui/private-theming/-/private-theming-5.14.18.tgz#98f97139ea21570493391ab377c1deb47fc6d1a2"
- integrity sha512-WSgjqRlzfHU+2Rou3HlR2Gqfr4rZRsvFgataYO3qQ0/m6gShJN+lhVEvwEiJ9QYyVzMDvNpXZAcqp8Y2Vl+PAw==
+"@mui/private-theming@^5.14.19":
+ version "5.14.19"
+ resolved "https://registry.yarnpkg.com/@mui/private-theming/-/private-theming-5.14.19.tgz#f3bae7377f987dc5f40d0c43163ae1ed1f892961"
+ integrity sha512-U9w39VpXLGVM8wZlUU/47YGTsBSk60ZQRRxQZtdqPfN1N7OVllQeN4cEKZKR8PjqqR3aYRcSciQ4dc6CttRoXQ==
dependencies:
- "@babel/runtime" "^7.23.2"
- "@mui/utils" "^5.14.18"
+ "@babel/runtime" "^7.23.4"
+ "@mui/utils" "^5.14.19"
prop-types "^15.8.1"
-"@mui/styled-engine@^5.14.18":
- version "5.14.18"
- resolved "https://registry.yarnpkg.com/@mui/styled-engine/-/styled-engine-5.14.18.tgz#82d427bc975b85cecdbab2fd9353ed6c2df7eae1"
- integrity sha512-pW8bpmF9uCB5FV2IPk6mfbQCjPI5vGI09NOLhtGXPeph/4xIfC3JdIX0TILU0WcTs3aFQqo6s2+1SFgIB9rCXA==
+"@mui/styled-engine@^5.14.19":
+ version "5.14.19"
+ resolved "https://registry.yarnpkg.com/@mui/styled-engine/-/styled-engine-5.14.19.tgz#dee1d16044a5ef3a783b742381ea4348c159b013"
+ integrity sha512-jtj/Pyn/bS8PM7NXdFNTHWZfE3p+vItO4/HoQbUeAv3u+cnWXcTBGHHY/xdIn446lYGFDczTh1YyX8G4Ts0Rtg==
dependencies:
- "@babel/runtime" "^7.23.2"
+ "@babel/runtime" "^7.23.4"
"@emotion/cache" "^11.11.0"
csstype "^3.1.2"
prop-types "^15.8.1"
"@mui/styles@^5.14.18":
- version "5.14.18"
- resolved "https://registry.yarnpkg.com/@mui/styles/-/styles-5.14.18.tgz#fde0cfefeb95188758804f46722933a74b9e6fd6"
- integrity sha512-dllIn149Fd6xzlf743y5jGbr61V/8qR1JWiwsOc5NAx5eTIooHpJxEfiVErHDpChCaHjlfR6upxvcNDq8IvT2w==
+ version "5.14.19"
+ resolved "https://registry.yarnpkg.com/@mui/styles/-/styles-5.14.19.tgz#713f66a4515f2a52f965485a081d64690241c879"
+ integrity sha512-5yARLEJ8zPzY6zpebupK3PqDo6jQBz1s78qXnBju10toP9HT4WEydpYdm+orDAlUUxP8eVlcpK0fVwza9NwbjA==
dependencies:
- "@babel/runtime" "^7.23.2"
+ "@babel/runtime" "^7.23.4"
"@emotion/hash" "^0.9.1"
- "@mui/private-theming" "^5.14.18"
- "@mui/types" "^7.2.9"
- "@mui/utils" "^5.14.18"
+ "@mui/private-theming" "^5.14.19"
+ "@mui/types" "^7.2.10"
+ "@mui/utils" "^5.14.19"
clsx "^2.0.0"
csstype "^3.1.2"
hoist-non-react-statics "^3.3.2"
@@ -397,32 +397,32 @@
jss-plugin-vendor-prefixer "^10.10.0"
prop-types "^15.8.1"
-"@mui/system@^5.14.18":
- version "5.14.18"
- resolved "https://registry.yarnpkg.com/@mui/system/-/system-5.14.18.tgz#0f671e8f0a5e8e965b79235d77c50098f54195b5"
- integrity sha512-hSQQdb3KF72X4EN2hMEiv8EYJZSflfdd1TRaGPoR7CIAG347OxCslpBUwWngYobaxgKvq6xTrlIl+diaactVww==
+"@mui/system@^5.14.19":
+ version "5.14.19"
+ resolved "https://registry.yarnpkg.com/@mui/system/-/system-5.14.19.tgz#f13387c60af129e4d61dfbf168fcee348ebe952a"
+ integrity sha512-4e3Q+2nx+vgEsd0h5ftxlZGB7XtkkPos/zWqCqnxUs1l/T70s0lF2YNrWHHdSQ7LgtBu0eQ0qweZG2pR7KwkAw==
dependencies:
- "@babel/runtime" "^7.23.2"
- "@mui/private-theming" "^5.14.18"
- "@mui/styled-engine" "^5.14.18"
- "@mui/types" "^7.2.9"
- "@mui/utils" "^5.14.18"
+ "@babel/runtime" "^7.23.4"
+ "@mui/private-theming" "^5.14.19"
+ "@mui/styled-engine" "^5.14.19"
+ "@mui/types" "^7.2.10"
+ "@mui/utils" "^5.14.19"
clsx "^2.0.0"
csstype "^3.1.2"
prop-types "^15.8.1"
-"@mui/types@^7.2.9":
- version "7.2.9"
- resolved "https://registry.yarnpkg.com/@mui/types/-/types-7.2.9.tgz#730ee83a37af292a5973962f78ce5c95f31213a7"
- integrity sha512-k1lN/PolaRZfNsRdAqXtcR71sTnv3z/VCCGPxU8HfdftDkzi335MdJ6scZxvofMAd/K/9EbzCZTFBmlNpQVdCg==
+"@mui/types@^7.2.10":
+ version "7.2.10"
+ resolved "https://registry.yarnpkg.com/@mui/types/-/types-7.2.10.tgz#13e3e9aa07ee6d593cfacd538e02e8e896d7a12f"
+ integrity sha512-wX1vbDC+lzF7FlhT6A3ffRZgEoKWPF8VqRoTu4lZwouFX2t90KyCMsgepMw5DxLak1BSp/KP86CmtZttikb/gQ==
-"@mui/utils@^5.14.14", "@mui/utils@^5.14.16", "@mui/utils@^5.14.18":
- version "5.14.18"
- resolved "https://registry.yarnpkg.com/@mui/utils/-/utils-5.14.18.tgz#d2a46df9b06230423ba6b6317748b27185a56ac3"
- integrity sha512-HZDRsJtEZ7WMSnrHV9uwScGze4wM/Y+u6pDVo+grUjt5yXzn+wI8QX/JwTHh9YSw/WpnUL80mJJjgCnWj2VrzQ==
+"@mui/utils@^5.14.14", "@mui/utils@^5.14.16", "@mui/utils@^5.14.19":
+ version "5.14.19"
+ resolved "https://registry.yarnpkg.com/@mui/utils/-/utils-5.14.19.tgz#39a5846a74ba199f1a2b067ea197dc6b9c8f442f"
+ integrity sha512-qAHvTXzk7basbyqPvhgWqN6JbmI2wLB/mf97GkSlz5c76MiKYV6Ffjvw9BjKZQ1YRb8rDX9kgdjRezOcoB91oQ==
dependencies:
- "@babel/runtime" "^7.23.2"
- "@types/prop-types" "^15.7.10"
+ "@babel/runtime" "^7.23.4"
+ "@types/prop-types" "^15.7.11"
prop-types "^15.8.1"
react-is "^18.2.0"
@@ -578,12 +578,12 @@
resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.2.tgz#5950e50960793055845e956c427fc2b0d70c5239"
integrity sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==
-"@types/prop-types@*", "@types/prop-types@^15.7.10":
+"@types/prop-types@*", "@types/prop-types@^15.7.11":
version "15.7.11"
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.11.tgz#2596fb352ee96a1379c657734d4b913a613ad563"
integrity sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==
-"@types/react-transition-group@^4.4.8":
+"@types/react-transition-group@^4.4.8", "@types/react-transition-group@^4.4.9":
version "4.4.9"
resolved "https://registry.yarnpkg.com/@types/react-transition-group/-/react-transition-group-4.4.9.tgz#12a1a1b5b8791067198149867b0823fbace31579"
integrity sha512-ZVNmWumUIh5NhH8aMD9CR2hdW0fNuYInlocZHaZ+dgk/1K49j1w/HoAuK1ki+pgscQrOFRTlXeoURtuzEkV3dg==
@@ -591,9 +591,9 @@
"@types/react" "*"
"@types/react@*":
- version "18.2.39"
- resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.39.tgz#744bee99e053ad61fe74eb8b897f3ab5b19a7e25"
- integrity sha512-Oiw+ppED6IremMInLV4HXGbfbG6GyziY3kqAwJYOR0PNbkYDmLWQA3a95EhdSmamsvbkJN96ZNN+YD+fGjzSBA==
+ version "18.2.41"
+ resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.41.tgz#9eea044246bdb10510df89ef7f8422a8b6ad8fb9"
+ integrity sha512-CwOGr/PiLiNBxEBqpJ7fO3kocP/2SSuC9fpH5K7tusrg4xPSRT/193rzolYwQnTN02We/ATXKnb6GqA5w4fRxw==
dependencies:
"@types/prop-types" "*"
"@types/scheduler" "*"
@@ -902,13 +902,13 @@ braces@^3.0.2, braces@~3.0.2:
fill-range "^7.0.1"
browserslist@^4.21.10:
- version "4.22.1"
- resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.22.1.tgz#ba91958d1a59b87dab6fed8dfbcb3da5e2e9c619"
- integrity sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==
+ version "4.22.2"
+ resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.22.2.tgz#704c4943072bd81ea18997f3bd2180e89c77874b"
+ integrity sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==
dependencies:
- caniuse-lite "^1.0.30001541"
- electron-to-chromium "^1.4.535"
- node-releases "^2.0.13"
+ caniuse-lite "^1.0.30001565"
+ electron-to-chromium "^1.4.601"
+ node-releases "^2.0.14"
update-browserslist-db "^1.0.13"
buffer-from@~0.1.1:
@@ -942,10 +942,10 @@ camelcase-css@^2.0.1:
resolved "https://registry.yarnpkg.com/camelcase-css/-/camelcase-css-2.0.1.tgz#ee978f6947914cc30c6b44741b6ed1df7f043fd5"
integrity sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==
-caniuse-lite@^1.0.30001406, caniuse-lite@^1.0.30001538, caniuse-lite@^1.0.30001541:
- version "1.0.30001565"
- resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001565.tgz#a528b253c8a2d95d2b415e11d8b9942acc100c4f"
- integrity sha512-xrE//a3O7TP0vaJ8ikzkD2c2NgcVUvsEe2IvFTntV4Yd1Z9FVzh+gW+enX96L0psrbaFMcVcH2l90xNuGDWc8w==
+caniuse-lite@^1.0.30001406, caniuse-lite@^1.0.30001538, caniuse-lite@^1.0.30001565:
+ version "1.0.30001566"
+ resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001566.tgz#61a8e17caf3752e3e426d4239c549ebbb37fef0d"
+ integrity sha512-ggIhCsTxmITBAMmK8yZjEhCO5/47jKXPu6Dha/wuCS4JePVL+3uiDEBuhu2aIoT+bqTOR8L76Ip1ARL9xYsEJA==
chalk@^2.4.2:
version "2.4.2"
@@ -1143,7 +1143,7 @@ define-data-property@^1.0.1, define-data-property@^1.1.1:
gopd "^1.0.1"
has-property-descriptors "^1.0.0"
-define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0, define-properties@^1.2.1:
+define-properties@^1.1.3, define-properties@^1.2.0, define-properties@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c"
integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==
@@ -1208,10 +1208,10 @@ duplexer2@^0.1.2:
dependencies:
readable-stream "^2.0.2"
-electron-to-chromium@^1.4.535:
- version "1.4.597"
- resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.597.tgz#9848b9aa52749bf35be88013bab52be232889d94"
- integrity sha512-0XOQNqHhg2YgRVRUrS4M4vWjFCFIP2ETXcXe/0KIQBjXE9Cpy+tgzzYfuq6HGai3hWq0YywtG+5XK8fyG08EjA==
+electron-to-chromium@^1.4.601:
+ version "1.4.601"
+ resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.601.tgz#cac69868548aee89961ffe63ff5a7716f0685b75"
+ integrity sha512-SpwUMDWe9tQu8JX5QCO1+p/hChAi9AE9UpoC3rcHVc+gdCGlbT3SGb5I1klgb952HRIyvt9wZhSz9bNBYz9swA==
emoji-regex@^9.2.2:
version "9.2.2"
@@ -1369,9 +1369,9 @@ [email protected]:
eslint-plugin-react-hooks "^4.5.0 || 5.0.0-canary-7118f5dd7-20230705"
eslint-config-prettier@^9.0.0:
- version "9.0.0"
- resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz#eb25485946dd0c66cd216a46232dc05451518d1f"
- integrity sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==
+ version "9.1.0"
+ resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz#31af3d94578645966c082fcb71a5846d3c94867f"
+ integrity sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==
eslint-import-resolver-node@^0.3.6, eslint-import-resolver-node@^0.3.9:
version "0.3.9"
@@ -1488,14 +1488,14 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4
integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==
eslint@^8:
- version "8.54.0"
- resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.54.0.tgz#588e0dd4388af91a2e8fa37ea64924074c783537"
- integrity sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA==
+ version "8.55.0"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.55.0.tgz#078cb7b847d66f2c254ea1794fa395bf8e7e03f8"
+ integrity sha512-iyUUAM0PCKj5QpwGfmCAG9XXbZCWsqP/eWAWrG/W0umvjuLRBECwSFdt+rCntju0xEH7teIABPwXpahftIaTdA==
dependencies:
"@eslint-community/eslint-utils" "^4.2.0"
"@eslint-community/regexpp" "^4.6.1"
- "@eslint/eslintrc" "^2.1.3"
- "@eslint/js" "8.54.0"
+ "@eslint/eslintrc" "^2.1.4"
+ "@eslint/js" "8.55.0"
"@humanwhocodes/config-array" "^0.11.13"
"@humanwhocodes/module-importer" "^1.0.1"
"@nodelib/fs.walk" "^1.2.8"
@@ -2451,7 +2451,7 @@ nano-css@^5.6.1:
stacktrace-js "^2.0.2"
stylis "^4.3.0"
-nanoid@^3.3.6:
+nanoid@^3.3.6, nanoid@^3.3.7:
version "3.3.7"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8"
integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==
@@ -2489,10 +2489,10 @@ [email protected]:
"@next/swc-win32-ia32-msvc" "14.0.3"
"@next/swc-win32-x64-msvc" "14.0.3"
-node-releases@^2.0.13:
- version "2.0.13"
- resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.13.tgz#d5ed1627c23e3461e819b02e57b75e4899b1c81d"
- integrity sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==
+node-releases@^2.0.14:
+ version "2.0.14"
+ resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b"
+ integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==
normalize-path@^3.0.0, normalize-path@~3.0.0:
version "3.0.0"
@@ -2535,12 +2535,12 @@ object-keys@~0.4.0:
integrity sha512-ncrLw+X55z7bkl5PnUvHwFK9FcGuFYo9gtjws2XtSzL+aZ8tm830P60WJ0dSmFVaSalWieW5MD7kEdnXda9yJw==
object.assign@^4.1.4:
- version "4.1.4"
- resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f"
- integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==
+ version "4.1.5"
+ resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.5.tgz#3a833f9ab7fdb80fc9e8d2300c803d216d8fdbb0"
+ integrity sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==
dependencies:
- call-bind "^1.0.2"
- define-properties "^1.1.4"
+ call-bind "^1.0.5"
+ define-properties "^1.2.1"
has-symbols "^1.0.3"
object-keys "^1.1.1"
@@ -2733,7 +2733,7 @@ postcss-value-parser@^4.0.0, postcss-value-parser@^4.2.0:
resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514"
integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==
[email protected], postcss@^8, postcss@^8.4.23:
version "8.4.31"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.31.tgz#92b451050a9f914da6755af352bdc0192508656d"
integrity sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==
@@ -2742,6 +2742,15 @@ [email protected], postcss@^8, postcss@^8.4.23:
picocolors "^1.0.0"
source-map-js "^1.0.2"
+postcss@^8, postcss@^8.4.23:
+ version "8.4.32"
+ resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.32.tgz#1dac6ac51ab19adb21b8b34fd2d93a86440ef6c9"
+ integrity sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==
+ dependencies:
+ nanoid "^3.3.7"
+ picocolors "^1.0.0"
+ source-map-js "^1.0.2"
+
prelude-ls@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
@@ -2852,9 +2861,9 @@ react-universal-interface@^0.6.2:
integrity sha512-dg8yXdcQmvgR13RIlZbTRQOoUrDciFVoSBZILwjE2LFISxZZ8loVJKAkuzswl5js8BHda79bIb2b84ehU8IjXw==
react-use@^17.4.1:
- version "17.4.1"
- resolved "https://registry.yarnpkg.com/react-use/-/react-use-17.4.1.tgz#e486f14892c96fe2c3764270dfb2df922a69c5aa"
- integrity sha512-f3EdGM5ea+2EEIkfgggE+Jhza7uEek8aEMTpd1TQnyqGAD4wew3CMVshiXEP6kstjBE4XUGoKVxttqio76ijNw==
+ version "17.4.2"
+ resolved "https://registry.yarnpkg.com/react-use/-/react-use-17.4.2.tgz#26d43c774ccb733a17a87be62e12fbcbc5654173"
+ integrity sha512-1jPtmWLD8OJJNYCdYLJEH/HM+bPDfJuyGwCYeJFgPmWY8ttwpgZnW5QnzgM55CYUByUiTjHxsGOnEpLl6yQaoQ==
dependencies:
"@types/js-cookie" "^2.2.6"
"@xobotyi/scrollbar-width" "^1.9.5"