Thank you for your interest in contributing! This document provides guidelines and information for contributors.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/yourusername/uptime-kuma-status-panel.git cd uptime-kuma-status-panel - Install dependencies:
npm install
- Start development environment:
docker-compose up -d # Starts Grafana + Prometheus + Blackbox Exporter npm run dev # Starts development build with watch
- Access Grafana at http://localhost:3001 (admin/admin)
git checkout -b feature/your-feature-name- Write clean, readable code
- Follow existing code style and patterns
- Add comments for complex logic
- Update documentation if needed
npm run typecheck # TypeScript checking
npm run lint # Code linting
npm run test # Run tests
npm run build # Production buildgit add .
git commit -m "feat: add new feature description"Commit Message Format:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesstyle:- Code style changes (formatting, etc.)refactor:- Code refactoringtest:- Adding or updating testschore:- Maintenance tasks
git push origin feature/your-feature-nameThen create a Pull Request on GitHub.
- ✅ All tests pass (
npm run test:ci) - ✅ TypeScript compiles without errors (
npm run typecheck) - ✅ Code passes linting (
npm run lint) - ✅ Plugin builds successfully (
npm run build) - ✅ Tested in actual Grafana environment
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Testing
- [ ] Tested in development environment
- [ ] Added/updated tests
- [ ] Manual testing completed
## Screenshots (if applicable)
Add screenshots for UI changes
## Checklist
- [ ] Code follows project style guidelines
- [ ] Self-review completed
- [ ] Documentation updated
- [ ] No console errors/warningsnpm test # Interactive test mode
npm run test:ci # CI mode (single run)- Start development environment:
docker-compose up -d - Build plugin:
npm run build - Access Grafana: http://localhost:3001
- Create dashboard with Uptime Kuma Status Panel
- Test different configurations and scenarios
- Aim for high test coverage on new features
- Test both happy path and error scenarios
- Include integration tests for complex features
src/
├── components/
│ ├── StatusPanel.tsx # Main panel component
│ └── StatusIndicator.tsx # Individual service cards
├── utils/
│ └── dataUtils.ts # Data parsing utilities
├── types.ts # TypeScript interfaces
├── plugin.ts # Panel options configuration
└── module.ts # Plugin entry point
- StatusPanel: Main component that receives Grafana data
- StatusIndicator: Individual service status card
- dataUtils: Parses Prometheus/Grafana data frames
- Panel Options: Configurable settings in Grafana UI
- Use strict TypeScript configuration
- Define proper types for all data structures
- Avoid
anytypes where possible - Use meaningful variable and function names
- Use functional components with hooks
- Follow React best practices
- Use proper prop types
- Implement proper error boundaries
- Use Emotion CSS-in-JS for styling
- Follow Grafana theme patterns
- Ensure responsive design
- Support both light and dark themes
Include:
- Environment: Grafana version, browser, OS
- Steps to reproduce
- Expected vs actual behavior
- Screenshots (if applicable)
- Console errors (if any)
Include:
- Problem description
- Proposed solution
- Use case examples
- Mockups (if applicable)
- Comment complex algorithms
- Document public APIs
- Include JSDoc for functions
- Update README for new features
- Update README.md for user-facing changes
- Include screenshots for UI changes
- Update CHANGELOG.md for releases
- Provide configuration examples
- Node.js 18+
- npm 8+
- Docker & Docker Compose
- Git
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"typescript.preferences.importModuleSpecifier": "relative"
}npm run dev # Development build with watch
npm run build # Production build
npm run typecheck # TypeScript checking
npm run lint # Lint code
npm run lint:fix # Fix linting issues
npm test # Run tests
docker-compose up # Start development environment
docker-compose down # Stop development environment- Fix typos in documentation
- Add new service name parsing rules
- Improve error handling
- Add unit tests for existing functions
- Support for additional metrics
- Custom theming options
- Performance optimizations
- New display modes
- Improve CI/CD workflows
- Add more comprehensive tests
- Documentation improvements
- Performance benchmarking
- Issues: Create an issue on GitHub
- Discussions: Use GitHub Discussions for questions
- Documentation: Check README.md and code comments
By contributing to this project, you agree that your contributions will be licensed under the Apache License 2.0.
Thank you for contributing to make this plugin better! 🙏