Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
01ab318e4b | ||
|
|
f9a81a4825 | ||
|
|
3bafb0deb8 |
@@ -26,7 +26,7 @@ ServerManager — **кроссплатформенное** Desktop GUI (CustomTk
|
|||||||
| grafana | `grafana_client.py` (requests) | Dashboards, Info, Setup | `--grafana-dashboards`, `--grafana-alerts` |
|
| grafana | `grafana_client.py` (requests) | Dashboards, Info, Setup | `--grafana-dashboards`, `--grafana-alerts` |
|
||||||
| prometheus | `prometheus_client.py` (requests) | Metrics, Info, Setup | `--prom-query`, `--prom-targets`, `--prom-alerts` |
|
| prometheus | `prometheus_client.py` (requests) | Metrics, Info, Setup | `--prom-query`, `--prom-targets`, `--prom-alerts` |
|
||||||
| winrm | `winrm_client.py` (pywinrm) | PowerShell, Info, Setup | `--ps`, `--cmd` |
|
| winrm | `winrm_client.py` (pywinrm) | PowerShell, Info, Setup | `--ps`, `--cmd` |
|
||||||
| s3 | `s3_client.py` (boto3) | Objects, Info, Setup | `--s3-buckets`, `--s3-ls`, `--s3-upload`, `--s3-download`, `--s3-delete` |
|
| s3 | `s3_client.py` (boto3) | Objects, Info, Setup | `--s3-buckets`, `--s3-ls`, `--s3-upload`, `--s3-download`, `--s3-delete`, `--s3-url` |
|
||||||
| rdp/vnc | `remote_desktop.py` | Launch, Info, Setup | — (запуск внешнего клиента) |
|
| rdp/vnc | `remote_desktop.py` | Launch, Info, Setup | — (запуск внешнего клиента) |
|
||||||
|
|
||||||
## БЕЗОПАСНОСТЬ
|
## БЕЗОПАСНОСТЬ
|
||||||
@@ -139,6 +139,13 @@ tools/
|
|||||||
/ssh --redis ALIAS "GET key" # Redis-команда
|
/ssh --redis ALIAS "GET key" # Redis-команда
|
||||||
/ssh --redis-info ALIAS # Redis INFO
|
/ssh --redis-info ALIAS # Redis INFO
|
||||||
/ssh --redis-keys ALIAS "pattern" # SCAN ключей
|
/ssh --redis-keys ALIAS "pattern" # SCAN ключей
|
||||||
|
# S3 / MinIO
|
||||||
|
/ssh --s3-buckets ALIAS # Список бакетов
|
||||||
|
/ssh --s3-ls ALIAS bucket[/prefix] # Список объектов
|
||||||
|
/ssh --s3-upload ALIAS local bucket/key # Upload файла
|
||||||
|
/ssh --s3-download ALIAS bucket/key local # Download файла
|
||||||
|
/ssh --s3-delete ALIAS bucket/key # Удалить объект
|
||||||
|
/ssh --s3-url ALIAS bucket/key [SEC] # Presigned URL (по умолчанию 1 час)
|
||||||
# Grafana / Prometheus
|
# Grafana / Prometheus
|
||||||
/ssh --grafana-dashboards ALIAS # Дашборды
|
/ssh --grafana-dashboards ALIAS # Дашборды
|
||||||
/ssh --prom-query ALIAS "up" # PromQL
|
/ssh --prom-query ALIAS "up" # PromQL
|
||||||
|
|||||||
@@ -15,10 +15,12 @@ class AboutDialog(ctk.CTkToplevel):
|
|||||||
self.geometry("500x480")
|
self.geometry("500x480")
|
||||||
self.resizable(False, False)
|
self.resizable(False, False)
|
||||||
self.transient(master)
|
self.transient(master)
|
||||||
self.grab_set()
|
|
||||||
self.focus_force()
|
self.focus_force()
|
||||||
self.protocol("WM_DELETE_WINDOW", self._on_close)
|
self.protocol("WM_DELETE_WINDOW", self._on_close)
|
||||||
|
|
||||||
|
self._master_ref = master
|
||||||
|
self._map_bind_id = master.bind("<Map>", self._on_parent_map, add="+")
|
||||||
|
|
||||||
# ── Header ──
|
# ── Header ──
|
||||||
ctk.CTkLabel(
|
ctk.CTkLabel(
|
||||||
self, text=t("about_title"),
|
self, text=t("about_title"),
|
||||||
@@ -78,9 +80,20 @@ class AboutDialog(ctk.CTkToplevel):
|
|||||||
self, text=t("close"), width=120, command=self._on_close
|
self, text=t("close"), width=120, command=self._on_close
|
||||||
).pack(pady=(10, 20))
|
).pack(pady=(10, 20))
|
||||||
|
|
||||||
|
def _on_parent_map(self, event=None):
|
||||||
|
"""Restore dialog when parent is un-minimized."""
|
||||||
|
try:
|
||||||
|
if not self.winfo_exists():
|
||||||
|
return
|
||||||
|
self.deiconify()
|
||||||
|
self.lift()
|
||||||
|
self.focus_force()
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
def _on_close(self):
|
def _on_close(self):
|
||||||
try:
|
try:
|
||||||
self.grab_release()
|
self._master_ref.unbind("<Map>", self._map_bind_id)
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
self.destroy()
|
self.destroy()
|
||||||
|
|||||||
32
gui/app.py
32
gui/app.py
@@ -3,6 +3,7 @@ Main application window — sidebar + tabview layout.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import tkinter
|
import tkinter
|
||||||
|
import sys
|
||||||
import customtkinter as ctk
|
import customtkinter as ctk
|
||||||
from tkinter import messagebox
|
from tkinter import messagebox
|
||||||
|
|
||||||
@@ -118,6 +119,37 @@ class App(ctk.CTk):
|
|||||||
# Cleanup on close
|
# Cleanup on close
|
||||||
self.protocol("WM_DELETE_WINDOW", self._on_close)
|
self.protocol("WM_DELETE_WINDOW", self._on_close)
|
||||||
|
|
||||||
|
# Fix: restore window after Win+D (Show Desktop)
|
||||||
|
self.bind("<Map>", self._on_map, add="+")
|
||||||
|
if sys.platform == "win32":
|
||||||
|
self._setup_win32_restore()
|
||||||
|
|
||||||
|
def _on_map(self, event=None):
|
||||||
|
"""Ensure window is fully visible when restored from taskbar."""
|
||||||
|
try:
|
||||||
|
self.deiconify()
|
||||||
|
self.lift()
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def _setup_win32_restore(self):
|
||||||
|
"""Win32 fallback: periodic check for stuck minimized state."""
|
||||||
|
import ctypes
|
||||||
|
self._user32 = ctypes.windll.user32
|
||||||
|
self._hwnd = int(self.wm_frame(), 16)
|
||||||
|
self._check_minimized()
|
||||||
|
|
||||||
|
def _check_minimized(self):
|
||||||
|
"""If window is iconic but should be visible, force restore."""
|
||||||
|
try:
|
||||||
|
if self._user32.IsIconic(self._hwnd):
|
||||||
|
fg = self._user32.GetForegroundWindow()
|
||||||
|
if fg == self._hwnd:
|
||||||
|
self._user32.ShowWindow(self._hwnd, 9) # SW_RESTORE
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
self.after(500, self._check_minimized)
|
||||||
|
|
||||||
def _build_layout(self):
|
def _build_layout(self):
|
||||||
# PanedWindow — resizable sidebar | main area
|
# PanedWindow — resizable sidebar | main area
|
||||||
self._paned = tkinter.PanedWindow(
|
self._paned = tkinter.PanedWindow(
|
||||||
|
|||||||
@@ -32,7 +32,11 @@ class GroupDialog(ctk.CTkToplevel):
|
|||||||
self.geometry("340x200")
|
self.geometry("340x200")
|
||||||
self.resizable(False, False)
|
self.resizable(False, False)
|
||||||
self.transient(master)
|
self.transient(master)
|
||||||
self.grab_set()
|
self.focus_force()
|
||||||
|
self.protocol("WM_DELETE_WINDOW", self._on_close)
|
||||||
|
|
||||||
|
self._master_ref = master
|
||||||
|
self._map_bind_id = master.bind("<Map>", self._on_parent_map, add="+")
|
||||||
|
|
||||||
# ── Name ──
|
# ── Name ──
|
||||||
ctk.CTkLabel(self, text=t("group_name"), anchor="w").pack(
|
ctk.CTkLabel(self, text=t("group_name"), anchor="w").pack(
|
||||||
@@ -71,7 +75,7 @@ class GroupDialog(ctk.CTkToplevel):
|
|||||||
btn_frame.pack(fill="x", padx=20, pady=(15, 10))
|
btn_frame.pack(fill="x", padx=20, pady=(15, 10))
|
||||||
|
|
||||||
ctk.CTkButton(btn_frame, text=t("cancel"), width=80,
|
ctk.CTkButton(btn_frame, text=t("cancel"), width=80,
|
||||||
fg_color="gray", command=self.destroy).pack(side="left")
|
fg_color="gray", command=self._on_close).pack(side="left")
|
||||||
ctk.CTkButton(btn_frame, text=t("save"), width=80,
|
ctk.CTkButton(btn_frame, text=t("save"), width=80,
|
||||||
command=self._save).pack(side="right")
|
command=self._save).pack(side="right")
|
||||||
|
|
||||||
@@ -90,6 +94,23 @@ class GroupDialog(ctk.CTkToplevel):
|
|||||||
else:
|
else:
|
||||||
btn.configure(border_color=fg)
|
btn.configure(border_color=fg)
|
||||||
|
|
||||||
|
def _on_parent_map(self, event=None):
|
||||||
|
try:
|
||||||
|
if not self.winfo_exists():
|
||||||
|
return
|
||||||
|
self.deiconify()
|
||||||
|
self.lift()
|
||||||
|
self.focus_force()
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def _on_close(self):
|
||||||
|
try:
|
||||||
|
self._master_ref.unbind("<Map>", self._map_bind_id)
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
self.destroy()
|
||||||
|
|
||||||
def _save(self):
|
def _save(self):
|
||||||
name = self._name_var.get().strip()
|
name = self._name_var.get().strip()
|
||||||
if not name:
|
if not name:
|
||||||
@@ -107,4 +128,4 @@ class GroupDialog(ctk.CTkToplevel):
|
|||||||
group = self.store.add_group(name, self._selected_color)
|
group = self.store.add_group(name, self._selected_color)
|
||||||
self.result = group
|
self.result = group
|
||||||
|
|
||||||
self.destroy()
|
self._on_close()
|
||||||
|
|||||||
@@ -54,14 +54,14 @@ class ServerDialog(ctk.CTkToplevel):
|
|||||||
self.geometry("450x720")
|
self.geometry("450x720")
|
||||||
self.resizable(False, False)
|
self.resizable(False, False)
|
||||||
|
|
||||||
# transient BEFORE grab_set — prevents focus lock on minimize
|
|
||||||
self.transient(master)
|
self.transient(master)
|
||||||
self.grab_set()
|
|
||||||
self.focus_force()
|
self.focus_force()
|
||||||
|
|
||||||
# Release grab on close (prevents stuck app)
|
|
||||||
self.protocol("WM_DELETE_WINDOW", self._on_close)
|
self.protocol("WM_DELETE_WINDOW", self._on_close)
|
||||||
|
|
||||||
|
# Restore dialog when parent is un-minimized
|
||||||
|
self._master_ref = master
|
||||||
|
self._map_bind_id = master.bind("<Map>", self._on_parent_map, add="+")
|
||||||
|
|
||||||
self._field_frames: dict[str, ctk.CTkFrame] = {}
|
self._field_frames: dict[str, ctk.CTkFrame] = {}
|
||||||
self._build_ui(server)
|
self._build_ui(server)
|
||||||
|
|
||||||
@@ -485,10 +485,20 @@ class ServerDialog(ctk.CTkToplevel):
|
|||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
self._show_error(str(e))
|
self._show_error(str(e))
|
||||||
|
|
||||||
def _on_close(self):
|
def _on_parent_map(self, event=None):
|
||||||
"""Release grab and destroy — prevents stuck app on minimize."""
|
"""Restore dialog when parent window is un-minimized."""
|
||||||
try:
|
try:
|
||||||
self.grab_release()
|
if not self.winfo_exists():
|
||||||
|
return
|
||||||
|
self.deiconify()
|
||||||
|
self.lift()
|
||||||
|
self.focus_force()
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def _on_close(self):
|
||||||
|
try:
|
||||||
|
self._master_ref.unbind("<Map>", self._map_bind_id)
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
self.destroy()
|
self.destroy()
|
||||||
|
|||||||
@@ -83,7 +83,11 @@ class UpdateDialog(ctk.CTkToplevel):
|
|||||||
self.geometry("500x420")
|
self.geometry("500x420")
|
||||||
self.resizable(False, False)
|
self.resizable(False, False)
|
||||||
self.transient(parent)
|
self.transient(parent)
|
||||||
self.grab_set()
|
self.focus_force()
|
||||||
|
self.protocol("WM_DELETE_WINDOW", self._on_close)
|
||||||
|
|
||||||
|
self._master_ref = parent
|
||||||
|
self._map_bind_id = parent.bind("<Map>", self._on_parent_map, add="+")
|
||||||
|
|
||||||
self._info = info
|
self._info = info
|
||||||
self._downloaded_path = downloaded_path
|
self._downloaded_path = downloaded_path
|
||||||
@@ -99,6 +103,23 @@ class UpdateDialog(ctk.CTkToplevel):
|
|||||||
py = parent.winfo_y() + (parent.winfo_height() - 420) // 2
|
py = parent.winfo_y() + (parent.winfo_height() - 420) // 2
|
||||||
self.geometry(f"+{px}+{py}")
|
self.geometry(f"+{px}+{py}")
|
||||||
|
|
||||||
|
def _on_parent_map(self, event=None):
|
||||||
|
try:
|
||||||
|
if not self.winfo_exists():
|
||||||
|
return
|
||||||
|
self.deiconify()
|
||||||
|
self.lift()
|
||||||
|
self.focus_force()
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def _on_close(self):
|
||||||
|
try:
|
||||||
|
self._master_ref.unbind("<Map>", self._map_bind_id)
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
self.destroy()
|
||||||
|
|
||||||
def _build_ui(self):
|
def _build_ui(self):
|
||||||
from version import __version__
|
from version import __version__
|
||||||
|
|
||||||
@@ -194,7 +215,7 @@ class UpdateDialog(ctk.CTkToplevel):
|
|||||||
width=80, height=34, corner_radius=8,
|
width=80, height=34, corner_radius=8,
|
||||||
fg_color="#4b5563", hover_color="#374151",
|
fg_color="#4b5563", hover_color="#374151",
|
||||||
font=ctk.CTkFont(size=13),
|
font=ctk.CTkFont(size=13),
|
||||||
command=self.destroy,
|
command=self._on_close,
|
||||||
).pack(side="right", padx=(8, 0))
|
).pack(side="right", padx=(8, 0))
|
||||||
|
|
||||||
ctk.CTkButton(
|
ctk.CTkButton(
|
||||||
@@ -268,4 +289,4 @@ class UpdateDialog(ctk.CTkToplevel):
|
|||||||
def _on_skip_click(self):
|
def _on_skip_click(self):
|
||||||
if self._on_skip:
|
if self._on_skip:
|
||||||
self._on_skip(self._info["version"])
|
self._on_skip(self._info["version"])
|
||||||
self.destroy()
|
self._on_close()
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -1,7 +1,7 @@
|
|||||||
# Скилл /ssh — управление удалёнными серверами
|
# Скилл /ssh — управление удалёнными серверами
|
||||||
|
|
||||||
Ты управляешь удалёнными серверами через универсальную CLI-утилиту.
|
Ты управляешь удалёнными серверами через универсальную CLI-утилиту.
|
||||||
Поддерживаются: SSH, SQL (MariaDB/MSSQL/PostgreSQL), Redis, S3, Grafana, Prometheus, WinRM (PowerShell/CMD).
|
Поддерживаются: SSH, SQL (MariaDB/MSSQL/PostgreSQL), Redis, S3/MinIO, Grafana, Prometheus, WinRM (PowerShell/CMD).
|
||||||
|
|
||||||
## ВАЖНО — Безопасность
|
## ВАЖНО — Безопасность
|
||||||
|
|
||||||
@@ -19,33 +19,47 @@
|
|||||||
|
|
||||||
Пользователь передаёт через `$ARGUMENTS`. Разбери и выполни.
|
Пользователь передаёт через `$ARGUMENTS`. Разбери и выполни.
|
||||||
|
|
||||||
## КРИТИЧНО — Команды зависят от типа сервера
|
## КРИТИЧНО — СНАЧАЛА ПРОВЕРЬ ТИП СЕРВЕРА
|
||||||
|
|
||||||
`--list` возвращает колонку `Type` для каждого сервера. **Тип определяет какие команды использовать:**
|
**ПЕРЕД ЛЮБОЙ операцией** с сервером — **ОБЯЗАТЕЛЬНО** выполни `--list` и посмотри колонку `Type`.
|
||||||
|
**ЗАПРЕЩЕНО** угадывать тип сервера. MinIO/S3 — это НЕ SSH, Redis — это НЕ SSH, MariaDB — это НЕ SSH.
|
||||||
|
|
||||||
| Тип | Команды |
|
**Тип сервера определяет КАКИЕ команды использовать. Использование команд не того типа — СЛОМАЕТ операцию.**
|
||||||
|-----|---------|
|
|
||||||
| `ssh` | `ALIAS "command"`, `--upload`, `--download`, `--ping`, `--install-key` |
|
|
||||||
| `telnet` | `ALIAS "command"` (как ssh, но без SFTP/sudo/ключей) |
|
|
||||||
| `mariadb` / `mssql` / `postgresql` | `--sql`, `--sql-databases`, `--sql-tables` |
|
|
||||||
| `redis` | `--redis`, `--redis-info`, `--redis-keys` |
|
|
||||||
| `s3` | `--s3-buckets`, `--s3-ls`, `--s3-upload`, `--s3-download`, `--s3-delete` |
|
|
||||||
| `grafana` | `--grafana-dashboards`, `--grafana-alerts` |
|
|
||||||
| `prometheus` | `--prom-query`, `--prom-targets`, `--prom-alerts` |
|
|
||||||
| `winrm` | `--ps`, `--cmd` |
|
|
||||||
| `rdp` / `vnc` | Только GUI (запуск внешнего клиента), CLI-команд нет |
|
|
||||||
|
|
||||||
**`ALIAS "command"` — ТОЛЬКО для типа `ssh`.** Для Redis — `--redis`, для SQL — `--sql`, для WinRM — `--ps`/`--cmd` и т.д.
|
| Тип | Команды | НЕ использовать |
|
||||||
|
|-----|---------|-----------------|
|
||||||
|
| `ssh` | `ALIAS "command"`, `--upload`, `--download`, `--ping`, `--install-key` | — |
|
||||||
|
| `telnet` | `ALIAS "command"` (без SFTP/sudo/ключей) | `--upload`, `--download` |
|
||||||
|
| `mariadb` / `mssql` / `postgresql` | `--sql`, `--sql-databases`, `--sql-tables` | `ALIAS "command"` |
|
||||||
|
| `redis` | `--redis`, `--redis-info`, `--redis-keys` | `ALIAS "command"` |
|
||||||
|
| `s3` (MinIO, AWS S3, и др.) | `--s3-buckets`, `--s3-ls`, `--s3-upload`, `--s3-download`, `--s3-delete`, `--s3-url` | `ALIAS "command"`, `--upload`, `--download` |
|
||||||
|
| `grafana` | `--grafana-dashboards`, `--grafana-alerts` | `ALIAS "command"` |
|
||||||
|
| `prometheus` | `--prom-query`, `--prom-targets`, `--prom-alerts` | `ALIAS "command"` |
|
||||||
|
| `winrm` | `--ps`, `--cmd` | `ALIAS "command"` |
|
||||||
|
| `rdp` / `vnc` | Только GUI | всё |
|
||||||
|
|
||||||
|
**`ALIAS "command"` (shell-команды типа ls, cat, mkdir) — ТОЛЬКО для типов `ssh` и `telnet`.**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Тип redis → --redis-info, НЕ ALIAS "INFO"
|
# ❌ НЕПРАВИЛЬНО — MinIO/S3 это НЕ SSH, нельзя выполнять shell-команды
|
||||||
python ~/.server-connections/ssh.py --redis-info "Reddis main ovh"
|
python ~/.server-connections/ssh.py "minio-alias" "ls /bucket"
|
||||||
|
python ~/.server-connections/ssh.py "minio-alias" "mkdir /bucket/folder"
|
||||||
|
|
||||||
# Тип mariadb → --sql-databases, НЕ ALIAS "SHOW DATABASES"
|
# ✅ ПРАВИЛЬНО — S3-команды для типа s3
|
||||||
python ~/.server-connections/ssh.py --sql-databases "Maria Db Connection main ovh"
|
python ~/.server-connections/ssh.py --s3-ls "minio-alias" bucket
|
||||||
|
python ~/.server-connections/ssh.py --s3-upload "minio-alias" "D:/file.txt" bucket/folder/file.txt
|
||||||
|
|
||||||
# Тип ssh → ALIAS "command"
|
# ❌ НЕПРАВИЛЬНО — Redis это НЕ SSH
|
||||||
python ~/.server-connections/ssh.py investor "uptime"
|
python ~/.server-connections/ssh.py "redis-alias" "INFO"
|
||||||
|
|
||||||
|
# ✅ ПРАВИЛЬНО
|
||||||
|
python ~/.server-connections/ssh.py --redis-info "redis-alias"
|
||||||
|
|
||||||
|
# ❌ НЕПРАВИЛЬНО — MariaDB это НЕ SSH
|
||||||
|
python ~/.server-connections/ssh.py "mariadb-alias" "SHOW DATABASES"
|
||||||
|
|
||||||
|
# ✅ ПРАВИЛЬНО
|
||||||
|
python ~/.server-connections/ssh.py --sql-databases "mariadb-alias"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Общие команды
|
## Общие команды
|
||||||
@@ -159,7 +173,12 @@ python ~/.server-connections/ssh.py --redis-info ALIAS
|
|||||||
python ~/.server-connections/ssh.py --redis-keys ALIAS "user:*"
|
python ~/.server-connections/ssh.py --redis-keys ALIAS "user:*"
|
||||||
```
|
```
|
||||||
|
|
||||||
## S3-команды (тип: s3)
|
## S3-команды (тип: s3) — MinIO, AWS S3, любое S3-совместимое хранилище
|
||||||
|
|
||||||
|
**MinIO = тип `s3`.** Когда пользователь говорит "MinIO" или "S3" — используй ТОЛЬКО `--s3-*` команды.
|
||||||
|
**НЕ пытайся** выполнять shell-команды (`ls`, `mkdir`, `cat`) на S3-серверах — это не SSH!
|
||||||
|
|
||||||
|
**Папки в S3 не существуют** — это префиксы. "Создать папку" = загрузить файл с префиксом в ключе (например `bucket/folder/file.txt`).
|
||||||
|
|
||||||
### Список бакетов
|
### Список бакетов
|
||||||
```bash
|
```bash
|
||||||
@@ -187,6 +206,25 @@ python ~/.server-connections/ssh.py --s3-download ALIAS bucket/key "D:/local/fil
|
|||||||
python ~/.server-connections/ssh.py --s3-delete ALIAS bucket/key
|
python ~/.server-connections/ssh.py --s3-delete ALIAS bucket/key
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Получить ссылку на файл (presigned URL)
|
||||||
|
```bash
|
||||||
|
python ~/.server-connections/ssh.py --s3-url ALIAS bucket/key
|
||||||
|
python ~/.server-connections/ssh.py --s3-url ALIAS bucket/key 86400
|
||||||
|
```
|
||||||
|
По умолчанию ссылка действует 1 час (3600 сек). Второй аргумент — время жизни в секундах (например 86400 = 24 часа).
|
||||||
|
|
||||||
|
### Типичный workflow: "создай папку и залей файл"
|
||||||
|
```bash
|
||||||
|
# 1. Посмотри бакеты
|
||||||
|
python ~/.server-connections/ssh.py --s3-buckets ALIAS
|
||||||
|
# 2. "Создать папку" = просто загрузить файл с нужным путём (prefix)
|
||||||
|
python ~/.server-connections/ssh.py --s3-upload ALIAS "D:/file.txt" mybucket/newfolder/file.txt
|
||||||
|
# 3. Проверить
|
||||||
|
python ~/.server-connections/ssh.py --s3-ls ALIAS mybucket/newfolder/
|
||||||
|
# 4. Получить ссылку
|
||||||
|
python ~/.server-connections/ssh.py --s3-url ALIAS mybucket/newfolder/file.txt
|
||||||
|
```
|
||||||
|
|
||||||
## Grafana-команды (тип: grafana)
|
## Grafana-команды (тип: grafana)
|
||||||
|
|
||||||
### Список дашбордов
|
### Список дашбордов
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"""Version info for ServerManager."""
|
"""Version info for ServerManager."""
|
||||||
|
|
||||||
__version__ = "1.9.13"
|
__version__ = "1.9.15"
|
||||||
__app_name__ = "ServerManager"
|
__app_name__ = "ServerManager"
|
||||||
__author__ = "aibot777"
|
__author__ = "aibot777"
|
||||||
__description__ = "Desktop GUI for managing remote servers"
|
__description__ = "Desktop GUI for managing remote servers"
|
||||||
|
|||||||
Reference in New Issue
Block a user