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

Initial implementation of ASD Dashboard with customizable boards, views and widgets #1

Open
wants to merge 124 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
1fae275
dashboard 0.1
kwuite Oct 1, 2024
cd6ed97
Use CSS order to change the order of elements
kwuite Oct 1, 2024
5e93f47
Restore widgets from localstorage
kwuite Oct 1, 2024
da71752
Split logic into feature files. Saved WidgetState after creating, res…
kwuite Oct 1, 2024
c26fcb6
Updated styles to utilize screen space as much as possible. Remobed h…
kwuite Oct 1, 2024
759a41d
Basis resize buttons implemented
kwuite Oct 1, 2024
7fc8972
Resize button and service worker
kwuite Oct 1, 2024
8d196e4
NodeJS or Python
kwuite Oct 1, 2024
54f3eaf
Correct arrow/unicode usage
kwuite Oct 1, 2024
1a70aa4
Impl: emojilist with unicode representations of our icons including a…
kwuite Oct 1, 2024
3b3da7e
More eoji widgets and fixed some incorrect unicode references
kwuite Oct 2, 2024
300ea2d
More emoji icons
kwuite Oct 2, 2024
69d7982
Migrating flex to grid CSS
kwuite Oct 2, 2024
44c8fe6
removed redundant main css
kwuite Oct 2, 2024
c6578c6
Migrated create and add widget functions from flex to grid
kwuite Oct 2, 2024
a5d78b7
css grid style migraton semi stable. Update localstorage and have a r…
kwuite Oct 2, 2024
791da45
Improve class naming for widget ordering
kwuite Oct 2, 2024
e51d888
Convert hor and ver resizing to grid css
kwuite Oct 2, 2024
76db786
save-boardboard->save-widget-order
kwuite Oct 2, 2024
5c31ae1
More naming convention improvements
kwuite Oct 2, 2024
edcb35e
Now we use the correct JavaScript Unicode escape sequence our unicode…
kwuite Oct 2, 2024
dbf349a
CSS update for wide and ultra wide screens
kwuite Oct 2, 2024
3b0f123
Correct SPA to PWA
kwuite Oct 2, 2024
659de60
Impl: hide MenuResizeBlock
kwuite Oct 2, 2024
86a4251
Create a widget-menu to contain all widget buttons for better element…
kwuite Oct 2, 2024
44110bc
mouseenter and mouseleave don't bubble like mouseover and mouseout, w…
kwuite Oct 2, 2024
d47ffb9
Added an event to catch the mouse leaving resize-menu-block. Now we c…
kwuite Oct 2, 2024
824eda7
Package.json and .gitignore
kwuite Oct 2, 2024
4be0a51
Emoji upd
kwuite Oct 2, 2024
1bbd4cd
Very messy but working drag and drop
kwuite Oct 2, 2024
b7ed48d
Smooth workign drag and drop by using overlays to prevent any iframe …
kwuite Oct 2, 2024
e475934
Cleanup and restore of the reset and add-widget feature. Aligned the …
kwuite Oct 2, 2024
cd3905c
Board ordering works again
kwuite Oct 2, 2024
633b681
fullscreenToggle
kwuite Oct 2, 2024
df9cca7
Design tuning
kwuite Oct 2, 2024
559930b
Docs
kwuite Oct 2, 2024
013c78f
Limiting widget via config.json works as expected.
kwuite Oct 3, 2024
8272d13
resize-menu-block options are mapped via services.json config min and…
kwuite Oct 4, 2024
14ba697
cleanup and cache config.json
kwuite Oct 4, 2024
fb50641
Moving files to dedicated folders, updating imports, cleaning unused …
kwuite Oct 5, 2024
0d76249
Moved files to src
kwuite Oct 5, 2024
ac20993
Fixed fullscreen after AI mess
kwuite Oct 5, 2024
4d05ca3
Ignore config and add config/services example files
kwuite Oct 5, 2024
d79ae64
First lint-fix
kwuite Oct 5, 2024
cb0a31e
Standard lint fixes
kwuite Oct 5, 2024
69aa6bc
Zero lint errors
kwuite Oct 5, 2024
e3151e1
Almost succesfull tests :D
kwuite Oct 9, 2024
51dffe3
- Mocked 3 iframe endpoints
kwuite Oct 11, 2024
ca20c67
Found the reason for tests not being able to verify order. We no use …
kwuite Oct 12, 2024
3e80067
feat: Add stable UI tests for ASD Dashboard features
kwuite Oct 12, 2024
a6749c7
Updated README
kwuite Oct 12, 2024
438ddc2
Cleanup config
kwuite Oct 12, 2024
b4c110f
husky init
kwuite Oct 12, 2024
1ecca9b
Playwright CI
kwuite Oct 12, 2024
30cdae2
Back to npm, less installation needed and project will remain small i…
kwuite Oct 12, 2024
14f1cba
Yarn -> npm
kwuite Oct 12, 2024
7ca5b03
Stabilized test, improved css and namingconvention
kwuite Oct 12, 2024
137536f
Fixed .resize-menu-block to no longer be confined within the bounds o…
kwuite Oct 12, 2024
265a3a5
Mock config.json
kwuite Oct 12, 2024
1fbcdba
Drafted a configuration file with boards, views and widgetStates in m…
kwuite Oct 12, 2024
039b718
- deleted widget-order-selector
kwuite Oct 12, 2024
e45059c
Major cleanup and focusing on reducing board and widget complexity.
kwuite Oct 12, 2024
7a686fb
Correct savedWidgetState if null, look for the board. This solved tes…
kwuite Oct 12, 2024
99ae818
Basic view, cannot load widgets in the view yet.
kwuite Oct 12, 2024
070fefb
Pretty garbage so far but I managed to switch to a secondboard it's v…
kwuite Oct 12, 2024
0b8eeb9
Can finally add widgets to the view and any new views of boards other…
kwuite Oct 12, 2024
86e5825
Stabilization
kwuite Oct 12, 2024
578b63b
The view-selector updates accordingly without showing views from the …
kwuite Oct 12, 2024
3024f43
loadDashboardFromConfig: true
kwuite Oct 12, 2024
7e46881
Config correction
kwuite Oct 12, 2024
ac59da8
Loading defaults from config.json 40% working
kwuite Oct 12, 2024
8c20893
Loaded dashboard with 2 views from config.
kwuite Oct 12, 2024
c7966cb
Action: Start the server using `npm start`.
kwuite Oct 12, 2024
e364264
localStorage Edit modal and CSS splitting.
kwuite Oct 12, 2024
895b7a4
Can save and edit localstorage.
kwuite Oct 12, 2024
731bc9b
Edit modal can only be opened once.
kwuite Oct 12, 2024
019492b
Finished src/component/modal/localStorageModal.js
kwuite Oct 12, 2024
279b34c
Update README.md
kwuite Oct 12, 2024
302cd8f
Board and View Dropdown to safe UI space
kwuite Oct 13, 2024
51b3aba
Shared dropdown logic
kwuite Oct 13, 2024
8b8d657
Solve missing metadata issue
kwuite Oct 13, 2024
3ab7aad
READNE upd
kwuite Oct 13, 2024
481a743
Fixed missing config elements in test
kwuite Oct 13, 2024
dcf8033
README upd
kwuite Oct 13, 2024
38f349d
consolidated both controls and controls-panel into a new menu design
kwuite Oct 13, 2024
8babb8e
Improved UI controls for admin aprts like sservice worker and localst…
kwuite Oct 13, 2024
c2c85e9
Now we have a notification component. Helps reduce negative impact of…
kwuite Oct 13, 2024
38c7a1e
Board DropDown Playwright spec
kwuite Oct 13, 2024
937965e
View Dropdown Playwright spec
kwuite Oct 13, 2024
13bec75
Implemented logic to merge Playwright videos
kwuite Oct 13, 2024
ade9755
Add titles to playwright videos.
kwuite Oct 13, 2024
35d7052
Resizing via corner is now a thing.
kwuite Oct 13, 2024
282a6db
Resizing Playwright testcase.
kwuite Oct 13, 2024
778fb0b
Optimized style and ensured widget resize method adheres to both serv…
kwuite Oct 13, 2024
d0e2986
Logger class for cleaning up logs but keep most of them for debugging…
kwuite Oct 13, 2024
86e1c88
Finally clean a clean controlled console.
kwuite Oct 13, 2024
1fbffc8
Fixed resizeMenuBlock not saving because of sync to async function sw…
kwuite Oct 13, 2024
24feb01
Stable test again.
kwuite Oct 13, 2024
5500b6d
localStorageEditor.spec.ts
kwuite Oct 13, 2024
718026e
Fixed Firefox test for localStorageEditor.spec.ts
kwuite Oct 13, 2024
e5d0dcc
Test spec name change from ASD dashboard to Widget
kwuite Oct 13, 2024
61f0f75
README upd
kwuite Oct 13, 2024
66ac248
README human correction
kwuite Oct 14, 2024
6eff5ef
Clarified License
kwuite Oct 15, 2024
5878843
Merge main and fix commit history?
kwuite Oct 15, 2024
bfd3b9a
Removed duplicate sentence.
kwuite Oct 15, 2024
80f1e1e
removed them ref
kwuite Oct 15, 2024
7f97941
Saving state when switching or creating views and boards so we always…
kwuite Oct 15, 2024
21da1eb
Semi stabilized saving lastUsedView and lastUsedBoard. Implemented wi…
kwuite Oct 15, 2024
2e487df
Stability patches
kwuite Oct 15, 2024
fe87a9f
Lazyload iframes
kwuite Oct 15, 2024
9fb5830
Add test case should generate widgets with unique and persistent UUIDs
kwuite Oct 15, 2024
d5af941
Increase widgets for testing
kwuite Oct 15, 2024
9405e8e
Allow dropping of widgets in open space.
kwuite Oct 15, 2024
81b3ef3
bigger buttons
kwuite Oct 15, 2024
a73b2c7
Menu refactoring and consolidating unicode char usage
kwuite Oct 15, 2024
0908d6e
Localstorage Editor update
kwuite Oct 15, 2024
276aacc
Localstorage Editor update
kwuite Oct 15, 2024
c52d044
Renamed Recovery Modal to ServiceLaunch and improved CSS
kwuite Oct 15, 2024
a25ec34
Prevent lastUsedBoards to be used if they do not exist. Minor fixes.
kwuite Oct 15, 2024
9b352cb
Stability patches
kwuite Oct 15, 2024
326691f
Stable Cypress localStorage logic and testing
kwuite Oct 15, 2024
cd9118c
Improved resizeHandle test but not no avail for Firefox
kwuite Oct 16, 2024
a5b5ae2
32 Passed green checks multiple times in a row with Chrome and Webkit…
kwuite Oct 16, 2024
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
30 changes: 30 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Playwright Tests

