diff --git a/src/gui/settings/dataset_settings.py b/src/gui/settings/dataset_settings.py index 1fe97d0..83a97d1 100644 --- a/src/gui/settings/dataset_settings.py +++ b/src/gui/settings/dataset_settings.py @@ -145,7 +145,7 @@ def init_ui(self): self.details_label = QLabel() self.details_label.setWordWrap(True) self.details_label.setTextFormat(Qt.TextFormat.RichText) - self.details_label.setStyleSheet("QLabel { background-color: #f0f0f0; padding: 5px; border-radius: 3px; }") + self.details_label.setStyleSheet("QLabel { background-color: #707070; padding: 5px; border-radius: 3px; }") group_layout.addWidget(self.details_label) self.dataset_group.setLayout(group_layout) @@ -417,4 +417,4 @@ def reset_settings(self): self.dataset_updated.emit() logger.info("重置数据集设置成功") except Exception as e: - logger.error(f"重置数据集设置失败: {e}") \ No newline at end of file + logger.error(f"重置数据集设置失败: {e}") diff --git a/src/gui/settings/gpu_settings.py b/src/gui/settings/gpu_settings.py index 12fc2f9..24ff908 100644 --- a/src/gui/settings/gpu_settings.py +++ b/src/gui/settings/gpu_settings.py @@ -195,7 +195,7 @@ def init_ui(self): self.details_label = QLabel() self.details_label.setWordWrap(True) self.details_label.setTextFormat(Qt.TextFormat.RichText) - self.details_label.setStyleSheet("QLabel { background-color: #f0f0f0; padding: 5px; border-radius: 3px; }") + self.details_label.setStyleSheet("QLabel { background-color: #707070; padding: 5px; border-radius: 3px; }") group_layout.addWidget(self.details_label) self.server_group.setLayout(group_layout) @@ -367,4 +367,4 @@ def reset_settings(self): logger.info("重置GPU服务器设置成功") except Exception as e: logger.error(f"重置GPU服务器设置失败: {e}") - QMessageBox.critical(self, self.tr('error'), f"{self.tr('error')}: {e}") \ No newline at end of file + QMessageBox.critical(self, self.tr('error'), f"{self.tr('error')}: {e}") diff --git a/src/gui/settings/model_settings.py b/src/gui/settings/model_settings.py index e0da4f4..dbd418a 100644 --- a/src/gui/settings/model_settings.py +++ b/src/gui/settings/model_settings.py @@ -154,7 +154,7 @@ def init_ui(self): self.details_label = QLabel() self.details_label.setWordWrap(True) self.details_label.setTextFormat(Qt.TextFormat.RichText) - self.details_label.setStyleSheet("QLabel { background-color: #f0f0f0; padding: 5px; border-radius: 3px; }") + self.details_label.setStyleSheet("QLabel { background-color: #707070; padding: 5px; border-radius: 3px; }") group_layout.addWidget(self.details_label) self.model_group.setLayout(group_layout) @@ -330,4 +330,4 @@ def save_common_settings(self): logger.info("保存通用配置成功") except Exception as e: logger.error(f"保存通用配置失败: {e}") - QMessageBox.critical(self, "错误", f"保存通用配置失败:{e}") \ No newline at end of file + QMessageBox.critical(self, "错误", f"保存通用配置失败:{e}") diff --git a/src/monitor/gpu_monitor.py b/src/monitor/gpu_monitor.py index 2c465d5..e556681 100644 --- a/src/monitor/gpu_monitor.py +++ b/src/monitor/gpu_monitor.py @@ -175,7 +175,7 @@ def _get_network_speed(self) -> Dict[str, float]: """获取网络速度""" try: # 获取当前网络数据 - net_command = "cat /proc/net/dev | grep -E 'eth0|ens|enp' | head -n1 | awk '{print $2,$10}'" + net_command = "cat /proc/net/dev | grep -E 'eth0|ens|enp|wlp|wlan' | head -n1 | awk '{print $2,$10}'" net_output = self._execute_command(net_command) if not net_output: return {'receive': 0, 'transmit': 0, 'receive_rate': 0.1, 'send_rate': 0.1} @@ -315,7 +315,7 @@ def get_stats(self, db_manager=None) -> Optional[GPUStats]: # 获取网络IO信息 stdin, stdout, stderr = self.client.exec_command( - "cat /proc/net/dev | grep -e eth0 -e ens -e eno -e enp | awk '{print $2,$10}'" + r"cat /proc/net/dev | grep -E '\b(eth|ens|enp|eno|wl|wlp|wlan)[a-z0-9]*\b:' | awk '{print $2,$10}' || echo '0 0'" ) net_output = stdout.read().decode().strip().split() if len(net_output) >= 2: