Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

React Refactoring #172

Open
wants to merge 74 commits into
base: Q4-review
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
35ba063
Create React App
Dev-Dominic Aug 15, 2020
fc03c98
Updated gitignore for node_modules
Dev-Dominic Aug 15, 2020
e273c78
Remove old python tests
Dev-Dominic Aug 15, 2020
b332e68
Structure React App
Dev-Dominic Aug 20, 2020
303714d
Login Route Design Complete
Dev-Dominic Aug 20, 2020
f8cd1e0
Start design of sidebar component
Dev-Dominic Aug 20, 2020
77a7054
Sidebar and Dashboard started
Dev-Dominic Aug 21, 2020
ee0fe8e
Restructure and Routing Init
Dev-Dominic Aug 24, 2020
0bf5986
Setup preliminary routes
Dev-Dominic Aug 24, 2020
662ad2b
Refactor exisiting components and routes
Dev-Dominic Aug 25, 2020
6ec1e71
Create `Base` application template
Dev-Dominic Aug 25, 2020
3ae074c
Dashboard Initial front-end design
Dev-Dominic Aug 25, 2020
6f25e81
Change route.js to routes.js
Dev-Dominic Aug 25, 2020
cbeed13
Updates to dashboard layout and graphql client setup
Dev-Dominic Aug 26, 2020
0eecd07
Implement GraphQL Client-Side Querying
Dev-Dominic Aug 27, 2020
9600798
Pattoo-web colorscheme
Dev-Dominic Aug 27, 2020
8980b5a
Updates to design
Dev-Dominic Aug 28, 2020
f7af8df
Updates queries and addition of api file for queries
Dev-Dominic Aug 29, 2020
829243a
Query for User Chart Favorites
Dev-Dominic Aug 30, 2020
ba4f34a
Re-design and Colorizing
Dev-Dominic Aug 30, 2020
e64e285
Create Chart Modal
Dev-Dominic Aug 31, 2020
1311c14
Setup Create Chart form
Dev-Dominic Sep 1, 2020
1b397bd
Update README
Dev-Dominic Sep 1, 2020
7f7bcbb
Allow for creating new charts and favorites
Dev-Dominic Sep 1, 2020
a8aeb89
Fixes: #155
palisadoes Sep 7, 2020
946fb55
Merge pull request #156 from palisadoes/issue-155
Dev-Dominic Sep 11, 2020
5bc2c38
Added Dockerfile
DangaRanga Sep 23, 2020
f0afa46
Added Dockerfile
DangaRanga Sep 23, 2020
1ca31b7
Updated File Structure (#166)
Dev-Dominic Sep 24, 2020
b187cf1
Fix Module Imports
Dev-Dominic Sep 26, 2020
b266592
Update Project import system (#166)
Dev-Dominic Sep 27, 2020
82d070d
Update Project Structure and Docs
Dev-Dominic Oct 3, 2020
ef33712
Merge branch 'master' of https://github.com/PalisadoesFoundation/patt…
DangaRanga Oct 9, 2020
26b05cd
Completed coker installation
DangaRanga Oct 18, 2020
4c9f751
Fixed error codes
DangaRanga Oct 18, 2020
890b712
Update travis config for ReactJs testing
Dev-Dominic Oct 24, 2020
38a974f
Fix typo in travis config
Dev-Dominic Oct 24, 2020
1a178d1
Additional updates to travis config
Dev-Dominic Oct 24, 2020
a7e5037
Clean-up files for new production
Dev-Dominic Oct 25, 2020
759abc7
Old build
Dev-Dominic Oct 25, 2020
34e8c14
Resolve merge conflicts
Dev-Dominic Oct 25, 2020
947a954
Merge branch 'Q4-review' of https://github.com/Dev-Dominic/pattoo-web…
DangaRanga Dec 30, 2020
fcdccff
Updated gitignore, node dependencies and added minor unnittest stubs
DangaRanga Dec 30, 2020
7b965ad
Added some unittests
DangaRanga Jan 4, 2021
0b45440
added sidebar components
FireFoxHD Jan 5, 2021
6c1c183
fixed api unittest
DangaRanga Jan 5, 2021
2c7352e
Completed api tests
DangaRanga Jan 5, 2021
b558508
Attempt to fix uuid in travis
DangaRanga Jan 5, 2021
499512e
fixed sidebar import
DangaRanga Jan 5, 2021
71a00df
Fixed sidebar import
DangaRanga Jan 5, 2021
2725d7c
made changes to sidebar component
FireFoxHD Jan 6, 2021
caf9ea1
Completed component unittests
DangaRanga Jan 6, 2021
cada771
Merge pull request #1 from DangaRanga/react-refactoring
DangaRanga Jan 6, 2021
40cc7d2
Moved assets so they're globally accessible
DangaRanga Jan 6, 2021
793400f
ui changes
FireFoxHD Jan 10, 2021
49d82bb
ui changes
FireFoxHD Jan 10, 2021
8185471
UI changes to dashboard
FireFoxHD Jan 10, 2021
bad6e0d
Completed login
DangaRanga Jan 11, 2021
75f3055
fixed merge conflicts
DangaRanga Jan 11, 2021
e8da86f
Completed basic routing and adjusted project structure
DangaRanga Jan 20, 2021
aa30bc8
Added basic routing
DangaRanga Jan 24, 2021
d308d58
Fixed unused vars
DangaRanga Jan 24, 2021
1ed8f8f
Added starter files for graphql
DangaRanga Jan 24, 2021
c648f59
added protected routes
FireFoxHD Jan 26, 2021
3f62160
Added state to login form and adjusted mutations to use Apollo syntax
DangaRanga Feb 6, 2021
18a9cb8
Merge pull request #2 from DangaRanga/react-refactoring
DangaRanga Feb 6, 2021
8f801fd
minor changes to login
DangaRanga Feb 6, 2021
ca3b1c3
UI changes, added components and made responsive changes
FireFoxHD Feb 13, 2021
acbb522
eslint cache
DangaRanga Feb 14, 2021
3950a0d
added UI components
FireFoxHD Feb 14, 2021
1453b96
Login changes
DangaRanga Feb 14, 2021
fbab697
Resolved merge conflicts
DangaRanga Feb 14, 2021
b62c60a
Slight modifications to routing
DangaRanga Feb 14, 2021
749c6b3
Merge pull request #3 from DangaRanga/react-refactoring
DangaRanga Feb 14, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .eslintcache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"/opt/Calico/pattoo-web/src/index.js":"1","/opt/Calico/pattoo-web/src/routes/ProtectedRoute.js":"2","/opt/Calico/pattoo-web/src/components/Login/Login.js":"3","/opt/Calico/pattoo-web/src/components/Dashboard/Dashboard.js":"4","/opt/Calico/pattoo-web/src/utils/query/query.js":"5","/opt/Calico/pattoo-web/src/hooks/useBreakpoint.js":"6","/opt/Calico/pattoo-web/src/hooks/Transition.js":"7","/opt/Calico/pattoo-web/src/components/Sidebar/Sidebar.js":"8","/opt/Calico/pattoo-web/src/components/Header/Header.js":"9","/opt/Calico/pattoo-web/src/components/DataCard/DataCard.js":"10","/opt/Calico/pattoo-web/src/components/StatCard/StatCard.js":"11","/opt/Calico/pattoo-web/src/tailwind.config.js":"12","/opt/Calico/pattoo-web/src/components/FavoriteItem/FavoriteItem.js":"13","/opt/Calico/pattoo-web/src/utils/api/index.js":"14","/opt/Calico/pattoo-web/src/utils/api/api.js":"15","/opt/Calico/pattoo-web/src/components/Graphcard/Graphcard.js":"16"},{"size":1819,"mtime":1612597968591,"results":"17","hashOfConfig":"18"},{"size":584,"mtime":1612596710720,"results":"19","hashOfConfig":"18"},{"size":1785,"mtime":1613266475655,"results":"20","hashOfConfig":"18"},{"size":2935,"mtime":1613267432844,"results":"21","hashOfConfig":"18"},{"size":1340,"mtime":1613266929256,"results":"22","hashOfConfig":"18"},{"size":369,"mtime":1613263221014,"results":"23","hashOfConfig":"18"},{"size":3101,"mtime":1613263221014,"results":"24","hashOfConfig":"18"},{"size":4064,"mtime":1613267033881,"results":"25","hashOfConfig":"18"},{"size":2354,"mtime":1613268275943,"results":"26","hashOfConfig":"18"},{"size":995,"mtime":1613267033829,"results":"27","hashOfConfig":"18"},{"size":955,"mtime":1613267033889,"results":"28","hashOfConfig":"18"},{"size":20700,"mtime":1613263221074,"results":"29","hashOfConfig":"18"},{"size":494,"mtime":1613263220998,"results":"30","hashOfConfig":"18"},{"size":199,"mtime":1609840220787,"results":"31","hashOfConfig":"18"},{"size":3672,"mtime":1612598345882,"results":"32","hashOfConfig":"18"},{"size":1767,"mtime":1613267033857,"results":"33","hashOfConfig":"18"},{"filePath":"34","messages":"35","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1xi6qq3",{"filePath":"36","messages":"37","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"38","messages":"39","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"40","messages":"41","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"42","messages":"43","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"44","messages":"45","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"46","messages":"47","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"48","messages":"49","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"50","messages":"51","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"52","messages":"53","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"54","messages":"55","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"56","messages":"57","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"58","messages":"59","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"60","messages":"61","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"62","messages":"63","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"64","messages":"65","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/opt/Calico/pattoo-web/src/index.js",[],"/opt/Calico/pattoo-web/src/routes/ProtectedRoute.js",[],"/opt/Calico/pattoo-web/src/components/Login/Login.js",[],"/opt/Calico/pattoo-web/src/components/Dashboard/Dashboard.js",[],"/opt/Calico/pattoo-web/src/utils/query/query.js",[],"/opt/Calico/pattoo-web/src/hooks/useBreakpoint.js",[],"/opt/Calico/pattoo-web/src/hooks/Transition.js",[],"/opt/Calico/pattoo-web/src/components/Sidebar/Sidebar.js",[],"/opt/Calico/pattoo-web/src/components/Header/Header.js",[],"/opt/Calico/pattoo-web/src/components/DataCard/DataCard.js",[],"/opt/Calico/pattoo-web/src/components/StatCard/StatCard.js",[],"/opt/Calico/pattoo-web/src/tailwind.config.js",[],"/opt/Calico/pattoo-web/src/components/FavoriteItem/FavoriteItem.js",[],"/opt/Calico/pattoo-web/src/utils/api/index.js",[],"/opt/Calico/pattoo-web/src/utils/api/api.js",[],"/opt/Calico/pattoo-web/src/components/Graphcard/Graphcard.js",[]]
26 changes: 26 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:import/errors",
"plugin:jsx-a11y/recommended"
],


"env": {
"browser": true,
"es2020": true
},

"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 11,
"sourceType": "module"
},

