Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/gui/settings/dataset_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -417,4 +417,4 @@ def reset_settings(self):
self.dataset_updated.emit()
logger.info("重置数据集设置成功")
except Exception as e:
logger.error(f"重置数据集设置失败: {e}")
logger.error(f"重置数据集设置失败: {e}")
4 changes: 2 additions & 2 deletions src/gui/settings/gpu_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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}")
QMessageBox.critical(self, self.tr('error'), f"{self.tr('error')}: {e}")
4 changes: 2 additions & 2 deletions src/gui/settings/model_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -330,4 +330,4 @@ def save_common_settings(self):
logger.info("保存通用配置成功")
except Exception as e:
logger.error(f"保存通用配置失败: {e}")
QMessageBox.critical(self, "错误", f"保存通用配置失败:{e}")
QMessageBox.critical(self, "错误", f"保存通用配置失败:{e}")
4 changes: 2 additions & 2 deletions src/monitor/gpu_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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:
Expand Down