Sites (Control Panel)
The Sites page is the main dashboard for GSM Middleware. It displays all configured e-commerce sites and provides tools for managing site configurations, testing connections, and monitoring sync status.
Overview
Navigate to GSM Middleware → Sites (formerly "Control Panel") to access the main dashboard.
Key Features:
- View all configured BigCommerce and WooCommerce sites
- Add, edit, and delete site configurations
- Test API connections
- Toggle sites active/inactive
- View site statistics and health status
- Trigger manual sync operations
Permission Required: manage_gsm_middleware
Dashboard Layout
Active Environment Badge
The page header displays the currently active database environment (e.g., "Live", "Beta", "Dev", "Local") as a colored badge, so you always know which database you're working with.
Statistics Bar
The StatsBar component shows system-wide metrics:
- Total Sites — Number of configured sites
- Active Sites — Sites currently enabled for sync
- Pending Orders — Orders waiting for Business Central export
Site Table
The main table lists all sites with the following columns:
| Column | Description |
|---|---|
| Site Name | Display name of the store |
| Platform | BigCommerce or WooCommerce icon/label |
| Status | Active (green) or Inactive (gray) toggle |
| Actions | Edit, Test Connection, Delete |
Managing Sites
Adding a New Site
- Click Add Site button
- Fill in site details in the modal:
- Name — Display name for the site
- Platform — BigCommerce or WooCommerce
- Site URL — Store URL
- API Credentials — Platform-specific API keys/tokens
- Configure sync tabs (see Sync Tabs)
- Click Test Connection to verify credentials
- Click Save to add the site
Editing a Site
- Click Edit on the site row
- The
SiteFormModalopens with tabbed configuration:- Order Sync — Enable toggle, health check URL
- Inventory Sync — Enable toggle, health URL, webhook secret (BigCommerce)
- Tracking Sync — Enable toggle, health URL
- BazaarVoice — Enable toggle, SFTP credentials
- Kit Builder — Enable toggle (BigCommerce only)
- Modify settings as needed
- Click Save to apply changes
Toggling Active Status
Click the status toggle to enable or disable a site. Inactive sites are excluded from all sync operations and crontab generation.
Deleting a Site
Click Delete and confirm. This removes the site configuration from the database. Associated order and item data in the tasks database is not deleted.
Testing Connections
Click Test Connection to verify that the site's API credentials are valid and the store is reachable. Results appear inline with success/failure indicators.
React Architecture
The Sites page is a React application rendered into #gsm-middleware-root:
- Entry point:
assets/js/index.js→build/index.js - Root component:
App.jsx - Key components:
SiteTable.jsx— Site list with actionsSiteRow.jsx— Individual site rowSiteFormModal.jsx— Add/edit modal with tabbed sync configStatsBar.jsx— Dashboard statistics
Uses @wordpress/components for UI consistency (Modal, Button, Notice, TabPanel, ToggleControl, TextControl).
Related Documentation
- Site Management — Detailed site configuration guide
- Sync Tabs — Per-sync-type configuration
- DB Environments — Database environment management
- Testing Tools — Test order creation
- Bulk Credentials — Bulk credential management