Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependencies update. Restructure each page to be modularized. Refactor Scene Page and more #61

Open
wants to merge 24 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d647f41
Removed deprecated react-admin tags and replace with accordingly
Jlu18 Nov 15, 2021
6abd92d
Forgot to commit course.js for previous commit
Jlu18 Nov 15, 2021
6e20326
Upgrade mui(material-ui), react-admin&related packages
Jlu18 Dec 21, 2021
d3ff371
Refactor LoginPage.js by reflect the updated packages, and re-structu…
Jlu18 Dec 21, 2021
9f6eb46
Switch from Card to Simpler Paper tag for containing form
Jlu18 Dec 21, 2021
cd7b616
Change the title and icon
Jlu18 Dec 22, 2021
5599911
Rename data_connection directory to dataProvider. And move component …
Jlu18 Jan 1, 2022
e337cc9
Modularizing page components to organize the code structure. Modulriz…
Jlu18 Jan 1, 2022
0da2716
Add ra-compact-ui. Refactor Scene Show to display settings and infos …
Jlu18 Jan 18, 2022
98288d6
Added Edit Page for the Scene (Needs to modify backend to accept edit…
Jlu18 Jan 18, 2022
6d7d310
Refactor Google Login Page. Removed Show and move all data to display…
Jlu18 Jan 19, 2022
4323fd2
Refactor User Pages into separate files.
Jlu18 Jan 19, 2022
995e83c
Refactor snapshot page
Jlu18 Jan 19, 2022
2ec30fe
Refactor collection page
Jlu18 Jan 19, 2022
6325e69
Refactor notification page
Jlu18 Jan 19, 2022
7da0814
Refactor RefEx page
Jlu18 Jan 19, 2022
5aecebf
Refactor Course page
Jlu18 Jan 19, 2022
4a4691e
Upgrade react version from 16 to 17
Jlu18 Jan 25, 2022
87f840b
Changed back the name to dataConnections to avoid name conflict
Jlu18 Jan 25, 2022
04f9ca3
Fixed the import paths
Jlu18 Jan 26, 2022
10c9154
Merge branch 'dev' of https://github.com/engaging-computing/myr-admin…
Jlu18 Jan 26, 2022
0d7a98c
Bump node version on Dockerfile from 10.13 to 12.18, same as frontend…
Jlu18 Jan 26, 2022
122487f
Forgot to Bump in ci.yml
Jlu18 Jan 26, 2022
b047b7f
Removed unused dependencies, upgrade react-scripts to 4.0.0
Jlu18 Jan 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
ci-checks:
runs-on: ubuntu-latest
container:
image: node:10.13
image: node:12.18

steps:
- uses: actions/checkout@v1
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:10.13
FROM node:12.18

WORKDIR /app
COPY . /app
Expand Down
34 changes: 23 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
"private": true,
"homepage": "/admin",
"dependencies": {
"@material-ui/core": "^3.1.1",
"@material-ui/icons": "^3.0.1",
"material-ui": "^0.20.2",
"@emotion/react": "^11.6.0",
"@emotion/styled": "^11.6.0",
"@mui/icons-material": "^5.1.0",
"@mui/material": "^5.1.0",
"prop-types": "^15.6.2",
"ra-data-json-server": "^2.3.2",
"ra-input-rich-text": "^2.3.2",
"react": "^16.5.2",
"react-admin": "^2.3.2",
"react-bootstrap": "^0.32.4",
"react-dom": "^16.5.2",
"react-scripts": "1.1.5"
"ra-compact-ui": "^1.1.1",
"react": "17.0.0",
"react-ace": "^9.5.0",
"react-admin": "^3.19.0",
"react-dom": "17.0.0",
"react-scripts": "4.0.0"
},
"scripts": {
"start": "react-scripts start",
Expand All @@ -23,5 +23,17 @@
"eject": "react-scripts eject",
"prod": "react-scripts build && mv build ../MYR-backend && rm -r ../MYR-backend/public/admin && mv ../MYR-backend/build ../MYR-backend/public/admin"
},
"proxy": "http://localhost:1337/"
"proxy": "http://localhost:1337/",
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 5 chrome version",
"last 5 firefox version",
"last 5 safari version"
]
}
}
Binary file modified public/favicon.ico
Binary file not shown.
12 changes: 1 addition & 11 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,12 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>MYR | Admin</title>
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.