on:
push:
branches: [ main, develop, feature/*, gpt-pilot/* ]
pull_request:
branches: [ main, develop, feature/*, gpt-pilot/* ]

jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*

- name: Install Playwright Browsers
run: npm i && npx playwright install

- name: Run Playwright tests
run: npm run test

- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
services.json
yarn.lock
dist
config.json
node_modules
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
*.webm
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm run lint
32 changes: 15 additions & 17 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
MIT License
# ASD-Dashboard License

Copyright (c) 2024 kelvin.id
The ASD-dashboard project is proprietary software. By using this software, you agree to the following terms:

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
1. Usage Rights:
- You are permitted to use this project for personal or internal purposes.
- You are not permitted to modify, distribute, sublicense, or sell this software in any form without explicit permission from the copyright holder.

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
2. Proprietary Notice:
- All rights to the ASD-dashboard project are reserved. The code, design, and associated assets remain the intellectual property of the copyright holder, K.R. Wuite.
- Copyright (c) 2024, K.R. Wuite, The Netherlands. All rights reserved.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
3. Future Licensing:
- The author intends to transition the project to an open-source license, likely the MIT License, in the future. Until that time, the current proprietary terms apply.
4. Disclaimer:
- This software is provided "as is," without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software.

For more information, please contact [[email protected]](mailto:[email protected])
76 changes: 74 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,74 @@
# asd-dashboard
asd web dashboard for ⚡ Accelerated Software Development / 🚀 Automated Service Deployment
# ASD Dashboard

The ASD web dashboard is a VanillaJS Progressive Web App (PWA) designed to streamline ⚡ Accelerated Software Development and 🚀 Automated Service Deployment. This application empowers users to manage remote services through dynamic, resizable widgets encapsulated within iframes. It supports multiple boards and views for flexible configurations, with user preferences stored in localStorage for persistent sessions. Services are configured in `services.json` and the configuration can be loaded via a `config.json` file. Both files can be loaded local or remote due to the way the project has been designed as a PWA.

## Overview

ASD Dashboard is architected with a focus on simplicity and adaptability:

- **Frontend**: Built using VanillaJS without any frameworks, it leverages CSS Grid for responsive layouts and iframes for embedding widgets.
- **Storage**: Utilizes localStorage for saving user preferences, such as widget positions and board/view states. Configuration is fetched and applied from a `config.json` file.
- **Service Worker**: Provides PWA capabilities, enabling offline functionality and caching of essential resources.
- **Testing**: Automated UI testing is conducted using Playwright, integrated with GitHub Actions for continuous integration. Static files are served by a Python web server during tests.
- **Widgets**: Widgets are loaded through iframes, supporting content from URLs or APIs with options for auto-refresh and configurable intervals.
- **Configurable Grid**: The widget layout grid is flexible, scaling from 1 to 6 columns/rows by default, with options for customization through configuration.

## Features

- **Widget Management**: Add, resize, reorder, and remove widgets dynamically. Widgets can be customized with properties such as size, metadata, and settings. Resizing is facilitated via mouse cursor dragging, adhering to grid standards.
- **Board and View Structure**: Manage multiple boards and views, akin to tabs, allowing users to switch, rename, delete, or reset configurations. State is persistently stored.
- **Global Configuration**: Centralized configuration through `config.json` for global settings like themes and widget store URLs.
- **LocalStorage Integration**: Persistent storage of dashboard preferences, with a modal for editing localStorage, enabling import/export and modification of JSON data.
- **Responsive Grid Layout**: Widgets are arranged in a grid that adapts to screen size, with default configurations and options for customization.
- **Service Selection**: Widgets can be added from a predefined JSON file, custom URL, or remote services, with support for merging multiple sources.
- **Service Worker & PWA**: Offline capabilities and caching through a service worker enhance usability and performance.
- **Playwright Integration & Testing**: Comprehensive testing using Playwright, with automated tests running via GitHub Actions.
- **Custom Logger Integration**: All log statements use a custom logger for better development and debugging.

## Getting started

### Requirements

To run the ASD Dashboard, ensure the following are installed on your system:

- Node.js: A JavaScript runtime required to run the application.

### Quickstart

Follow these steps to set up and run the ASD Dashboard:

1. Clone the repository:
```bash
git clone <repository-url>
cd asd-dashboard
```

2. Install dependencies:
```bash
npm install
```

3. Start the application:
```bash
npm run start
```

4. Open your browser and navigate to `http://localhost:8000` to access the dashboard.

## Built With

This project was built using the following tools and platforms:

- [GPT Pilot](https://github.com/Pythagora-io/gpt-pilot): An AI developer tool that assists in generating production-ready applications.
- 15-10-2024: Upgraded to the latest edition of GPT-Pilot after this README commit. The current project might not reflect the previous 161 commits in GPT-Pilot because I chose not to sync my fork of the project for various reasons.
- [Cursor](https://www.cursor.com/): An AI code editor designed to enhance productivity by integrating AI capabilities directly into the coding environment.
- [OpenAI Platform](https://platform.openai.com/): Provides the AI models and APIs used in this project.

### License

The ASD-dashboard project is currently proprietary. You are allowed to use the project for personal or internal purposes, but you are not permitted to distribute or sublicense the code.
Copyright (c) 2024, K.R. Wuite.
For more information, please visit: [https://kelvin.id](https://kelvin.id) or email [[email protected]](mailto:[email protected]).

**Note**: I plan to transition the project to an open-source license (likely MIT) in the future. However, during this early stage of development, with a focus on networking security related to the commercial side, I am keeping it proprietary to ensure I have the time to shape all ASD-related projects in a way that allows anyone to use them without compromising personal data, privacy, or project security.

Loading
Loading