Skip to content

Commit

Permalink
hide-jobs-ands-dataops
Browse files Browse the repository at this point in the history
  • Loading branch information
Kess220 committed Feb 12, 2025
1 parent 703f9ee commit c2df362
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 82 deletions.
92 changes: 46 additions & 46 deletions web/src/components/App.tsx
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
import { AuthProvider } from '../auth/AuthContext';
import { Box, Container, CssBaseline } from '@mui/material';
import { Helmet, HelmetProvider } from 'react-helmet-async';
import { LocalizationProvider } from '@mui/x-date-pickers';
import { NotFound } from '../routes/not-found/NotFound';
import { PrivateRoute } from './PrivateRoute';
import { Provider } from 'react-redux';
import { ReduxRouter, createRouterMiddleware } from '@lagunovsky/redux-react-router';
import { Route, Routes } from 'react-router-dom';
import { StyledEngineProvider, ThemeProvider } from '@mui/material/styles';
import { applyMiddleware, createStore } from 'redux';
import { composeWithDevTools } from '@redux-devtools/extension';
import { createBrowserHistory } from 'history';
import { theme } from '../helpers/theme';
import ColumnLevel from '../routes/column-level/ColumnLevel';
import Dashboard from '../routes/dashboard/Dashboard';
import Datasets from '../routes/datasets/Datasets';
import ErrorBoundary from './ErrorBoundary';
import Events from '../routes/events/Events';
import Header from './header/Header';
import Jobs from '../routes/jobs/Jobs';
import Login from './Login';
import LoginCallback from './LoginCallback';
import React, { ReactElement } from 'react';
import Sidenav from './sidenav/Sidenav';
import TableLevel from '../routes/table-level/TableLevel';
import Toast from './Toast';
import createRootReducer from '../store/reducers';
import createSagaMiddleware from 'redux-saga';
import rootSaga from '../store/sagas';
import GAInitializer from './GAInitializer';
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'
import { AuthProvider } from '../auth/AuthContext'
import { Box, Container, CssBaseline } from '@mui/material'
import { Helmet, HelmetProvider } from 'react-helmet-async'
import { LocalizationProvider } from '@mui/x-date-pickers'
import { NotFound } from '../routes/not-found/NotFound'
import { PrivateRoute } from './PrivateRoute'
import { Provider } from 'react-redux'
import { ReduxRouter, createRouterMiddleware } from '@lagunovsky/redux-react-router'
import { Route, Routes } from 'react-router-dom'
import { StyledEngineProvider, ThemeProvider } from '@mui/material/styles'
import { applyMiddleware, createStore } from 'redux'
import { composeWithDevTools } from '@redux-devtools/extension'
import { createBrowserHistory } from 'history'
import { theme } from '../helpers/theme'
import ColumnLevel from '../routes/column-level/ColumnLevel'
// import Dashboard from '../routes/dashboard/Dashboard'
import Datasets from '../routes/datasets/Datasets'
import ErrorBoundary from './ErrorBoundary'
import Events from '../routes/events/Events'
import GAInitializer from './GAInitializer'
import Header from './header/Header'
// import Jobs from '../routes/jobs/Jobs'
import Login from './Login'
import LoginCallback from './LoginCallback'
import React, { ReactElement } from 'react'
import Sidenav from './sidenav/Sidenav'
import TableLevel from '../routes/table-level/TableLevel'
import Toast from './Toast'
import createRootReducer from '../store/reducers'
import createSagaMiddleware from 'redux-saga'
import rootSaga from '../store/sagas'

const sagaMiddleware = createSagaMiddleware({
onError: (error, _sagaStackIgnored) => {
console.log('There was an error in the saga', error);
console.log('There was an error in the saga', error)
},
});
const history = createBrowserHistory();
const historyMiddleware = createRouterMiddleware(history);
})
const history = createBrowserHistory()
const historyMiddleware = createRouterMiddleware(history)

const store = createStore(
createRootReducer(history),
composeWithDevTools(applyMiddleware(sagaMiddleware, historyMiddleware))
);
)

sagaMiddleware.run(rootSaga);
sagaMiddleware.run(rootSaga)

const TITLE = 'Nu Data Lineage';
const TITLE = 'Nu Data Lineage'

const App = (): ReactElement => {
return (
Expand Down Expand Up @@ -79,22 +79,22 @@ const App = (): ReactElement => {
</PrivateRoute>
}
/>
<Route
{/* <Route
path={'/jobs'}
element={
<PrivateRoute>
<Jobs />
</PrivateRoute>
}
/>
<Route
/> */}
{/* <Route
path={'/dashboard'}
element={
<PrivateRoute>
<Dashboard />
</PrivateRoute>
}
/>
/> */}
<Route
path={'/events'}
element={
Expand Down Expand Up @@ -123,7 +123,7 @@ const App = (): ReactElement => {
</Provider>
</AuthProvider>
</ErrorBoundary>
);
};
)
}

export default App;
export default App
71 changes: 35 additions & 36 deletions web/src/components/sidenav/Sidenav.tsx
Original file line number Diff line number Diff line change
@@ -1,38 +1,37 @@
import React from 'react';
import SVG from 'react-inlinesvg';
import { Link, useLocation } from 'react-router-dom';
import Box from '@mui/material/Box';
import { DRAWER_WIDTH, HEADER_HEIGHT } from '../../helpers/theme';
import { Divider, Drawer, createTheme } from '@mui/material';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faCogs, faDatabase } from '@fortawesome/free-solid-svg-icons';
import MqIconButton from '../core/icon-button/MqIconButton';
import '../../i18n/config';
import { FormControl, MenuItem, Select } from '@mui/material';
import { MqInputNoIcon } from '../core/input-base/MqInputBase';
import { useTheme } from '@emotion/react';
import { Dashboard } from '@mui/icons-material';
import { PrivateRoute } from '../PrivateRoute';
import HelpCenterIcon from '@mui/icons-material/HelpCenter';
import SupportAgentIcon from '@mui/icons-material/SupportAgent';
import iconSearchArrow from '../../img/iconSearchArrow.svg';
import nu_logo from './logoNu.svg';
import { trackEvent } from '../ga4';
import '../../i18n/config'
import { DRAWER_WIDTH, HEADER_HEIGHT } from '../../helpers/theme'
import { Divider, Drawer, createTheme } from '@mui/material'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { FormControl, MenuItem, Select } from '@mui/material'
import { Link, useLocation } from 'react-router-dom'
import { MqInputNoIcon } from '../core/input-base/MqInputBase'
import { PrivateRoute } from '../PrivateRoute'
import { faDatabase } from '@fortawesome/free-solid-svg-icons'
import { trackEvent } from '../ga4'
import { useTheme } from '@emotion/react'
import Box from '@mui/material/Box'
import HelpCenterIcon from '@mui/icons-material/HelpCenter'
import MqIconButton from '../core/icon-button/MqIconButton'
import React from 'react'
import SVG from 'react-inlinesvg'
import SupportAgentIcon from '@mui/icons-material/SupportAgent'
import iconSearchArrow from '../../img/iconSearchArrow.svg'
import nu_logo from './logoNu.svg'

interface SidenavProps {}

const Sidenav: React.FC<SidenavProps> = () => {
const i18next = require('i18next');
const i18next = require('i18next')
const changeLanguage = (lng: string) => {
i18next.changeLanguage(lng);
};
const theme = createTheme(useTheme());
i18next.changeLanguage(lng)
}
const theme = createTheme(useTheme())

const location = useLocation();
const location = useLocation()

const handleNavClick = (category: string, action: string) => {
trackEvent(category, action);
};
trackEvent(category, action)
}

return (
<PrivateRoute>
Expand Down Expand Up @@ -92,15 +91,15 @@ const Sidenav: React.FC<SidenavProps> = () => {
>
<FontAwesomeIcon icon={faDatabase} fontSize={20} />
</MqIconButton>
<MqIconButton
{/* <MqIconButton
to={'/jobs'}
id={'jobsDrawerButton'}
title={i18next.t('sidenav.jobs')}
active={location.pathname === '/jobs'}
onClick={() => handleNavClick('Sidenav', 'Jobs Clicked')}
>
<FontAwesomeIcon icon={faCogs} fontSize={20} />
</MqIconButton>
</MqIconButton> */}
<MqIconButton
id={'eventsButton'}
to={'/events'}
Expand All @@ -110,15 +109,15 @@ const Sidenav: React.FC<SidenavProps> = () => {
>
<SVG src={iconSearchArrow} width={'20px'} />
</MqIconButton>
<MqIconButton
{/* <MqIconButton
to={'/dashboard'}
id={'homeDrawerButton'}
title={i18next.t('sidenav.dataOps')}
active={location.pathname === '/dashboard'}
onClick={() => handleNavClick('Sidenav', 'Dashboard Clicked')}
>
<Dashboard />
</MqIconButton>
</MqIconButton> */}
</Box>

<Box
Expand Down Expand Up @@ -165,8 +164,8 @@ const Sidenav: React.FC<SidenavProps> = () => {
fullWidth
value={i18next.resolvedLanguage}
onChange={(event) => {
changeLanguage(event.target.value as string);
window.location.reload();
changeLanguage(event.target.value as string)
window.location.reload()
}}
input={<MqInputNoIcon />}
>
Expand All @@ -188,7 +187,7 @@ const Sidenav: React.FC<SidenavProps> = () => {
</Box>
</Drawer>
</PrivateRoute>
);
};
)
}

export default Sidenav;
export default Sidenav

0 comments on commit c2df362

Please sign in to comment.