feat: add kiosk settings UI and co-managed client filtering
- Created kiosk_settings table for configuration storage - Added API endpoints for kiosk settings (GET/POST) - Filter out co-managed clients (configurable company exclusions) - Built comprehensive settings UI at /kiosk/settings - Allow excluding specific companies from kiosk display - Configurable cycle interval, refresh interval, and RMM alert toggle - Updated dashboard link to point to settings page - Applied company exclusion filter to all ticket queries and activity feed - Default excludes Thrasher Group (ID: 29861361)
This commit is contained in:
parent
724791121a
commit
26bfd503f1
6 changed files with 478 additions and 12 deletions
23
migrations/019_create_kiosk_settings.sql
Normal file
23
migrations/019_create_kiosk_settings.sql
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
-- Create kiosk_settings table to store kiosk configuration
|
||||
CREATE TABLE IF NOT EXISTS kiosk_settings (
|
||||
id SERIAL PRIMARY KEY,
|
||||
setting_key VARCHAR(255) UNIQUE NOT NULL,
|
||||
setting_value TEXT,
|
||||
description TEXT,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- Create index on setting_key for faster lookups
|
||||
CREATE INDEX IF NOT EXISTS idx_kiosk_settings_key ON kiosk_settings(setting_key);
|
||||
|
||||
-- Insert default settings
|
||||
INSERT INTO kiosk_settings (setting_key, setting_value, description) VALUES
|
||||
('excluded_company_ids', '29861361', 'Comma-separated list of company IDs to exclude from kiosk (co-managed clients)'),
|
||||
('cycle_interval', '7', 'Default cycle interval in seconds (3-15)'),
|
||||
('refresh_interval', '60', 'Data refresh interval in seconds'),
|
||||
('show_rmm_alerts', 'false', 'Whether to show RMM alert tickets')
|
||||
ON CONFLICT (setting_key) DO NOTHING;
|
||||
|
||||
-- Add comment to table
|
||||
COMMENT ON TABLE kiosk_settings IS 'Configuration settings for the executive kiosk dashboard';
|
||||
Loading…
Add table
Add a link
Reference in a new issue