A modern React-based dashboard for managing cluster configurations with support for both text-based and YAML-based configuration files.
- Node.js (v16 or higher)
- npm or yarn - for frontend dependencies
cd server python -m pip install -r requirements.txt or uv pip install -r requirements npm run server
-
Install Dependencies
npm install
-
Start Development Server
VITE_PROMETHEUS_BASE_URL=http://localhost:9090 npm run dev
if deployed on remote server VITE_PROMETHEUS_BASE_URL=http://localhost:9090 npm run dev -- --host 0.0.0.0
-
Access the Application
- Open your browser and navigate to
http://localhost:5173
- The dashboard will load with a professional UI for cluster management
- Note: This is currently a frontend-only application with mock data
- Open your browser and navigate to
aioms_ui/
βββ src/
β βββ components/
β β βββ Dashboard.tsx # Main dashboard with config editors
β β βββ Login.tsx # Authentication component
β βββ contexts/
β β βββ AuthContext.tsx # Authentication state management
β βββ services/
β β βββ api.ts # API service layer
β βββ config/
β βββ api.ts # API configuration
βββ public/
β βββ cluster_all.txt # Text-based cluster configuration
β βββ cluster.yml # YAML-based cluster configuration
βββ package.json
- Text Editor - Edit
cluster_all.txt
with structured sections - YAML Editor - Manage
cluster.yml
with tabbed interface - Real-time Validation - Syntax checking and error reporting
- File Operations - Load, save, download configurations
- Device Groups - Manage hardware models and instances
- Networks - Configure network mappings and links
- Tenants - Set up tenant-specific configurations
- System Checks - Define monitoring and validation rules
- Labels - Manage request and set labels
- Modern Design - Clean, enterprise-grade interface
- Responsive Layout - Works on desktop and mobile
- Tab Navigation - Organized section management
- Real-time Updates - Instant feedback and validation
# Development
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLint
Create a .env
file in the root directory (optional for future backend integration):
# Frontend (for future backend integration)
VITE_API_URL=http://localhost:8000/api
This is currently a frontend-only application with the following characteristics:
- Mock Data - Uses sample configuration data for demonstration
- File-based Configuration - Reads from
public/cluster_all.txt
andpublic/cluster.yml
- No Backend Required - Fully functional standalone application
- Future Ready - Designed to integrate with a Django REST API backend when available
When a backend server is added, the application will support:
- Authentication - JWT-based authentication
- Configuration Management - CRUD operations for cluster configs
- File Operations - Upload/download configuration files
- Real-time Updates - WebSocket support for live updates
Text-based configuration with sections:
- Settings (monitor_mode, etc.)
- Device Groups (hardware models)
- Networks (mappings and links)
- Tenants (instance assignments)
- System (monitoring checks)
YAML-based configuration with:
- Devices (models and instances)
- Networks (node and link files)
- Tenants (instance assignments)
- System (epilogue commands)
- Labels (request and set labels)
npm run build
# Deploy the 'dist' folder to your web server
# When backend is added:
python manage.py collectstatic
python manage.py migrate
# Deploy using gunicorn, uWSGI, or similar WSGI server
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request
This project is licensed under the MIT License.
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Remove tseslint.configs.recommended and replace with this
tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
tseslint.configs.stylisticTypeChecked,
// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])