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

Refactor entire website to work with angular instead of ejs #6

Draft
wants to merge 68 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
0d4a1fc
Remove all files for refactor
realstealthninja Feb 4, 2024
057c194
add angular
realstealthninja Feb 4, 2024
6738a96
add a basic sidebar
realstealthninja Feb 4, 2024
779b359
update gitignore to add .vscode
realstealthninja Feb 4, 2024
6d02d06
fix typos and add comments
realstealthninja Feb 4, 2024
259bfc3
add hover and drawer animation to sidebar
realstealthninja Feb 4, 2024
cbbcf36
add button events to sidebar
realstealthninja Feb 4, 2024
58966e4
add checks for status of sidebar
realstealthninja Feb 4, 2024
206c4e0
add default routes
realstealthninja Feb 4, 2024
ed142ef
add home component
realstealthninja Feb 4, 2024
319b20f
add card with graph template
realstealthninja Feb 4, 2024
0aaafe3
add card component
realstealthninja Feb 4, 2024
544c894
make root more stylish
realstealthninja Feb 4, 2024
842de3f
attempt at current route
realstealthninja Feb 4, 2024
f82296d
add more colours
realstealthninja Feb 4, 2024
68c9d3d
fix force layout draw before load
realstealthninja Feb 4, 2024
bfedb92
add ec2 component
realstealthninja Feb 4, 2024
e1f963f
add link to ec2 component
realstealthninja Feb 4, 2024
762d639
add ec2 to route
realstealthninja Feb 4, 2024
75850f4
generate login component
realstealthninja Feb 5, 2024
9f1e4a1
adding test for login
realstealthninja Feb 5, 2024
2abdaa8
add login component
realstealthninja Feb 5, 2024
a4fdd25
add auth service
realstealthninja Feb 5, 2024
01777e1
add main.cpp file
realstealthninja Feb 6, 2024
a1bdd53
add crow api to backend
realstealthninja Feb 6, 2024
f6676ee
add more files to ignore
realstealthninja Feb 6, 2024
fad6e1e
make a cmake project
realstealthninja Feb 6, 2024
f6f3e19
move backend code to backend folder
realstealthninja Feb 7, 2024
e1c7508
add username password authentication
realstealthninja Feb 9, 2024
24e7628
move everything to frontend
realstealthninja Feb 10, 2024
8143208
move files into src and add build script
realstealthninja Feb 10, 2024
107618e
remove .angular from repo
realstealthninja Feb 10, 2024
394e4e6
make crow serve angular built files
realstealthninja Feb 10, 2024
94beae3
add things to gitignore
realstealthninja Feb 10, 2024
ef046a7
add a nice header to build.sh
realstealthninja Feb 10, 2024
750868b
make cmake output to working dir
realstealthninja Feb 10, 2024
a5cba18
make angular build to static
realstealthninja Feb 10, 2024
375b5cc
add .angular to gitignore
realstealthninja Feb 10, 2024
2e7c3a8
fix routing
realstealthninja Feb 11, 2024
431538b
make build only build and not run
realstealthninja Feb 11, 2024
8655df4
use login instead of direct path
realstealthninja Feb 11, 2024
2c39e76
make home the default route
realstealthninja Feb 11, 2024
eac67b4
add more things to gitignore
realstealthninja Feb 11, 2024
5767834
fix page / text to work
realstealthninja Feb 11, 2024
7688695
auth works now
realstealthninja Feb 11, 2024
90d4b83
add dashboard.h file
realstealthninja Feb 11, 2024
a2600dc
remove node from repo
realstealthninja Feb 11, 2024
448dc65
remove node things
realstealthninja Feb 11, 2024
428db4e
update readme
realstealthninja Feb 11, 2024
371afea
make readme pretty
realstealthninja Feb 11, 2024
471a294
fix syntax error
realstealthninja Feb 11, 2024
5a8a659
make login readable
realstealthninja Feb 11, 2024
6e1ce45
make verify_pass readable
realstealthninja Feb 11, 2024
1492e8c
add warning about macros
realstealthninja Feb 11, 2024
b6eac13
do a little bit of frontending
realstealthninja Feb 11, 2024
6218428
add graphs
realstealthninja Feb 12, 2024
cbce37e
some commit
realstealthninja Feb 22, 2024
2174e5e
fix: remove unused
realstealthninja Jun 24, 2024
cadd899
fix: use make instead of ninja
realstealthninja Jun 24, 2024
ff70943
feat: finish card
realstealthninja Jun 24, 2024
00f0623
fix: removed #
realstealthninja Jun 26, 2024
1a9572a
fix: remove unused
realstealthninja Jun 26, 2024
c9e2ee8
fix: add some comments
realstealthninja Jun 26, 2024
1be4888
fix(card): parent the absolute icon to card-container
realstealthninja Jun 26, 2024
65fcec5
fix(home): make scroll work
realstealthninja Jun 26, 2024
aed55e3
fix(home,ts): use a single timer
realstealthninja Jun 26, 2024
3056212
fix: substitute name to _ for unused params
realstealthninja Jun 26, 2024
0253784
feat: remove backend
realstealthninja Jun 27, 2024
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
  •  
  •  
  •  
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single

