주변 스캔 기능을 정리
This commit is contained in:
@@ -153,17 +153,6 @@ function setting_definitions(): array
|
||||
'security.shell_default_timeout_seconds' => ['group' => 'security', 'label' => '기본 명령 timeout', 'type' => 'number', 'default' => 8, 'min' => 2, 'max' => 60, 'step' => 1, 'unit' => '초'],
|
||||
'security.allow_wifi_restart' => ['group' => 'security', 'label' => 'WiFi restart 허용', 'type' => 'boolean', 'default' => 1],
|
||||
'security.allow_wifi_reload' => ['group' => 'security', 'label' => 'WiFi reload 허용', 'type' => 'boolean', 'default' => 1],
|
||||
'wifi.scan_enabled' => ['group' => 'wifi', 'label' => '주변 WiFi 스캔', 'type' => 'boolean', 'default' => 1],
|
||||
'wifi.scan_cache_seconds' => ['group' => 'wifi', 'label' => '주변 WiFi 스캔 캐시', 'type' => 'number', 'default' => 60, 'min' => 10, 'max' => 600, 'step' => 5, 'unit' => '초'],
|
||||
'wifi.scan_timeout_seconds' => ['group' => 'wifi', 'label' => '주변 WiFi 스캔 timeout', 'type' => 'number', 'default' => 8, 'min' => 3, 'max' => 30, 'step' => 1, 'unit' => '초'],
|
||||
'wifi.scan_max_networks' => ['group' => 'wifi', 'label' => '주변 WiFi 표시 개수', 'type' => 'number', 'default' => 80, 'min' => 10, 'max' => 300, 'step' => 10, 'unit' => '개'],
|
||||
'wifi.scan_include_raw' => ['group' => 'wifi', 'label' => '주변 WiFi 원문 일부 표시', 'type' => 'boolean', 'default' => 0],
|
||||
'bluetooth.scan_enabled' => ['group' => 'wifi', 'label' => '주변 Bluetooth 스캔', 'type' => 'boolean', 'default' => 1],
|
||||
'bluetooth.scan_cache_seconds' => ['group' => 'wifi', 'label' => '주변 Bluetooth 스캔 캐시', 'type' => 'number', 'default' => 60, 'min' => 10, 'max' => 600, 'step' => 5, 'unit' => '초'],
|
||||
'bluetooth.scan_timeout_seconds' => ['group' => 'wifi', 'label' => '주변 Bluetooth 스캔 timeout', 'type' => 'number', 'default' => 12, 'min' => 5, 'max' => 60, 'step' => 1, 'unit' => '초'],
|
||||
'bluetooth.scan_max_devices' => ['group' => 'wifi', 'label' => '주변 Bluetooth 표시 개수', 'type' => 'number', 'default' => 80, 'min' => 10, 'max' => 300, 'step' => 10, 'unit' => '개'],
|
||||
'bluetooth.scan_include_raw' => ['group' => 'wifi', 'label' => '주변 Bluetooth 원문 일부 표시', 'type' => 'boolean', 'default' => 0],
|
||||
|
||||
'fan.auto_min_temp' => ['group' => 'fan', 'label' => '팬 시작 온도', 'type' => 'number', 'default' => 50, 'min' => 30, 'max' => 90, 'step' => 0.5, 'unit' => 'C'],
|
||||
'fan.auto_max_temp' => ['group' => 'fan', 'label' => '팬 최대 온도', 'type' => 'number', 'default' => 80, 'min' => 45, 'max' => 100, 'step' => 0.5, 'unit' => 'C'],
|
||||
'fan.full_temp' => ['group' => 'fan', 'label' => '즉시 최대 PWM 온도', 'type' => 'number', 'default' => 80, 'min' => 45, 'max' => 100, 'step' => 0.5, 'unit' => 'C'],
|
||||
@@ -535,73 +524,6 @@ function bootstrap_db(): void
|
||||
COLLATE=utf8mb4_unicode_ci
|
||||
");
|
||||
|
||||
$pdo->exec("
|
||||
CREATE TABLE IF NOT EXISTS wifi_scan_observations (
|
||||
bssid VARCHAR(17) NOT NULL PRIMARY KEY,
|
||||
iface VARCHAR(32) NOT NULL,
|
||||
band VARCHAR(16) NOT NULL,
|
||||
ssid VARCHAR(255) NULL,
|
||||
freq INT NULL,
|
||||
channel INT NULL,
|
||||
signal_dbm DECIMAL(6,2) NULL,
|
||||
signal_text VARCHAR(32) NULL,
|
||||
security_text VARCHAR(255) NULL,
|
||||
capability_text VARCHAR(255) NULL,
|
||||
rates_text VARCHAR(255) NULL,
|
||||
channel_width VARCHAR(64) NULL,
|
||||
raw_text MEDIUMTEXT NULL,
|
||||
detail_json LONGTEXT NULL,
|
||||
ht TINYINT(1) NOT NULL DEFAULT 0,
|
||||
vht TINYINT(1) NOT NULL DEFAULT 0,
|
||||
he TINYINT(1) NOT NULL DEFAULT 0,
|
||||
first_seen_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
last_seen_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
ON UPDATE CURRENT_TIMESTAMP,
|
||||
INDEX idx_last_seen_at (last_seen_at),
|
||||
INDEX idx_band (band),
|
||||
INDEX idx_iface (iface)
|
||||
) ENGINE=InnoDB
|
||||
DEFAULT CHARSET=utf8mb4
|
||||
COLLATE=utf8mb4_unicode_ci
|
||||
");
|
||||
|
||||
$pdo->exec("
|
||||
CREATE TABLE IF NOT EXISTS bluetooth_scan_observations (
|
||||
address VARCHAR(17) NOT NULL PRIMARY KEY,
|
||||
name VARCHAR(255) NULL,
|
||||
alias VARCHAR(255) NULL,
|
||||
address_type VARCHAR(32) NULL,
|
||||
rssi INT NULL,
|
||||
tx_power INT NULL,
|
||||
class_text VARCHAR(64) NULL,
|
||||
icon VARCHAR(64) NULL,
|
||||
paired TINYINT(1) NULL,
|
||||
bonded TINYINT(1) NULL,
|
||||
trusted TINYINT(1) NULL,
|
||||
blocked TINYINT(1) NULL,
|
||||
connected TINYINT(1) NULL,
|
||||
legacy_pairing TINYINT(1) NULL,
|
||||
uuids_text MEDIUMTEXT NULL,
|
||||
manufacturer_data MEDIUMTEXT NULL,
|
||||
service_data MEDIUMTEXT NULL,
|
||||
service_uuids_text MEDIUMTEXT NULL,
|
||||
modalias VARCHAR(255) NULL,
|
||||
appearance VARCHAR(64) NULL,
|
||||
raw_text MEDIUMTEXT NULL,
|
||||
detail_json LONGTEXT NULL,
|
||||
first_seen_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
last_seen_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
ON UPDATE CURRENT_TIMESTAMP,
|
||||
INDEX idx_last_seen_at (last_seen_at),
|
||||
INDEX idx_rssi (rssi),
|
||||
INDEX idx_connected (connected)
|
||||
) ENGINE=InnoDB
|
||||
DEFAULT CHARSET=utf8mb4
|
||||
COLLATE=utf8mb4_unicode_ci
|
||||
");
|
||||
|
||||
$pdo->exec("
|
||||
CREATE TABLE IF NOT EXISTS remember_tokens (
|
||||
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
@@ -691,8 +613,6 @@ function bootstrap_db(): void
|
||||
"ALTER TABLE system_notice_state ADD COLUMN active_temp_delta DECIMAL(8,2) NULL AFTER active_reason",
|
||||
"ALTER TABLE system_notice_state ADD COLUMN active_rpm_delta DECIMAL(12,2) NULL AFTER active_temp_delta",
|
||||
"ALTER TABLE system_notice_state ADD COLUMN process_signature VARCHAR(255) NULL AFTER active_rpm_delta",
|
||||
"ALTER TABLE wifi_scan_observations ADD COLUMN raw_text MEDIUMTEXT NULL AFTER channel_width",
|
||||
"ALTER TABLE wifi_scan_observations ADD COLUMN detail_json LONGTEXT NULL AFTER raw_text",
|
||||
"ALTER TABLE sensor_logs DROP COLUMN disk_total_gb",
|
||||
"ALTER TABLE sensor_logs DROP COLUMN disk_used_gb",
|
||||
"ALTER TABLE sensor_logs DROP COLUMN disk_free_gb",
|
||||
|
||||
Reference in New Issue
Block a user