Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a924227805 | ||
|
|
2144d3f8c0 | ||
|
|
fcd6786149 | ||
|
|
ea968ebf3c | ||
|
|
8a7b852974 | ||
|
|
c8d3e3b70c | ||
|
|
7a90a6f9f4 |
No files matched your search
@@ -1,40 +0,0 @@
|
|||||||
name: Build Check (Client & Server)
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-client:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Node
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 22
|
|
||||||
|
|
||||||
- name: Install client dependencies
|
|
||||||
working-directory: client
|
|
||||||
run: npm install
|
|
||||||
|
|
||||||
- name: Check client build
|
|
||||||
working-directory: client
|
|
||||||
run: npm run build
|
|
||||||
build-server:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Node
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 22
|
|
||||||
|
|
||||||
- name: Install server dependencies
|
|
||||||
working-directory: server
|
|
||||||
run: npm install
|
|
||||||
|
|
||||||
- name: Check server build
|
|
||||||
working-directory: server
|
|
||||||
run: npm run build
|
|
||||||
@@ -88,4 +88,3 @@ jobs:
|
|||||||
docker compose down
|
docker compose down
|
||||||
docker compose pull
|
docker compose pull
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
docker system prune -af
|
|
||||||
+1
-3
@@ -1,3 +1 @@
|
|||||||
.idea
|
.vscode
|
||||||
.vscode
|
|
||||||
.VSCodeCounter
|
|
||||||
@@ -1,993 +0,0 @@
|
|||||||
# Checkmate Codebase Architecture - Docker Monitoring Integration Guide
|
|
||||||
|
|
||||||
## 1. PROJECT STRUCTURE
|
|
||||||
|
|
||||||
### Directory Layout
|
|
||||||
```
|
|
||||||
Checkmate/
|
|
||||||
├── server/ # Backend Node.js/Express
|
|
||||||
│ ├── src/
|
|
||||||
│ │ ├── db/v1|v2/ # Database (MongoDB)
|
|
||||||
│ │ ├── service/v1|v2/ # Business logic
|
|
||||||
│ │ ├── routes/v1|v2/ # API routes
|
|
||||||
│ │ ├── controllers/v1|v2/ # HTTP request handlers
|
|
||||||
│ │ ├── middleware/v1/ # Express middleware
|
|
||||||
│ │ ├── config/ # Service initialization
|
|
||||||
│ │ ├── validation/ # Input validation
|
|
||||||
│ │ └── utils/ # Helper functions
|
|
||||||
│ └── package.json # Dependencies (Node >=20)
|
|
||||||
├── client/ # Frontend React + TypeScript
|
|
||||||
│ ├── src/
|
|
||||||
│ │ ├── Components/v1|v2/ # UI Components
|
|
||||||
│ │ ├── Pages/v1|v2/ # Page layouts
|
|
||||||
│ │ ├── Hooks/ # React hooks (data fetching)
|
|
||||||
│ │ ├── Features/ # Redux slices
|
|
||||||
│ │ └── Utils/ # Utilities & API client
|
|
||||||
│ └── package.json # React, Vite, MUI
|
|
||||||
└── docker/ # Deployment configs
|
|
||||||
```
|
|
||||||
|
|
||||||
### Technology Stack
|
|
||||||
**Backend:**
|
|
||||||
- Express 4.19 (HTTP server)
|
|
||||||
- MongoDB 8.3 (database)
|
|
||||||
- Mongoose (ODM)
|
|
||||||
- BullMQ 5.41 (job queue) - V2 only
|
|
||||||
- super-simple-scheduler 1.4 (job scheduling) - V1
|
|
||||||
- Dockerode 4.0.6 (Docker API client)
|
|
||||||
- JWT authentication
|
|
||||||
- Winston (logging)
|
|
||||||
|
|
||||||
**Frontend:**
|
|
||||||
- React 18.3 + TypeScript
|
|
||||||
- Vite (build tool)
|
|
||||||
- MUI v6 (Material-UI)
|
|
||||||
- Redux Toolkit (state management)
|
|
||||||
- Axios (HTTP client)
|
|
||||||
- React Router (navigation)
|
|
||||||
- i18next (internationalization)
|
|
||||||
|
|
||||||
**Architectures:**
|
|
||||||
- V1: Simpler, SuperSimpleQueue-based job scheduling
|
|
||||||
- V2: TypeScript-based, BullMQ, more structured (in development)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 2. MONITOR TYPES & IMPLEMENTATION
|
|
||||||
|
|
||||||
### Supported Monitor Types
|
|
||||||
Defined in `/server/src/db/v1/models/Monitor.js` line 46:
|
|
||||||
```javascript
|
|
||||||
type: {
|
|
||||||
enum: ["http", "ping", "pagespeed", "hardware", "docker", "port", "game"],
|
|
||||||
required: true
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### How Monitor Types Are Handled
|
|
||||||
|
|
||||||
#### Request Dispatch (NetworkService)
|
|
||||||
**Location:** `/server/src/service/v1/infrastructure/networkService.js` (580 lines)
|
|
||||||
|
|
||||||
Entry point: `requestStatus(monitor)` - Routes to type-specific handlers:
|
|
||||||
```javascript
|
|
||||||
async requestStatus(monitor) {
|
|
||||||
switch(monitor.type) {
|
|
||||||
case "ping": return await this.requestPing(monitor);
|
|
||||||
case "http": return await this.requestHttp(monitor);
|
|
||||||
case "pagespeed": return await this.requestPageSpeed(monitor);
|
|
||||||
case "hardware": return await this.requestHardware(monitor);
|
|
||||||
case "docker": return await this.requestDocker(monitor);
|
|
||||||
case "port": return await this.requestPort(monitor);
|
|
||||||
case "game": return await this.requestGame(monitor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### DOCKER IMPLEMENTATION (Lines 289-383)
|
|
||||||
```javascript
|
|
||||||
async requestDocker(monitor) {
|
|
||||||
// Uses Dockerode to connect to /var/run/docker.sock
|
|
||||||
const docker = new this.Docker({
|
|
||||||
socketPath: "/var/run/docker.sock",
|
|
||||||
handleError: true,
|
|
||||||
});
|
|
||||||
|
|
||||||
// Container matching (priority-based):
|
|
||||||
// 1. Exact full ID match (64-char)
|
|
||||||
// 2. Exact name match (case-insensitive)
|
|
||||||
// 3. Partial ID match (backwards compatibility)
|
|
||||||
|
|
||||||
// Returns: { status: bool, code: int, message: string, responseTime: ms }
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
**Docker Monitor Storage:**
|
|
||||||
- `monitor.url`: Container ID or name (e.g., "my-app" or "a1b2c3d4...")
|
|
||||||
- `monitor.port`: Not used for Docker
|
|
||||||
- Returns: Only status and response time (no detailed metrics)
|
|
||||||
|
|
||||||
#### HARDWARE IMPLEMENTATION (Lines 279-287)
|
|
||||||
```javascript
|
|
||||||
async requestHardware(monitor) {
|
|
||||||
return await this.requestHttp(monitor); // Delegates to HTTP!
|
|
||||||
}
|
|
||||||
```
|
|
||||||
Hardware monitors send HTTP requests to Capture API endpoint with secret authentication.
|
|
||||||
|
|
||||||
### Hardware/Docker Check Data Structure
|
|
||||||
**Location:** `/server/src/db/v1/models/Check.js` (176 lines)
|
|
||||||
|
|
||||||
Check schema includes:
|
|
||||||
```javascript
|
|
||||||
// Common fields
|
|
||||||
monitorId, teamId, type, status, responseTime, message
|
|
||||||
|
|
||||||
// Hardware/Docker specific (capture data):
|
|
||||||
cpu: {
|
|
||||||
physical_core, logical_core, frequency, temperature[],
|
|
||||||
free_percent, usage_percent
|
|
||||||
},
|
|
||||||
memory: {
|
|
||||||
total_bytes, available_bytes, used_bytes, usage_percent
|
|
||||||
},
|
|
||||||
disk: [{
|
|
||||||
read_speed_bytes, write_speed_bytes,
|
|
||||||
total_bytes, free_bytes, usage_percent
|
|
||||||
}],
|
|
||||||
host: { os, platform, kernel_version },
|
|
||||||
errors: [{ metric[], err }],
|
|
||||||
capture: { version, mode },
|
|
||||||
net: [{ name, bytes_sent, bytes_recv, ... }]
|
|
||||||
```
|
|
||||||
|
|
||||||
**TTL:** Auto-deletes after 30 days
|
|
||||||
**Indexes:** monitorId, type, status, updatedAt (optimized for queries)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 3. DATABASE SCHEMA
|
|
||||||
|
|
||||||
### Core Models
|
|
||||||
|
|
||||||
#### Monitor Model
|
|
||||||
**File:** `/server/src/db/v1/models/Monitor.js` (208 lines)
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
{
|
|
||||||
userId: ObjectId (immutable, required),
|
|
||||||
teamId: ObjectId (immutable, required),
|
|
||||||
name: String (required),
|
|
||||||
description: String,
|
|
||||||
type: String (enum: http|ping|pagespeed|hardware|docker|port|game),
|
|
||||||
url: String (required) // container name/ID for docker
|
|
||||||
port: Number,
|
|
||||||
interval: Number (ms, default: 60000),
|
|
||||||
isActive: Boolean (default: true),
|
|
||||||
status: Boolean, // Current up/down
|
|
||||||
statusWindow: [Boolean], // Last N checks
|
|
||||||
statusWindowSize: Number (default: 5),
|
|
||||||
statusWindowThreshold: Number (default: 60),
|
|
||||||
|
|
||||||
// Hardware/Docker thresholds
|
|
||||||
thresholds: {
|
|
||||||
usage_cpu: Number (0-1),
|
|
||||||
usage_memory: Number (0-1),
|
|
||||||
usage_disk: Number (0-1),
|
|
||||||
usage_temperature: Number
|
|
||||||
},
|
|
||||||
|
|
||||||
// Notification thresholds
|
|
||||||
alertThreshold: Number (default: 5),
|
|
||||||
cpuAlertThreshold, memoryAlertThreshold, diskAlertThreshold, tempAlertThreshold,
|
|
||||||
|
|
||||||
// Relationships
|
|
||||||
notifications: [ObjectId], // refs to Notification model
|
|
||||||
|
|
||||||
// Advanced
|
|
||||||
secret: String, // For Capture API auth
|
|
||||||
ignoreTlsErrors: Boolean,
|
|
||||||
jsonPath: String,
|
|
||||||
expectedValue: String,
|
|
||||||
matchMethod: String (equal|include|regex),
|
|
||||||
gameId: String,
|
|
||||||
group: String (max 50 chars),
|
|
||||||
|
|
||||||
// Computed
|
|
||||||
uptimePercentage: Number,
|
|
||||||
|
|
||||||
timestamps: true // createdAt, updatedAt
|
|
||||||
}
|
|
||||||
|
|
||||||
// Indexes
|
|
||||||
MonitorSchema.index({ teamId: 1, type: 1 });
|
|
||||||
|
|
||||||
// Pre-hooks
|
|
||||||
pre("findOneAndDelete"): Deletes checks, stats, removes from status pages
|
|
||||||
pre("deleteMany"): Cascade deletes
|
|
||||||
pre("save"): Syncs alertThresholds
|
|
||||||
pre("findOneAndUpdate"): Updates thresholds
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Check Model
|
|
||||||
**File:** `/server/src/db/v1/models/Check.js`
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
{
|
|
||||||
monitorId: ObjectId (ref: Monitor, immutable, indexed),
|
|
||||||
teamId: ObjectId (ref: Team, immutable, indexed),
|
|
||||||
type: String (enum: http|ping|pagespeed|hardware|docker|port|game, indexed),
|
|
||||||
status: Boolean (indexed),
|
|
||||||
responseTime: Number,
|
|
||||||
timings: Object,
|
|
||||||
statusCode: Number,
|
|
||||||
message: String,
|
|
||||||
|
|
||||||
// Acknowledgment
|
|
||||||
ack: Boolean (default: false),
|
|
||||||
ackAt: Date,
|
|
||||||
|
|
||||||
// Hardware fields (see above)
|
|
||||||
cpu, memory, disk[], host, errors[], capture, net[]
|
|
||||||
|
|
||||||
// PageSpeed only
|
|
||||||
accessibility, bestPractices, seo, performance, audits,
|
|
||||||
|
|
||||||
// Expiry
|
|
||||||
expiry: Date (TTL index: 30 days),
|
|
||||||
timestamps: true
|
|
||||||
}
|
|
||||||
|
|
||||||
// Indexes
|
|
||||||
CheckSchema.index({ updatedAt: 1 });
|
|
||||||
CheckSchema.index({ monitorId: 1, updatedAt: 1 });
|
|
||||||
CheckSchema.index({ monitorId: 1, updatedAt: -1 });
|
|
||||||
CheckSchema.index({ teamId: 1, updatedAt: -1 });
|
|
||||||
```
|
|
||||||
|
|
||||||
#### MonitorStats Model
|
|
||||||
**File:** `/server/src/db/v1/models/MonitorStats.js`
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
{
|
|
||||||
monitorId: ObjectId (ref: Monitor, immutable, indexed),
|
|
||||||
avgResponseTime: Number,
|
|
||||||
totalChecks: Number,
|
|
||||||
totalUpChecks: Number,
|
|
||||||
totalDownChecks: Number,
|
|
||||||
uptimePercentage: Number,
|
|
||||||
lastCheckTimestamp: Number,
|
|
||||||
lastResponseTime: Number,
|
|
||||||
timeOfLastFailure: Number,
|
|
||||||
timestamps: true
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Database Access Layer
|
|
||||||
**Location:** `/server/src/db/v1/modules/`
|
|
||||||
|
|
||||||
- `MonitorModule.js` (593 lines) - Monitor CRUD + aggregations
|
|
||||||
- `CheckModule.js` - Check recording
|
|
||||||
- `MonitorModuleQueries.js` - MongoDB aggregation pipelines
|
|
||||||
|
|
||||||
**Key Methods:**
|
|
||||||
```javascript
|
|
||||||
// Creation
|
|
||||||
Monitor.createMonitor({ body, teamId, userId })
|
|
||||||
Monitor.createBulkMonitors(monitors)
|
|
||||||
|
|
||||||
// Retrieval
|
|
||||||
Monitor.getMonitorById(id)
|
|
||||||
Monitor.getMonitorsByTeamId()
|
|
||||||
Monitor.getMonitorStatsById()
|
|
||||||
Monitor.getHardwareDetailsById()
|
|
||||||
|
|
||||||
// Updates
|
|
||||||
Monitor.updateMonitor(id, updateData)
|
|
||||||
|
|
||||||
// Deletions
|
|
||||||
Monitor.deleteMonitor(id)
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 4. API PATTERNS
|
|
||||||
|
|
||||||
### REST Endpoint Structure
|
|
||||||
**Base:** `/api/v1/`
|
|
||||||
|
|
||||||
#### Monitor Routes
|
|
||||||
**File:** `/server/src/routes/v1/monitorRoute.js`
|
|
||||||
|
|
||||||
```
|
|
||||||
GET /monitors getAllMonitors
|
|
||||||
POST /monitors createMonitor
|
|
||||||
DELETE /monitors deleteAllMonitors (superadmin)
|
|
||||||
|
|
||||||
GET /monitors/:monitorId getMonitorById
|
|
||||||
PUT /monitors/:monitorId editMonitor (admin)
|
|
||||||
DELETE /monitors/:monitorId deleteMonitor (admin)
|
|
||||||
|
|
||||||
GET /monitors/team getMonitorsByTeamId
|
|
||||||
GET /monitors/team/with-checks getMonitorsWithChecksByTeamId
|
|
||||||
GET /monitors/team/summary getMonitorsSummaryByTeamId
|
|
||||||
GET /monitors/team/groups getGroupsByTeamId
|
|
||||||
|
|
||||||
GET /monitors/stats/:monitorId getMonitorStatsById
|
|
||||||
GET /monitors/uptime/details/:monitorId getUptimeDetailsById
|
|
||||||
GET /monitors/hardware/details/:monitorId getHardwareDetailsById
|
|
||||||
|
|
||||||
POST /monitors/pause/:monitorId pauseMonitor (admin)
|
|
||||||
POST /monitors/demo addDemoMonitors
|
|
||||||
POST /monitors/bulk createBulkMonitors (CSV upload)
|
|
||||||
POST /monitors/test-email sendTestEmail
|
|
||||||
|
|
||||||
GET /monitors/games getAllGames
|
|
||||||
GET /monitors/certificate/:monitorId fetchCertificate
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Check Routes
|
|
||||||
**File:** `/server/src/routes/v1/checkRoute.js`
|
|
||||||
|
|
||||||
```
|
|
||||||
GET /checks/:monitorId getChecksByMonitorId
|
|
||||||
GET /checks/team/:teamId getChecksByTeamId
|
|
||||||
GET /checks/:monitorId/:checkId getCheckById
|
|
||||||
PUT /checks/:checkId updateCheck (ack)
|
|
||||||
```
|
|
||||||
|
|
||||||
### Request/Response Pattern
|
|
||||||
|
|
||||||
**Create Monitor Request:**
|
|
||||||
```javascript
|
|
||||||
POST /api/v1/monitors
|
|
||||||
Authorization: Bearer <JWT>
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
name: "My Docker Container",
|
|
||||||
description: "Monitors app container",
|
|
||||||
type: "docker",
|
|
||||||
url: "my-app-container", // Container name
|
|
||||||
interval: 60000, // 1 minute
|
|
||||||
isActive: true,
|
|
||||||
secret: "api-key-for-capture", // If using hardware monitoring
|
|
||||||
notifications: ["notif-id-1"],
|
|
||||||
thresholds: {
|
|
||||||
usage_cpu: 0.8, // 80%
|
|
||||||
usage_memory: 0.9, // 90%
|
|
||||||
usage_disk: 0.95
|
|
||||||
},
|
|
||||||
alertThreshold: 5, // Consecutive failures
|
|
||||||
statusWindowSize: 5, // Last 5 checks
|
|
||||||
statusWindowThreshold: 60 // % threshold
|
|
||||||
}
|
|
||||||
|
|
||||||
Response 200:
|
|
||||||
{
|
|
||||||
data: {
|
|
||||||
_id: "monitor-id",
|
|
||||||
name: "My Docker Container",
|
|
||||||
type: "docker",
|
|
||||||
status: true,
|
|
||||||
interval: 60000,
|
|
||||||
...
|
|
||||||
},
|
|
||||||
msg: "Monitor created successfully"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
**Edit Monitor Request:**
|
|
||||||
```javascript
|
|
||||||
PUT /api/v1/monitors/:monitorId
|
|
||||||
|
|
||||||
{
|
|
||||||
name: "Updated Name",
|
|
||||||
interval: 120000,
|
|
||||||
thresholds: { usage_cpu: 0.85 },
|
|
||||||
// Partial updates allowed
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Authentication & Authorization
|
|
||||||
|
|
||||||
**JWT Middleware:** `/server/src/middleware/v1/verifyJWT.js`
|
|
||||||
- Header: `Authorization: Bearer <token>`
|
|
||||||
- Validates signature using `jwtSecret` from AppSettings
|
|
||||||
- Extracts user info: `req.user = { userId, teamId, role, ... }`
|
|
||||||
|
|
||||||
**Role-Based Access:**
|
|
||||||
```javascript
|
|
||||||
// isAllowed middleware checks req.user.role
|
|
||||||
router.post("/monitors", isAllowed(["admin", "superadmin"]), createMonitor);
|
|
||||||
router.delete("/monitors/:monitorId", isAllowed(["admin", "superadmin"]), deleteMonitor);
|
|
||||||
```
|
|
||||||
|
|
||||||
### Validation
|
|
||||||
**File:** `/server/src/validation/joi.js`
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
const createMonitorBodyValidation = joi.object({
|
|
||||||
name: joi.string().required(),
|
|
||||||
description: joi.string().required(),
|
|
||||||
type: joi.string().required(),
|
|
||||||
url: joi.string().required(),
|
|
||||||
interval: joi.number(),
|
|
||||||
port: joi.number(),
|
|
||||||
thresholds: joi.object().keys({
|
|
||||||
usage_cpu: joi.number(),
|
|
||||||
usage_memory: joi.number(),
|
|
||||||
usage_disk: joi.number(),
|
|
||||||
usage_temperature: joi.number(),
|
|
||||||
}),
|
|
||||||
notifications: joi.array().items(joi.string()),
|
|
||||||
secret: joi.string(),
|
|
||||||
// ... more fields
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 5. POLLING/JOBS IMPLEMENTATION
|
|
||||||
|
|
||||||
### Job Queue Architecture
|
|
||||||
|
|
||||||
#### V1: SuperSimpleScheduler (Production)
|
|
||||||
**Files:**
|
|
||||||
- `/server/src/service/v1/infrastructure/SuperSimpleQueue/SuperSimpleQueue.js`
|
|
||||||
- `/server/src/service/v1/infrastructure/SuperSimpleQueue/SuperSimpleQueueHelper.js`
|
|
||||||
|
|
||||||
**Job Lifecycle:**
|
|
||||||
|
|
||||||
1. **Initialization** (on server startup):
|
|
||||||
```javascript
|
|
||||||
// Load all monitors from DB
|
|
||||||
const monitors = await db.monitorModule.getAllMonitors();
|
|
||||||
for (const monitor of monitors) {
|
|
||||||
// Add job with random offset (0-100ms)
|
|
||||||
this.addJob(monitor._id, monitor);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Register job template
|
|
||||||
scheduler.addTemplate("monitor-job", this.helper.getMonitorJob());
|
|
||||||
```
|
|
||||||
|
|
||||||
2. **Job Template** (executed per interval):
|
|
||||||
```javascript
|
|
||||||
getMonitorJob = () => {
|
|
||||||
return async (monitor) => {
|
|
||||||
// Check maintenance window
|
|
||||||
if (await this.isInMaintenanceWindow(monitorId, teamId)) {
|
|
||||||
return; // Skip
|
|
||||||
}
|
|
||||||
|
|
||||||
// Execute monitor check
|
|
||||||
const networkResponse = await this.networkService.requestStatus(monitor);
|
|
||||||
|
|
||||||
// Update monitor status
|
|
||||||
const { monitor: updated, statusChanged } =
|
|
||||||
await this.statusService.updateStatus(networkResponse);
|
|
||||||
|
|
||||||
// Send notifications if status changed
|
|
||||||
if (statusChanged) {
|
|
||||||
await this.notificationService.handleNotifications({
|
|
||||||
...networkResponse,
|
|
||||||
monitor: updated,
|
|
||||||
prevStatus,
|
|
||||||
statusChanged
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
3. **Job Control:**
|
|
||||||
```javascript
|
|
||||||
// Add job
|
|
||||||
addJob(monitorId, monitor) {
|
|
||||||
scheduler.addJob({
|
|
||||||
id: monitorId.toString(),
|
|
||||||
template: "monitor-job",
|
|
||||||
repeat: monitor.interval, // Milliseconds
|
|
||||||
active: monitor.isActive,
|
|
||||||
data: monitor.toObject()
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Pause/Resume
|
|
||||||
pauseJob(monitor) { scheduler.pauseJob(monitor._id); }
|
|
||||||
resumeJob(monitor) { scheduler.resumeJob(monitor._id); }
|
|
||||||
|
|
||||||
// Update interval
|
|
||||||
updateJob(monitor) {
|
|
||||||
scheduler.updateJob(monitor._id, {
|
|
||||||
repeat: monitor.interval,
|
|
||||||
data: monitor.toObject()
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete
|
|
||||||
deleteJob(monitor) { scheduler.removeJob(monitor._id); }
|
|
||||||
```
|
|
||||||
|
|
||||||
#### V2: BullMQ (TypeScript, Planned)
|
|
||||||
**Files:**
|
|
||||||
- `/server/src/service/v2/infrastructure/JobQueue.ts`
|
|
||||||
- `/server/src/service/v2/infrastructure/JobGenerator.ts`
|
|
||||||
|
|
||||||
**Key Differences:**
|
|
||||||
- Uses Redis backing store
|
|
||||||
- TypeScript interfaces (type safety)
|
|
||||||
- More robust queue management
|
|
||||||
- Cleanup jobs for orphaned checks
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
// Cleanup job runs every 24 hours
|
|
||||||
scheduler.addJob({
|
|
||||||
id: "cleanup-orphaned-checks",
|
|
||||||
template: "cleanup-job",
|
|
||||||
repeat: 24 * 60 * 60 * 1000,
|
|
||||||
active: true
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
### Monitor Execution Flow
|
|
||||||
|
|
||||||
```
|
|
||||||
Monitor Created/Updated
|
|
||||||
↓
|
|
||||||
MonitorService.createMonitor()
|
|
||||||
↓
|
|
||||||
jobQueue.addJob(monitor)
|
|
||||||
↓
|
|
||||||
Job scheduled at interval
|
|
||||||
↓
|
|
||||||
[Job Execution]
|
|
||||||
├─ Check maintenance window
|
|
||||||
├─ NetworkService.requestStatus(monitor)
|
|
||||||
│ └─ Routes to type handler (requestDocker, requestHttp, etc)
|
|
||||||
├─ Create Check record (database)
|
|
||||||
├─ StatusService.updateMonitorStatus()
|
|
||||||
│ └─ Updates Monitor.status field
|
|
||||||
├─ MonitorStatsService.updateStats()
|
|
||||||
├─ If status changed → NotificationService.handleNotifications()
|
|
||||||
└─ Job completes / reschedules for next interval
|
|
||||||
```
|
|
||||||
|
|
||||||
### Status Update Logic
|
|
||||||
**Location:** `/server/src/service/v1/infrastructure/statusService.js`
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
async updateStatus(networkResponse) {
|
|
||||||
// networkResponse = { monitorId, type, status, code, message, responseTime }
|
|
||||||
|
|
||||||
// 1. Create Check record
|
|
||||||
const check = await Check.create({
|
|
||||||
monitorId, teamId, type, status,
|
|
||||||
responseTime, statusCode: code, message
|
|
||||||
});
|
|
||||||
|
|
||||||
// 2. Get previous status
|
|
||||||
const prevStatus = monitor.status;
|
|
||||||
|
|
||||||
// 3. Apply statusWindow logic (sliding window of checks)
|
|
||||||
monitor.statusWindow.push(status);
|
|
||||||
if (monitor.statusWindow.length > monitor.statusWindowSize) {
|
|
||||||
monitor.statusWindow.shift();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 4. Determine if DOWN (majority of window is false)
|
|
||||||
const downCount = monitor.statusWindow.filter(s => !s).length;
|
|
||||||
const isDown = (downCount / monitor.statusWindowSize) >
|
|
||||||
(monitor.statusWindowThreshold / 100);
|
|
||||||
|
|
||||||
monitor.status = isDown ? false : true;
|
|
||||||
|
|
||||||
// 5. Return status change info
|
|
||||||
return {
|
|
||||||
monitor: await monitor.save(),
|
|
||||||
statusChanged: prevStatus !== monitor.status,
|
|
||||||
prevStatus
|
|
||||||
};
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 6. FRONTEND COMPONENTS
|
|
||||||
|
|
||||||
### Monitor Management Pages
|
|
||||||
|
|
||||||
#### Infrastructure Monitors (Hardware/Docker)
|
|
||||||
**Location:** `/client/src/Pages/v1/Infrastructure/`
|
|
||||||
|
|
||||||
```
|
|
||||||
Infrastructure/
|
|
||||||
├── Create/
|
|
||||||
│ ├── index.jsx (Main form - 10K lines)
|
|
||||||
│ ├── Components/
|
|
||||||
│ │ ├── MonitorStatusHeader.jsx
|
|
||||||
│ │ ├── MonitorActionButtons.jsx
|
|
||||||
│ │ └── CustomAlertsSection.jsx
|
|
||||||
│ └── hooks/
|
|
||||||
│ ├── useInfrastructureMonitorForm.jsx
|
|
||||||
│ ├── useValidateInfrastructureForm.jsx
|
|
||||||
│ └── useInfrastructureSubmit.jsx
|
|
||||||
├── Details/
|
|
||||||
├── Monitors/
|
|
||||||
│ └── Components/
|
|
||||||
│ └── MonitorsTable.jsx
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Form Structure (useInfrastructureMonitorForm hook)
|
|
||||||
```javascript
|
|
||||||
const [infrastructureMonitor, setInfrastructureMonitor] = useState({
|
|
||||||
url: "", // Container name/IP
|
|
||||||
name: "", // Display name
|
|
||||||
notifications: [], // Notification IDs
|
|
||||||
interval: 0.25, // Minutes (0.25 = 15s, 1 = 60s)
|
|
||||||
|
|
||||||
// Threshold toggles
|
|
||||||
cpu: false,
|
|
||||||
usage_cpu: "", // Percentage
|
|
||||||
memory: false,
|
|
||||||
usage_memory: "",
|
|
||||||
disk: false,
|
|
||||||
usage_disk: "",
|
|
||||||
temperature: false,
|
|
||||||
usage_temperature: "",
|
|
||||||
|
|
||||||
secret: "", // Capture API secret
|
|
||||||
statusWindowSize: 5,
|
|
||||||
statusWindowThreshold: 60
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
**Frequency Options:**
|
|
||||||
```javascript
|
|
||||||
[
|
|
||||||
{ _id: 0.25, name: "15 Seconds" },
|
|
||||||
{ _id: 0.5, name: "30 Seconds" },
|
|
||||||
{ _id: 1, name: "1 Minute" },
|
|
||||||
{ _id: 2, name: "2 Minutes" },
|
|
||||||
{ _id: 5, name: "5 Minutes" },
|
|
||||||
{ _id: 10, name: "10 Minutes" }
|
|
||||||
]
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Form Submission (useInfrastructureSubmit hook)
|
|
||||||
```javascript
|
|
||||||
// Converts frontend form → backend model
|
|
||||||
const finalForm = {
|
|
||||||
url: `http${https ? "s" : ""}://` + infrastructureMonitor.url,
|
|
||||||
name: infrastructureMonitor.name || infrastructureMonitor.url,
|
|
||||||
interval: infrastructureMonitor.interval * 60000, // Convert to ms
|
|
||||||
type: "hardware", // Always "hardware" for infrastructure monitors
|
|
||||||
|
|
||||||
// Thresholds (convert % to decimal 0-1)
|
|
||||||
thresholds: {
|
|
||||||
...(cpu ? { usage_cpu: usage_cpu / 100 } : {}),
|
|
||||||
...(memory ? { usage_memory: usage_memory / 100 } : {}),
|
|
||||||
...(disk ? { usage_disk: usage_disk / 100 } : {}),
|
|
||||||
...(temperature ? { usage_temperature: usage_temperature / 100 } : {})
|
|
||||||
},
|
|
||||||
|
|
||||||
notifications: infrastructureMonitor.notifications
|
|
||||||
};
|
|
||||||
|
|
||||||
// API call
|
|
||||||
isCreate ?
|
|
||||||
await createMonitor({ monitor: finalForm, redirect: "/infrastructure" }) :
|
|
||||||
await updateMonitor({ monitor: finalForm, redirect: "/infrastructure" });
|
|
||||||
```
|
|
||||||
|
|
||||||
### Monitor Display Components
|
|
||||||
|
|
||||||
#### Monitor Status Component
|
|
||||||
**Location:** `/client/src/Components/v2/Monitors/MonitorStatus.tsx`
|
|
||||||
|
|
||||||
Displays:
|
|
||||||
- Status indicator (up/down)
|
|
||||||
- Response time
|
|
||||||
- Last check time
|
|
||||||
- Incident badges
|
|
||||||
|
|
||||||
#### Monitoring Hooks
|
|
||||||
**Location:** `/client/src/Hooks/v1/monitorHooks.js`
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
// Fetch monitors
|
|
||||||
useFetchMonitorsByTeamId({ types, limit, page, ... })
|
|
||||||
useFetchMonitorsWithSummary({ types, monitorUpdateTrigger })
|
|
||||||
useFetchMonitorsWithChecks({ types, limit, ... })
|
|
||||||
|
|
||||||
// Fetch individual monitor
|
|
||||||
useFetchHardwareMonitorById({ monitorId, updateTrigger })
|
|
||||||
useFetchStatsByMonitorId({ monitorId, dateRange, ... })
|
|
||||||
|
|
||||||
// Manage monitors
|
|
||||||
useCreateMonitor() // POST /monitors
|
|
||||||
useUpdateMonitor() // PUT /monitors/:id
|
|
||||||
useDeleteMonitor() // DELETE /monitors/:id
|
|
||||||
usePauseMonitor() // POST /monitors/pause/:id
|
|
||||||
```
|
|
||||||
|
|
||||||
### Network Service (API Client)
|
|
||||||
**Location:** `/client/src/Utils/NetworkService.js` (1157 lines)
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
// Constructor
|
|
||||||
constructor(store, dispatch, navigate) {
|
|
||||||
// Axios instance with:
|
|
||||||
// - Bearer token injection
|
|
||||||
// - Language header
|
|
||||||
// - 401 redirect to login
|
|
||||||
// - Network error handling
|
|
||||||
}
|
|
||||||
|
|
||||||
// Monitor endpoints
|
|
||||||
async createMonitor(config) {
|
|
||||||
return this.axiosInstance.post(`/monitors`, config.monitor);
|
|
||||||
}
|
|
||||||
|
|
||||||
async updateMonitor(config) {
|
|
||||||
return this.axiosInstance.put(`/monitors/${config.monitorId}`, config.monitor);
|
|
||||||
}
|
|
||||||
|
|
||||||
async getMonitorsByTeamId(config) {
|
|
||||||
// Query params: limit, types[], page, rowsPerPage, filter, field, order
|
|
||||||
return this.axiosInstance.get(`/monitors/team?...`);
|
|
||||||
}
|
|
||||||
|
|
||||||
async getHardwareDetailsByMonitorId(config) {
|
|
||||||
return this.axiosInstance.get(`/monitors/hardware/details/${config.monitorId}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
async getStatsByMonitorId(config) {
|
|
||||||
// Query params: sortOrder, limit, dateRange, numToDisplay, normalize
|
|
||||||
return this.axiosInstance.get(`/monitors/stats/${config.monitorId}?...`);
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 7. AUTHENTICATION & API KEYS
|
|
||||||
|
|
||||||
### User Authentication (JWT)
|
|
||||||
|
|
||||||
**Registration/Login:**
|
|
||||||
```javascript
|
|
||||||
// POST /auth/register
|
|
||||||
{
|
|
||||||
firstName: "John",
|
|
||||||
lastName: "Doe",
|
|
||||||
email: "john@example.com",
|
|
||||||
password: "SecurePass123!"
|
|
||||||
}
|
|
||||||
|
|
||||||
Response:
|
|
||||||
{
|
|
||||||
user: { _id, email, role, teamId, ... },
|
|
||||||
token: "eyJhbGciOiJIUzI1NiIs..." // JWT
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
**Token Storage:** Redux store (`Features/Auth/authSlice`)
|
|
||||||
|
|
||||||
**Token Injection:** Automatic by NetworkService
|
|
||||||
```javascript
|
|
||||||
config.headers.Authorization = `Bearer ${authToken}`;
|
|
||||||
```
|
|
||||||
|
|
||||||
### Monitor-Specific Authentication
|
|
||||||
|
|
||||||
#### For Hardware/Docker Monitors via Capture API
|
|
||||||
Monitors can have a `secret` field for authenticating requests to the Capture API:
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
{
|
|
||||||
type: "hardware",
|
|
||||||
url: "http://192.168.1.100:3000", // Capture endpoint
|
|
||||||
secret: "api-key-12345", // Passed to Capture API
|
|
||||||
thresholds: { ... }
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
**Implementation:** The secret is stored in the Monitor model and could be:
|
|
||||||
1. Sent as HTTP header: `Authorization: Bearer <secret>`
|
|
||||||
2. Sent as query param: `?secret=<secret>`
|
|
||||||
3. Sent in request body for POST requests
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 8. CONFIGURATION & USER SETTINGS
|
|
||||||
|
|
||||||
### Global Settings
|
|
||||||
**Model:** `/server/src/db/v1/models/AppSettings.js`
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
{
|
|
||||||
jwtSecret: String, // For signing JWTs
|
|
||||||
sslCertificate: String, // SSL cert content
|
|
||||||
smtpConfig: Object, // Email settings
|
|
||||||
globalThresholds: { // Default thresholds
|
|
||||||
cpu: Number,
|
|
||||||
memory: Number,
|
|
||||||
disk: Number,
|
|
||||||
temperature: Number
|
|
||||||
},
|
|
||||||
siteTitle: String,
|
|
||||||
defaultLanguage: String,
|
|
||||||
maintenanceMode: Boolean
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
**Fetching Settings:**
|
|
||||||
```javascript
|
|
||||||
// Frontend
|
|
||||||
useFetchGlobalSettings()
|
|
||||||
→ NetworkService.getGlobalSettings()
|
|
||||||
→ GET /settings
|
|
||||||
|
|
||||||
// Backend
|
|
||||||
SettingsService.loadSettings()
|
|
||||||
→ Loads from AppSettings collection
|
|
||||||
```
|
|
||||||
|
|
||||||
### Monitor Configuration UI Flow
|
|
||||||
|
|
||||||
1. **Create Page:** `/infrastructure/create`
|
|
||||||
- Fetch global settings for default thresholds
|
|
||||||
- Form includes:
|
|
||||||
- Monitor name
|
|
||||||
- URL/Container name
|
|
||||||
- Interval (dropdown)
|
|
||||||
- CPU/Memory/Disk/Temp thresholds (checkboxes + inputs)
|
|
||||||
- Notification channels (multi-select)
|
|
||||||
- Secret (if using Capture API)
|
|
||||||
|
|
||||||
2. **Edit Page:** `/infrastructure/configure/:monitorId`
|
|
||||||
- Load existing monitor data
|
|
||||||
- Update form fields
|
|
||||||
- Save changes with PUT request
|
|
||||||
|
|
||||||
3. **Details Page:** `/infrastructure/:monitorId`
|
|
||||||
- Display monitor stats
|
|
||||||
- Show uptime graph
|
|
||||||
- List recent checks
|
|
||||||
- Status history
|
|
||||||
|
|
||||||
### Team-Based Isolation
|
|
||||||
**Access Control:**
|
|
||||||
```javascript
|
|
||||||
// All queries filtered by teamId
|
|
||||||
await Monitor.find({ teamId: req.user.teamId });
|
|
||||||
|
|
||||||
// verifyTeamAccess middleware
|
|
||||||
await verifyTeamAccess(req.user.teamId, req.params.monitorId);
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## KEY PATTERNS FOR DOCKER MONITORING INTEGRATION
|
|
||||||
|
|
||||||
### 1. Adding Docker Monitor Type
|
|
||||||
Already supported! Located in:
|
|
||||||
- `Monitor.schema` type enum ✓
|
|
||||||
- `NetworkService.requestDocker()` ✓
|
|
||||||
- `Check.schema` with type ✓
|
|
||||||
|
|
||||||
### 2. Docker-Specific Data Collection
|
|
||||||
Currently: Only status + response time
|
|
||||||
**To Add Detailed Metrics:**
|
|
||||||
- Extend `Check.schema` with Docker stats fields
|
|
||||||
- Modify `NetworkService.requestDocker()` to call `container.stats()`
|
|
||||||
- Stream stats to `Check.docker` field
|
|
||||||
|
|
||||||
### 3. Capture API Integration (Hardware Monitoring)
|
|
||||||
**Flow:**
|
|
||||||
```
|
|
||||||
Monitor with type="hardware" and url="http://capture-endpoint"
|
|
||||||
↓
|
|
||||||
NetworkService.requestHardware()
|
|
||||||
↓ (delegates to)
|
|
||||||
NetworkService.requestHttp()
|
|
||||||
↓
|
|
||||||
Expects JSON response: { cpu, memory, disk, net, ... }
|
|
||||||
↓
|
|
||||||
Check record stores full payload in hardware fields
|
|
||||||
```
|
|
||||||
|
|
||||||
### 4. Database Queries
|
|
||||||
**Get hardware checks:**
|
|
||||||
```javascript
|
|
||||||
Check.find({
|
|
||||||
monitorId: id,
|
|
||||||
type: "hardware",
|
|
||||||
createdAt: { $gte: startDate, $lte: endDate }
|
|
||||||
})
|
|
||||||
.sort({ createdAt: -1 })
|
|
||||||
.limit(100)
|
|
||||||
```
|
|
||||||
|
|
||||||
### 5. UI Display
|
|
||||||
- Stats dashboard: `/infrastructure/:monitorId`
|
|
||||||
- Uptime details: `/monitor/uptime/details/:monitorId`
|
|
||||||
- Hardware details: `/monitor/hardware/details/:monitorId`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## SERVICE ARCHITECTURE
|
|
||||||
|
|
||||||
### Service Registry Pattern
|
|
||||||
**Location:** `/server/src/service/v1/system/serviceRegistry.js`
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
// Singleton pattern
|
|
||||||
ServiceRegistry.set(serviceName, serviceInstance);
|
|
||||||
const service = ServiceRegistry.get(serviceName);
|
|
||||||
```
|
|
||||||
|
|
||||||
### Service Dependencies
|
|
||||||
**Initialization:** `/server/src/config/services.js`
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
// Infrastructure services
|
|
||||||
new NetworkService({
|
|
||||||
axios, got, https, jmespath, GameDig, ping,
|
|
||||||
logger, http, Docker, // ← Docker client injected
|
|
||||||
net, stringService, settingsService
|
|
||||||
})
|
|
||||||
|
|
||||||
// Business services
|
|
||||||
new MonitorService({
|
|
||||||
db, settingsService, jobQueue,
|
|
||||||
stringService, emailService, logger
|
|
||||||
})
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## KEY FILES SUMMARY
|
|
||||||
|
|
||||||
| Component | File | Lines | Purpose |
|
|
||||||
|-----------|------|-------|---------|
|
|
||||||
| Monitor Model | `server/src/db/v1/models/Monitor.js` | 209 | Schema, hooks |
|
|
||||||
| Check Model | `server/src/db/v1/models/Check.js` | 177 | Check records, TTL |
|
|
||||||
| NetworkService | `server/src/service/v1/infrastructure/networkService.js` | 580 | Type handlers |
|
|
||||||
| MonitorService | `server/src/service/v1/business/monitorService.js` | 277 | CRUD, validation |
|
|
||||||
| MonitorModule | `server/src/db/v1/modules/monitorModule.js` | 593 | DB queries |
|
|
||||||
| JobQueue | `server/src/service/v1/infrastructure/SuperSimpleQueue/SuperSimpleQueue.js` | 177 | Job scheduling |
|
|
||||||
| MonitorController | `server/src/controllers/v1/monitorController.js` | 475 | HTTP handlers |
|
|
||||||
| MonitorRoute | `server/src/routes/v1/monitorRoute.js` | 61 | Endpoint definitions |
|
|
||||||
| Frontend Hooks | `client/src/Hooks/v1/monitorHooks.js` | 500+ | Data fetching |
|
|
||||||
| NetworkService (FE) | `client/src/Utils/NetworkService.js` | 1157 | API client |
|
|
||||||
| Form Hook | `client/src/Pages/v1/Infrastructure/Create/hooks/useInfrastructureMonitorForm.jsx` | 97 | Form state |
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## DEPLOYMENT & DOCKER INTEGRATION
|
|
||||||
|
|
||||||
### Docker-Compose Setup
|
|
||||||
**Files:** `/docker/dev/docker-compose.yaml`, `/docker/prod/docker-compose.yaml`
|
|
||||||
|
|
||||||
**Volumes for Docker Monitoring:**
|
|
||||||
```yaml
|
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock # Required for Dockerode
|
|
||||||
```
|
|
||||||
|
|
||||||
### Environment Variables
|
|
||||||
**Backend (.env):**
|
|
||||||
```
|
|
||||||
MONGODB_URI=mongodb://mongo:27017/checkmate
|
|
||||||
JWT_SECRET=your-secret-key
|
|
||||||
NODE_ENV=production|development
|
|
||||||
PORT=5000
|
|
||||||
```
|
|
||||||
|
|
||||||
**Frontend (.env):**
|
|
||||||
```
|
|
||||||
VITE_APP_API_BASE_URL=http://localhost:5000/api/v1
|
|
||||||
```
|
|
||||||
|
|
||||||
+12
-166
@@ -6,7 +6,7 @@ We truly appreciate all kinds of contributions — code, ideas, translations or
|
|||||||
|
|
||||||
Before you start, please take a moment to read the relevant section. It helps us review and accept contributions faster, and makes the whole process smoother for everyone. 💚
|
Before you start, please take a moment to read the relevant section. It helps us review and accept contributions faster, and makes the whole process smoother for everyone. 💚
|
||||||
|
|
||||||
PS: **We work closely with contributors on our [Discord channel](https://discord.com/invite/NAb6H3UTjK)**. You'll find community members, core maintainers, and first-timers helping each other out.
|
PS: **We work closely with contributors on our [Discord channel](https://discord.com/invite/NAb6H3UTjK)**. You’ll find community members, core maintainers, and first-timers helping each other out.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -32,12 +32,12 @@ PS: **We work closely with contributors on our [Discord channel](https://discord
|
|||||||
|
|
||||||
### Get help or ask a question?
|
### Get help or ask a question?
|
||||||
|
|
||||||
Ask anything in our [Discord server](https://discord.com/invite/NAb6H3UTjK) — we're friendly and happy to help. [Our core contributors](https://github.com/bluewave-labs/checkmate?tab=readme-ov-file#-contributing) are active and ready to support you. You can also use [GitHub Discussions](https://github.com/bluewave-labs/Checkmate/discussions) section to ask your questions.
|
Ask anything in our [Discord server](https://discord.com/invite/NAb6H3UTjK) — we’re friendly and happy to help. [Our core contributors](https://github.com/bluewave-labs/checkmate?tab=readme-ov-file#-contributing) are active and ready to support you. You can also use [GitHub Discussions](https://github.com/bluewave-labs/Checkmate/discussions) section to ask your questions.
|
||||||
|
|
||||||
### Report a bug?
|
### Report a bug?
|
||||||
|
|
||||||
1. Search [existing issues](https://github.com/bluewave-labs/checkmate/issues).
|
1. Search [existing issues](https://github.com/bluewave-labs/checkmate/issues).
|
||||||
2. If it's not listed, open a **new issue**.
|
2. If it’s not listed, open a **new issue**.
|
||||||
3. Include as much detail as possible: what happened, what you expected, and steps to reproduce. Logs and screenshots help.
|
3. Include as much detail as possible: what happened, what you expected, and steps to reproduce. Logs and screenshots help.
|
||||||
|
|
||||||
### Suggest a new feature?
|
### Suggest a new feature?
|
||||||
@@ -48,175 +48,19 @@ Ask anything in our [Discord server](https://discord.com/invite/NAb6H3UTjK) —
|
|||||||
|
|
||||||
### Set up Checkmate locally?
|
### Set up Checkmate locally?
|
||||||
|
|
||||||
#### Prerequisites
|
Frontend & backend:
|
||||||
|
|
||||||
- Node.js (with npm)
|
|
||||||
- Docker
|
|
||||||
- Git
|
|
||||||
|
|
||||||
#### Step 1: Clone the Repository
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git clone https://github.com/bluewave-labs/Checkmate.git
|
|
||||||
cd Checkmate
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Step 2: Set Up Docker Containers (MongoDB)
|
|
||||||
|
|
||||||
Navigate to the Docker dev directory:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cd docker/dev
|
|
||||||
```
|
|
||||||
|
|
||||||
Build the Docker images:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
./build_images.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
Run MongoDB container:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker run -d -p 27017:27017 -v uptime_mongo_data:/data/db --name uptime_database_mongo mongo:6.0
|
|
||||||
```
|
|
||||||
|
|
||||||
Navigate back to the root directory:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cd ../..
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Step 3: Set Up the Backend (Server)
|
|
||||||
|
|
||||||
Navigate to the server directory:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cd server
|
|
||||||
```
|
|
||||||
|
|
||||||
Install dependencies:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm install
|
npm install
|
||||||
```
|
|
||||||
|
|
||||||
Create a `.env` file in the `server` directory with the following minimum required configuration:
|
|
||||||
|
|
||||||
```env
|
|
||||||
CLIENT_HOST="http://localhost:5173"
|
|
||||||
JWT_SECRET="my_secret_key_change_this"
|
|
||||||
DB_CONNECTION_STRING="mongodb://localhost:27017/uptime_db"
|
|
||||||
TOKEN_TTL="99d"
|
|
||||||
ORIGIN="localhost"
|
|
||||||
LOG_LEVEL="debug"
|
|
||||||
```
|
|
||||||
|
|
||||||
**Environment Variables Explained:**
|
|
||||||
|
|
||||||
- `CLIENT_HOST`: Frontend URL (default: http://localhost:5173)
|
|
||||||
- `JWT_SECRET`: Secret key for JWT tokens (change to something secure)
|
|
||||||
- `DB_CONNECTION_STRING`: MongoDB connection URL
|
|
||||||
- `ORIGIN`: Origin for CORS purposes
|
|
||||||
- `TOKEN_TTL`: Token time to live (in vercel/ms format)
|
|
||||||
- `LOG_LEVEL`: Debug level (debug, info, warn, error)
|
|
||||||
|
|
||||||
Start the backend server:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm run dev
|
npm run dev
|
||||||
```
|
```
|
||||||
|
|
||||||
The server will run at `http://localhost:52345`.
|
By default, the frontend expects the backend on `http://localhost:3001`. Update configs if needed.
|
||||||
|
|
||||||
#### Step 4: Set Up the Frontend (Client)
|
|
||||||
|
|
||||||
Open a new terminal window and navigate to the client directory from the root:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cd client
|
|
||||||
```
|
|
||||||
|
|
||||||
Install dependencies:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm install
|
|
||||||
```
|
|
||||||
|
|
||||||
Create a `.env` file in the `client` directory:
|
|
||||||
|
|
||||||
```env
|
|
||||||
VITE_APP_API_BASE_URL="http://localhost:52345/api/v1"
|
|
||||||
VITE_APP_LOG_LEVEL="debug"
|
|
||||||
```
|
|
||||||
|
|
||||||
**Environment Variables Explained:**
|
|
||||||
|
|
||||||
- `VITE_APP_API_BASE_URL`: Backend API URL
|
|
||||||
- `VITE_APP_LOG_LEVEL`: Log level (none, error, warn, debug, info)
|
|
||||||
|
|
||||||
Start the frontend:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm run dev
|
|
||||||
```
|
|
||||||
|
|
||||||
The client will run at `http://localhost:5173`.
|
|
||||||
|
|
||||||
#### Step 5: Access the Application
|
|
||||||
|
|
||||||
Open your browser and navigate to:
|
|
||||||
|
|
||||||
- **Frontend**: http://localhost:5173
|
|
||||||
- **Backend API**: http://localhost:52345
|
|
||||||
- **API Documentation**: http://localhost:52345/api-docs
|
|
||||||
|
|
||||||
#### Managing Docker Containers
|
|
||||||
|
|
||||||
Stop containers:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker stop uptime_database_mongo
|
|
||||||
```
|
|
||||||
|
|
||||||
Start containers:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker start uptime_database_mongo
|
|
||||||
```
|
|
||||||
|
|
||||||
Remove containers (if needed):
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker rm uptime_database_mongo
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Troubleshooting
|
|
||||||
|
|
||||||
**Port already in use:**
|
|
||||||
|
|
||||||
- Check if another service is using ports 5173, 52345, 27017, or 6379
|
|
||||||
- Stop the conflicting service or change the port in `.env` files
|
|
||||||
|
|
||||||
**MongoDB connection issues:**
|
|
||||||
|
|
||||||
- Verify container is running: `docker ps`
|
|
||||||
- Check container logs: `docker logs uptime_database_mongo`
|
|
||||||
|
|
||||||
**Module not found errors:**
|
|
||||||
|
|
||||||
- Ensure you ran `npm install` in both `client` and `server` directories
|
|
||||||
|
|
||||||
**Need more help?**
|
|
||||||
|
|
||||||
- Check the [full documentation](https://docs.checkmate.so)
|
|
||||||
- Ask on [Discord](https://discord.com/invite/NAb6H3UTjK)
|
|
||||||
|
|
||||||
### Start contributing code?
|
### Start contributing code?
|
||||||
|
|
||||||
1. Pick or open an issue (check `good-first-issue`s first)
|
1. Pick or open an issue (check `good-first-issue`s first)
|
||||||
2. (optional but highly suggested) Read a detailed structure of [Checkmate](https://deepwiki.com/bluewave-labs/Checkmate) if you would like to deep dive into the architecture.
|
2. (optional but highly suggested) Read a detailed structure of [Checkmate](https://deepwiki.com/bluewave-labs/Checkmate) if you would like to deep dive into the architecture.
|
||||||
3. Ask to be assigned. If there is already someone assigned and it's been more than 7 days, you can raise the flag and ask to be assigned as well.
|
3. Ask to be assigned. If there is alrady someone assigned and it's been more than 7 days, you can raise the flag and ask to be assigned as well.
|
||||||
4. Create a branch from `develop`.
|
4. Create a branch from `develop`.
|
||||||
5. Write your code.
|
5. Write your code.
|
||||||
6. Run and test locally.
|
6. Run and test locally.
|
||||||
@@ -231,7 +75,6 @@ Docs live in [checkmate-documentation](https://github.com/bluewave-labs/checkmat
|
|||||||
### Help with translations?
|
### Help with translations?
|
||||||
|
|
||||||
We use [PoEditor](https://poeditor.com) for translations. You can:
|
We use [PoEditor](https://poeditor.com) for translations. You can:
|
||||||
|
|
||||||
- [Sign up and join your language team](https://poeditor.com/join/project/lRUoGZFCsJ).
|
- [Sign up and join your language team](https://poeditor.com/join/project/lRUoGZFCsJ).
|
||||||
- Translate UI strings.
|
- Translate UI strings.
|
||||||
- Ask questions on Discord in the relevant #translations channel.
|
- Ask questions on Discord in the relevant #translations channel.
|
||||||
@@ -241,7 +84,6 @@ Make sure all new UI strings in code use `t('key')`.
|
|||||||
### Submit a pull request?
|
### Submit a pull request?
|
||||||
|
|
||||||
Follow the [pull request checklist](#pull-request-checklist). Your PR should:
|
Follow the [pull request checklist](#pull-request-checklist). Your PR should:
|
||||||
|
|
||||||
- Be focused on one issue.
|
- Be focused on one issue.
|
||||||
- Be tested locally.
|
- Be tested locally.
|
||||||
- Use our linting and translation rules.
|
- Use our linting and translation rules.
|
||||||
@@ -281,6 +123,7 @@ If one or more of these are missing, we may ask you to update your pull request
|
|||||||
|
|
||||||
## Branching model
|
## Branching model
|
||||||
|
|
||||||
|
|
||||||
- Code contributions should go to the `develop` branch.
|
- Code contributions should go to the `develop` branch.
|
||||||
- `master` is used for stable releases.
|
- `master` is used for stable releases.
|
||||||
- Use descriptive branch names, like `fix/login-error` or `feat/add-alerts`.
|
- Use descriptive branch names, like `fix/login-error` or `feat/add-alerts`.
|
||||||
@@ -294,10 +137,13 @@ If one or more of these are missing, we may ask you to update your pull request
|
|||||||
|
|
||||||
## Thank you
|
## Thank you
|
||||||
|
|
||||||
Thanks for making Checkmate better. We mean it. Whether it's your first pull request or your 50th, we're excited to build with you.
|
Thanks for making Checkmate better. We mean it. Whether it’s your first pull request or your 50th, we’re excited to build with you.
|
||||||
|
|
||||||
PS: feel free to introduce yourself on [Discord](https://discord.gg/NAb6H3UTjK) and say hi.
|
|
||||||
|
PS: feel free to introduce yourself on [Discord](https://discord.gg/YOUR-DISCORD-LINK) and say hi.
|
||||||
|
|
||||||
-- Checkmate team
|
-- Checkmate team
|
||||||
|
|
||||||
Also make sure you read the [document about how to make a good pull request](/PULLREQUESTS.md).
|
Also make sure you read the [document about how to make a good pull request](/PULLREQUESTS.md).
|
||||||
|
|
||||||
|
|
||||||
-11325
File diff suppressed because it is too large.
Load diff
@@ -52,7 +52,7 @@ Usage instructions can be found [here](https://docs.checkmate.so/checkmate-2.1).
|
|||||||
|
|
||||||
See installation instructions in [Checkmate documentation portal](https://docs.checkmate.so/checkmate-2.1/users-guide/quickstart).
|
See installation instructions in [Checkmate documentation portal](https://docs.checkmate.so/checkmate-2.1/users-guide/quickstart).
|
||||||
|
|
||||||
Alternatively, you can also use [Elestio](https://elest.io/open-source/checkmate), [K8s](./charts/helm/checkmate/INSTALLATION.md), [Sive Host](https://sive.host) (South Africa) or [Pikapods](https://www.pikapods.com/) to quickly spin off a Checkmate instance. If you would like to monitor your server infrastructure, you'll need [Capture agent](https://github.com/bluewave-labs/capture). Capture repository also contains the installation instructions.
|
Alternatively, you can also use [Coolify](https://coolify.io/), [Elestio](https://elest.io/open-source/checkmate), [K8s](./charts/helm/checkmate/INSTALLATION.md), [Sive Host](https://sive.host) (South Africa) or [Pikapods](https://www.pikapods.com/) to quickly spin off a Checkmate instance. If you would like to monitor your server infrastructure, you'll need [Capture agent](https://github.com/bluewave-labs/capture). Capture repository also contains the installation instructions.
|
||||||
|
|
||||||
### Using a Custom CA
|
### Using a Custom CA
|
||||||
|
|
||||||
@@ -162,7 +162,6 @@ Here's how you can contribute:
|
|||||||
4. Open an issue if you believe you've encountered a bug.
|
4. Open an issue if you believe you've encountered a bug.
|
||||||
5. Check for good-first-issue's if you are a newcomer.
|
5. Check for good-first-issue's if you are a newcomer.
|
||||||
6. Make a pull request to add new features/make quality-of-life improvements/fix bugs.
|
6. Make a pull request to add new features/make quality-of-life improvements/fix bugs.
|
||||||
7. Check out this interactive walkthrough of the `Checkmate` codebase on CodeCanvas [here](https://www.code-canvas.com/?session=unauthenticatedGithub&repo=Checkmate&owner=bluewave-labs&branch=develop&OnboardingTutorial=true). To refine existing dataflow simulation or create new ones, follow the quick tutorial [here](https://docs.code-canvas.com/updating-diagram).
|
|
||||||
|
|
||||||
<a href="https://github.com/bluewave-labs/checkmate/graphs/contributors">
|
<a href="https://github.com/bluewave-labs/checkmate/graphs/contributors">
|
||||||
<img src="https://contrib.rocks/image?repo=bluewave-labs/checkmate" />
|
<img src="https://contrib.rocks/image?repo=bluewave-labs/checkmate" />
|
||||||
|
|||||||
@@ -21,10 +21,6 @@ cd checkmate/charts/helm/checkmate
|
|||||||
Edit `values.yaml` to update:
|
Edit `values.yaml` to update:
|
||||||
- `client.ingress.host` and `server.ingress.host` with your domain names
|
- `client.ingress.host` and `server.ingress.host` with your domain names
|
||||||
- `server.protocol` (usually http or https)
|
- `server.protocol` (usually http or https)
|
||||||
- **If upgrading**: Migrate persistence settings from flat structure to nested:
|
|
||||||
- Old: `persistence.mongodbSize` → New: `persistence.mongo.size`
|
|
||||||
- Old: `persistence.redisSize` → New: `persistence.redis.size`
|
|
||||||
- Add: `persistence.mongo.storageClass` and `persistence.redis.storageClass` (leave empty for default)
|
|
||||||
- Secrets under the `secrets` section (`JWT_SECRET`, email credentials, API keys, etc.) — replace all change_me values
|
- Secrets under the `secrets` section (`JWT_SECRET`, email credentials, API keys, etc.) — replace all change_me values
|
||||||
|
|
||||||
### 3. Deploy the Helm chart
|
### 3. Deploy the Helm chart
|
||||||
|
|||||||
@@ -1,25 +1,17 @@
|
|||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: checkmate-client
|
name: client
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: checkmate-client
|
app: client
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: checkmate-client
|
app: client
|
||||||
spec:
|
spec:
|
||||||
{{- with .Values.client.affinity }}
|
|
||||||
affinity:
|
|
||||||
{{- tpl ( . | toYaml) $ | nindent 8 }}
|
|
||||||
{{- end }}
|
|
||||||
{{- with .Values.client.tolerations }}
|
|
||||||
tolerations:
|
|
||||||
{{- tpl ( . | toYaml) $ | nindent 8 }}
|
|
||||||
{{- end }}
|
|
||||||
containers:
|
containers:
|
||||||
- name: client
|
- name: client
|
||||||
image: {{ .Values.client.image }}
|
image: {{ .Values.client.image }}
|
||||||
@@ -28,17 +20,3 @@ spec:
|
|||||||
env:
|
env:
|
||||||
- name: UPTIME_APP_API_BASE_URL
|
- name: UPTIME_APP_API_BASE_URL
|
||||||
value: "{{ .Values.server.protocol }}://{{ .Values.server.ingress.host }}/api/v1"
|
value: "{{ .Values.server.protocol }}://{{ .Values.server.ingress.host }}/api/v1"
|
||||||
- name: UPTIME_APP_CLIENT_HOST
|
|
||||||
value: "{{ .Values.client.protocol }}://{{ .Values.client.ingress.host }}"
|
|
||||||
volumeMounts:
|
|
||||||
- name: config-volume
|
|
||||||
mountPath: /etc/nginx/conf.d/default.conf
|
|
||||||
subPath: default.conf
|
|
||||||
{{- with .Values.client.resources }}
|
|
||||||
resources:
|
|
||||||
{{- tpl ( . | toYaml) $ | nindent 12 }}
|
|
||||||
{{- end }}
|
|
||||||
volumes:
|
|
||||||
- name: config-volume
|
|
||||||
configMap:
|
|
||||||
name: checkmate-server-nginx-cm
|
|
||||||
@@ -2,15 +2,10 @@
|
|||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: checkmate-client-ingress
|
name: client-ingress
|
||||||
{{- if .Values.client.ingress.annotations }}
|
|
||||||
annotations:
|
annotations:
|
||||||
{{- range $key, $value := .Values.client.ingress.annotations }}
|
nginx.ingress.kubernetes.io/rewrite-target: /
|
||||||
{{ $key }}: {{ $value | quote }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
spec:
|
spec:
|
||||||
ingressClassName: {{ .Values.client.ingress.className }}
|
|
||||||
rules:
|
rules:
|
||||||
- host: {{ .Values.client.ingress.host }}
|
- host: {{ .Values.client.ingress.host }}
|
||||||
http:
|
http:
|
||||||
@@ -19,7 +14,7 @@ spec:
|
|||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
backend:
|
backend:
|
||||||
service:
|
service:
|
||||||
name: checkmate-client
|
name: client
|
||||||
port:
|
port:
|
||||||
number: {{ .Values.client.port }}
|
number: {{ .Values.client.port }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: checkmate-client
|
name: client
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
app: checkmate-client
|
app: client
|
||||||
ports:
|
ports:
|
||||||
- port: {{ .Values.client.port }}
|
- port: {{ .Values.client.port }}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: mongodb
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: mongodb
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: mongodb
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: mongodb
|
||||||
|
image: {{ .Values.mongodb.image }}
|
||||||
|
ports:
|
||||||
|
- containerPort: {{ .Values.mongodb.port }}
|
||||||
|
command: ["mongod", "--quiet", "--bind_ip_all"]
|
||||||
|
volumeMounts:
|
||||||
|
- name: mongodb-data
|
||||||
|
mountPath: /data/db
|
||||||
|
volumes:
|
||||||
|
- name: mongodb-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: mongodb-pvc
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: mongodb-pvc
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .Values.persistence.mongodbSize }}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: checkmate-mongodb
|
name: mongodb
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
app: checkmate-mongodb
|
app: mongodb
|
||||||
ports:
|
ports:
|
||||||
- port: {{ .Values.mongodb.port }}
|
- port: {{ .Values.mongodb.port }}
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
apiVersion: apps/v1
|
|
||||||
kind: StatefulSet
|
|
||||||
metadata:
|
|
||||||
name: checkmate-mongodb
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: checkmate-mongodb
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: checkmate-mongodb
|
|
||||||
spec:
|
|
||||||
{{- with .Values.mongodb.affinity }}
|
|
||||||
affinity:
|
|
||||||
{{- tpl ( . | toYaml) $ | nindent 8 }}
|
|
||||||
{{- end }}
|
|
||||||
{{- with .Values.mongodb.tolerations }}
|
|
||||||
tolerations:
|
|
||||||
{{- tpl ( . | toYaml) $ | nindent 8 }}
|
|
||||||
{{- end }}
|
|
||||||
containers:
|
|
||||||
- name: mongodb
|
|
||||||
image: {{ .Values.mongodb.image }}
|
|
||||||
ports:
|
|
||||||
- containerPort: {{ .Values.mongodb.port }}
|
|
||||||
command: ["mongod", "--quiet", "--bind_ip_all"]
|
|
||||||
volumeMounts:
|
|
||||||
- name: checkmate-mongo-persistent-storage
|
|
||||||
mountPath: /data/db
|
|
||||||
{{- with .Values.mongodb.resources }}
|
|
||||||
resources:
|
|
||||||
{{- tpl ( . | toYaml) $ | nindent 12 }}
|
|
||||||
{{- end }}
|
|
||||||
volumeClaimTemplates:
|
|
||||||
- metadata:
|
|
||||||
name: checkmate-mongo-persistent-storage
|
|
||||||
spec:
|
|
||||||
storageClassName: {{ .Values.persistence.mongo.storageClass | quote }}
|
|
||||||
accessModes: ["ReadWriteOnce"]
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: {{ .Values.persistence.mongo.size | default "5Gi" | quote }}
|
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: redis
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: redis
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: redis
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: redis
|
||||||
|
image: {{ .Values.redis.image }}
|
||||||
|
ports:
|
||||||
|
- containerPort: {{ .Values.redis.port }}
|
||||||
|
volumeMounts:
|
||||||
|
- name: redis-data
|
||||||
|
mountPath: /data
|
||||||
|
volumes:
|
||||||
|
- name: redis-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: redis-pvc
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: redis-pvc
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .Values.persistence.redisSize }}
|
||||||
@@ -1,11 +1,9 @@
|
|||||||
{{- if .Values.redis.enabled }}
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: checkmate-redis
|
name: redis
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
app: checkmate-redis
|
app: redis
|
||||||
ports:
|
ports:
|
||||||
- port: {{ .Values.redis.port }}
|
- port: {{ .Values.redis.port }}
|
||||||
{{- end }}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
{{- if .Values.redis.enabled }}
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: StatefulSet
|
|
||||||
metadata:
|
|
||||||
name: checkmate-redis
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: checkmate-redis
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: checkmate-redis
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: redis
|
|
||||||
image: {{ .Values.redis.image }}
|
|
||||||
ports:
|
|
||||||
- containerPort: {{ .Values.redis.port }}
|
|
||||||
volumeMounts:
|
|
||||||
- name: redis-data
|
|
||||||
mountPath: /data
|
|
||||||
volumeClaimTemplates:
|
|
||||||
- metadata:
|
|
||||||
name: checkmate-redis-persistent-storage
|
|
||||||
spec:
|
|
||||||
storageClassName: {{ .Values.persistence.redis.storageClass | quote }}
|
|
||||||
accessModes: ["ReadWriteOnce"]
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: {{ .Values.persistence.redis.size | default "1Gi" | quote }}
|
|
||||||
{{- end }}
|
|
||||||
@@ -4,6 +4,10 @@
|
|||||||
{{- fail "secrets.JWT_SECRET must be overridden and cannot be 'change_me'" }}
|
{{- fail "secrets.JWT_SECRET must be overridden and cannot be 'change_me'" }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if or (not $secrets.REFRESH_TOKEN_SECRET) (eq $secrets.REFRESH_TOKEN_SECRET "change_me") }}
|
||||||
|
{{- fail "secrets.REFRESH_TOKEN_SECRET must be overridden and cannot be 'change_me'" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
|
|||||||
@@ -1,25 +1,17 @@
|
|||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: checkmate-server
|
name: server
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: checkmate-server
|
app: server
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: checkmate-server
|
app: server
|
||||||
spec:
|
spec:
|
||||||
{{- with .Values.server.affinity }}
|
|
||||||
affinity:
|
|
||||||
{{- tpl ( . | toYaml) $ | nindent 8 }}
|
|
||||||
{{- end }}
|
|
||||||
{{- with .Values.server.tolerations }}
|
|
||||||
tolerations:
|
|
||||||
{{- tpl ( . | toYaml) $ | nindent 8 }}
|
|
||||||
{{- end }}
|
|
||||||
containers:
|
containers:
|
||||||
- name: server
|
- name: server
|
||||||
image: {{ .Values.server.image }}
|
image: {{ .Values.server.image }}
|
||||||
@@ -28,10 +20,3 @@ spec:
|
|||||||
envFrom:
|
envFrom:
|
||||||
- secretRef:
|
- secretRef:
|
||||||
name: checkmate-secrets
|
name: checkmate-secrets
|
||||||
{{- with .Values.server.resources }}
|
|
||||||
resources:
|
|
||||||
{{- tpl ( . | toYaml) $ | nindent 12 }}
|
|
||||||
{{- end }}
|
|
||||||
env:
|
|
||||||
- name: CLIENT_HOST
|
|
||||||
value: "{{ .Values.client.protocol }}://{{ .Values.client.ingress.host }}"
|
|
||||||
@@ -2,31 +2,24 @@
|
|||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: checkmate-server-ingress
|
name: server-ingress
|
||||||
{{- if .Values.server.ingress.annotations }}
|
|
||||||
annotations:
|
annotations:
|
||||||
{{- range $key, $value := .Values.server.ingress.annotations }}
|
nginx.ingress.kubernetes.io/rewrite-target: /
|
||||||
{{ $key }}: {{ $value | quote }}
|
nginx.ingress.kubernetes.io/enable-cors: "true"
|
||||||
{{- end }}
|
nginx.ingress.kubernetes.io/cors-allow-origin: "http://{{ .Values.client.ingress.host }},https://{{ .Values.client.ingress.host }}"
|
||||||
{{- end }}
|
nginx.ingress.kubernetes.io/cors-allow-methods: "GET, PUT, POST, DELETE, PATCH, OPTIONS"
|
||||||
{{/*#annotations:
|
nginx.ingress.kubernetes.io/cors-allow-headers: "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization"
|
||||||
#nginx.ingress.kubernetes.io/rewrite-target: /
|
nginx.ingress.kubernetes.io/cors-allow-credentials: "true"
|
||||||
#nginx.ingress.kubernetes.io/enable-cors: "true"
|
|
||||||
#nginx.ingress.kubernetes.io/cors-allow-origin: "http://{{ .Values.client.ingress.host }},https://{{ .Values.client.ingress.host }}"
|
|
||||||
#nginx.ingress.kubernetes.io/cors-allow-methods: "GET, PUT, POST, DELETE, PATCH, OPTIONS"
|
|
||||||
#nginx.ingress.kubernetes.io/cors-allow-headers: "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization"
|
|
||||||
#nginx.ingress.kubernetes.io/cors-allow-credentials: "true"*/}}
|
|
||||||
spec:
|
spec:
|
||||||
ingressClassName: {{ .Values.server.ingress.className }}
|
|
||||||
rules:
|
rules:
|
||||||
- host: {{ .Values.server.ingress.host }}
|
- host: {{ .Values.server.ingress.host }}
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: /api/v1
|
- path: /
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
backend:
|
backend:
|
||||||
service:
|
service:
|
||||||
name: checkmate-server
|
name: server
|
||||||
port:
|
port:
|
||||||
number: {{ .Values.server.port }}
|
number: {{ .Values.server.port }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: ConfigMap
|
|
||||||
metadata:
|
|
||||||
name: checkmate-server-nginx-cm
|
|
||||||
data:
|
|
||||||
default.conf: |
|
|
||||||
server {
|
|
||||||
listen 80;
|
|
||||||
listen [::]:80;
|
|
||||||
|
|
||||||
server_name checkmate-demo.bluewavelabs.ca;
|
|
||||||
server_tokens off;
|
|
||||||
|
|
||||||
location /.well-known/acme-challenge/ {
|
|
||||||
root /var/www/certbot;
|
|
||||||
}
|
|
||||||
|
|
||||||
location / {
|
|
||||||
root /usr/share/nginx/html;
|
|
||||||
index index.html index.htm;
|
|
||||||
try_files $uri $uri/ /index.html;
|
|
||||||
}
|
|
||||||
|
|
||||||
# location /api/ {
|
|
||||||
# proxy_pass http://{{ .Values.server.ingress.host }}:5000/api/;
|
|
||||||
# proxy_http_version 1.1;
|
|
||||||
# proxy_set_header Host $host;
|
|
||||||
# proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
# proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
# }
|
|
||||||
|
|
||||||
location /api-docs/ {
|
|
||||||
proxy_pass http://{{ .Values.server.ingress.host }}:5000/api-docs/;
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: checkmate-server
|
name: server
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
app: checkmate-server
|
app: server
|
||||||
ports:
|
ports:
|
||||||
- port: {{ .Values.server.port }}
|
- port: {{ .Values.server.port }}
|
||||||
@@ -1,52 +1,41 @@
|
|||||||
client:
|
client:
|
||||||
image: ghcr.io/bluewave-labs/checkmate-client:v3.2.0
|
image: ghcr.io/bluewave-labs/checkmate-client:v2.3
|
||||||
port: 80
|
port: 80
|
||||||
protocol: http
|
|
||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
host: change_me
|
host: change_me
|
||||||
className: nginx
|
|
||||||
annotations: {}
|
|
||||||
|
|
||||||
server:
|
server:
|
||||||
image: ghcr.io/bluewave-labs/checkmate-backend:v3.2.0
|
image: ghcr.io/bluewave-labs/checkmate-backend:v2.3
|
||||||
port: 52345
|
port: 52345
|
||||||
protocol: http
|
protocol: change_me
|
||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
host: change_me
|
host: change_me
|
||||||
className: nginx
|
|
||||||
annotations: {}
|
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
enabled: false
|
|
||||||
image: redis:7.2
|
image: redis:7.2
|
||||||
port: 6379
|
port: 6379
|
||||||
|
|
||||||
mongodb:
|
mongodb:
|
||||||
image: ghcr.io/bluewave-labs/checkmate-mongo:v3.2.0
|
image: mongo:7.0
|
||||||
port: 27017
|
port: 27017
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
JWT_SECRET: change_me
|
JWT_SECRET: change_me
|
||||||
# REFRESH_TOKEN_SECRET: change_me
|
REFRESH_TOKEN_SECRET: change_me
|
||||||
# SYSTEM_EMAIL_ADDRESS: test@example.com
|
SYSTEM_EMAIL_ADDRESS: test@example.com
|
||||||
# SYSTEM_EMAIL_PASSWORD: change_me
|
SYSTEM_EMAIL_PASSWORD: change_me
|
||||||
# SYSTEM_EMAIL_HOST: smtp.example.com
|
SYSTEM_EMAIL_HOST: smtp.example.com
|
||||||
# SYSTEM_EMAIL_PORT: "587"
|
SYSTEM_EMAIL_PORT: "587"
|
||||||
# PAGESPEED_API_KEY: change_me
|
PAGESPEED_API_KEY: change_me
|
||||||
DB_CONNECTION_STRING: mongodb://checkmate-mongodb.namespace.svc:27017/uptime_db
|
DB_CONNECTION_STRING: mongodb://mongodb:27017/uptime_db
|
||||||
CLIENT_HOST: change_me
|
REDIS_HOST: redis
|
||||||
# REDIS_HOST: redis
|
REDIS_PORT: "6379"
|
||||||
# REDIS_PORT: "6379"
|
DB_TYPE: MongoDB
|
||||||
# DB_TYPE: MongoDB
|
TOKEN_TTL: 99d
|
||||||
# TOKEN_TTL: 99d
|
REFRESH_TOKEN_TTL: 99d
|
||||||
# REFRESH_TOKEN_TTL: 99d
|
|
||||||
|
|
||||||
persistence:
|
persistence:
|
||||||
mongo:
|
mongodbSize: 5Gi
|
||||||
size: 5Gi
|
redisSize: 1Gi
|
||||||
storageClass: ""
|
|
||||||
redis:
|
|
||||||
size: 1Gi
|
|
||||||
storageClass: ""
|
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
VITE_APP_API_BASE_URL=UPTIME_APP_API_BASE_URL
|
VITE_APP_API_BASE_URL=UPTIME_APP_API_BASE_URL
|
||||||
VITE_APP_API_V2_BASE_URL=UPTIME_APP_API_V2_BASE_URL
|
|
||||||
VITE_APP_CLIENT_HOST=UPTIME_APP_CLIENT_HOST
|
VITE_APP_CLIENT_HOST=UPTIME_APP_CLIENT_HOST
|
||||||
VITE_APP_LOG_LEVEL=UPTIME_APP_LOG_LEVEL
|
VITE_APP_LOG_LEVEL=UPTIME_APP_LOG_LEVEL
|
||||||
Generated
+1
-141
@@ -11,7 +11,6 @@
|
|||||||
"@emotion/react": "^11.13.3",
|
"@emotion/react": "^11.13.3",
|
||||||
"@emotion/styled": "^11.13.0",
|
"@emotion/styled": "^11.13.0",
|
||||||
"@hello-pangea/dnd": "^18.0.0",
|
"@hello-pangea/dnd": "^18.0.0",
|
||||||
"@hookform/resolvers": "5.2.2",
|
|
||||||
"@mui/icons-material": "6.4.11",
|
"@mui/icons-material": "6.4.11",
|
||||||
"@mui/lab": "6.0.0-dev.240424162023-9968b4889d",
|
"@mui/lab": "6.0.0-dev.240424162023-9968b4889d",
|
||||||
"@mui/material": "6.4.11",
|
"@mui/material": "6.4.11",
|
||||||
@@ -22,14 +21,11 @@
|
|||||||
"dayjs": "1.11.13",
|
"dayjs": "1.11.13",
|
||||||
"flag-icons": "7.3.2",
|
"flag-icons": "7.3.2",
|
||||||
"html2canvas": "^1.4.1",
|
"html2canvas": "^1.4.1",
|
||||||
"human-interval": "2.0.1",
|
|
||||||
"i18next": "25.4.2",
|
"i18next": "25.4.2",
|
||||||
"joi": "17.13.3",
|
"joi": "17.13.3",
|
||||||
"mui-color-input": "^6.0.0",
|
"mui-color-input": "^6.0.0",
|
||||||
"pretty-ms": "9.3.0",
|
|
||||||
"react": "18.3.1",
|
"react": "18.3.1",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-hook-form": "7.63.0",
|
|
||||||
"react-i18next": "^15.4.0",
|
"react-i18next": "^15.4.0",
|
||||||
"react-icons": "5.5.0",
|
"react-icons": "5.5.0",
|
||||||
"react-redux": "9.2.0",
|
"react-redux": "9.2.0",
|
||||||
@@ -38,12 +34,9 @@
|
|||||||
"react-toastify": "^10.0.5",
|
"react-toastify": "^10.0.5",
|
||||||
"recharts": "2.15.2",
|
"recharts": "2.15.2",
|
||||||
"redux-persist": "6.0.0",
|
"redux-persist": "6.0.0",
|
||||||
"swr": "2.3.6",
|
"vite-plugin-svgr": "^4.2.0"
|
||||||
"vite-plugin-svgr": "^4.2.0",
|
|
||||||
"zod": "4.1.11"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "24.5.2",
|
|
||||||
"@types/react": "^18.2.66",
|
"@types/react": "^18.2.66",
|
||||||
"@types/react-dom": "^18.2.22",
|
"@types/react-dom": "^18.2.22",
|
||||||
"@vitejs/plugin-react": "^4.2.1",
|
"@vitejs/plugin-react": "^4.2.1",
|
||||||
@@ -52,7 +45,6 @@
|
|||||||
"eslint-plugin-react-hooks": "^5.0.0",
|
"eslint-plugin-react-hooks": "^5.0.0",
|
||||||
"eslint-plugin-react-refresh": "^0.4.6",
|
"eslint-plugin-react-refresh": "^0.4.6",
|
||||||
"prettier": "^3.3.3",
|
"prettier": "^3.3.3",
|
||||||
"typescript": "5.9.3",
|
|
||||||
"vite": "6.3.6"
|
"vite": "6.3.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -661,18 +653,6 @@
|
|||||||
"react-dom": "^18.0.0 || ^19.0.0"
|
"react-dom": "^18.0.0 || ^19.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@hookform/resolvers": {
|
|
||||||
"version": "5.2.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@hookform/resolvers/-/resolvers-5.2.2.tgz",
|
|
||||||
"integrity": "sha512-A/IxlMLShx3KjV/HeTcTfaMxdwy690+L/ZADoeaTltLx+CVuzkeVIPuybK3jrRfw7YZnmdKsVVHAlEPIAEUNlA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@standard-schema/utils": "^0.3.0"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"react-hook-form": "^7.55.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@humanwhocodes/config-array": {
|
"node_modules/@humanwhocodes/config-array": {
|
||||||
"version": "0.13.0",
|
"version": "0.13.0",
|
||||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz",
|
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz",
|
||||||
@@ -2127,16 +2107,6 @@
|
|||||||
"integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==",
|
"integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
|
||||||
"version": "24.5.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.5.2.tgz",
|
|
||||||
"integrity": "sha512-FYxk1I7wPv3K2XBaoyH2cTnocQEu8AOZ60hPbsyukMPLv5/5qr7V1i8PLHdl6Zf87I+xZXFvPCXYjiTFq+YSDQ==",
|
|
||||||
"devOptional": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"undici-types": "~7.12.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@types/parse-json": {
|
"node_modules/@types/parse-json": {
|
||||||
"version": "4.0.2",
|
"version": "4.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz",
|
||||||
@@ -3021,15 +2991,6 @@
|
|||||||
"node": ">=0.4.0"
|
"node": ">=0.4.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/dequal": {
|
|
||||||
"version": "2.0.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
|
|
||||||
"integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/doctrine": {
|
"node_modules/doctrine": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
|
||||||
@@ -4121,15 +4082,6 @@
|
|||||||
"node": ">=8.0.0"
|
"node": ">=8.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/human-interval": {
|
|
||||||
"version": "2.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/human-interval/-/human-interval-2.0.1.tgz",
|
|
||||||
"integrity": "sha512-r4Aotzf+OtKIGQCB3odUowy4GfUDTy3aTWTfLd7ZF2gBCy3XW3v/dJLRefZnOFFnjqs5B1TypvS8WarpBkYUNQ==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"numbered": "^1.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/i18next": {
|
"node_modules/i18next": {
|
||||||
"version": "25.4.2",
|
"version": "25.4.2",
|
||||||
"resolved": "https://registry.npmjs.org/i18next/-/i18next-25.4.2.tgz",
|
"resolved": "https://registry.npmjs.org/i18next/-/i18next-25.4.2.tgz",
|
||||||
@@ -4964,12 +4916,6 @@
|
|||||||
"integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==",
|
"integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/numbered": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/numbered/-/numbered-1.1.0.tgz",
|
|
||||||
"integrity": "sha512-pv/ue2Odr7IfYOO0byC1KgBI10wo5YDauLhxY6/saNzAdAs0r1SotGCPzzCLNPL0xtrAwWRialLu23AAu9xO1g==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/object-assign": {
|
"node_modules/object-assign": {
|
||||||
"version": "4.1.1",
|
"version": "4.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||||
@@ -5185,18 +5131,6 @@
|
|||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/parse-ms": {
|
|
||||||
"version": "4.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-4.0.0.tgz",
|
|
||||||
"integrity": "sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/path-exists": {
|
"node_modules/path-exists": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
|
||||||
@@ -5324,21 +5258,6 @@
|
|||||||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/pretty-ms": {
|
|
||||||
"version": "9.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-9.3.0.tgz",
|
|
||||||
"integrity": "sha512-gjVS5hOP+M3wMm5nmNOucbIrqudzs9v/57bWRHQWLYklXqoXKrVfYW2W9+glfGsqtPgpiz5WwyEEB+ksXIx3gQ==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"parse-ms": "^4.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/prop-types": {
|
"node_modules/prop-types": {
|
||||||
"version": "15.8.1",
|
"version": "15.8.1",
|
||||||
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",
|
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",
|
||||||
@@ -5424,22 +5343,6 @@
|
|||||||
"react": "^18.3.1"
|
"react": "^18.3.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/react-hook-form": {
|
|
||||||
"version": "7.63.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.63.0.tgz",
|
|
||||||
"integrity": "sha512-ZwueDMvUeucovM2VjkCf7zIHcs1aAlDimZu2Hvel5C5907gUzMpm4xCrQXtRzCvsBqFjonB4m3x4LzCFI1ZKWA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/react-hook-form"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"react": "^16.8.0 || ^17 || ^18 || ^19"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/react-i18next": {
|
"node_modules/react-i18next": {
|
||||||
"version": "15.5.1",
|
"version": "15.5.1",
|
||||||
"resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-15.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-15.5.1.tgz",
|
||||||
@@ -6238,19 +6141,6 @@
|
|||||||
"integrity": "sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ==",
|
"integrity": "sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/swr": {
|
|
||||||
"version": "2.3.6",
|
|
||||||
"resolved": "https://registry.npmjs.org/swr/-/swr-2.3.6.tgz",
|
|
||||||
"integrity": "sha512-wfHRmHWk/isGNMwlLGlZX5Gzz/uTgo0o2IRuTMcf4CPuPFJZlq0rDaKUx+ozB5nBOReNV1kiOyzMfj+MBMikLw==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"dequal": "^2.0.3",
|
|
||||||
"use-sync-external-store": "^1.4.0"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"react": "^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/text-segmentation": {
|
"node_modules/text-segmentation": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/text-segmentation/-/text-segmentation-1.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/text-segmentation/-/text-segmentation-1.0.3.tgz",
|
||||||
@@ -6399,20 +6289,6 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/typescript": {
|
|
||||||
"version": "5.9.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
|
|
||||||
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
|
|
||||||
"devOptional": true,
|
|
||||||
"license": "Apache-2.0",
|
|
||||||
"bin": {
|
|
||||||
"tsc": "bin/tsc",
|
|
||||||
"tsserver": "bin/tsserver"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=14.17"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/unbox-primitive": {
|
"node_modules/unbox-primitive": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz",
|
||||||
@@ -6432,13 +6308,6 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/undici-types": {
|
|
||||||
"version": "7.12.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.12.0.tgz",
|
|
||||||
"integrity": "sha512-goOacqME2GYyOZZfb5Lgtu+1IDmAlAEu5xnD3+xTzS10hT0vzpf0SPjkXwAw9Jm+4n/mQGDP3LO8CPbYROeBfQ==",
|
|
||||||
"devOptional": true,
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/update-browserslist-db": {
|
"node_modules/update-browserslist-db": {
|
||||||
"version": "1.1.3",
|
"version": "1.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz",
|
||||||
@@ -6770,15 +6639,6 @@
|
|||||||
"funding": {
|
"funding": {
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"node_modules/zod": {
|
|
||||||
"version": "4.1.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/zod/-/zod-4.1.11.tgz",
|
|
||||||
"integrity": "sha512-WPsqwxITS2tzx1bzhIKsEs19ABD5vmCVa4xBo2tq/SrV4RNZtfws1EnCWQXM6yh8bD08a1idvkB5MZSBiZsjwg==",
|
|
||||||
"license": "MIT",
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/colinhacks"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+11
-11
@@ -5,8 +5,8 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "tsc -b && vite build",
|
"build": "vite build",
|
||||||
"build-dev": "tsc -b && vite build --mode development",
|
"build-dev": "vite build --mode development",
|
||||||
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
|
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"format": "prettier --write .",
|
"format": "prettier --write .",
|
||||||
@@ -16,7 +16,6 @@
|
|||||||
"@emotion/react": "^11.13.3",
|
"@emotion/react": "^11.13.3",
|
||||||
"@emotion/styled": "^11.13.0",
|
"@emotion/styled": "^11.13.0",
|
||||||
"@hello-pangea/dnd": "^18.0.0",
|
"@hello-pangea/dnd": "^18.0.0",
|
||||||
"@hookform/resolvers": "5.2.2",
|
|
||||||
"@mui/icons-material": "6.4.11",
|
"@mui/icons-material": "6.4.11",
|
||||||
"@mui/lab": "6.0.0-dev.240424162023-9968b4889d",
|
"@mui/lab": "6.0.0-dev.240424162023-9968b4889d",
|
||||||
"@mui/material": "6.4.11",
|
"@mui/material": "6.4.11",
|
||||||
@@ -27,14 +26,11 @@
|
|||||||
"dayjs": "1.11.13",
|
"dayjs": "1.11.13",
|
||||||
"flag-icons": "7.3.2",
|
"flag-icons": "7.3.2",
|
||||||
"html2canvas": "^1.4.1",
|
"html2canvas": "^1.4.1",
|
||||||
"human-interval": "2.0.1",
|
|
||||||
"i18next": "25.4.2",
|
"i18next": "25.4.2",
|
||||||
"joi": "17.13.3",
|
"joi": "17.13.3",
|
||||||
"mui-color-input": "^6.0.0",
|
"mui-color-input": "^6.0.0",
|
||||||
"pretty-ms": "9.3.0",
|
|
||||||
"react": "18.3.1",
|
"react": "18.3.1",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-hook-form": "7.63.0",
|
|
||||||
"react-i18next": "^15.4.0",
|
"react-i18next": "^15.4.0",
|
||||||
"react-icons": "5.5.0",
|
"react-icons": "5.5.0",
|
||||||
"react-redux": "9.2.0",
|
"react-redux": "9.2.0",
|
||||||
@@ -43,12 +39,17 @@
|
|||||||
"react-toastify": "^10.0.5",
|
"react-toastify": "^10.0.5",
|
||||||
"recharts": "2.15.2",
|
"recharts": "2.15.2",
|
||||||
"redux-persist": "6.0.0",
|
"redux-persist": "6.0.0",
|
||||||
"swr": "2.3.6",
|
"vite-plugin-svgr": "^4.2.0"
|
||||||
"vite-plugin-svgr": "^4.2.0",
|
},
|
||||||
"zod": "4.1.11"
|
"unusedDepencies": {
|
||||||
|
"@solana/wallet-adapter-base": "0.9.25",
|
||||||
|
"@solana/wallet-adapter-material-ui": "0.16.35",
|
||||||
|
"@solana/wallet-adapter-react": "0.15.37",
|
||||||
|
"@solana/wallet-adapter-react-ui": "0.9.37",
|
||||||
|
"@solana/wallet-adapter-wallets": "0.19.34",
|
||||||
|
"@solana/web3.js": "1.98.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "24.5.2",
|
|
||||||
"@types/react": "^18.2.66",
|
"@types/react": "^18.2.66",
|
||||||
"@types/react-dom": "^18.2.22",
|
"@types/react-dom": "^18.2.22",
|
||||||
"@vitejs/plugin-react": "^4.2.1",
|
"@vitejs/plugin-react": "^4.2.1",
|
||||||
@@ -57,7 +58,6 @@
|
|||||||
"eslint-plugin-react-hooks": "^5.0.0",
|
"eslint-plugin-react-hooks": "^5.0.0",
|
||||||
"eslint-plugin-react-refresh": "^0.4.6",
|
"eslint-plugin-react-refresh": "^0.4.6",
|
||||||
"prettier": "^3.3.3",
|
"prettier": "^3.3.3",
|
||||||
"typescript": "5.9.3",
|
|
||||||
"vite": "6.3.6"
|
"vite": "6.3.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+11
-6
@@ -9,7 +9,8 @@ import { CssBaseline, GlobalStyles } from "@mui/material";
|
|||||||
import { logger } from "./Utils/Logger"; // Import the logger
|
import { logger } from "./Utils/Logger"; // Import the logger
|
||||||
import { networkService } from "./main";
|
import { networkService } from "./main";
|
||||||
import { Routes } from "./Routes";
|
import { Routes } from "./Routes";
|
||||||
import AppLayout from "@/Components/v1/Layouts/AppLayout";
|
import WalletProvider from "./Components/WalletProvider";
|
||||||
|
import AppLayout from "./Components/Layouts/AppLayout";
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
const mode = useSelector((state) => state.ui.mode);
|
const mode = useSelector((state) => state.ui.mode);
|
||||||
@@ -23,12 +24,16 @@ function App() {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
/* Extract Themeprovider, baseline and global styles to Styles */
|
||||||
<ThemeProvider theme={mode === "light" ? lightTheme : darkTheme}>
|
<ThemeProvider theme={mode === "light" ? lightTheme : darkTheme}>
|
||||||
<CssBaseline />
|
<WalletProvider>
|
||||||
<AppLayout>
|
<CssBaseline />
|
||||||
<Routes />
|
|
||||||
</AppLayout>
|
<AppLayout>
|
||||||
<ToastContainer />
|
<Routes />
|
||||||
|
</AppLayout>
|
||||||
|
<ToastContainer />
|
||||||
|
</WalletProvider>
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -2,17 +2,17 @@
|
|||||||
import IconButton from "@mui/material/IconButton";
|
import IconButton from "@mui/material/IconButton";
|
||||||
import Menu from "@mui/material/Menu";
|
import Menu from "@mui/material/Menu";
|
||||||
import MenuItem from "@mui/material/MenuItem";
|
import MenuItem from "@mui/material/MenuItem";
|
||||||
import Settings from "../../../assets/icons/settings-bold.svg?react";
|
import Settings from "../../assets/icons/settings-bold.svg?react";
|
||||||
import Dialog from "../Dialog/index.jsx";
|
import Dialog from "../../Components/Dialog";
|
||||||
|
|
||||||
// Utils
|
// Utils
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import { createToast } from "../../../Utils/toastUtils.jsx";
|
import { createToast } from "../../Utils/toastUtils";
|
||||||
|
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import { usePauseMonitor, useDeleteMonitor } from "../../../Hooks/v1/monitorHooks.js";
|
import { usePauseMonitor, useDeleteMonitor } from "../../Hooks/monitorHooks";
|
||||||
|
|
||||||
const ActionsMenu = ({
|
const ActionsMenu = ({
|
||||||
monitor,
|
monitor,
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
+3
-3
@@ -1,6 +1,6 @@
|
|||||||
import LeftArrow from "../../../assets/icons/left-arrow.svg?react";
|
import LeftArrow from "../../assets/icons/left-arrow.svg?react";
|
||||||
import LeftArrowDouble from "../../../assets/icons/left-arrow-double.svg?react";
|
import LeftArrowDouble from "../../assets/icons/left-arrow-double.svg?react";
|
||||||
import LeftArrowLong from "../../../assets/icons/left-arrow-long.svg?react";
|
import LeftArrowLong from "../../assets/icons/left-arrow-long.svg?react";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
const ArrowLeft = ({ type, color = "#667085", ...props }) => {
|
const ArrowLeft = ({ type, color = "#667085", ...props }) => {
|
||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
import RightArrow from "../../../assets/icons/right-arrow.svg?react";
|
import RightArrow from "../../assets/icons/right-arrow.svg?react";
|
||||||
import RightArrowDouble from "../../../assets/icons/right-arrow-double.svg?react";
|
import RightArrowDouble from "../../assets/icons/right-arrow-double.svg?react";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
const ArrowRight = ({ type, color = "#667085", ...props }) => {
|
const ArrowRight = ({ type, color = "#667085", ...props }) => {
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1
-1
@@ -2,7 +2,7 @@ import PropTypes from "prop-types";
|
|||||||
import { Box, Breadcrumbs as MUIBreadcrumbs } from "@mui/material";
|
import { Box, Breadcrumbs as MUIBreadcrumbs } from "@mui/material";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import ArrowRight from "../ArrowRight/index.jsx";
|
import ArrowRight from "../ArrowRight";
|
||||||
import "./index.css";
|
import "./index.css";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
File renamed without changes.
+1
-1
@@ -61,7 +61,7 @@ import {
|
|||||||
Tooltip,
|
Tooltip,
|
||||||
ResponsiveContainer,
|
ResponsiveContainer,
|
||||||
} from "recharts";
|
} from "recharts";
|
||||||
import { createGradient } from "../Utils/gradientUtils.jsx";
|
import { createGradient } from "../Utils/gradientUtils";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import { useTheme } from "@mui/material";
|
import { useTheme } from "@mui/material";
|
||||||
import { useId } from "react";
|
import { useId } from "react";
|
||||||
File renamed without changes.
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { Box, Stack, Tooltip, Typography } from "@mui/material";
|
import { Box, Stack, Tooltip, Typography } from "@mui/material";
|
||||||
import { formatDateWithTz } from "../../../../Utils/timeUtils.js";
|
import { formatDateWithTz } from "../../../Utils/timeUtils";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import "./index.css";
|
import "./index.css";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
import { Typography, Stack } from "@mui/material";
|
import { Typography, Stack } from "@mui/material";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import IconBox from "../../IconBox/index.jsx";
|
import IconBox from "../../IconBox";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* `EmptyView` is a functional React component that displays an empty state view with an optional icon, header, and message.
|
* `EmptyView` is a functional React component that displays an empty state view with an optional icon, header, and message.
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
import { Stack, Typography } from "@mui/material";
|
import { Stack, Typography } from "@mui/material";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import IconBox from "../../IconBox/index.jsx";
|
import IconBox from "../../IconBox";
|
||||||
import EmptyView from "./EmptyView.jsx";
|
import EmptyView from "./EmptyView";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
const ChartBox = ({
|
const ChartBox = ({
|
||||||
File renamed without changes.
File renamed without changes.
+1
-1
@@ -5,7 +5,7 @@ import { Stack, Box, Tooltip, Typography } from "@mui/material";
|
|||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import { formatDateWithTz } from "../../../../Utils/timeUtils.js";
|
import { formatDateWithTz } from "../../../Utils/timeUtils";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
|
|
||||||
const PlaceholderCheck = ({ daysToShow }) => {
|
const PlaceholderCheck = ({ daysToShow }) => {
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
import { Stack, Typography } from "@mui/material";
|
import { Stack, Typography } from "@mui/material";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import IconBox from "../../IconBox/index.jsx";
|
import IconBox from "../../IconBox";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
const LegendBox = ({ children, icon, header, sx }) => {
|
const LegendBox = ({ children, icon, header, sx }) => {
|
||||||
File renamed without changes.
+2
-2
@@ -12,11 +12,11 @@ import { Box, Stack, Typography } from "@mui/material";
|
|||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { useMemo, useState } from "react";
|
import { useMemo, useState } from "react";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
import { formatDateWithTz } from "../../../../Utils/timeUtils.js";
|
import { formatDateWithTz } from "../../../Utils/timeUtils";
|
||||||
import {
|
import {
|
||||||
tooltipDateFormatLookup,
|
tooltipDateFormatLookup,
|
||||||
tickDateFormatLookup,
|
tickDateFormatLookup,
|
||||||
} from "../Utils/chartUtilFunctions.js";
|
} from "../Utils/chartUtilFunctions";
|
||||||
|
|
||||||
import "./index.css";
|
import "./index.css";
|
||||||
const CustomToolTip = ({ active, payload, label, dateRange }) => {
|
const CustomToolTip = ({ active, payload, label, dateRange }) => {
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { Box, Stack, Tooltip, Typography } from "@mui/material";
|
import { Box, Stack, Tooltip, Typography } from "@mui/material";
|
||||||
import { formatDateWithTz } from "../../../../Utils/timeUtils.js";
|
import { formatDateWithTz } from "../../../Utils/timeUtils";
|
||||||
import { useEffect, useState, forwardRef } from "react";
|
import { useEffect, useState, forwardRef } from "react";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
File renamed without changes.
+2
-2
@@ -2,9 +2,9 @@ import PropTypes from "prop-types";
|
|||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
import { useTheme } from "@mui/material";
|
import { useTheme } from "@mui/material";
|
||||||
import { Text } from "recharts";
|
import { Text } from "recharts";
|
||||||
import { formatDateWithTz } from "../../../../Utils/timeUtils.js";
|
import { formatDateWithTz } from "../../../Utils/timeUtils";
|
||||||
import { Box, Stack, Typography } from "@mui/material";
|
import { Box, Stack, Typography } from "@mui/material";
|
||||||
import { tickDateFormatLookup, tooltipDateFormatLookup } from "./chartUtilFunctions.js";
|
import { tickDateFormatLookup, tooltipDateFormatLookup } from "./chartUtilFunctions";
|
||||||
/**
|
/**
|
||||||
* Custom tick component for rendering time with timezone.
|
* Custom tick component for rendering time with timezone.
|
||||||
*
|
*
|
||||||
File renamed without changes.
@@ -1,7 +1,7 @@
|
|||||||
import "./check.css";
|
import "./check.css";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import CheckGrey from "../../../assets/icons/check.svg?react";
|
import CheckGrey from "../../assets/icons/check.svg?react";
|
||||||
import CheckOutlined from "../../../assets/icons/check-outlined.svg?react";
|
import CheckOutlined from "../../assets/icons/check-outlined.svg?react";
|
||||||
import { Box, Stack, Typography } from "@mui/material";
|
import { Box, Stack, Typography } from "@mui/material";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
|
|
||||||
File renamed without changes.
File renamed without changes.
+1
-1
@@ -10,7 +10,7 @@ import MenuItem from "@mui/material/MenuItem";
|
|||||||
import Drawer from "@mui/material/Drawer";
|
import Drawer from "@mui/material/Drawer";
|
||||||
import MenuIcon from "@mui/icons-material/Menu";
|
import MenuIcon from "@mui/icons-material/Menu";
|
||||||
import CloseRoundedIcon from "@mui/icons-material/CloseRounded";
|
import CloseRoundedIcon from "@mui/icons-material/CloseRounded";
|
||||||
import ThemeSwitch from "../ThemeSwitch/index.jsx";
|
import ThemeSwitch from "../ThemeSwitch";
|
||||||
import { useTheme } from "@mui/material/styles";
|
import { useTheme } from "@mui/material/styles";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
import { useLocation, useNavigate } from "react-router-dom";
|
import { useLocation, useNavigate } from "react-router-dom";
|
||||||
File renamed without changes.
File renamed without changes.
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
import { Box, Stack, Typography } from "@mui/material";
|
import { Box, Stack, Typography } from "@mui/material";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import ConfigBox from "../ConfigBox/index.jsx";
|
import ConfigBox from "../ConfigBox";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ConfigRow is a styled container used to layout content in a row format with specific padding, border, and spacing.
|
* ConfigRow is a styled container used to layout content in a row format with specific padding, border, and spacing.
|
||||||
File renamed without changes.
@@ -1,6 +1,6 @@
|
|||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import { Button, Stack } from "@mui/material";
|
import { Button, Stack } from "@mui/material";
|
||||||
import { GenericDialog } from "./genericDialog.jsx";
|
import { GenericDialog } from "./genericDialog";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
File renamed without changes.
File renamed without changes.
+3
-3
@@ -1,8 +1,8 @@
|
|||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import Box from "@mui/material/Box";
|
import Box from "@mui/material/Box";
|
||||||
import Background from "../../../assets/Images/background-grid.svg?react";
|
import Background from "../../assets/Images/background-grid.svg?react";
|
||||||
import OutputAnimation from "../../../assets/Animations/output.gif";
|
import OutputAnimation from "../../assets/Animations/output.gif";
|
||||||
import DarkmodeOutput from "../../../assets/Animations/darkmodeOutput.gif";
|
import DarkmodeOutput from "../../assets/Animations/darkmodeOutput.gif";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
const FallbackBackground = () => {
|
const FallbackBackground = () => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
+1
-1
@@ -2,7 +2,7 @@ import PropTypes from "prop-types";
|
|||||||
import { useTheme } from "@mui/material/styles";
|
import { useTheme } from "@mui/material/styles";
|
||||||
import Box from "@mui/material/Box";
|
import Box from "@mui/material/Box";
|
||||||
import Stack from "@mui/material/Stack";
|
import Stack from "@mui/material/Stack";
|
||||||
import Check from "../Check/Check.jsx";
|
import Check from "../Check/Check";
|
||||||
const FallbackCheckList = ({ checks, type }) => {
|
const FallbackCheckList = ({ checks, type }) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
return (
|
return (
|
||||||
File renamed without changes.
+1
-1
@@ -3,7 +3,7 @@ import { useTheme } from "@mui/material/styles";
|
|||||||
import Link from "@mui/material/Link";
|
import Link from "@mui/material/Link";
|
||||||
import { Link as RouterLink } from "react-router-dom";
|
import { Link as RouterLink } from "react-router-dom";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import Alert from "../Alert/index.jsx";
|
import Alert from "../Alert";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
const renderWarningMessage = (t) => {
|
const renderWarningMessage = (t) => {
|
||||||
File renamed without changes.
File renamed without changes.
+5
-5
@@ -2,11 +2,11 @@ import PropTypes from "prop-types";
|
|||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { Box, Stack } from "@mui/material";
|
import { Box, Stack } from "@mui/material";
|
||||||
import "./index.css";
|
import "./index.css";
|
||||||
import FallbackTitle from "./FallbackTitle.jsx";
|
import FallbackTitle from "./FallbackTitle";
|
||||||
import FallbackCheckList from "./FallbackCheckList.jsx";
|
import FallbackCheckList from "./FallbackCheckList";
|
||||||
import FallbackActionButtons from "./FallBackActionButtons.jsx";
|
import FallbackActionButtons from "./FallBackActionButtons";
|
||||||
import FallbackBackground from "./FallbackBackground.jsx";
|
import FallbackBackground from "./FallbackBackground";
|
||||||
import FallbackContainer from "./FallbackContainer.jsx";
|
import FallbackContainer from "./FallbackContainer";
|
||||||
/**
|
/**
|
||||||
* Fallback component to display a fallback UI with a title, a list of checks, and a navigation button.
|
* Fallback component to display a fallback UI with a title, a list of checks, and a navigation button.
|
||||||
*
|
*
|
||||||
File renamed without changes.
File renamed without changes.
+3
-3
@@ -1,8 +1,8 @@
|
|||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { Box, Stack } from "@mui/material";
|
import { Box, Stack } from "@mui/material";
|
||||||
import OutputAnimation from "../../../assets/Animations/output.gif";
|
import OutputAnimation from "../../assets/Animations/output.gif";
|
||||||
import DarkmodeOutput from "../../../assets/Animations/darkmodeOutput.gif";
|
import DarkmodeOutput from "../../assets/Animations/darkmodeOutput.gif";
|
||||||
import Background from "../../../assets/Images/background-grid.svg?react";
|
import Background from "../../assets/Images/background-grid.svg?react";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
import { logger } from "../../../Utils/Logger.js";
|
import { logger } from "../../Utils/Logger";
|
||||||
import { networkService } from "../../../main.jsx";
|
import { networkService } from "../../main";
|
||||||
|
|
||||||
const withAdminCheck = (WrappedComponent) => {
|
const withAdminCheck = (WrappedComponent) => {
|
||||||
const WithAdminCheck = (props) => {
|
const WithAdminCheck = (props) => {
|
||||||
File renamed without changes.
@@ -1,8 +1,7 @@
|
|||||||
import { Stack, Typography } from "@mui/material";
|
import { Stack, Typography } from "@mui/material";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import Dot from "../Dot/index.jsx";
|
import Dot from "../Dot";
|
||||||
import { StatusLabel } from "@/Components/v1/Label/index.jsx";
|
|
||||||
/**
|
/**
|
||||||
* Host component.
|
* Host component.
|
||||||
* This subcomponent receives a params object and displays the host details.
|
* This subcomponent receives a params object and displays the host details.
|
||||||
@@ -15,7 +14,7 @@ import { StatusLabel } from "@/Components/v1/Label/index.jsx";
|
|||||||
* @param {number} params.percentage - The percentage to display.
|
* @param {number} params.percentage - The percentage to display.
|
||||||
* @returns {React.ElementType} Returns a div element with the host details.
|
* @returns {React.ElementType} Returns a div element with the host details.
|
||||||
*/
|
*/
|
||||||
const Host = ({ url, title, percentageColor, percentage, showURL, status }) => {
|
const Host = ({ url, title, percentageColor, percentage, showURL }) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
return (
|
return (
|
||||||
<Stack>
|
<Stack>
|
||||||
@@ -23,36 +22,21 @@ const Host = ({ url, title, percentageColor, percentage, showURL, status }) => {
|
|||||||
direction="row"
|
direction="row"
|
||||||
position="relative"
|
position="relative"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
gap={theme.spacing(5)}
|
gap={theme.spacing(4)}
|
||||||
>
|
>
|
||||||
<Typography
|
{title}
|
||||||
variant="h6"
|
|
||||||
sx={{
|
|
||||||
fontWeight: 600,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{title}
|
|
||||||
</Typography>
|
|
||||||
|
|
||||||
{percentageColor && percentage && (
|
{percentageColor && percentage && (
|
||||||
<>
|
<>
|
||||||
<Dot />
|
<Dot />
|
||||||
<Typography
|
<Typography
|
||||||
variant="h6"
|
component="span"
|
||||||
sx={{
|
sx={{
|
||||||
fontWeight: 600,
|
|
||||||
color: percentageColor,
|
color: percentageColor,
|
||||||
|
fontWeight: 500,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{percentage}%
|
{percentage}%
|
||||||
</Typography>
|
</Typography>
|
||||||
{status && (
|
|
||||||
<StatusLabel
|
|
||||||
status={status}
|
|
||||||
text={status}
|
|
||||||
customStyles={{ textTransform: "capitalize" }}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
@@ -67,7 +51,6 @@ Host.propTypes = {
|
|||||||
percentage: PropTypes.string,
|
percentage: PropTypes.string,
|
||||||
url: PropTypes.string,
|
url: PropTypes.string,
|
||||||
showURL: PropTypes.bool,
|
showURL: PropTypes.bool,
|
||||||
status: PropTypes.string,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Host;
|
export default Host;
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import { useTheme } from "@mui/material";
|
import { useTheme } from "@mui/material";
|
||||||
import { BaseLabel } from "../Label/index.jsx";
|
import { BaseLabel } from "../Label";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @component
|
* @component
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import i18n from "../../../Utils/i18n.js";
|
import i18n from "../../Utils/i18n";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
const I18nLoader = () => {
|
const I18nLoader = () => {
|
||||||
File renamed without changes.
File renamed without changes.
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
import { RowContainer } from "../StandardContainer/index.jsx";
|
import { RowContainer } from "../StandardContainer";
|
||||||
import { Stack, Typography } from "@mui/material";
|
import { Stack, Typography } from "@mui/material";
|
||||||
import Image from "../Image/index.jsx";
|
import Image from "../Image";
|
||||||
|
|
||||||
import { useTheme } from "@mui/material/styles";
|
import { useTheme } from "@mui/material/styles";
|
||||||
|
|
||||||
File renamed without changes.
+3
-2
@@ -1,8 +1,9 @@
|
|||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import { FormControlLabel, Checkbox as MuiCheckbox } from "@mui/material";
|
import { FormControlLabel, Checkbox as MuiCheckbox } from "@mui/material";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import CheckboxOutline from "../../../../assets/icons/checkbox-outline.svg?react";
|
import CheckboxOutline from "../../../assets/icons/checkbox-outline.svg?react";
|
||||||
import CheckboxFilled from "../../../../assets/icons/checkbox-filled.svg?react";
|
import CheckboxFilled from "../../../assets/icons/checkbox-filled.svg?react";
|
||||||
|
import "./index.css";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checkbox Component
|
* Checkbox Component
|
||||||
File renamed without changes.
File renamed without changes.
+2
-2
@@ -1,10 +1,10 @@
|
|||||||
// Components
|
// Components
|
||||||
import { Box, Stack, Typography } from "@mui/material";
|
import { Box, Stack, Typography } from "@mui/material";
|
||||||
import CloudUploadIcon from "@mui/icons-material/CloudUpload";
|
import CloudUploadIcon from "@mui/icons-material/CloudUpload";
|
||||||
import Image from "../../Image/index.jsx";
|
import Image from "../../../Components/Image";
|
||||||
import TextField from "@mui/material/TextField";
|
import TextField from "@mui/material/TextField";
|
||||||
import IconButton from "@mui/material/IconButton";
|
import IconButton from "@mui/material/IconButton";
|
||||||
import ProgressUpload from "../../ProgressBars/index.jsx";
|
import ProgressUpload from "../../ProgressBars";
|
||||||
import ImageIcon from "@mui/icons-material/Image";
|
import ImageIcon from "@mui/icons-material/Image";
|
||||||
|
|
||||||
// Utils
|
// Utils
|
||||||
File renamed without changes.
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import { FormControlLabel, Radio as MUIRadio, Typography } from "@mui/material";
|
import { FormControlLabel, Radio as MUIRadio, Typography } from "@mui/material";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import RadioChecked from "../../../../assets/icons/radio-checked.svg?react";
|
import RadioChecked from "../../../assets/icons/radio-checked.svg?react";
|
||||||
import "./index.css";
|
import "./index.css";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
+2
-2
@@ -8,10 +8,10 @@ import {
|
|||||||
Checkbox,
|
Checkbox,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import SearchIcon from "../../../../assets/icons/search.svg?react";
|
import SearchIcon from "../../../assets/icons/search.svg?react";
|
||||||
import React, { useEffect } from "react";
|
import React, { useEffect } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import FieldWrapper from "../FieldWrapper/index.jsx";
|
import FieldWrapper from "../FieldWrapper";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search component using Material UI's Autocomplete.
|
* Search component using Material UI's Autocomplete.
|
||||||
File renamed without changes.
+1
-1
@@ -2,7 +2,7 @@ import PropTypes from "prop-types";
|
|||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { MenuItem, Select as MuiSelect, Stack, Typography } from "@mui/material";
|
import { MenuItem, Select as MuiSelect, Stack, Typography } from "@mui/material";
|
||||||
import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
|
import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
|
||||||
import FieldWrapper from "../FieldWrapper/index.jsx";
|
import FieldWrapper from "../FieldWrapper";
|
||||||
|
|
||||||
import "./index.css";
|
import "./index.css";
|
||||||
|
|
||||||
+1
-1
@@ -4,7 +4,7 @@ import PropTypes from "prop-types";
|
|||||||
import VisibilityOff from "@mui/icons-material/VisibilityOff";
|
import VisibilityOff from "@mui/icons-material/VisibilityOff";
|
||||||
import Visibility from "@mui/icons-material/Visibility";
|
import Visibility from "@mui/icons-material/Visibility";
|
||||||
import ReorderRoundedIcon from "@mui/icons-material/ReorderRounded";
|
import ReorderRoundedIcon from "@mui/icons-material/ReorderRounded";
|
||||||
import DeleteIcon from "../../../../../assets/icons/trash-bin.svg?react";
|
import DeleteIcon from "../../../../assets/icons/trash-bin.svg?react";
|
||||||
|
|
||||||
export const HttpAdornment = ({ https }) => {
|
export const HttpAdornment = ({ https }) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
+1
-1
@@ -2,7 +2,7 @@ import { Stack, TextField, Typography } from "@mui/material";
|
|||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { forwardRef, useState, cloneElement } from "react";
|
import { forwardRef, useState, cloneElement } from "react";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import FieldWrapper from "../FieldWrapper/index.jsx";
|
import FieldWrapper from "../FieldWrapper";
|
||||||
|
|
||||||
const getSx = (theme, type, maxWidth) => {
|
const getSx = (theme, type, maxWidth) => {
|
||||||
const sx = {
|
const sx = {
|
||||||
File renamed without changes.
@@ -147,9 +147,11 @@ const StatusLabel = ({ status, text, customStyles }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
|
width={7}
|
||||||
|
height={7}
|
||||||
bgcolor={theme.palette[themeColor].lowContrast}
|
bgcolor={theme.palette[themeColor].lowContrast}
|
||||||
borderRadius="0%"
|
borderRadius="50%"
|
||||||
marginRight="1px"
|
marginRight="5px"
|
||||||
/>
|
/>
|
||||||
</BaseLabel>
|
</BaseLabel>
|
||||||
);
|
);
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
import Box from "@mui/material/Box";
|
import Box from "@mui/material/Box";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import BackgroundSVG from "../../../../assets/Images/background.svg";
|
import BackgroundSVG from "../../../assets/Images/background.svg";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
|
|
||||||
const AppLayout = ({ children }) => {
|
const AppLayout = ({ children }) => {
|
||||||
File renamed without changes.
Loaded 100 of 613 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user