"plugins": ["react", "import", "jsx-a11y"],

"rules": {}
}
180 changes: 28 additions & 152 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,152 +1,28 @@
###############################################################################
# Pattoo exlcusions
###############################################################################

# Ignore files in these directories and ALL subdirectories
# _AND_ maintain the directory structure

etc/**
!etc/.gitkeep
log/**
!log/.gitkeep
cache/**
!cache/.gitkeep
daemon/**
!daemon/.gitkeep

###############################################################################
# Vim editor files
###############################################################################

# Created by https://www.gitignore.io/api/vim

### Vim ###
# Swap
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]

# Session
Session.vim
Sessionx.vim

# Temporary
.netrwhist
*~
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~

# End of https://www.gitignore.io/api/vim

###############################################################################
# Generic Python Exlcusions (Provided by GitHub)
###############################################################################

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
.eslintcache

npm-debug.log*
yarn-debug.log*
yarn-error.log*

.eslintcache
# Ignoring pycache
**__pycache__
41 changes: 13 additions & 28 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,16 @@
# Run on ubuntu
dist: bionic
language: node_js
node_js:
- 14

# Don't use
sudo: false
# Caches dependencies
cache:
directories:
- node_modules

# Define the language and versions that infoset is written in
language: python
python:
- 3.6
# Installs all require modules before testing
before_script:
- npm install

# Run tests only against the master branch
# branches:
# only:
# - master

# Setup services
services:
- mysql

# Setup global environmental variables
env:
- PYTHONPATH=./ PATTOO_CONFIGDIR=$HOME/.pattoo-web-unittests/config

# Install PIP packages and create a temporary config file before installing
before_install:
- pip install -r pip_requirements.txt
- tests/bin/unittest_setup.py

# Run the unittest scripts
script: tests/bin/do_all_tests.py
# Runs all unittests
script:
- npm run test
10 changes: 10 additions & 0 deletions CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Contributions to the project
============================

In chronological order:

* Peter Harrison <http://www.simiya.com>
* Creator of original code

* [Your name or handle] <[email or website]>
* [Brief summary of your changes]
45 changes: 45 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Use ubuntu as base image
FROM ubuntu:latest

# Metadata
LABEL version="1.0"
LABEL maintainers="Jason Gayle, Peter Harrison"


# Update packages
RUN apt-get update && apt-get upgrade -y

# Install
RUN apt-get update \
&& apt-get install -y python3-pip python3-dev \
&& cd /usr/local/bin \
&& ln -s /usr/bin/python3 python \
&& pip3 install --upgrade pip

# Set Debian frontend
ARG DEBIAN_FRONTEND=noninteractive


# Set working directorya
WORKDIR "/pattoo-web"

# Install systemd
RUN apt-get install -y systemd


# Copy Pattoo contents

# Copy Pattoo web contents
COPY . /pattoo-web

# Expose ports
EXPOSE 20201
EXPOSE 20200
EXPOSE 20202

# Install configuration
RUN setup/install.py install configuration


# Start systemd
CMD ["/usr/bin/systemd"]
13 changes: 13 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ pattoo-web

``pattoo-web`` is a web GUI to view IoT data stored on ``pattoo`` servers.

Setup and Running pattoo-web
============================

`Pattoo-web` udpated to run as ReactJS application and utilizes various
third-party ReactJS modules.

.. code-block:: bash

cd pattoo_web
npm install
npm start


Introduction
============

Expand Down
54 changes: 0 additions & 54 deletions bin/pattoo_webd.py

This file was deleted.

3 changes: 0 additions & 3 deletions cache/.gitkeep

This file was deleted.

3 changes: 0 additions & 3 deletions daemon/.gitkeep

This file was deleted.

Binary file added docs/_build/doctrees/about.doctree
Binary file not shown.
Binary file added docs/_build/doctrees/backup.doctree
Binary file not shown.
Binary file added docs/_build/doctrees/configuration.doctree
Binary file not shown.
Binary file added docs/_build/doctrees/contributing.doctree
Binary file not shown.
Binary file added docs/_build/doctrees/cron.doctree
Binary file not shown.
Binary file added docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file added docs/_build/doctrees/index.doctree
Binary file not shown.
Binary file added docs/_build/doctrees/installation.doctree
Binary file not shown.
Binary file added docs/_build/doctrees/pattoo_webd.doctree
Binary file not shown.
Binary file added docs/_build/doctrees/project-structure.doctree
Binary file not shown.
Binary file added docs/_build/doctrees/troubleshooting.doctree
Binary file not shown.
Loading