A lightweight frontend application to display farm and node information from the Grid4 API.
Grid4 Dashboard is a simple, lightweight web application built with vanilla HTML, CSS, and JavaScript. It provides an intuitive interface for exploring farms and nodes on the Grid4 network across different environments (development, QA, test, and production).
- Environment Switching: Easily switch between different Grid4 environments (dev4, qa4, test4, prod4)
- Farms Management:
- List all farms with pagination
- Search farms by name or ID
- View detailed farm information
- Nodes Management:
- List all nodes with pagination
- Search nodes by ID, farm ID, or status
- View detailed node information including resources and interfaces
- Dashboard Statistics:
- Total number of farms
- Total number of nodes
- Total resources (CPU, Memory, SSD Storage, HDD Storage)
- Responsive Design: Works on desktop and mobile devices
(Screenshots would be added here)
The application integrates with the Grid4 Registrar API:
- Farms API:
https://registrar.[env].grid.tf/api/v1/farms
- Nodes API:
https://registrar.[env].grid.tf/api/v1/nodes
Where [env]
can be:
dev4
- Development environmentqa4
- QA environmenttest4
- Test environmentprod4
- Production environment (default)
grid4-dashboard/
├── index.html # Home page
├── farms.html # Farms listing page
├── farm-details.html # Farm details page
├── nodes.html # Nodes listing page
├── node-details.html # Node details page
├── css/
│ └── styles.css # Main stylesheet
├── js/
│ ├── api.js # API service
│ ├── main.js # Main JavaScript file
│ ├── farms.js # Farms page logic
│ ├── farm-details.js # Farm details page logic
│ ├── nodes.js # Nodes page logic
│ └── node-details.js # Node details page logic
└── README.md # This file
- A modern web browser
- A local web server (optional for development)
-
Clone this repository:
git clone https://github.com/yourusername/grid4-dashboard.git cd grid4-dashboard
-
Start a local web server:
# Using Python python -m http.server 8000 # Using Node.js npx serve
-
Open your browser and navigate to:
http://localhost:8000
The home page provides an overview of the Grid4 network with statistics cards showing:
- Total number of farms
- Total number of nodes
- Total resources (CPU, Memory, SSD Storage, HDD Storage)
- View a list of all farms
- Search for farms by name or ID
- Click on a farm to view detailed information
- View detailed information about a specific farm
- See a list of nodes associated with the farm
- View a list of all nodes
- Search for nodes by ID, farm ID, or status
- Click on a node to view detailed information
- View detailed information about a specific node
- See resource information (CPU, memory, storage)
- View network interfaces
Use the environment selector in the top-right corner to switch between different Grid4 environments:
- Development (dev4)
- QA (qa4)
- Test (test4)
- Production (prod4) - Default
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Grid4 API Team for providing the backend services
- All contributors to this project