feat: Add Playwright Trace Viewer with initial HTML, CSS, and JavaScript files
This commit is contained in:
parent
425e7358a3
commit
a23dbbedc0
25 changed files with 1589 additions and 2 deletions
|
|
@ -546,7 +546,7 @@ Security Considerations
|
|||
Design Decisions Summary
|
||||
|
||||
| Decision | Choice | Rationale |
|
||||
|----------------|--------------------------|------------------------------------------------------------------------|
|
||||
|----------------|--------------------------|------------------------------------------------------------------------|
|
||||
| Discovery | Manual only | Simpler, more secure - explicit peer registration |
|
||||
| Transport | WebSocket + SMSG | Better firewall traversal, built-in framing, browser-friendly |
|
||||
| Node Mode | Dual (default) | Maximum flexibility - each node controls remotes AND runs local miners |
|
||||
|
|
|
|||
112
site-docs/about/changelog.md
Normal file
112
site-docs/about/changelog.md
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
# Changelog
|
||||
|
||||
All notable changes to this project.
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
- MkDocs documentation site with Material theme
|
||||
- Screenshots of all UI pages
|
||||
- Comprehensive API and CLI documentation
|
||||
|
||||
---
|
||||
|
||||
## [0.3.0] - 2024
|
||||
|
||||
### Added
|
||||
- **Multi-Node P2P System**
|
||||
- Node identity with X25519 keypairs
|
||||
- Peer registry and management
|
||||
- WebSocket transport layer
|
||||
- Remote miner control (start/stop/stats/logs)
|
||||
- CLI commands: `node`, `peer`, `remote`
|
||||
- REST API endpoints for P2P operations
|
||||
|
||||
- **SQLite Persistence**
|
||||
- Hashrate history storage (30-day retention)
|
||||
- Historical data API endpoints
|
||||
- Time-range queries
|
||||
|
||||
- **Dashboard Enhancements**
|
||||
- Stats bar with all key metrics
|
||||
- Time range selector for charts
|
||||
- Worker dropdown for multi-miner support
|
||||
- Avg difficulty per share display
|
||||
|
||||
- **Console Improvements**
|
||||
- Stdin command support (h, p, r, s, c)
|
||||
- ANSI color rendering
|
||||
- Auto-scroll toggle
|
||||
|
||||
### Changed
|
||||
- Refactored miner interface for better extensibility
|
||||
- Improved stats collection with background goroutines
|
||||
- Enhanced error handling throughout
|
||||
|
||||
---
|
||||
|
||||
## [0.2.0] - 2024
|
||||
|
||||
### Added
|
||||
- **TT-Miner Support**
|
||||
- GPU mining with NVIDIA CUDA
|
||||
- Automatic installation from GitHub
|
||||
- Stats parsing from stdout
|
||||
|
||||
- **Profile Management**
|
||||
- Create, edit, delete mining profiles
|
||||
- Start miners from saved profiles
|
||||
- Autostart configuration
|
||||
|
||||
- **Console View**
|
||||
- Live miner output streaming
|
||||
- Base64-encoded log retrieval
|
||||
- Clear and auto-scroll controls
|
||||
|
||||
### Changed
|
||||
- Improved XMRig stats collection
|
||||
- Better process lifecycle management
|
||||
- Enhanced UI responsiveness
|
||||
|
||||
---
|
||||
|
||||
## [0.1.0] - 2024
|
||||
|
||||
### Added
|
||||
- **Initial Release**
|
||||
- XMRig miner support
|
||||
- Automatic installation
|
||||
- Config generation
|
||||
- Stats via HTTP API
|
||||
- REST API with Gin framework
|
||||
- Angular dashboard
|
||||
- Real-time hashrate display
|
||||
- Miner control (start/stop)
|
||||
- System information
|
||||
- CLI with Cobra
|
||||
- `serve` command
|
||||
- `start`, `stop`, `status`
|
||||
- `install`, `uninstall`
|
||||
- `doctor` health check
|
||||
- Swagger API documentation
|
||||
|
||||
---
|
||||
|
||||
## Version History
|
||||
|
||||
| Version | Date | Highlights |
|
||||
|---------|------|------------|
|
||||
| 0.3.0 | 2024 | P2P multi-node, SQLite, enhanced dashboard |
|
||||
| 0.2.0 | 2024 | TT-Miner, profiles, console |
|
||||
| 0.1.0 | 2024 | Initial release with XMRig |
|
||||
|
||||
## Roadmap
|
||||
|
||||
Future planned features:
|
||||
|
||||
- [ ] Automatic peer discovery
|
||||
- [ ] Fleet-wide statistics aggregation
|
||||
- [ ] Mobile-responsive improvements
|
||||
- [ ] Notification system (email, webhooks)
|
||||
- [ ] Mining pool profit comparison
|
||||
- [ ] Additional miner support (GMiner, lolMiner)
|
||||
192
site-docs/architecture/backend.md
Normal file
192
site-docs/architecture/backend.md
Normal file
|
|
@ -0,0 +1,192 @@
|
|||
# Backend Architecture
|
||||
|
||||
The Go backend provides miner management, REST API, and P2P networking.
|
||||
|
||||
## Package Structure
|
||||
|
||||
```
|
||||
pkg/
|
||||
├── mining/ # Core mining functionality
|
||||
│ ├── mining.go # Interfaces and types
|
||||
│ ├── miner.go # BaseMiner shared logic
|
||||
│ ├── manager.go # Miner lifecycle management
|
||||
│ ├── service.go # REST API endpoints
|
||||
│ ├── xmrig*.go # XMRig implementation
|
||||
│ ├── ttminer*.go # TT-Miner implementation
|
||||
│ ├── profile_manager.go
|
||||
│ └── config_manager.go
|
||||
├── node/ # P2P networking
|
||||
│ ├── identity.go # Node identity (X25519)
|
||||
│ ├── peer.go # Peer registry
|
||||
│ ├── transport.go # WebSocket transport
|
||||
│ ├── message.go # Protocol messages
|
||||
│ ├── controller.go # Remote operations
|
||||
│ └── worker.go # Message handlers
|
||||
└── database/ # Persistence
|
||||
└── sqlite.go # SQLite operations
|
||||
```
|
||||
|
||||
## Core Interfaces
|
||||
|
||||
### Miner Interface
|
||||
|
||||
```go
|
||||
type Miner interface {
|
||||
Install() error
|
||||
Uninstall() error
|
||||
Start(cfg *Config) error
|
||||
Stop() error
|
||||
GetStats() (*PerformanceMetrics, error)
|
||||
GetConfig() *Config
|
||||
GetBinaryPath() string
|
||||
GetDataPath() string
|
||||
GetVersion() (string, error)
|
||||
IsInstalled() bool
|
||||
IsRunning() bool
|
||||
GetMinerType() string
|
||||
GetName() string
|
||||
}
|
||||
```
|
||||
|
||||
### Manager Interface
|
||||
|
||||
```go
|
||||
type ManagerInterface interface {
|
||||
StartMiner(minerType string, cfg *Config) (string, error)
|
||||
StopMiner(name string) error
|
||||
GetMinerStats(name string) (*PerformanceMetrics, error)
|
||||
ListMiners() []MinerStatus
|
||||
InstallMiner(minerType string) error
|
||||
UninstallMiner(minerType string) error
|
||||
}
|
||||
```
|
||||
|
||||
## REST API Routes
|
||||
|
||||
```go
|
||||
// System
|
||||
GET /info # System information
|
||||
|
||||
// Miners
|
||||
GET /miners # List running miners
|
||||
GET /miners/available # List installable miners
|
||||
DELETE /miners/:name # Stop miner
|
||||
GET /miners/:name/stats # Get miner stats
|
||||
GET /miners/:name/logs # Get miner logs
|
||||
POST /miners/:name/stdin # Send stdin command
|
||||
GET /miners/:name/hashrate-history
|
||||
|
||||
// Installation
|
||||
POST /miners/:type/install
|
||||
DELETE /miners/:type/uninstall
|
||||
|
||||
// Profiles
|
||||
GET /profiles
|
||||
POST /profiles
|
||||
PUT /profiles/:id
|
||||
DELETE /profiles/:id
|
||||
POST /profiles/:id/start
|
||||
|
||||
// History
|
||||
GET /history/miners
|
||||
GET /history/miners/:name
|
||||
GET /history/miners/:name/hashrate
|
||||
|
||||
// P2P
|
||||
GET /node/info
|
||||
GET /peers
|
||||
POST /peers
|
||||
DELETE /peers/:id
|
||||
POST /peers/:id/ping
|
||||
|
||||
// Remote
|
||||
GET /remote/stats
|
||||
GET /remote/:peerId/stats
|
||||
POST /remote/:peerId/start
|
||||
POST /remote/:peerId/stop
|
||||
```
|
||||
|
||||
## Miner Implementations
|
||||
|
||||
### XMRig
|
||||
|
||||
- Downloads from GitHub releases
|
||||
- Generates `config.json` for each run
|
||||
- Polls HTTP API (port 8080) for stats
|
||||
- Parses stdout for hashrate if API unavailable
|
||||
|
||||
### TT-Miner
|
||||
|
||||
- Downloads from GitHub releases
|
||||
- Uses command-line arguments
|
||||
- Parses stdout for stats (no HTTP API)
|
||||
- Supports CUDA/OpenCL GPU mining
|
||||
|
||||
## Stats Collection
|
||||
|
||||
```go
|
||||
// Every 10 seconds
|
||||
func (m *Manager) collectStats() {
|
||||
for _, miner := range m.miners {
|
||||
stats, err := miner.GetStats()
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
|
||||
// Store in memory (high-res, 5 min)
|
||||
m.hashrateHistory[name].AddPoint(stats.Hashrate)
|
||||
|
||||
// Store in SQLite (low-res, 30 days)
|
||||
m.db.InsertHashrate(name, stats.Hashrate, time.Now())
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## P2P Architecture
|
||||
|
||||
### Node Identity
|
||||
|
||||
```go
|
||||
type NodeIdentity struct {
|
||||
ID string // Derived from public key
|
||||
Name string // Human-friendly name
|
||||
PublicKey string // X25519 base64
|
||||
Role NodeRole // controller|worker|dual
|
||||
}
|
||||
```
|
||||
|
||||
### Message Protocol
|
||||
|
||||
```go
|
||||
type Message struct {
|
||||
ID string // UUID
|
||||
Type MessageType // handshake, ping, get_stats, etc.
|
||||
From string // Sender node ID
|
||||
To string // Recipient node ID
|
||||
Timestamp time.Time
|
||||
Payload json.RawMessage
|
||||
}
|
||||
```
|
||||
|
||||
### WebSocket Transport
|
||||
|
||||
- Listens on port 9091 by default
|
||||
- Binary frames with JSON messages
|
||||
- Automatic reconnection handling
|
||||
- Ping/pong keepalive
|
||||
|
||||
## Error Handling
|
||||
|
||||
All API endpoints return consistent error format:
|
||||
|
||||
```json
|
||||
{
|
||||
"error": "Error message here"
|
||||
}
|
||||
```
|
||||
|
||||
HTTP status codes:
|
||||
- `200` - Success
|
||||
- `400` - Bad request
|
||||
- `404` - Not found
|
||||
- `500` - Server error
|
||||
165
site-docs/architecture/frontend.md
Normal file
165
site-docs/architecture/frontend.md
Normal file
|
|
@ -0,0 +1,165 @@
|
|||
# Frontend Architecture
|
||||
|
||||
The Angular frontend provides a modern, responsive dashboard for miner management.
|
||||
|
||||
## Technology Stack
|
||||
|
||||
- **Angular 20+** - Standalone components
|
||||
- **Tailwind CSS** - Utility-first styling
|
||||
- **Chart.js** - Hashrate visualization
|
||||
- **xterm.js** - Terminal emulation for console
|
||||
|
||||
## Component Structure
|
||||
|
||||
```
|
||||
ui/src/app/
|
||||
├── app.ts # Root component
|
||||
├── app.routes.ts # Route definitions
|
||||
├── app.config.ts # App configuration
|
||||
├── miner.service.ts # API communication
|
||||
├── node.service.ts # P2P node service
|
||||
│
|
||||
├── components/
|
||||
│ └── sidebar/ # Navigation sidebar
|
||||
│
|
||||
├── layouts/
|
||||
│ └── main-layout/ # Page layout wrapper
|
||||
│
|
||||
├── pages/
|
||||
│ ├── dashboard/ # Main monitoring view
|
||||
│ ├── profiles/ # Profile management
|
||||
│ ├── console/ # Terminal output
|
||||
│ ├── workers/ # Running miners
|
||||
│ ├── miners/ # Installation
|
||||
│ ├── nodes/ # P2P management
|
||||
│ └── pools/ # Pool information
|
||||
│
|
||||
├── dashboard.component.* # Stats and charts
|
||||
├── chart.component.* # Hashrate chart
|
||||
├── profile-*.component.* # Profile CRUD
|
||||
├── console.component.* # Terminal
|
||||
└── setup-wizard.component.* # Initial setup
|
||||
```
|
||||
|
||||
## Key Components
|
||||
|
||||
### Dashboard Component
|
||||
|
||||
Displays real-time mining statistics:
|
||||
|
||||
- **Stats Bar**: Hashrate, shares, uptime, pool, difficulty, workers
|
||||
- **Chart**: Time-series hashrate visualization
|
||||
- **Quick Stats**: Peak rate, efficiency, share time
|
||||
- **Worker Selector**: Switch between multiple miners
|
||||
|
||||
### Chart Component
|
||||
|
||||
Chart.js-based hashrate visualization:
|
||||
|
||||
- Time range selector (5m, 15m, 1h, 6h, 24h)
|
||||
- Real-time updates every 10 seconds
|
||||
- Historical data from SQLite
|
||||
|
||||
### Console Component
|
||||
|
||||
Terminal emulator with:
|
||||
|
||||
- ANSI color support via ansi_up
|
||||
- Auto-scroll toggle
|
||||
- Stdin command input
|
||||
- Worker selection dropdown
|
||||
|
||||
### Profile Components
|
||||
|
||||
- **List**: Card-based profile display with actions
|
||||
- **Create**: Form for new profiles
|
||||
- **Edit**: Modify existing profiles
|
||||
|
||||
## Services
|
||||
|
||||
### MinerService
|
||||
|
||||
Handles all API communication:
|
||||
|
||||
```typescript
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class MinerService {
|
||||
getMiners(): Observable<Miner[]>
|
||||
getSystemInfo(): Observable<SystemInfo>
|
||||
startMiner(profileId: string): Observable<any>
|
||||
stopMiner(name: string): Observable<any>
|
||||
getMinerStats(name: string): Observable<Stats>
|
||||
getMinerLogs(name: string): Observable<string[]>
|
||||
sendStdin(name: string, input: string): Observable<any>
|
||||
getHashrateHistory(name: string, range: string): Observable<Point[]>
|
||||
// ... profiles, installation, etc.
|
||||
}
|
||||
```
|
||||
|
||||
### NodeService
|
||||
|
||||
P2P node management:
|
||||
|
||||
```typescript
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class NodeService {
|
||||
getNodeInfo(): Observable<NodeInfo>
|
||||
getPeers(): Observable<Peer[]>
|
||||
addPeer(peer: PeerAdd): Observable<any>
|
||||
removePeer(id: string): Observable<any>
|
||||
pingPeer(id: string): Observable<PingResult>
|
||||
}
|
||||
```
|
||||
|
||||
## Routing
|
||||
|
||||
```typescript
|
||||
export const routes: Routes = [
|
||||
{ path: '', component: DashboardComponent },
|
||||
{ path: 'profiles', component: ProfileListComponent },
|
||||
{ path: 'profiles/new', component: ProfileCreateComponent },
|
||||
{ path: 'profiles/:id/edit', component: ProfileEditComponent },
|
||||
{ path: 'console', component: ConsoleComponent },
|
||||
{ path: 'workers', component: WorkersComponent },
|
||||
{ path: 'miners', component: MinersComponent },
|
||||
{ path: 'nodes', component: NodesComponent },
|
||||
{ path: 'pools', component: PoolsComponent },
|
||||
{ path: 'admin', component: AdminComponent },
|
||||
];
|
||||
```
|
||||
|
||||
## Styling
|
||||
|
||||
### Design System
|
||||
|
||||
| Element | Style |
|
||||
|---------|-------|
|
||||
| Background | Dark slate (#0a0a12) |
|
||||
| Cards | Slightly lighter slate |
|
||||
| Accent | Cyan and lime |
|
||||
| Text | White and gray variants |
|
||||
| Success | Green |
|
||||
| Error | Red |
|
||||
| Warning | Yellow |
|
||||
|
||||
### Responsive Design
|
||||
|
||||
- Mobile-first approach
|
||||
- Sidebar collapses on small screens
|
||||
- Grid layouts adapt to viewport
|
||||
|
||||
## Build Output
|
||||
|
||||
The UI builds to a web component:
|
||||
|
||||
```bash
|
||||
ng build
|
||||
# Outputs: ui/dist/mbe-mining-dashboard.js
|
||||
```
|
||||
|
||||
Can be embedded in any HTML page:
|
||||
|
||||
```html
|
||||
<script src="mbe-mining-dashboard.js"></script>
|
||||
<mbe-mining-dashboard></mbe-mining-dashboard>
|
||||
```
|
||||
116
site-docs/architecture/overview.md
Normal file
116
site-docs/architecture/overview.md
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
# Architecture Overview
|
||||
|
||||
The Mining Dashboard follows a modular architecture with clear separation of concerns.
|
||||
|
||||
## High-Level Architecture
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────────────┐
|
||||
│ Web Browser │
|
||||
│ Angular UI (4200) │
|
||||
└─────────────────────┬───────────────────────────────────────┘
|
||||
│ HTTP/REST
|
||||
┌─────────────────────▼───────────────────────────────────────┐
|
||||
│ Go Backend (9090) │
|
||||
│ ┌──────────────────────────────────────────────────────┐ │
|
||||
│ │ REST API (Gin) │ │
|
||||
│ │ /api/v1/mining/* │ │
|
||||
│ └──────────────────────────────────────────────────────┘ │
|
||||
│ │ │
|
||||
│ ┌──────────────────────▼──────────────────────────────┐ │
|
||||
│ │ Mining Manager │ │
|
||||
│ │ - Process lifecycle - Stats collection │ │
|
||||
│ │ - Profile management - Hashrate history │ │
|
||||
│ └──────────────────────────────────────────────────────┘ │
|
||||
│ │ │
|
||||
│ ┌───────────┬───────────┴────────────┬────────────────┐ │
|
||||
│ │ XMRig │ TT-Miner │ Future... │ │
|
||||
│ │ Adapter │ Adapter │ Miners │ │
|
||||
│ └───────────┴────────────────────────┴────────────────┘ │
|
||||
└─────────────────────────────────────────────────────────────┘
|
||||
│
|
||||
┌───────────────┼───────────────┐
|
||||
▼ ▼ ▼
|
||||
┌─────────┐ ┌─────────┐ ┌─────────┐
|
||||
│ XMRig │ │TT-Miner │ │ SQLite │
|
||||
│ Process │ │ Process │ │ DB │
|
||||
└─────────┘ └─────────┘ └─────────┘
|
||||
```
|
||||
|
||||
## Component Responsibilities
|
||||
|
||||
### Frontend (Angular)
|
||||
|
||||
| Component | Purpose |
|
||||
|-----------|---------|
|
||||
| Dashboard | Real-time hashrate display, stats bar |
|
||||
| Profiles | CRUD for mining configurations |
|
||||
| Console | Live miner output with ANSI colors |
|
||||
| Workers | Running miner instances |
|
||||
| Nodes | P2P peer management |
|
||||
|
||||
### Backend (Go)
|
||||
|
||||
| Package | Purpose |
|
||||
|---------|---------|
|
||||
| `pkg/mining` | Core miner management, API service |
|
||||
| `pkg/node` | P2P networking, identity, transport |
|
||||
| `pkg/database` | SQLite persistence layer |
|
||||
| `cmd/mining` | CLI commands via Cobra |
|
||||
|
||||
## Data Flow
|
||||
|
||||
### Starting a Miner
|
||||
|
||||
```
|
||||
1. UI: POST /api/v1/mining/profiles/{id}/start
|
||||
2. Service: Validates profile, calls Manager.StartMiner()
|
||||
3. Manager: Creates miner instance (XMRig/TT-Miner)
|
||||
4. Miner: Generates config, spawns process
|
||||
5. Manager: Starts stats collection goroutine
|
||||
6. Response: Returns miner name to UI
|
||||
```
|
||||
|
||||
### Stats Collection
|
||||
|
||||
```
|
||||
Every 10 seconds:
|
||||
1. Manager iterates running miners
|
||||
2. Each miner adapter polls stats (HTTP API or stdout parsing)
|
||||
3. Stats stored in memory + SQLite
|
||||
4. UI polls /api/v1/mining/miners for updates
|
||||
```
|
||||
|
||||
## Storage
|
||||
|
||||
### Configuration Files
|
||||
|
||||
```
|
||||
~/.config/lethean-desktop/
|
||||
├── mining_profiles.json # Saved profiles
|
||||
├── miners.json # Autostart config
|
||||
├── node.json # P2P identity
|
||||
└── peers.json # Known peers
|
||||
```
|
||||
|
||||
### Data Files
|
||||
|
||||
```
|
||||
~/.local/share/lethean-desktop/
|
||||
├── miners/ # Installed miner binaries
|
||||
│ ├── xmrig/
|
||||
│ └── tt-miner/
|
||||
├── node/
|
||||
│ └── private.key # X25519 private key
|
||||
└── mining.db # SQLite database
|
||||
```
|
||||
|
||||
## Key Design Decisions
|
||||
|
||||
| Decision | Rationale |
|
||||
|----------|-----------|
|
||||
| Interface-based miners | Easy to add new miner types |
|
||||
| Gorilla WebSocket | P2P transport with good browser support |
|
||||
| SQLite | Zero-config persistence, embedded |
|
||||
| Gin framework | Fast, widely used Go HTTP framework |
|
||||
| Angular standalone | Modern, tree-shakable components |
|
||||
215
site-docs/cli/examples.md
Normal file
215
site-docs/cli/examples.md
Normal file
|
|
@ -0,0 +1,215 @@
|
|||
# CLI Examples
|
||||
|
||||
Practical examples for common tasks.
|
||||
|
||||
## Quick Start
|
||||
|
||||
### Start Mining with XMRig
|
||||
|
||||
```bash
|
||||
# Install XMRig
|
||||
miner-cli install xmrig
|
||||
|
||||
# Start mining with a profile
|
||||
miner-cli start --profile "My Profile"
|
||||
|
||||
# Or with direct parameters
|
||||
miner-cli start xmrig --pool pool.example.com:3333 --wallet 4xxx...
|
||||
```
|
||||
|
||||
### Monitor Mining Status
|
||||
|
||||
```bash
|
||||
# Check status of all miners
|
||||
miner-cli status
|
||||
|
||||
# Watch status continuously
|
||||
watch -n 5 miner-cli status
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Profile Management
|
||||
|
||||
### Create and Use Profiles
|
||||
|
||||
```bash
|
||||
# List existing profiles
|
||||
miner-cli profile list
|
||||
|
||||
# Start a miner from profile
|
||||
miner-cli start --profile "Monero Mining"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Multi-Node Operations
|
||||
|
||||
### Set Up a Controller Node
|
||||
|
||||
```bash
|
||||
# Initialize as controller
|
||||
miner-cli node init --name "control-center" --role controller
|
||||
|
||||
# Start the P2P server
|
||||
miner-cli node serve --listen :9091
|
||||
```
|
||||
|
||||
### Set Up a Worker Node
|
||||
|
||||
```bash
|
||||
# Initialize as worker
|
||||
miner-cli node init --name "rig-alpha" --role worker
|
||||
|
||||
# Start accepting connections
|
||||
miner-cli node serve --listen :9091
|
||||
```
|
||||
|
||||
### Connect and Manage Peers
|
||||
|
||||
```bash
|
||||
# On controller: add a worker
|
||||
miner-cli peer add --address 192.168.1.100:9091 --name "rig-alpha"
|
||||
|
||||
# List all peers
|
||||
miner-cli peer list
|
||||
|
||||
# Ping a peer
|
||||
miner-cli peer ping abc123
|
||||
```
|
||||
|
||||
### Remote Mining Commands
|
||||
|
||||
```bash
|
||||
# Get stats from all remote miners
|
||||
miner-cli remote status
|
||||
|
||||
# Start miner on remote peer
|
||||
miner-cli remote start abc123 --profile "My Profile"
|
||||
|
||||
# Stop miner on remote peer
|
||||
miner-cli remote stop abc123 xmrig-456
|
||||
|
||||
# Get logs from remote miner
|
||||
miner-cli remote logs abc123 xmrig-456 --lines 50
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Server Operations
|
||||
|
||||
### Run the Dashboard
|
||||
|
||||
```bash
|
||||
# Start with defaults (port 9090)
|
||||
miner-cli serve
|
||||
|
||||
# Custom port
|
||||
miner-cli serve --port 8080
|
||||
|
||||
# Disable autostart
|
||||
miner-cli serve --no-autostart
|
||||
```
|
||||
|
||||
### System Health Check
|
||||
|
||||
```bash
|
||||
# Run diagnostics
|
||||
miner-cli doctor
|
||||
```
|
||||
|
||||
Output:
|
||||
```
|
||||
System Check
|
||||
============
|
||||
Platform: linux
|
||||
CPU: AMD Ryzen 9 5950X
|
||||
Cores: 32
|
||||
Memory: 64 GB
|
||||
|
||||
Miner Status
|
||||
============
|
||||
✓ xmrig v6.25.0 installed
|
||||
✗ tt-miner not installed
|
||||
|
||||
Recommendations
|
||||
===============
|
||||
- Enable huge pages for better performance
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Scripting Examples
|
||||
|
||||
### Bash Script: Auto-restart on Failure
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
PROFILE="My Profile"
|
||||
|
||||
while true; do
|
||||
miner-cli start --profile "$PROFILE"
|
||||
sleep 10
|
||||
|
||||
# Check if still running
|
||||
if ! miner-cli status | grep -q "running"; then
|
||||
echo "Miner stopped, restarting..."
|
||||
continue
|
||||
fi
|
||||
|
||||
sleep 60
|
||||
done
|
||||
```
|
||||
|
||||
### Monitor Hashrate via API
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
while true; do
|
||||
curl -s http://localhost:9090/api/v1/mining/miners | \
|
||||
jq -r '.[] | "\(.name): \(.full_stats.hashrate.total[0] // 0) H/s"'
|
||||
sleep 10
|
||||
done
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Docker Examples
|
||||
|
||||
### Run with Docker Compose
|
||||
|
||||
```yaml
|
||||
# docker-compose.yml
|
||||
version: '3.8'
|
||||
services:
|
||||
mining-dashboard:
|
||||
image: mining-cli:latest
|
||||
command: serve --port 9090
|
||||
ports:
|
||||
- "9090:9090"
|
||||
volumes:
|
||||
- mining-data:/root/.local/share/lethean-desktop
|
||||
- mining-config:/root/.config/lethean-desktop
|
||||
|
||||
volumes:
|
||||
mining-data:
|
||||
mining-config:
|
||||
```
|
||||
|
||||
```bash
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
### Multi-Node Docker Setup
|
||||
|
||||
```bash
|
||||
# Start controller
|
||||
docker run -d --name controller \
|
||||
-p 9090:9090 -p 9091:9091 \
|
||||
mining-cli node serve
|
||||
|
||||
# Start workers
|
||||
docker run -d --name worker1 \
|
||||
-p 9092:9091 \
|
||||
mining-cli node serve
|
||||
```
|
||||
222
site-docs/development/building.md
Normal file
222
site-docs/development/building.md
Normal file
|
|
@ -0,0 +1,222 @@
|
|||
# Building from Source
|
||||
|
||||
Complete guide to building the Mining Dashboard from source.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
### Required
|
||||
|
||||
| Tool | Version | Purpose |
|
||||
|------|---------|---------|
|
||||
| Go | 1.21+ | Backend compilation |
|
||||
| Node.js | 20+ | Frontend build |
|
||||
| npm | 10+ | Package management |
|
||||
| Make | any | Build automation |
|
||||
|
||||
### Optional
|
||||
|
||||
| Tool | Purpose |
|
||||
|------|---------|
|
||||
| golangci-lint | Code linting |
|
||||
| swag | Swagger doc generation |
|
||||
| Docker | Containerized builds |
|
||||
|
||||
## Quick Build
|
||||
|
||||
```bash
|
||||
# Clone repository
|
||||
git clone https://github.com/Snider/Mining.git
|
||||
cd Mining
|
||||
|
||||
# Build everything
|
||||
make build
|
||||
|
||||
# Output: ./miner-cli
|
||||
```
|
||||
|
||||
## Backend Build
|
||||
|
||||
### Standard Build
|
||||
|
||||
```bash
|
||||
make build
|
||||
# or
|
||||
go build -o miner-cli ./cmd/mining
|
||||
```
|
||||
|
||||
### With Version Info
|
||||
|
||||
```bash
|
||||
VERSION=1.0.0
|
||||
go build -ldflags "-X main.version=$VERSION" -o miner-cli ./cmd/mining
|
||||
```
|
||||
|
||||
### Cross-Platform Builds
|
||||
|
||||
```bash
|
||||
# Build for all platforms
|
||||
make build-all
|
||||
|
||||
# Or manually:
|
||||
GOOS=linux GOARCH=amd64 go build -o dist/miner-cli-linux-amd64 ./cmd/mining
|
||||
GOOS=darwin GOARCH=amd64 go build -o dist/miner-cli-darwin-amd64 ./cmd/mining
|
||||
GOOS=windows GOARCH=amd64 go build -o dist/miner-cli-windows-amd64.exe ./cmd/mining
|
||||
```
|
||||
|
||||
## Frontend Build
|
||||
|
||||
```bash
|
||||
cd ui
|
||||
|
||||
# Install dependencies
|
||||
npm install
|
||||
|
||||
# Development build
|
||||
ng build
|
||||
|
||||
# Production build
|
||||
ng build --configuration production
|
||||
|
||||
# Output: ui/dist/
|
||||
```
|
||||
|
||||
## Generate Documentation
|
||||
|
||||
### Swagger Docs
|
||||
|
||||
```bash
|
||||
# Install swag
|
||||
go install github.com/swaggo/swag/cmd/swag@latest
|
||||
|
||||
# Generate
|
||||
make docs
|
||||
# or
|
||||
swag init -g ./cmd/mining/main.go
|
||||
```
|
||||
|
||||
### MkDocs Site
|
||||
|
||||
```bash
|
||||
# Create virtual environment
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
|
||||
# Install MkDocs
|
||||
pip install mkdocs-material mkdocs-glightbox
|
||||
|
||||
# Serve locally
|
||||
mkdocs serve
|
||||
|
||||
# Build static site
|
||||
mkdocs build
|
||||
```
|
||||
|
||||
## Running Tests
|
||||
|
||||
### Unit Tests
|
||||
|
||||
```bash
|
||||
# All tests with coverage
|
||||
make test
|
||||
|
||||
# Specific package
|
||||
go test -v ./pkg/mining/...
|
||||
|
||||
# With race detection
|
||||
go test -race ./...
|
||||
```
|
||||
|
||||
### E2E Tests
|
||||
|
||||
```bash
|
||||
cd ui
|
||||
|
||||
# Install Playwright
|
||||
npx playwright install
|
||||
|
||||
# Run all E2E tests
|
||||
npm run e2e
|
||||
|
||||
# API tests only (faster)
|
||||
npm run e2e:api
|
||||
|
||||
# Interactive UI mode
|
||||
npm run e2e:ui
|
||||
```
|
||||
|
||||
## Development Server
|
||||
|
||||
```bash
|
||||
# Start backend + frontend
|
||||
make dev
|
||||
|
||||
# Or separately:
|
||||
# Terminal 1: Backend
|
||||
./miner-cli serve
|
||||
|
||||
# Terminal 2: Frontend
|
||||
cd ui && ng serve
|
||||
```
|
||||
|
||||
Access:
|
||||
- Frontend: http://localhost:4200
|
||||
- Backend API: http://localhost:9090/api/v1/mining
|
||||
- Swagger UI: http://localhost:9090/api/v1/mining/swagger/index.html
|
||||
|
||||
## Docker Build
|
||||
|
||||
### Single Binary
|
||||
|
||||
```bash
|
||||
docker build -t mining-cli .
|
||||
docker run -p 9090:9090 mining-cli serve
|
||||
```
|
||||
|
||||
### Multi-Node Setup
|
||||
|
||||
```bash
|
||||
docker-compose -f docker-compose.p2p.yml up
|
||||
```
|
||||
|
||||
## Release Build
|
||||
|
||||
```bash
|
||||
# Using GoReleaser
|
||||
make package
|
||||
|
||||
# Creates:
|
||||
# - dist/miner-cli_linux_amd64.tar.gz
|
||||
# - dist/miner-cli_darwin_amd64.tar.gz
|
||||
# - dist/miner-cli_windows_amd64.zip
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### CGO Issues
|
||||
|
||||
SQLite requires CGO. If you get errors:
|
||||
|
||||
```bash
|
||||
# Enable CGO
|
||||
CGO_ENABLED=1 go build ./cmd/mining
|
||||
```
|
||||
|
||||
### Node Modules
|
||||
|
||||
If frontend build fails:
|
||||
|
||||
```bash
|
||||
cd ui
|
||||
rm -rf node_modules package-lock.json
|
||||
npm install
|
||||
```
|
||||
|
||||
### Swagger Generation
|
||||
|
||||
If swagger fails:
|
||||
|
||||
```bash
|
||||
go install github.com/swaggo/swag/cmd/swag@latest
|
||||
export PATH=$PATH:$(go env GOPATH)/bin
|
||||
swag init -g ./cmd/mining/main.go
|
||||
```
|
||||
122
site-docs/development/contributing.md
Normal file
122
site-docs/development/contributing.md
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
# Contributing
|
||||
|
||||
Contributions are welcome! Here's how to get involved.
|
||||
|
||||
## Getting Started
|
||||
|
||||
1. Fork the repository
|
||||
2. Clone your fork
|
||||
3. Create a feature branch
|
||||
4. Make your changes
|
||||
5. Submit a pull request
|
||||
|
||||
## Development Setup
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- Go 1.21+
|
||||
- Node.js 20+
|
||||
- Make
|
||||
|
||||
### Clone and Build
|
||||
|
||||
```bash
|
||||
git clone https://github.com/yourusername/Mining.git
|
||||
cd Mining
|
||||
|
||||
# Build backend
|
||||
make build
|
||||
|
||||
# Build frontend
|
||||
cd ui && npm install && ng build
|
||||
```
|
||||
|
||||
## Code Style
|
||||
|
||||
### Go
|
||||
|
||||
- Run `make lint` before committing
|
||||
- Follow standard Go conventions
|
||||
- Use meaningful variable names
|
||||
- Add comments for exported functions
|
||||
|
||||
### TypeScript/Angular
|
||||
|
||||
- Use standalone components
|
||||
- Follow Angular style guide
|
||||
- Use TypeScript strict mode
|
||||
|
||||
## Testing
|
||||
|
||||
### Backend Tests
|
||||
|
||||
```bash
|
||||
make test # All tests
|
||||
go test -v ./pkg/mining/... # Specific package
|
||||
go test -run TestName ./... # Single test
|
||||
```
|
||||
|
||||
### E2E Tests
|
||||
|
||||
```bash
|
||||
cd ui
|
||||
npm run e2e # All E2E tests
|
||||
npm run e2e:api # API tests only
|
||||
npm run e2e:ui # Interactive mode
|
||||
```
|
||||
|
||||
## Pull Request Guidelines
|
||||
|
||||
1. **One feature per PR** - Keep changes focused
|
||||
2. **Write tests** - Add tests for new functionality
|
||||
3. **Update docs** - Update relevant documentation
|
||||
4. **Describe changes** - Clear PR description
|
||||
5. **Pass CI** - All tests must pass
|
||||
|
||||
## Adding a New Miner
|
||||
|
||||
To add support for a new miner:
|
||||
|
||||
1. Create `pkg/mining/newminer.go`
|
||||
2. Implement the `Miner` interface
|
||||
3. Register in `manager.go`
|
||||
4. Add UI support if needed
|
||||
5. Write tests
|
||||
6. Document the miner
|
||||
|
||||
Example structure:
|
||||
|
||||
```go
|
||||
type NewMiner struct {
|
||||
*BaseMiner
|
||||
// miner-specific fields
|
||||
}
|
||||
|
||||
func NewNewMiner() *NewMiner {
|
||||
return &NewMiner{
|
||||
BaseMiner: NewBaseMiner("newminer", "newminer"),
|
||||
}
|
||||
}
|
||||
|
||||
func (m *NewMiner) Start(cfg *Config) error {
|
||||
// Implementation
|
||||
}
|
||||
|
||||
func (m *NewMiner) GetStats() (*PerformanceMetrics, error) {
|
||||
// Implementation
|
||||
}
|
||||
```
|
||||
|
||||
## Reporting Issues
|
||||
|
||||
When reporting bugs:
|
||||
|
||||
1. Check existing issues first
|
||||
2. Include system information
|
||||
3. Provide steps to reproduce
|
||||
4. Include relevant logs
|
||||
5. Attach screenshots if UI-related
|
||||
|
||||
## License
|
||||
|
||||
By contributing, you agree that your contributions will be licensed under the project's license.
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
ui/playwright-report/trace/codeMirrorModule.C3UTv-Ge.css
Normal file
1
ui/playwright-report/trace/codeMirrorModule.C3UTv-Ge.css
Normal file
File diff suppressed because one or more lines are too long
BIN
ui/playwright-report/trace/codicon.DCmgc-ay.ttf
Normal file
BIN
ui/playwright-report/trace/codicon.DCmgc-ay.ttf
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
2
ui/playwright-report/trace/index.BxQ34UMZ.js
Normal file
2
ui/playwright-report/trace/index.BxQ34UMZ.js
Normal file
File diff suppressed because one or more lines are too long
1
ui/playwright-report/trace/index.C4Y3Aw8n.css
Normal file
1
ui/playwright-report/trace/index.C4Y3Aw8n.css
Normal file
|
|
@ -0,0 +1 @@
|
|||
.drop-target{display:flex;align-items:center;justify-content:center;flex:auto;flex-direction:column;background-color:var(--vscode-editor-background);position:absolute;top:0;right:0;bottom:0;left:0;z-index:100;line-height:24px}body .drop-target{background:#fffc}:root.dark-mode .drop-target{background:#000c}.drop-target .title{font-size:24px;font-weight:700;margin-bottom:30px}.drop-target .info{max-width:400px;text-align:center}.drop-target .processing-error{font-size:24px;color:#e74c3c;font-weight:700;text-align:center;margin:30px}.drop-target input{margin-top:50px}.drop-target button{color:#fff;background-color:#007acc;padding:8px 12px;border:none;margin:30px 0;cursor:pointer}.drop-target .version{color:var(--vscode-disabledForeground);margin-top:8px}.progress-dialog{width:400px;top:0;right:0;bottom:0;left:0;border:none;outline:none;background-color:var(--vscode-sideBar-background)}.progress-dialog::backdrop{background-color:#0006}.progress-content{padding:16px}.progress-content .title{background-color:unset;font-size:18px;font-weight:700;padding:0}.progress-wrapper{background-color:var(--vscode-commandCenter-activeBackground);width:100%;margin-top:16px;margin-bottom:8px}.inner-progress{background-color:var(--vscode-progressBar-background);height:4px}.header{display:flex;background-color:#000;flex:none;flex-basis:48px;line-height:48px;font-size:16px;color:#ccc}.workbench-loader{contain:size}.workbench-loader .header .toolbar-button{margin:12px;padding:8px 4px}.workbench-loader .logo{margin-left:16px;display:flex;align-items:center}.workbench-loader .logo img{height:32px;width:32px;pointer-events:none;flex:none}.workbench-loader .product{font-weight:600;margin-left:16px;flex:none}.workbench-loader .header .title{margin-left:16px;overflow:hidden;text-overflow:ellipsis;text-wrap:nowrap}html,body{min-width:550px;min-height:450px;overflow:auto}
|
||||
43
ui/playwright-report/trace/index.html
Normal file
43
ui/playwright-report/trace/index.html
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" translate="no">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" href="./playwright-logo.svg" type="image/svg+xml">
|
||||
<link rel="manifest" href="./manifest.webmanifest">
|
||||
<title>Playwright Trace Viewer</title>
|
||||
<script type="module" crossorigin src="./index.BxQ34UMZ.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="./assets/defaultSettingsView-BEpdCv1S.js">
|
||||
<link rel="stylesheet" crossorigin href="./defaultSettingsView.ConWv5KN.css">
|
||||
<link rel="stylesheet" crossorigin href="./index.C4Y3Aw8n.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<dialog id="fallback-error">
|
||||
<p>The Playwright Trace Viewer must be loaded over the <code>http://</code> or <code>https://</code> protocols.</p>
|
||||
<p>For more information, please see the <a href="https://aka.ms/playwright/trace-viewer-file-protocol">docs</a>.</p>
|
||||
</dialog>
|
||||
<script>
|
||||
if (!/^https?:/.test(window.location.protocol)) {
|
||||
const fallbackErrorDialog = document.getElementById('fallback-error');
|
||||
const isTraceViewerInsidePlaywrightReport = window.location.protocol === 'file:' && window.location.pathname.endsWith('/trace/index.html');
|
||||
// Best-effort to show the report path in the dialog.
|
||||
if (isTraceViewerInsidePlaywrightReport) {
|
||||
const reportPath = (() => {
|
||||
const base = decodeURIComponent(window.location.pathname).replace(/\/trace\/index\.html$/, '');
|
||||
if (navigator.platform === 'Win32')
|
||||
return base.replace(/^\//, '').replace(/\//g, '\\\\');
|
||||
return base;
|
||||
})();
|
||||
const reportLink = document.createElement('div');
|
||||
const command = `npx playwright show-report "${reportPath}"`;
|
||||
reportLink.innerHTML = `You can open the report via <code>${command}</code> from your Playwright project. <button type="button">Copy Command</button>`;
|
||||
fallbackErrorDialog.insertBefore(reportLink, fallbackErrorDialog.children[1]);
|
||||
reportLink.querySelector('button').addEventListener('click', () => navigator.clipboard.writeText(command));
|
||||
}
|
||||
fallbackErrorDialog.show();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
16
ui/playwright-report/trace/manifest.webmanifest
Normal file
16
ui/playwright-report/trace/manifest.webmanifest
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"theme_color": "#000",
|
||||
"background_color": "#fff",
|
||||
"display": "standalone",
|
||||
"start_url": "index.html",
|
||||
"name": "Playwright Trace Viewer",
|
||||
"short_name": "Trace Viewer",
|
||||
"icons": [
|
||||
{
|
||||
"src": "playwright-logo.svg",
|
||||
"sizes": "48x48 72x72 96x96 128x128 150x150 256x256 512x512 1024x1024",
|
||||
"type": "image/svg+xml",
|
||||
"purpose": "any"
|
||||
}
|
||||
]
|
||||
}
|
||||
9
ui/playwright-report/trace/playwright-logo.svg
Normal file
9
ui/playwright-report/trace/playwright-logo.svg
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<svg width="400" height="400" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M136.444 221.556C123.558 225.213 115.104 231.625 109.535 238.032C114.869 233.364 122.014 229.08 131.652 226.348C141.51 223.554 149.92 223.574 156.869 224.915V219.481C150.941 218.939 144.145 219.371 136.444 221.556ZM108.946 175.876L61.0895 188.484C61.0895 188.484 61.9617 189.716 63.5767 191.36L104.153 180.668C104.153 180.668 103.578 188.077 98.5847 194.705C108.03 187.559 108.946 175.876 108.946 175.876ZM149.005 288.347C81.6582 306.486 46.0272 228.438 35.2396 187.928C30.2556 169.229 28.0799 155.067 27.5 145.928C27.4377 144.979 27.4665 144.179 27.5336 143.446C24.04 143.657 22.3674 145.473 22.7077 150.721C23.2876 159.855 25.4633 174.016 30.4473 192.721C41.2301 233.225 76.8659 311.273 144.213 293.134C158.872 289.185 169.885 281.992 178.152 272.81C170.532 279.692 160.995 285.112 149.005 288.347ZM161.661 128.11V132.903H188.077C187.535 131.206 186.989 129.677 186.447 128.11H161.661Z" fill="#2D4552"/>
|
||||
<path d="M193.981 167.584C205.861 170.958 212.144 179.287 215.465 186.658L228.711 190.42C228.711 190.42 226.904 164.623 203.57 157.995C181.741 151.793 168.308 170.124 166.674 172.496C173.024 167.972 182.297 164.268 193.981 167.584ZM299.422 186.777C277.573 180.547 264.145 198.916 262.535 201.255C268.89 196.736 278.158 193.031 289.837 196.362C301.698 199.741 307.976 208.06 311.307 215.436L324.572 219.212C324.572 219.212 322.736 193.41 299.422 186.777ZM286.262 254.795L176.072 223.99C176.072 223.99 177.265 230.038 181.842 237.869L274.617 263.805C282.255 259.386 286.262 254.795 286.262 254.795ZM209.867 321.102C122.618 297.71 133.166 186.543 147.284 133.865C153.097 112.156 159.073 96.0203 164.029 85.204C161.072 84.5953 158.623 86.1529 156.203 91.0746C150.941 101.747 144.212 119.124 137.7 143.45C123.586 196.127 113.038 307.29 200.283 330.682C241.406 341.699 273.442 324.955 297.323 298.659C274.655 319.19 245.714 330.701 209.867 321.102Z" fill="#2D4552"/>
|
||||
<path d="M161.661 262.296V239.863L99.3324 257.537C99.3324 257.537 103.938 230.777 136.444 221.556C146.302 218.762 154.713 218.781 161.661 220.123V128.11H192.869C189.471 117.61 186.184 109.526 183.423 103.909C178.856 94.612 174.174 100.775 163.545 109.665C156.059 115.919 137.139 129.261 108.668 136.933C80.1966 144.61 57.179 142.574 47.5752 140.911C33.9601 138.562 26.8387 135.572 27.5049 145.928C28.0847 155.062 30.2605 169.224 35.2445 187.928C46.0272 228.433 81.663 306.481 149.01 288.342C166.602 283.602 179.019 274.233 187.626 262.291H161.661V262.296ZM61.0848 188.484L108.946 175.876C108.946 175.876 107.551 194.288 89.6087 199.018C71.6614 203.743 61.0848 188.484 61.0848 188.484Z" fill="#E2574C"/>
|
||||
<path d="M341.786 129.174C329.345 131.355 299.498 134.072 262.612 124.185C225.716 114.304 201.236 97.0224 191.537 88.8994C177.788 77.3834 171.74 69.3802 165.788 81.4857C160.526 92.163 153.797 109.54 147.284 133.866C133.171 186.543 122.623 297.706 209.867 321.098C297.093 344.47 343.53 242.92 357.644 190.238C364.157 165.917 367.013 147.5 367.799 135.625C368.695 122.173 359.455 126.078 341.786 129.174ZM166.497 172.756C166.497 172.756 180.246 151.372 203.565 158C226.899 164.628 228.706 190.425 228.706 190.425L166.497 172.756ZM223.42 268.713C182.403 256.698 176.077 223.99 176.077 223.99L286.262 254.796C286.262 254.791 264.021 280.578 223.42 268.713ZM262.377 201.495C262.377 201.495 276.107 180.126 299.422 186.773C322.736 193.411 324.572 219.208 324.572 219.208L262.377 201.495Z" fill="#2EAD33"/>
|
||||
<path d="M139.88 246.04L99.3324 257.532C99.3324 257.532 103.737 232.44 133.607 222.496L110.647 136.33L108.663 136.933C80.1918 144.611 57.1742 142.574 47.5704 140.911C33.9554 138.563 26.834 135.572 27.5001 145.929C28.08 155.063 30.2557 169.224 35.2397 187.929C46.0225 228.433 81.6583 306.481 149.005 288.342L150.989 287.719L139.88 246.04ZM61.0848 188.485L108.946 175.876C108.946 175.876 107.551 194.288 89.6087 199.018C71.6615 203.743 61.0848 188.485 61.0848 188.485Z" fill="#D65348"/>
|
||||
<path d="M225.27 269.163L223.415 268.712C182.398 256.698 176.072 223.99 176.072 223.99L232.89 239.872L262.971 124.281L262.607 124.185C225.711 114.304 201.232 97.0224 191.532 88.8994C177.783 77.3834 171.735 69.3802 165.783 81.4857C160.526 92.163 153.797 109.54 147.284 133.866C133.171 186.543 122.623 297.706 209.867 321.097L211.655 321.5L225.27 269.163ZM166.497 172.756C166.497 172.756 180.246 151.372 203.565 158C226.899 164.628 228.706 190.425 228.706 190.425L166.497 172.756Z" fill="#1D8D22"/>
|
||||
<path d="M141.946 245.451L131.072 248.537C133.641 263.019 138.169 276.917 145.276 289.195C146.513 288.922 147.74 288.687 149 288.342C152.302 287.451 155.364 286.348 158.312 285.145C150.371 273.361 145.118 259.789 141.946 245.451ZM137.7 143.451C132.112 164.307 127.113 194.326 128.489 224.436C130.952 223.367 133.554 222.371 136.444 221.551L138.457 221.101C136.003 188.939 141.308 156.165 147.284 133.866C148.799 128.225 150.318 122.978 151.832 118.085C149.393 119.637 146.767 121.228 143.776 122.867C141.759 129.093 139.722 135.898 137.7 143.451Z" fill="#C04B41"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.9 KiB |
21
ui/playwright-report/trace/snapshot.html
Normal file
21
ui/playwright-report/trace/snapshot.html
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<body>
|
||||
<iframe src="about:blank" style="position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;border:none;"></iframe>
|
||||
<script>
|
||||
(async () => {
|
||||
if (!navigator.serviceWorker)
|
||||
throw new Error(`Service workers are not supported.\nMake sure to serve the Trace Viewer (${window.location}) via HTTPS or localhost.`);
|
||||
navigator.serviceWorker.register('sw.bundle.js');
|
||||
if (!navigator.serviceWorker.controller)
|
||||
await new Promise(f => navigator.serviceWorker.oncontrollerchange = f);
|
||||
const traceUrl = new URL(location.href).searchParams.get('trace');
|
||||
const params = new URLSearchParams();
|
||||
params.set('trace', traceUrl);
|
||||
await fetch('contexts?' + params.toString());
|
||||
document.querySelector('iframe').src = new URLSearchParams(location.search).get('r');
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
3
ui/playwright-report/trace/sw.bundle.js
Normal file
3
ui/playwright-report/trace/sw.bundle.js
Normal file
File diff suppressed because one or more lines are too long
5
ui/playwright-report/trace/uiMode.BWTwXl41.js
Normal file
5
ui/playwright-report/trace/uiMode.BWTwXl41.js
Normal file
File diff suppressed because one or more lines are too long
1
ui/playwright-report/trace/uiMode.Btcz36p_.css
Normal file
1
ui/playwright-report/trace/uiMode.Btcz36p_.css
Normal file
File diff suppressed because one or more lines are too long
17
ui/playwright-report/trace/uiMode.html
Normal file
17
ui/playwright-report/trace/uiMode.html
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" translate="no">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" href="./playwright-logo.svg" type="image/svg+xml">
|
||||
<title>Playwright Test</title>
|
||||
<script type="module" crossorigin src="./uiMode.BWTwXl41.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="./assets/defaultSettingsView-BEpdCv1S.js">
|
||||
<link rel="stylesheet" crossorigin href="./defaultSettingsView.ConWv5KN.css">
|
||||
<link rel="stylesheet" crossorigin href="./uiMode.Btcz36p_.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
</html>
|
||||
32
ui/playwright-report/trace/xtermModule.DYP7pi_n.css
Normal file
32
ui/playwright-report/trace/xtermModule.DYP7pi_n.css
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
* Copyright (c) 2014 The xterm.js authors. All rights reserved.
|
||||
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
||||
* https://github.com/chjj/term.js
|
||||
* @license MIT
|
||||
*
|
||||
* 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:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Originally forked from (with the author's permission):
|
||||
* Fabrice Bellard's javascript vt100 for jslinux:
|
||||
* http://bellard.org/jslinux/
|
||||
* Copyright (c) 2011 Fabrice Bellard
|
||||
* The original design remains. The terminal itself
|
||||
* has been extended to include xterm CSI codes, among
|
||||
* other features.
|
||||
*/.xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm .xterm-scroll-area{visibility:hidden}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{-webkit-user-select:text;user-select:text;white-space:pre}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{text-decoration:double underline}.xterm-underline-3{text-decoration:wavy underline}.xterm-underline-4{text-decoration:dotted underline}.xterm-underline-5{text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}
|
||||
Loading…
Add table
Reference in a new issue