Fix ALT bootstrap package and polish UI controls

parent 036b6fa1
......@@ -23,6 +23,7 @@ cephdeploy.db
cephdeploy.db-wal
cephdeploy.db-shm
cephdeploy.db-journal
cephdeploy_run*.log
# Локальные конфиги
.env
......
......@@ -18,17 +18,17 @@
- lvm2
state: present
update_cache: true
when: ansible_os_family == "Debian"
when: ansible_facts["os_family"] == "Debian"
- name: Установить cephadm (ALT Linux)
community.general.apt_rpm:
package:
- cephadm
- python3-pip
- python3-module-pip
- lvm2
state: present
update_cache: true
when: ansible_os_family == "Altlinux"
when: ansible_facts["os_family"] == "Altlinux"
- name: Установить cephadm (RHEL/CentOS/Rocky)
ansible.builtin.dnf:
......@@ -37,7 +37,7 @@
- python3-pip
- lvm2
state: present
when: ansible_os_family == "RedHat"
when: ansible_facts["os_family"] == "RedHat"
# ── Проверка наличия chronyc и firewalld без зависимости от pkg-facts
- name: Проверить наличие chronyc
......
......@@ -149,7 +149,7 @@ class ClustersWidget(BasePage):
self._btn_create.setFixedHeight(32)
self._btn_create.setStyleSheet(
"QPushButton { background: #1565c0; color: #fff; border-radius: 5px; "
"font-size: 13px; font-weight: bold; }"
"font-size: 13px; font-weight: bold; padding: 0 12px; }"
"QPushButton:hover { background: #1976d2; }"
)
self._btn_create.clicked.connect(self._on_create)
......@@ -159,7 +159,7 @@ class ClustersWidget(BasePage):
self._btn_delete_cluster.setEnabled(False)
self._btn_delete_cluster.setStyleSheet(
"QPushButton { background: #b71c1c; color: #fff; border-radius: 5px; "
"font-size: 13px; font-weight: bold; }"
"font-size: 13px; font-weight: bold; padding: 0 12px; }"
"QPushButton:hover { background: #c62828; }"
"QPushButton:disabled { background: #333; color: #555; }"
)
......
......@@ -112,7 +112,8 @@ class DeployWidget(BasePage):
self._btn_check.setEnabled(False)
self._btn_check.setStyleSheet(
"QPushButton { background: #2a3040; color: #8fbcbb; "
"border: 1px solid #3a4050; border-radius: 5px; font-size: 13px; }"
"border: 1px solid #3a4050; border-radius: 5px; "
"font-size: 13px; padding: 0 12px; }"
"QPushButton:hover { background: #2e4a7a; color: #fff; }"
"QPushButton:disabled { color: #444; border-color: #2a3040; }"
)
......@@ -162,7 +163,7 @@ class DeployWidget(BasePage):
self._btn_deploy.setEnabled(False)
self._btn_deploy.setStyleSheet(
"QPushButton { background: #2e7d32; color: #fff; border-radius: 6px; "
"font-size: 13px; font-weight: bold; }"
"font-size: 13px; font-weight: bold; padding: 0 14px; }"
"QPushButton:hover { background: #388e3c; }"
"QPushButton:disabled { background: #333; color: #555; }"
)
......@@ -173,7 +174,7 @@ class DeployWidget(BasePage):
self._btn_stop.setEnabled(False)
self._btn_stop.setStyleSheet(
"QPushButton { background: #b71c1c; color: #fff; border-radius: 6px; "
"font-size: 13px; font-weight: bold; }"
"font-size: 13px; font-weight: bold; padding: 0 14px; }"
"QPushButton:hover { background: #c62828; }"
"QPushButton:disabled { background: #333; color: #555; }"
)
......@@ -184,7 +185,7 @@ class DeployWidget(BasePage):
self._btn_cleanup.setEnabled(False)
self._btn_cleanup.setStyleSheet(
"QPushButton { background: #5d4037; color: #fff; border-radius: 6px; "
"font-size: 13px; font-weight: bold; }"
"font-size: 13px; font-weight: bold; padding: 0 14px; }"
"QPushButton:hover { background: #6d4c41; }"
"QPushButton:disabled { background: #333; color: #555; }"
)
......@@ -195,7 +196,8 @@ class DeployWidget(BasePage):
self._btn_open_dir.setEnabled(False)
self._btn_open_dir.setStyleSheet(
"QPushButton { background: #2a3040; color: #8fbcbb; "
"border: 1px solid #3a4050; border-radius: 6px; font-size: 13px; }"
"border: 1px solid #3a4050; border-radius: 6px; "
"font-size: 13px; padding: 0 14px; }"
"QPushButton:hover { background: #2e4a7a; color: #fff; }"
"QPushButton:disabled { color: #444; border-color: #2a3040; }"
)
......
......@@ -128,6 +128,12 @@ class MonitoringDialog(QDialog):
self._btn_stop = QPushButton("⏹ Остановить")
self._btn_stop.setFixedHeight(32)
self._btn_stop.setEnabled(False)
self._btn_stop.setStyleSheet(
"QPushButton { background: #b71c1c; color: #fff; border-radius: 6px; "
"font-weight: bold; padding: 4px 18px; }"
"QPushButton:hover { background: #c62828; }"
"QPushButton:disabled { background: #333; color: #555; }"
)
self._btn_stop.clicked.connect(self._stop)
btn_row.addWidget(self._btn_start)
......
......@@ -249,7 +249,8 @@ class NetworkScanWidget(BasePage):
self._btn_scan.setFixedSize(160, 36)
self._btn_scan.setStyleSheet(
"QPushButton { background: #2e7d32; color: #fff; "
"border-radius: 6px; font-size: 13px; font-weight: bold; }"
"border-radius: 6px; font-size: 13px; font-weight: bold; "
"padding: 0 12px; }"
"QPushButton:hover { background: #388e3c; }"
"QPushButton:pressed { background: #1b5e20; }"
)
......@@ -260,7 +261,8 @@ class NetworkScanWidget(BasePage):
self._btn_stop.setEnabled(False)
self._btn_stop.setStyleSheet(
"QPushButton { background: #b71c1c; color: #fff; "
"border-radius: 6px; font-size: 13px; font-weight: bold; }"
"border-radius: 6px; font-size: 13px; font-weight: bold; "
"padding: 0 12px; }"
"QPushButton:hover { background: #c62828; }"
"QPushButton:disabled { background: #333; color: #555; }"
)
......@@ -487,7 +489,7 @@ class NetworkScanWidget(BasePage):
btn.setEnabled(info.ssh_auth_ok)
btn.setStyleSheet(
"QPushButton { background: #1565c0; color: #fff; border-radius: 4px; "
"font-size: 11px; }"
"font-size: 11px; padding: 0 8px; }"
"QPushButton:hover { background: #1976d2; }"
"QPushButton:disabled { background: #2a3040; color: #444; }"
)
......
......@@ -29,6 +29,7 @@ from PyQt6.QtWidgets import (
QWidget,
)
from core.config import AppConfig
from db import SessionLocal
from db.models import DeviceType, OSDRole
from db.repository import (
......@@ -100,14 +101,17 @@ class DiskFetchWorker(QThread):
client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
try:
ssh_timeout = max(20, int(AppConfig.get("scan_ssh_timeout") or 8))
client.connect(
self.ip, username=self.user, key_filename=self.key_path,
timeout=8, banner_timeout=8, auth_timeout=8,
timeout=ssh_timeout,
banner_timeout=ssh_timeout,
auth_timeout=ssh_timeout,
look_for_keys=False, allow_agent=False,
)
_, stdout, _ = client.exec_command(
"lsblk -J -o NAME,SIZE,ROTA,TYPE,FSTYPE,MOUNTPOINT,LABEL 2>/dev/null",
timeout=10,
timeout=ssh_timeout + 10,
)
raw = stdout.read().decode(errors="replace").strip()
try:
......@@ -484,7 +488,7 @@ class OSDWidget(BasePage):
self._btn_add.setEnabled(False)
self._btn_add.setStyleSheet(
"QPushButton { background: #1565c0; color: #fff; border-radius: 5px; "
"font-size: 13px; font-weight: bold; }"
"font-size: 13px; font-weight: bold; padding: 0 12px; }"
"QPushButton:hover { background: #1976d2; }"
"QPushButton:disabled { background: #333; color: #555; }"
)
......
......@@ -59,11 +59,12 @@ class ReportWidget(BasePage):
ctrl_layout.addWidget(self._cluster_combo)
self._btn_gen = QPushButton("🔄 Сформировать")
self._btn_gen.setFixedHeight(30)
self._btn_gen.setFixedHeight(32)
self._btn_gen.setEnabled(False)
self._btn_gen.setStyleSheet(
"QPushButton { background: #2a3040; color: #8fbcbb; "
"border: 1px solid #3a4050; border-radius: 5px; font-size: 13px; }"
"border: 1px solid #3a4050; border-radius: 5px; "
"font-size: 13px; padding: 0 12px; }"
"QPushButton:hover { background: #2e4a7a; color: #fff; }"
"QPushButton:disabled { color: #444; border-color: #2a3040; }"
)
......@@ -71,11 +72,12 @@ class ReportWidget(BasePage):
ctrl_layout.addWidget(self._btn_gen)
self._btn_save = QPushButton("💾 Сохранить HTML")
self._btn_save.setFixedHeight(30)
self._btn_save.setFixedHeight(32)
self._btn_save.setEnabled(False)
self._btn_save.setStyleSheet(
"QPushButton { background: #1565c0; color: #fff; "
"border-radius: 5px; font-size: 13px; font-weight: bold; }"
"border-radius: 5px; font-size: 13px; font-weight: bold; "
"padding: 0 12px; }"
"QPushButton:hover { background: #1976d2; }"
"QPushButton:disabled { background: #333; color: #555; }"
)
......
......@@ -227,7 +227,7 @@ class SettingsWidget(BasePage):
self._btn_save.setFixedHeight(34)
self._btn_save.setStyleSheet(
"QPushButton { background: #1565c0; color: #fff; border-radius: 6px; "
"font-size: 13px; font-weight: bold; }"
"font-size: 13px; font-weight: bold; padding: 0 14px; }"
"QPushButton:hover { background: #1976d2; }"
)
self._btn_save.clicked.connect(self._save)
......@@ -236,7 +236,8 @@ class SettingsWidget(BasePage):
self._btn_reset.setFixedHeight(34)
self._btn_reset.setStyleSheet(
"QPushButton { background: #2a3040; color: #8fbcbb; "
"border: 1px solid #3a4050; border-radius: 6px; font-size: 13px; }"
"border: 1px solid #3a4050; border-radius: 6px; "
"font-size: 13px; padding: 0 14px; }"
"QPushButton:hover { background: #2e4a7a; color: #fff; }"
)
self._btn_reset.clicked.connect(self._reset)
......
......@@ -297,7 +297,8 @@ class StatusWidget(BasePage):
self._btn_refresh.setEnabled(False)
self._btn_refresh.setStyleSheet(
"QPushButton { background: #2a3040; color: #8fbcbb; "
"border: 1px solid #3a4050; border-radius: 5px; font-size: 13px; }"
"border: 1px solid #3a4050; border-radius: 5px; "
"font-size: 13px; padding: 0 12px; }"
"QPushButton:hover { background: #2e4a7a; color: #fff; }"
"QPushButton:disabled { color: #444; border-color: #2a3040; }"
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment