Compare commits
No commits in common. "master" and "v1.0.19-DEV" have entirely different histories.
master
...
v1.0.19-DE
3
.gitignore
vendored
3
.gitignore
vendored
@ -14,10 +14,7 @@
|
|||||||
/build
|
/build
|
||||||
*/build
|
*/build
|
||||||
/src/authtoken.json
|
/src/authtoken.json
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
|
|
||||||
>>>>>>> dev
|
|
||||||
# misc
|
# misc
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.env.local
|
.env.local
|
||||||
|
|||||||
@ -1,11 +1,10 @@
|
|||||||
CREATE TABLE users (
|
CREATE TABLE users (
|
||||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||||
token VARCHAR(255) NOT NULL,
|
|
||||||
username VARCHAR(50) NOT NULL UNIQUE,
|
username VARCHAR(50) NOT NULL UNIQUE,
|
||||||
password_hash VARCHAR(255) NOT NULL,
|
password_hash VARCHAR(255) NOT NULL,
|
||||||
perms VARCHAR(255) NOT NULL
|
perms VARCHAR(255) NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
-- Test user with admin permissions
|
-- Test user with admin permissions
|
||||||
INSERT INTO users (token, username, password_hash, perms)
|
INSERT INTO users (username, password_hash, perms)
|
||||||
VALUES ('be01e88cc202593292d503e4ed9e51e9eb217093662efbb145030ba51b97c22a','admin', 'ecd71870d1963316a97e3ac3408c9835ad8cf0f3c1bc703527c30265534f75ae', 'admin');
|
VALUES ('admin', 'ecd71870d1963316a97e3ac3408c9835ad8cf0f3c1bc703527c30265534f75ae', 'admin');
|
||||||
|
|||||||
@ -11,7 +11,6 @@ import metadata from './metadata.json';
|
|||||||
import './App.css'
|
import './App.css'
|
||||||
import useToken from './core/useToken';
|
import useToken from './core/useToken';
|
||||||
import Terminal from './Terminal/TerminalPage'
|
import Terminal from './Terminal/TerminalPage'
|
||||||
import DashboardReports from './Dashboard/DashboardReports';
|
|
||||||
|
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
@ -27,8 +26,8 @@ function App() {
|
|||||||
<Route path='/' element={<Navigate to='/dashboard' />} />
|
<Route path='/' element={<Navigate to='/dashboard' />} />
|
||||||
<Route path="/dashboard" element={<Dashboard/>} />
|
<Route path="/dashboard" element={<Dashboard/>} />
|
||||||
<Route path="/dashboard/users" element={<DashboardUsers />} />
|
<Route path="/dashboard/users" element={<DashboardUsers />} />
|
||||||
{/* <Route path="/dashboard/configuration" element={<Settings />} /> */}
|
{/* <Route path="/dashboard/configuration" element={<Settings />} />
|
||||||
<Route path="/dashboard/reports" element={<DashboardReports />} />
|
<Route path="/dashboard/reports" element={<Reports />} /> */}
|
||||||
<Route path="/dashboard/console" element={<Terminal/>} />
|
<Route path="/dashboard/console" element={<Terminal/>} />
|
||||||
<Route path="/settings" element={<SettingsMain/>} />
|
<Route path="/settings" element={<SettingsMain/>} />
|
||||||
<Route path="/settings/info" element={<SettingsInfo/>} />
|
<Route path="/settings/info" element={<SettingsInfo/>} />
|
||||||
|
|||||||
@ -1,33 +0,0 @@
|
|||||||
import React from 'react';
|
|
||||||
import {
|
|
||||||
Box,
|
|
||||||
CssBaseline,
|
|
||||||
Toolbar,
|
|
||||||
} from '@mui/material';
|
|
||||||
import { ThemeProvider } from '@mui/material/styles';
|
|
||||||
import theme from '../theme';
|
|
||||||
import { SidebarMain } from '../widgets/Sidebar';
|
|
||||||
import { AppBarFull } from '../widgets/AppBar';
|
|
||||||
import WidgetReport from '../widgets/WidgetReport';
|
|
||||||
|
|
||||||
export default function DashboardReports() {
|
|
||||||
return (
|
|
||||||
<ThemeProvider theme={theme}>
|
|
||||||
<Box sx={{ display: 'flex' }}>
|
|
||||||
<CssBaseline />
|
|
||||||
<AppBarFull />
|
|
||||||
<SidebarMain />
|
|
||||||
<Box
|
|
||||||
component="main"
|
|
||||||
sx={{ flexGrow: 1, bgcolor: 'background.default', p: 3 }}
|
|
||||||
>
|
|
||||||
<Toolbar />
|
|
||||||
{/* <Typography variant="h4">Hi {localStorage.getItem('token')}</Typography> */}
|
|
||||||
<Box sx={{ display: 'flex', gap: 3 }}>
|
|
||||||
<WidgetReport />
|
|
||||||
</Box>
|
|
||||||
</Box>
|
|
||||||
</Box>
|
|
||||||
</ThemeProvider>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -1 +1 @@
|
|||||||
{"buildMajor":1,"buildMinor":0,"buildRevision":21,"buildTag":"DEV"}
|
{"buildMajor":1,"buildMinor":0,"buildRevision":19,"buildTag":"DEV"}
|
||||||
@ -9,7 +9,6 @@ import DashboardIcon from '@mui/icons-material/DashboardOutlined';
|
|||||||
import SettingsIcon from '@mui/icons-material/SettingsOutlined';
|
import SettingsIcon from '@mui/icons-material/SettingsOutlined';
|
||||||
import LogoutIcon from '@mui/icons-material/LogoutOutlined';
|
import LogoutIcon from '@mui/icons-material/LogoutOutlined';
|
||||||
import deleteToken from "../core/deleteToken";
|
import deleteToken from "../core/deleteToken";
|
||||||
import metadata from "../metadata.json";
|
|
||||||
|
|
||||||
const drawerWidth = 240;
|
const drawerWidth = 240;
|
||||||
|
|
||||||
@ -44,10 +43,7 @@ export const AppBarFull = () => {
|
|||||||
<AppBar position="fixed" sx={{ width: `calc(100% - ${drawerWidth}px)`, ml: `${drawerWidth}px` }}>
|
<AppBar position="fixed" sx={{ width: `calc(100% - ${drawerWidth}px)`, ml: `${drawerWidth}px` }}>
|
||||||
<Toolbar>
|
<Toolbar>
|
||||||
<Typography variant="h6" noWrap sx={{ flexGrow: 1 }}>
|
<Typography variant="h6" noWrap sx={{ flexGrow: 1 }}>
|
||||||
{['DEV', 'ALPHA', 'BETA'].includes(metadata.buildTag) ?
|
Admin Dashboard
|
||||||
`Admin Dashboard ${metadata.buildTag}` :
|
|
||||||
'Admin Dashboard'
|
|
||||||
}
|
|
||||||
</Typography>
|
</Typography>
|
||||||
<IconButton
|
<IconButton
|
||||||
color="inherit"
|
color="inherit"
|
||||||
|
|||||||
@ -1,22 +0,0 @@
|
|||||||
import React from "react";
|
|
||||||
import { Box, CssBaseline, Toolbar } from "@mui/material";
|
|
||||||
|
|
||||||
import { ThemeProvider } from "@mui/material/styles";
|
|
||||||
import theme from "../theme";
|
|
||||||
|
|
||||||
|
|
||||||
export default function WidgetReport() {
|
|
||||||
return (
|
|
||||||
<ThemeProvider theme={theme}>
|
|
||||||
<Box sx={{ display: "flex" }}>
|
|
||||||
<CssBaseline />
|
|
||||||
<Box
|
|
||||||
component="main"
|
|
||||||
sx={{ flexGrow: 1, bgcolor: "background.default", p: 3 }}
|
|
||||||
>
|
|
||||||
<Toolbar />
|
|
||||||
</Box>
|
|
||||||
</Box>
|
|
||||||
</ThemeProvider>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user