You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.

To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
46 changes: 19 additions & 27 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,39 +1,31 @@
import React from 'react';
import { Admin, Resource } from 'react-admin';

import Dashboard from './pages/dashboard';
import authProvider from './data_connections/authProvider';
import dataProvider from './data_connections/dataProvider';
import Dashboard from './pages/Dashboard';
import authProvider from './dataConnections/authProvider';
import dataProvider from './dataConnections/dataProvider';
import loginPage from './pages/LoginPage'
import { SceneList, SceneShow } from './pages/Scenes';
import { CourseList, CourseEdit, CourseCreate } from './pages/courses';
import { ReferenceExamplesList, ReferenceExamplesEdit, ReferenceExamplesCreate } from './pages/referenceExamples';
import { UserList, UserEdit, UserCreate } from './pages/users';
import { SnapshotList, SnapshotShow } from './pages/snapshots';
import { NotifList, NotifEdit, NotifCreate } from './pages/Notifications';
import { CollectionList, CollectionShow } from './pages/Collections';
import { GoogleLoginList, GoogleLoginShow } from './pages/GoogleLogins';

import CourseIcon from '@material-ui/icons/List';
import RefExIcon from '@material-ui/icons/Help';
import UserIcon from '@material-ui/icons/SupervisedUserCircle';
import SnapshotIcon from '@material-ui/icons/CameraEnhance';
import CollectionIcon from '@material-ui/icons/Filter';
import SceneIcon from '@material-ui/icons/Landscape';
import NotificationIcon from '@material-ui/icons/PriorityHigh';
import GoogleLoginIcon from '@material-ui/icons/Face';
import scene from './pages/scene';
import collection from "./pages/collection";
import course from "./pages/course";
import referenceExample from "./pages/referenceExample";
import user from "./pages/user";
import googleLogin from "./pages/googleLogin";
import notification from "./pages/notification";
import snapshot from "./pages/snapshot";


const App = () => (
<Admin dashboard={Dashboard} loginPage={loginPage} authProvider={authProvider} dataProvider={dataProvider}>
<Resource name="scenes" list={SceneList} show={SceneShow} icon={SceneIcon} />
<Resource name="collections" list={CollectionList} show={CollectionShow} icon={CollectionIcon} />
<Resource name="courses" list={CourseList} edit={CourseEdit} create={CourseCreate} icon={CourseIcon} />
<Resource name="referenceExamples" list={ReferenceExamplesList} edit={ReferenceExamplesEdit} create={ReferenceExamplesCreate} icon={RefExIcon} />
<Resource name="users" list={UserList} edit={UserEdit} create={UserCreate} icon={UserIcon} />
<Resource name="googlelogins" list={GoogleLoginList} show={GoogleLoginShow} icon={GoogleLoginIcon} />
<Resource name="notifications" list={NotifList} edit={NotifEdit} create={NotifCreate} icon={NotificationIcon} />
<Resource name="snapshots" list={SnapshotList} show={SnapshotShow} icon={SnapshotIcon} />
<Resource name="scenes" {...scene} />
<Resource name="collections" {...collection} />
<Resource name="courses" {...course}/>
<Resource name="referenceExamples"{...referenceExample} />
<Resource name="users" {...user} />
<Resource name="googlelogins" {...googleLogin} />
<Resource name="notifications" {...notification} />
<Resource name="snapshots" {...snapshot} />
</Admin>
);

Expand Down
43 changes: 0 additions & 43 deletions src/components/PromoteButton.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export default (type, resource, params) => {
}
return {
data: data,
total: total
total: Number(total)
};
case GET_MANY:
data = response.map(record => ({ id: record._id, ...record }));
Expand All @@ -145,7 +145,7 @@ export default (type, resource, params) => {
}
return {
data: data,
total: total
total: Number(total)
};
case GET_MANY_REFERENCE:
if (!response.headers.has('content-range')) {
Expand All @@ -163,7 +163,7 @@ export default (type, resource, params) => {
}
return {
data: data,
total: total,
total: Number(total),
};
case CREATE:
return { data: { ...params.data, id: response.id } };
Expand Down
File renamed without changes.
64 changes: 0 additions & 64 deletions src/pages/GoogleLogins.js

This file was deleted.

Loading