[*.md]
max_line_length = off
trim_trailing_whitespace = false
57 changes: 51 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,52 @@
#See http://help.github.com/ignore-files/ for more about ignoring files.

# Compiled output
/dist
/tmp
/out-tsc
/bazel-out

# Node
/node_modules
npm-debug.log
yarn-error.log
node_modules/

# IDEs and editors
backend/.idea/
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# Visual Studio Code
.vscode/
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# Miscellaneous
.angular/
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
testem.log
/typings

# System files
.DS_Store
Thumbs.db

# security stuff
config.json
node_modules
logs
test.py
tmp
*.db
!views/logs
backend/userdb

# c++ stuff
cmake-build-debug/
frontend/.angular/cache/17.1.2/raspberry-dashboard/.tsbuildinfo
43 changes: 27 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
# Raspberry Dashboard
A script to generate beautiful statistics about my Raspberry Pi's status,
run tasks and manage processes.

**Examples:**
*home:*
> <img src="assets/examples/dashboard.png">
*console:*
> <img src="assets/examples/console.png">
*editor:*
> <img src="assets/examples/editor.png">

**Special thanks:**
> [Capitalism](https://github.com/NastyPigz) for helping me with javascript

> [Ropra](https://github.com/RopraMMC) for helping me with css
# RaspberryDashboard

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.0.9.

## Development server

Run `cd backend/ && ./dashboard_backend` for a dev server. Navigate to `http://0.0.0.0:18080/`. The application will automatically reload if you change any of the source files.

## Code scaffolding

Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.

## Build

Run `ng build --watch` to build the project. The build artifacts will be stored in the `backend/static/` directory.

## Running unit tests

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Running end-to-end tests

Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
104 changes: 104 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"raspberry-dashboard": {
"projectType": "application",
"schematics": {},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:application",
"options": {
"outputPath": {
"base": "../backend/static/",
"browser": ""
},
"index": "src/index.html",
"browser": "src/main.ts",
"polyfills": [
"zone.js"
],
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"scripts": []
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "1mb",
"maximumError": "2mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"outputHashing": "all"
},
"development": {
"optimization": false,
"extractLicenses": false,
"sourceMap": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"buildTarget": "raspberry-dashboard:build:production"
},
"development": {
"buildTarget": "raspberry-dashboard:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"buildTarget": "raspberry-dashboard:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"polyfills": [
"zone.js",
"zone.js/testing"
],
"tsConfig": "tsconfig.spec.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"scripts": []
}
}
}
}
},
"cli": {
"cache": {
"enabled": true,
"environment": "all"
}
}
}
Binary file removed assets/examples/account.png
Binary file not shown.
Binary file removed assets/examples/console.png
Binary file not shown.
Binary file removed assets/examples/dashboard.png
Binary file not shown.
Binary file removed assets/examples/editor.png
Binary file not shown.
Binary file removed assets/fonts/nucleo-icons.eot
Binary file not shown.
Loading