Compare commits
1 Commits
main
...
fix_react_
| Author | SHA1 | Date | |
|---|---|---|---|
| 8fe130f918 |
6
.env
Normal file
6
.env
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
VITE_API_URL=http://localhost:3000/api/v1
|
||||||
|
|
||||||
|
NODE_ENV=development
|
||||||
|
|
||||||
|
#Database Configuration
|
||||||
|
DB_NAME=ve_router_db
|
||||||
@ -4,35 +4,39 @@ services:
|
|||||||
frontend:
|
frontend:
|
||||||
build:
|
build:
|
||||||
context: ./router-dashboard
|
context: ./router-dashboard
|
||||||
dockerfile: Dockerfile
|
dockerfile: dockerfile
|
||||||
ports:
|
ports:
|
||||||
- "5173:5173"
|
- "5173:5173"
|
||||||
environment:
|
environment:
|
||||||
- VITE_API_URL=http://localhost:3001/api/v1
|
- VITE_API_URL=${VITE_API_URL}
|
||||||
|
restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- backend
|
backend:
|
||||||
volumes:
|
condition: service_healthy
|
||||||
- ./router-dashboard:/app
|
|
||||||
- /app/node_modules
|
|
||||||
|
|
||||||
backend:
|
backend:
|
||||||
build:
|
build:
|
||||||
context: ./ve-router-backend
|
context: ./ve-router-backend
|
||||||
dockerfile: Dockerfile
|
dockerfile: dockerfile
|
||||||
ports:
|
ports:
|
||||||
- "3001:3000"
|
- "3000:3000"
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=development
|
- NODE_ENV=${NODE_ENV}
|
||||||
- DB_HOST=host.docker.internal
|
- DB_HOST=host.docker.internal
|
||||||
- DB_PORT=3307
|
- DB_PORT=3306
|
||||||
- DB_USER=ve_router_user
|
- DB_USER=ve_router_user
|
||||||
- DB_PASSWORD=ve_router_password
|
- DB_PASSWORD=ve_router_password
|
||||||
- DB_NAME=ve_router_db
|
- DB_NAME=${DB_NAME}
|
||||||
|
restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- mysql
|
mysql:
|
||||||
volumes:
|
condition: service_healthy
|
||||||
- ./ve-router-backend:/app
|
healthcheck:
|
||||||
- /app/node_modules
|
test: ["CMD", "nc", "-z", "localhost", "3000"] # Netcat check to see if port 3000 is open
|
||||||
|
interval: 30s # Check every 30 seconds
|
||||||
|
retries: 3 # Retry 3 times before marking unhealthy
|
||||||
|
start_period: 30s # Wait 30 seconds before starting health checks
|
||||||
|
timeout: 10s # Wait for 10 seconds for each health check to respond
|
||||||
|
|
||||||
mysql:
|
mysql:
|
||||||
image: mysql:8.0
|
image: mysql:8.0
|
||||||
@ -44,11 +48,11 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- mysql_data:/var/lib/mysql
|
- mysql_data:/var/lib/mysql
|
||||||
# Correct paths for init scripts
|
# Correct paths for init scripts
|
||||||
- ./router-dashboard/sql/init.sql:/docker-entrypoint-initdb.d/01-init.sql
|
- ./sql:/docker-entrypoint-initdb.d
|
||||||
- ./router-dashboard/sql/seed_data.sql:/docker-entrypoint-initdb.d/02-seed_data.sql
|
|
||||||
ports:
|
ports:
|
||||||
- "3307:3306"
|
- "3306:3306"
|
||||||
command: --default-authentication-plugin=mysql_native_password
|
command: --default-authentication-plugin=mysql_native_password
|
||||||
|
restart: always
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "ve_router_user", "-pve_router_password"]
|
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "ve_router_user", "-pve_router_password"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
VITE_API_URL=http://localhost:3001/api/v1
|
VITE_API_URL=http://localhost:3000/api/v1
|
||||||
VITE_NODE_ENV=development
|
VITE_NODE_ENV=development
|
||||||
@ -8,7 +8,7 @@ RUN npm install
|
|||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
ENV VITE_API_URL=http://localhost:3001/api/v1
|
ENV VITE_API_URL=http://localhost:3000/api/v1
|
||||||
|
|
||||||
EXPOSE 5173
|
EXPOSE 5173
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@ interface Config {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const config: Config = {
|
const config: Config = {
|
||||||
apiUrl: import.meta.env.VITE_API_URL || 'http://localhost:3001/api/v1',
|
apiUrl: import.meta.env.VITE_API_URL || 'http://localhost:3000/api/v1',
|
||||||
environment: import.meta.env.VITE_NODE_ENV || 'development',
|
environment: import.meta.env.VITE_NODE_ENV || 'development',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// router-dashboard/src/services/api.service.ts
|
// router-dashboard/src/services/api.service.ts
|
||||||
import { RouterData, FilterType, BackendRouter } from '../types';
|
import { RouterData, FilterType, BackendRouter } from '../types';
|
||||||
|
|
||||||
const API_BASE_URL = 'http://localhost:3001/api/v1';
|
const API_BASE_URL = 'http://localhost:3000/api/v1';
|
||||||
|
|
||||||
// Default request options for all API calls
|
// Default request options for all API calls
|
||||||
const DEFAULT_OPTIONS = {
|
const DEFAULT_OPTIONS = {
|
||||||
|
|||||||
@ -118,7 +118,7 @@ CREATE TABLE IF NOT EXISTS status_type (
|
|||||||
category_id VARCHAR(50),
|
category_id VARCHAR(50),
|
||||||
name VARCHAR(100),
|
name VARCHAR(100),
|
||||||
code VARCHAR(100),
|
code VARCHAR(100),
|
||||||
description VARCHAR(20),
|
description VARCHAR(150),
|
||||||
severity INT
|
severity INT
|
||||||
);
|
);
|
||||||
|
|
||||||
121
sql/02-seed_data.sql
Normal file
121
sql/02-seed_data.sql
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
DELIMITER //
|
||||||
|
|
||||||
|
CREATE PROCEDURE seed_complete_router_system()
|
||||||
|
BEGIN
|
||||||
|
DECLARE done INT DEFAULT 0;
|
||||||
|
DECLARE table_name VARCHAR(64);
|
||||||
|
DECLARE table_cursor CURSOR FOR
|
||||||
|
SELECT table_name
|
||||||
|
FROM information_schema.tables
|
||||||
|
WHERE table_schema = DATABASE()
|
||||||
|
AND table_name IN (
|
||||||
|
'auth_log', 'user_sessions', 'user_router_access', 'users',
|
||||||
|
'container_status_history', 'router_status_history',
|
||||||
|
'container_status', 'vm_details', 'dicom_study_overview',
|
||||||
|
'system_status', 'router_settings_history', 'router_settings',
|
||||||
|
'routers', 'status_type', 'status_category'
|
||||||
|
);
|
||||||
|
|
||||||
|
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1;
|
||||||
|
|
||||||
|
-- Disable foreign key checks
|
||||||
|
SET FOREIGN_KEY_CHECKS=0;
|
||||||
|
|
||||||
|
-- Truncate all tables dynamically
|
||||||
|
OPEN table_cursor;
|
||||||
|
truncate_loop: LOOP
|
||||||
|
FETCH table_cursor INTO table_name;
|
||||||
|
IF done THEN
|
||||||
|
LEAVE truncate_loop;
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
SET @query = CONCAT('TRUNCATE TABLE ', table_name);
|
||||||
|
PREPARE stmt FROM @query;
|
||||||
|
EXECUTE stmt;
|
||||||
|
DEALLOCATE PREPARE stmt;
|
||||||
|
END LOOP;
|
||||||
|
CLOSE table_cursor;
|
||||||
|
|
||||||
|
-- Re-enable foreign key checks
|
||||||
|
SET FOREIGN_KEY_CHECKS=1;
|
||||||
|
|
||||||
|
-- Insert Status Categories
|
||||||
|
INSERT INTO status_category (name, description)
|
||||||
|
VALUES
|
||||||
|
('Network', 'Network related statuses'),
|
||||||
|
('Disk', 'Disk related statuses'),
|
||||||
|
('VPN', 'VPN connection statuses'),
|
||||||
|
('License', 'License statuses'),
|
||||||
|
('Container', 'Container related statuses')
|
||||||
|
ON DUPLICATE KEY UPDATE id = id;
|
||||||
|
|
||||||
|
-- Insert Status Types
|
||||||
|
INSERT INTO status_type (category_id, name, code, description, severity)
|
||||||
|
VALUES
|
||||||
|
(1, 'Online', 'NET_ONLINE', 'System is online', 1),
|
||||||
|
(1, 'Offline', 'NET_OFFLINE', 'System is offline', 5),
|
||||||
|
(2, 'Normal', 'DISK_NORMAL', 'Disk usage is normal', 1),
|
||||||
|
(2, 'Warning', 'DISK_WARNING', 'Disk usage is high', 3),
|
||||||
|
(2, 'Critical', 'DISK_CRITICAL', 'Disk usage is critical', 5),
|
||||||
|
(3, 'Connected', 'VPN_CONNECTED', 'VPN is connected', 1),
|
||||||
|
(3, 'Disconnected', 'VPN_DISCONNECTED', 'VPN is disconnected', 5),
|
||||||
|
(5, 'Running', 'CONTAINER_RUNNING', 'Container is running', 1),
|
||||||
|
(5, 'Stopped', 'CONTAINER_STOPPED', 'Container is stopped', 5)
|
||||||
|
ON DUPLICATE KEY UPDATE id = id;
|
||||||
|
|
||||||
|
-- Insert Routers
|
||||||
|
INSERT INTO routers (router_id, facility, router_alias, last_seen, vpn_status_code, disk_status_code, license_status, free_disk, total_disk, disk_usage)
|
||||||
|
VALUES
|
||||||
|
('RTR001', 'Main Hospital', 'MAIN_RAD', NOW(), 'VPN_CONNECTED', 'DISK_NORMAL', 'active', 500000000000, 1000000000000, 50.00),
|
||||||
|
('RTR002', 'Emergency Center', 'ER_RAD', NOW(), 'VPN_CONNECTED', 'DISK_WARNING', 'active', 400000000000, 1000000000000, 60.00),
|
||||||
|
('RTR003', 'Imaging Center', 'IMG_CENTER', NOW(), 'VPN_CONNECTED', 'DISK_NORMAL', 'active', 600000000000, 1000000000000, 40.00)
|
||||||
|
ON DUPLICATE KEY UPDATE id = id;
|
||||||
|
|
||||||
|
-- Store Router IDs
|
||||||
|
SET @router1_id = (SELECT id FROM routers WHERE router_id = 'RTR001');
|
||||||
|
SET @router2_id = (SELECT id FROM routers WHERE router_id = 'RTR002');
|
||||||
|
SET @router3_id = (SELECT id FROM routers WHERE router_id = 'RTR003');
|
||||||
|
|
||||||
|
-- Insert System Status
|
||||||
|
INSERT INTO system_status (router_id)
|
||||||
|
VALUES
|
||||||
|
(@router1_id),
|
||||||
|
(@router2_id),
|
||||||
|
(@router3_id)
|
||||||
|
ON DUPLICATE KEY UPDATE id = id;
|
||||||
|
|
||||||
|
-- Insert Container Status
|
||||||
|
INSERT INTO container_status (system_status_id, container_number, status_code)
|
||||||
|
VALUES
|
||||||
|
(1, 1, 'CONTAINER_RUNNING'),
|
||||||
|
(1, 2, 'CONTAINER_RUNNING'),
|
||||||
|
(2, 1, 'CONTAINER_RUNNING'),
|
||||||
|
(2, 2, 'CONTAINER_STOPPED'),
|
||||||
|
(3, 1, 'CONTAINER_RUNNING')
|
||||||
|
ON DUPLICATE KEY UPDATE id = id;
|
||||||
|
|
||||||
|
-- Insert VM Details
|
||||||
|
INSERT INTO vm_details (router_id, vm_number, status_code)
|
||||||
|
VALUES
|
||||||
|
(@router1_id, 1, 'NET_ONLINE'),
|
||||||
|
(@router2_id, 1, 'NET_ONLINE'),
|
||||||
|
(@router3_id, 1, 'NET_ONLINE')
|
||||||
|
ON DUPLICATE KEY UPDATE id = id;
|
||||||
|
|
||||||
|
-- Insert DICOM Study Overview
|
||||||
|
INSERT INTO dicom_study_overview (
|
||||||
|
router_id, study_instance_uid, patient_id, patient_name,
|
||||||
|
accession_number, study_date, modality, study_description,
|
||||||
|
series_instance_uid, procedure_code, referring_physician_name
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
(@router1_id, '1.2.840.113619.2.55.3.283116435.276.1543707218.134', 'P1', 'John Doe', 'ACC1234', '2024-03-15', 'CT', 'Chest CT', '1.2.840.113619.2.55.3.283116435.276.1543707219.135', 'CT001', 'Dr. Smith'),
|
||||||
|
(@router2_id, '1.2.840.113619.2.55.3.283116435.276.1543707218.136', 'P2', 'Jane Doe', 'ACC1235', '2024-03-15', 'MR', 'Brain MRI', '1.2.840.113619.2.55.3.283116435.276.1543707219.137', 'MR001', 'Dr. Johnson')
|
||||||
|
ON DUPLICATE KEY UPDATE id = id;
|
||||||
|
|
||||||
|
END //
|
||||||
|
|
||||||
|
DELIMITER ;
|
||||||
|
|
||||||
|
-- Automatically call the procedure after creation
|
||||||
|
CALL seed_complete_router_system();
|
||||||
@ -1,267 +0,0 @@
|
|||||||
DELIMITER //
|
|
||||||
|
|
||||||
CREATE PROCEDURE seed_complete_router_system()
|
|
||||||
BEGIN
|
|
||||||
-- Disable foreign key checks and start fresh
|
|
||||||
SET FOREIGN_KEY_CHECKS=0;
|
|
||||||
|
|
||||||
-- Conditionally clear existing data, only if the table exists
|
|
||||||
IF EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'auth_log') THEN
|
|
||||||
TRUNCATE TABLE auth_log;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'user_sessions') THEN
|
|
||||||
TRUNCATE TABLE user_sessions;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'user_router_access') THEN
|
|
||||||
TRUNCATE TABLE user_router_access;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'users') THEN
|
|
||||||
TRUNCATE TABLE users;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'container_status_history') THEN
|
|
||||||
TRUNCATE TABLE container_status_history;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'router_status_history') THEN
|
|
||||||
TRUNCATE TABLE router_status_history;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'container_status') THEN
|
|
||||||
TRUNCATE TABLE container_status;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'vm_details') THEN
|
|
||||||
TRUNCATE TABLE vm_details;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'dicom_study_overview') THEN
|
|
||||||
TRUNCATE TABLE dicom_study_overview;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'system_status') THEN
|
|
||||||
TRUNCATE TABLE system_status;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'router_settings_history') THEN
|
|
||||||
TRUNCATE TABLE router_settings_history;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'router_settings') THEN
|
|
||||||
TRUNCATE TABLE router_settings;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'routers') THEN
|
|
||||||
TRUNCATE TABLE routers;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'status_type') THEN
|
|
||||||
TRUNCATE TABLE status_type;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'status_category') THEN
|
|
||||||
TRUNCATE TABLE status_category;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
-- Re-enable foreign key checks
|
|
||||||
SET FOREIGN_KEY_CHECKS=1;
|
|
||||||
|
|
||||||
-- Insert status categories
|
|
||||||
INSERT INTO status_category (name, description)
|
|
||||||
VALUES
|
|
||||||
('Network', 'Network related statuses'),
|
|
||||||
('Disk', 'Disk related statuses'),
|
|
||||||
('VPN', 'VPN connection statuses'),
|
|
||||||
('License', 'License statuses'),
|
|
||||||
('Container', 'Container related statuses')
|
|
||||||
ON DUPLICATE KEY UPDATE id = id;
|
|
||||||
|
|
||||||
-- Insert status types
|
|
||||||
INSERT INTO status_type (category_id, name, code, description, severity)
|
|
||||||
VALUES
|
|
||||||
(1, 'Online', 'NET_ONLINE', 'System is online', 1),
|
|
||||||
(1, 'Offline', 'NET_OFFLINE', 'System is offline', 5),
|
|
||||||
(2, 'Normal', 'DISK_NORMAL', 'Disk usage is normal', 1),
|
|
||||||
(2, 'Warning', 'DISK_WARNING', 'Disk usage is high', 3),
|
|
||||||
(2, 'Critical', 'DISK_CRITICAL', 'Disk usage is critical', 5),
|
|
||||||
(3, 'Connected', 'VPN_CONNECTED', 'VPN is connected', 1),
|
|
||||||
(3, 'Disconnected', 'VPN_DISCONNECTED', 'VPN is disconnected', 5),
|
|
||||||
(5, 'Running', 'CONTAINER_RUNNING', 'Container is running', 1),
|
|
||||||
(5, 'Stopped', 'CONTAINER_STOPPED', 'Container is stopped', 5)
|
|
||||||
ON DUPLICATE KEY UPDATE id = id;
|
|
||||||
|
|
||||||
-- Insert routers
|
|
||||||
INSERT INTO routers (router_id, facility, router_alias, last_seen, vpn_status_code, disk_status_code, license_status, free_disk, total_disk, disk_usage)
|
|
||||||
VALUES
|
|
||||||
('RTR001', 'Main Hospital', 'MAIN_RAD', NOW(), 'VPN_CONNECTED', 'DISK_NORMAL', 'active', 500000000000, 1000000000000, 50.00),
|
|
||||||
('RTR002', 'Emergency Center', 'ER_RAD', NOW(), 'VPN_CONNECTED', 'DISK_WARNING', 'active', 400000000000, 1000000000000, 60.00),
|
|
||||||
('RTR003', 'Imaging Center', 'IMG_CENTER', NOW(), 'VPN_CONNECTED', 'DISK_NORMAL', 'active', 600000000000, 1000000000000, 40.00)
|
|
||||||
ON DUPLICATE KEY UPDATE id = id;
|
|
||||||
|
|
||||||
-- Store router IDs for later use
|
|
||||||
SET @router1_id = (SELECT id FROM routers WHERE router_id = 'RTR001');
|
|
||||||
SET @router2_id = (SELECT id FROM routers WHERE router_id = 'RTR002');
|
|
||||||
SET @router3_id = (SELECT id FROM routers WHERE router_id = 'RTR003');
|
|
||||||
|
|
||||||
-- Insert system status
|
|
||||||
INSERT INTO system_status (router_id)
|
|
||||||
VALUES
|
|
||||||
(@router1_id),
|
|
||||||
(@router2_id),
|
|
||||||
(@router3_id)
|
|
||||||
ON DUPLICATE KEY UPDATE id = id;
|
|
||||||
|
|
||||||
-- Insert container status
|
|
||||||
INSERT INTO container_status (system_status_id, container_number, status_code)
|
|
||||||
VALUES
|
|
||||||
(1, 1, 'CONTAINER_RUNNING'),
|
|
||||||
(1, 2, 'CONTAINER_RUNNING'),
|
|
||||||
(2, 1, 'CONTAINER_RUNNING'),
|
|
||||||
(2, 2, 'CONTAINER_STOPPED'),
|
|
||||||
(3, 1, 'CONTAINER_RUNNING')
|
|
||||||
ON DUPLICATE KEY UPDATE id = id;
|
|
||||||
|
|
||||||
-- Insert VM details
|
|
||||||
INSERT INTO vm_details (router_id, vm_number, status_code)
|
|
||||||
VALUES
|
|
||||||
(@router1_id, 1, 'NET_ONLINE'),
|
|
||||||
(@router2_id, 1, 'NET_ONLINE'),
|
|
||||||
(@router3_id, 1, 'NET_ONLINE')
|
|
||||||
ON DUPLICATE KEY UPDATE id = id;
|
|
||||||
|
|
||||||
-- Insert DICOM studies
|
|
||||||
INSERT INTO dicom_study_overview (
|
|
||||||
router_id,
|
|
||||||
study_instance_uid,
|
|
||||||
patient_id,
|
|
||||||
patient_name,
|
|
||||||
accession_number,
|
|
||||||
study_date,
|
|
||||||
modality,
|
|
||||||
study_description,
|
|
||||||
series_instance_uid,
|
|
||||||
procedure_code,
|
|
||||||
referring_physician_name
|
|
||||||
)
|
|
||||||
VALUES
|
|
||||||
(@router1_id, '1.2.840.113619.2.55.3.283116435.276.1543707218.134', 'P1', 'John Doe', 'ACC1234', '2024-03-15', 'CT', 'Chest CT', '1.2.840.113619.2.55.3.283116435.276.1543707219.135', 'CT001', 'Dr. Smith'),
|
|
||||||
(@router2_id, '1.2.840.113619.2.55.3.283116435.276.1543707218.136', 'P2', 'Jane Doe', 'ACC1235', '2024-03-15', 'MR', 'Brain MRI', '1.2.840.113619.2.55.3.283116435.276.1543707219.137', 'MR001', 'Dr. Johnson')
|
|
||||||
ON DUPLICATE KEY UPDATE id = id;
|
|
||||||
|
|
||||||
-- Insert router settings for each router (calls to upsert_router_settings are disabled)
|
|
||||||
-- Main Hospital Router
|
|
||||||
-- CALL upsert_router_settings(
|
|
||||||
-- @router1_id,
|
|
||||||
-- 'client',
|
|
||||||
-- '{
|
|
||||||
-- "dicom": {
|
|
||||||
-- "local": {
|
|
||||||
-- "aet": "MAIN_RAD",
|
|
||||||
-- "port": 104,
|
|
||||||
-- "file_directory": "/dicom_images",
|
|
||||||
-- "wait_time": 2,
|
|
||||||
-- "receiver_wait_time": 5000
|
|
||||||
-- },
|
|
||||||
-- "association": {
|
|
||||||
-- "acse_timeout": 5,
|
|
||||||
-- "dimse_timeout": 1000,
|
|
||||||
-- "network_timeout": 1000,
|
|
||||||
-- "retry": {
|
|
||||||
-- "attempts": 3,
|
|
||||||
-- "interval": 10
|
|
||||||
-- }
|
|
||||||
-- }
|
|
||||||
-- },
|
|
||||||
-- "rabbitmq": {
|
|
||||||
-- "local": {
|
|
||||||
-- "hostname": "router-rabbitmq",
|
|
||||||
-- "port": 5672,
|
|
||||||
-- "credentials": {
|
|
||||||
-- "username": "vitalengine",
|
|
||||||
-- "password": "vitalengine"
|
|
||||||
-- },
|
|
||||||
-- "settings": {
|
|
||||||
-- "durable": true,
|
|
||||||
-- "auto_delete": false,
|
|
||||||
-- "exchange_type": "direct",
|
|
||||||
-- "heartbeat": 50
|
|
||||||
-- }
|
|
||||||
-- }
|
|
||||||
-- },
|
|
||||||
-- "scp_connections": {
|
|
||||||
-- "pacs_nodes": [
|
|
||||||
-- {
|
|
||||||
-- "host": "pacsmain.example.com",
|
|
||||||
-- "port": 104
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- "host": "pacsbackup.example.com",
|
|
||||||
-- "port": 104
|
|
||||||
-- }
|
|
||||||
-- ]
|
|
||||||
-- }
|
|
||||||
-- }',
|
|
||||||
-- 'system',
|
|
||||||
-- 'Initial client configuration for Main Hospital'
|
|
||||||
-- );
|
|
||||||
|
|
||||||
-- Emergency Center Router
|
|
||||||
-- CALL upsert_router_settings(
|
|
||||||
-- @router2_id,
|
|
||||||
-- 'client',
|
|
||||||
-- '{
|
|
||||||
-- "dicom": {
|
|
||||||
-- "local": {
|
|
||||||
-- "aet": "ER_RAD",
|
|
||||||
-- "port": 104,
|
|
||||||
-- "file_directory": "/dicom_images",
|
|
||||||
-- "wait_time": 2,
|
|
||||||
-- "receiver_wait_time": 5000
|
|
||||||
-- },
|
|
||||||
-- "association": {
|
|
||||||
-- "acse_timeout": 5,
|
|
||||||
-- "dimse_timeout": 1000,
|
|
||||||
-- "network_timeout": 1000,
|
|
||||||
-- "retry": {
|
|
||||||
-- "attempts": 3,
|
|
||||||
-- "interval": 10
|
|
||||||
-- }
|
|
||||||
-- }
|
|
||||||
-- },
|
|
||||||
-- "rabbitmq": {
|
|
||||||
-- "local": {
|
|
||||||
-- "hostname": "router-rabbitmq",
|
|
||||||
-- "port": 5672,
|
|
||||||
-- "credentials": {
|
|
||||||
-- "username": "vitalengine",
|
|
||||||
-- "password": "vitalengine"
|
|
||||||
-- },
|
|
||||||
-- "settings": {
|
|
||||||
-- "durable": true,
|
|
||||||
-- "auto_delete": false,
|
|
||||||
-- "exchange_type": "direct",
|
|
||||||
-- "heartbeat": 50
|
|
||||||
-- }
|
|
||||||
-- }
|
|
||||||
-- },
|
|
||||||
-- "scp_connections": {
|
|
||||||
-- "pacs_nodes": [
|
|
||||||
-- {
|
|
||||||
-- "host": "pacsemergency.example.com",
|
|
||||||
-- "port": 104
|
|
||||||
-- }
|
|
||||||
-- ]
|
|
||||||
-- }
|
|
||||||
-- }',
|
|
||||||
-- 'system',
|
|
||||||
-- 'Initial client configuration for Emergency Center'
|
|
||||||
-- );
|
|
||||||
|
|
||||||
-- Insert settings for other routers as needed...
|
|
||||||
|
|
||||||
END //
|
|
||||||
|
|
||||||
DELIMITER ;
|
|
||||||
@ -7,7 +7,7 @@ CORS_ORIGIN=http://localhost:5173,http://localhost:3000
|
|||||||
|
|
||||||
# Database Configuration
|
# Database Configuration
|
||||||
DB_HOST=localhost
|
DB_HOST=localhost
|
||||||
DB_PORT=3307
|
DB_PORT=3306
|
||||||
DB_USER=root
|
DB_USER=root
|
||||||
DB_PASSWORD=rootpassword
|
DB_PASSWORD=rootpassword
|
||||||
DB_NAME=ve_router_db
|
DB_NAME=ve_router_db
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user