Skip to content

Commit

Permalink
saftey commit
Browse files Browse the repository at this point in the history
  • Loading branch information
grovesy committed Oct 9, 2020
1 parent 6634793 commit 7b3a8a9
Show file tree
Hide file tree
Showing 42 changed files with 392 additions and 1,909 deletions.
71 changes: 68 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@
"concurrently": "^5.3.0",
"connect-ensure-login": "^0.1.1",
"cors": "^2.8.5",
"diff2html": "^3.1.13",
"diskdb": "^0.1.17",
"express": "^4.17.1",
"express-http-proxy": "^1.6.2",
"express-session": "^1.17.1",
"history": "4.10.1",
"https": "^1.0.0",
"lodash": "^4.17.20",
"moment": "^2.29.1",
"passport": "^0.4.1",
"passport-local": "^1.0.0",
"perfect-scrollbar": "1.5.0",
Expand All @@ -40,10 +42,11 @@
"react-chartist": "0.14.3",
"react-dom": "^16.13.1",
"react-google-maps": "9.4.5",
"react-html-parser": "^2.0.2",
"react-router-dom": "5.2.0",
"react-scripts": "3.4.3",
"react-swipeable-views": "0.13.9",
"uuid": "^8.3.0",
"uuid": "^8.3.1",
"why-is-node-running": "^2.2.0"
},
"devDependencies": {
Expand Down
2 changes: 2 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
/>

<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/diff2html/bundles/css/diff2html.min.css" />

<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Expand Down
15 changes: 1 addition & 14 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,16 @@ import { Router, Route, Switch, Redirect } from "react-router-dom";
// core components
import Admin from "ui/layouts/Admin.js";
import Login from "ui/views/Login/Login.js";


import "ui/assets/css/material-dashboard-react.css?v=1.9.0";

function PrivateRoute ({component: Component, authed, ...rest}) {
return (
<Route
{...rest}
render={(props) => authed === true
? <Component {...props} />
: <Redirect to={{pathname: '/login', state: {from: props.location}}} />}
/>
)
}


const hist = createBrowserHistory();

ReactDOM.render(
<Router history={hist}>
<Switch>
<Route path="/admin" component={Admin} />
<Route path="/login" component={Login} />
<Route path="/login" component={Login} />
<Redirect from="/" to="/admin/dashboard" />
</Switch>
</Router>,
Expand Down
3 changes: 1 addition & 2 deletions src/proxy/processors/push-action/parsePush.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if (!fs.existsSync(dir)) {
const exec = (req, action) => {
// TODO - this needs a good refactoring!
// But for the time being - it's working for POC
// purporses - turns out Streams and node are not nice
// purporses - turns out Streams and node are not nice#

const step = new Step('parsePackFile')

Expand All @@ -39,7 +39,6 @@ const exec = (req, action) => {
};

const getPackMeta = (buffer) => {

const sig = buffer.slice(0, 4).toString('utf-8');
const version = buffer.readUIntBE(4, 4);
const entries = buffer.readUIntBE(8, 4);
Expand Down
28 changes: 14 additions & 14 deletions src/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,34 @@
// @material-ui/icons
import Dashboard from "@material-ui/icons/Dashboard";
import Person from "@material-ui/icons/Person";

import DashboardPage from "ui/views/Dashboard/Dashboard.js";
import OpenPushRequests from "ui/views/OpenPushRequests/OpenPushRequests.js";

// import LibraryBooks from "@material-ui/icons/LibraryBooks";
// import BubbleChart from "@material-ui/icons/BubbleChart";
// import LocationOn from "@material-ui/icons/LocationOn";
// import Notifications from "@material-ui/icons/Notifications";
// import Unarchive from "@material-ui/icons/Unarchive";
// import Language from "@material-ui/icons/Language";
// core components/views for Admin layout
// import UserProfile from "ui/views/UserProfile/UserProfile.js";

import PushDetails from "ui/views/PushDetails/PushDetails.js";

const dashboardRoutes = [
{
path: "/dashboard",
name: "Dashboard",
icon: Dashboard,
component: DashboardPage,
layout: "/admin"
layout: "/admin",
visible: true
},
{
path: "/open-pushges",
path: "/push",
name: "Open Push Requests",
icon: Person,
component: OpenPushRequests,
layout: "/admin"
layout: "/admin",
visible: true
},
{
path: "/push/:id",
name: "Open Push Requests",
icon: Person,
component: PushDetails,
layout: "/admin",
visible: false
},
];

Expand Down
6 changes: 0 additions & 6 deletions src/ui/components/Card/Card.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
import React from "react";
// nodejs library that concatenates classes
import classNames from "classnames";
// nodejs library to set properties for components
import PropTypes from "prop-types";
// @material-ui/core components
import { makeStyles } from "@material-ui/core/styles";
// @material-ui/icons

// core components
import styles from "ui/assets/jss/material-dashboard-react/components/cardStyle.js";

const useStyles = makeStyles(styles);
Expand Down
6 changes: 0 additions & 6 deletions src/ui/components/Card/CardAvatar.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
import React from "react";
// nodejs library that concatenates classes
import classNames from "classnames";
// nodejs library to set properties for components
import PropTypes from "prop-types";
// @material-ui/core components
import { makeStyles } from "@material-ui/core/styles";
// @material-ui/icons
// core components

import styles from "ui/assets/jss/material-dashboard-react/components/cardAvatarStyle.js";

const useStyles = makeStyles(styles);
Expand Down
6 changes: 0 additions & 6 deletions src/ui/components/Card/CardBody.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
import React from "react";
// nodejs library that concatenates classes
import classNames from "classnames";
// nodejs library to set properties for components
import PropTypes from "prop-types";
// @material-ui/core components
import { makeStyles } from "@material-ui/core/styles";
// @material-ui/icons

// core components
import styles from "ui/assets/jss/material-dashboard-react/components/cardBodyStyle.js";

const useStyles = makeStyles(styles);
Expand Down
6 changes: 0 additions & 6 deletions src/ui/components/Card/CardFooter.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
import React from "react";
// nodejs library that concatenates classes
import classNames from "classnames";
// nodejs library to set properties for components
import PropTypes from "prop-types";
// @material-ui/core components
import { makeStyles } from "@material-ui/core/styles";
// @material-ui/icons

// core components
import styles from "ui/assets/jss/material-dashboard-react/components/cardFooterStyle.js";

const useStyles = makeStyles(styles);
Expand Down
6 changes: 0 additions & 6 deletions src/ui/components/Card/CardHeader.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
import React from "react";
// nodejs library that concatenates classes
import classNames from "classnames";
// nodejs library to set properties for components
import PropTypes from "prop-types";
// @material-ui/core components
import { makeStyles } from "@material-ui/core/styles";
// @material-ui/icons

// core components
import styles from "ui/assets/jss/material-dashboard-react/components/cardHeaderStyle.js";

const useStyles = makeStyles(styles);
Expand Down
6 changes: 0 additions & 6 deletions src/ui/components/Card/CardIcon.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
import React from "react";
// nodejs library that concatenates classes
import classNames from "classnames";
// nodejs library to set properties for components
import PropTypes from "prop-types";
// @material-ui/core components
import { makeStyles } from "@material-ui/core/styles";
// @material-ui/icons

// core components
import styles from "ui/assets/jss/material-dashboard-react/components/cardIconStyle.js";

const useStyles = makeStyles(styles);
Expand Down
5 changes: 0 additions & 5 deletions src/ui/components/CustomButtons/Button.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
import React from "react";
// nodejs library that concatenates classes
import classNames from "classnames";
// nodejs library to set properties for components
import PropTypes from "prop-types";

// material-ui components
import { makeStyles } from "@material-ui/core/styles";
import Button from "@material-ui/core/Button";

import styles from "ui/assets/jss/material-dashboard-react/components/buttonStyle.js";

const useStyles = makeStyles(styles);
Expand Down
3 changes: 0 additions & 3 deletions src/ui/components/CustomInput/CustomInput.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
import React from "react";
import classNames from "classnames";
import PropTypes from "prop-types";
// @material-ui/core components
import { makeStyles } from "@material-ui/core/styles";
import FormControl from "@material-ui/core/FormControl";
import InputLabel from "@material-ui/core/InputLabel";
import Input from "@material-ui/core/Input";
// @material-ui/icons
import Clear from "@material-ui/icons/Clear";
import Check from "@material-ui/icons/Check";
// core components
import styles from "ui/assets/jss/material-dashboard-react/components/customInputStyle.js";

const useStyles = makeStyles(styles);
Expand Down
7 changes: 1 addition & 6 deletions src/ui/components/CustomTabs/CustomTabs.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
import React from "react";
// nodejs library that concatenates classes
import classNames from "classnames";
// nodejs library to set properties for components
import PropTypes from "prop-types";

// material-ui components
import { makeStyles } from "@material-ui/core/styles";
import Tabs from "@material-ui/core/Tabs";
import Tab from "@material-ui/core/Tab";
// core components
import Card from "ui/components/Card/Card.js";
import CardBody from "ui/components/Card/CardBody.js";
import CardHeader from "ui/components/Card/CardHeader.js";

import styles from "ui/assets/jss/material-dashboard-react/components/customTabsStyle.js";
import styles from "ui/assets/jss/material-dashboard-react/components/customTabsStyle";

const useStyles = makeStyles(styles);

Expand Down
Loading

0 comments on commit 7b3a8a9

Please sign in to comment.