fix(container): Parsing results in sudo mode (#1031)
* docs(l10n): fix un-updated English translation * feat(container): Add support for requiring a sudo password Add support for sudo password verification for Docker container operations, including: 1. Added ContainerErrType.sudoPasswordRequired error type 2. Add password prompt text in multi-language files 3. Modify the SSH execution logic to correctly handle the input of sudo password 4. Implement password caching and verification mechanism * feat(container): Add sudo password error handling logic Add a new error type `sudoPasswordIncorrect` to handle situations where the sudo password is incorrect Modify the password verification logic in the SSH client, and return a specific error code when a password error is detected Update multilingual files to support password error prompt information * fix(ssh): Remove unnecessary stderr parameter and improve sudo command handling Clean up the no longer needed stderr parameter in the SSH client, which was originally used to handle sudo password prompts Unify the sudo command construction logic, always use the _buildSudoCmd method, and add stderr redirection Clear cached passwords when passwords are incorrect * fix(container): Improved sudo command handling and Podman simulation detection Fix the sudo command processing logic, remove the masking of stderr to capture password errors Override the detection logic simulated by Podman Refactor the command building logic to support sh wrapping of multi-line commands * fix(container): Improve the prompt message for sudo password errors Update the sudo password error prompt messages for all languages to more accurately reflect situations of incorrect password or lack of permission Fix the password error detection logic for both the SSH client and container providers simultaneously * refactor(container): Remove unused sudo and password parameters in exec method Simplify the exec method signature by removing the sudo and password parameters that are no longer needed, as these functions are no longer in use * feat: Add new contributors and optimize container command handling Add two new contributors to the GithubIds list and refactor the container command processing logic: 1. Simplify the command wrapping logic and uniformly use `sh -c` for processing 2. Specific error handling when adding a sudo password incorrectly 3. Remove redundant conditional checks and temporary variables
This commit is contained in:
@@ -58,6 +58,8 @@
|
||||
"connectionStatsDesc": "Server-Verbindungserfolgsrate und Verlauf anzeigen",
|
||||
"container": "Container",
|
||||
"containerTrySudoTip": "Zum Beispiel: In der App ist der Benutzer auf aaa eingestellt, aber Docker ist unter dem Root-Benutzer installiert. In diesem Fall müssen Sie diese Option aktivieren",
|
||||
"containerSudoPasswordRequired": "Ein sudo-Passwort ist erforderlich, um auf Docker zuzugreifen. Bitte geben Sie Ihr Passwort ein.",
|
||||
"containerSudoPasswordIncorrect": "Das sudo-Passwort ist falsch oder nicht erlaubt. Bitte versuchen Sie es erneut.",
|
||||
"convert": "Konvertieren",
|
||||
"copyPath": "Pfad kopieren",
|
||||
"cpuViewAsProgressTip": "Zeigen Sie die Auslastung jedes CPUs in einem Fortschrittsbalken-Stil an (alter Stil)",
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
"clearServerStatsTitle": "Clear {serverName} Statistics",
|
||||
"clearThisServerStats": "Clear This Server Statistics",
|
||||
"compactDatabase": "Compact Database",
|
||||
"compactDatabaseContent": "Database size: {size}\n\nThis will rebuild the whole database to reduce file size.",
|
||||
"compactDatabaseContent": "Database size: {size}\n\nThis will reorganize the database to reduce file size. No data will be deleted.",
|
||||
"confirm": "Confirm",
|
||||
"closeAfterSave": "Save and close",
|
||||
"cmd": "Command",
|
||||
@@ -58,6 +58,8 @@
|
||||
"connectionStatsDesc": "View server connection success rate and history",
|
||||
"container": "Container",
|
||||
"containerTrySudoTip": "For example: In the app, the user is set to aaa, but Docker is installed under the root user. In this case, you need to enable this option.",
|
||||
"containerSudoPasswordRequired": "Sudo password is required to access Docker. Please enter your password.",
|
||||
"containerSudoPasswordIncorrect": "Sudo password is incorrect or not allowed. Please try again.",
|
||||
"convert": "Convert",
|
||||
"copyPath": "Copy path",
|
||||
"cpuViewAsProgressTip": "Display the usage of each CPU in a progress bar style (old style)",
|
||||
|
||||
@@ -57,6 +57,8 @@
|
||||
"connectionStatsDesc": "Ver la tasa de éxito de conexión del servidor e historial",
|
||||
"container": "Contenedor",
|
||||
"containerTrySudoTip": "Por ejemplo: si configuras el usuario dentro de la app como aaa, pero Docker está instalado bajo el usuario root, entonces necesitarás habilitar esta opción",
|
||||
"containerSudoPasswordRequired": "Se requiere contraseña de sudo para acceder a Docker. Por favor ingrese su contraseña.",
|
||||
"containerSudoPasswordIncorrect": "La contraseña de sudo es incorrecta o no está permitida. Por favor intente de nuevo.",
|
||||
"convert": "Convertir",
|
||||
"copyPath": "Copiar ruta",
|
||||
"cpuViewAsProgressTip": "Muestre la tasa de uso de cada CPU en estilo de barra de progreso (estilo antiguo)",
|
||||
|
||||
@@ -57,6 +57,8 @@
|
||||
"connectionStatsDesc": "Voir le taux de réussite de connexion du serveur et l'historique",
|
||||
"container": "Conteneur",
|
||||
"containerTrySudoTip": "Par exemple : Dans l'application, l'utilisateur est défini comme aaa, mais Docker est installé sous l'utilisateur root. Dans ce cas, vous devez activer cette option.",
|
||||
"containerSudoPasswordRequired": "Un mot de passe sudo est requis pour accéder à Docker. Veuillez entrer votre mot de passe.",
|
||||
"containerSudoPasswordIncorrect": "Le mot de passe sudo est incorrect ou non autorisé. Veuillez réessayer.",
|
||||
"convert": "Convertir",
|
||||
"copyPath": "Copier le chemin",
|
||||
"cpuViewAsProgressTip": "Afficher le taux d'utilisation de chaque CPU sous forme de barre de progression (ancien style)",
|
||||
|
||||
@@ -57,6 +57,8 @@
|
||||
"connectionStatsDesc": "Lihat tingkat keberhasilan koneksi server dan riwayat",
|
||||
"container": "Wadah",
|
||||
"containerTrySudoTip": "Contohnya: Di dalam aplikasi, pengguna diatur sebagai aaa, tetapi Docker diinstal di bawah pengguna root. Dalam kasus ini, Anda perlu mengaktifkan opsi ini.",
|
||||
"containerSudoPasswordRequired": "Kata sandi sudo diperlukan untuk mengakses Docker. Silakan masukkan kata sandi Anda.",
|
||||
"containerSudoPasswordIncorrect": "Kata sandi sudo salah atau tidak diizinkan. Silakan coba lagi.",
|
||||
"convert": "Mengubah",
|
||||
"copyPath": "Path Copy",
|
||||
"cpuViewAsProgressTip": "Tampilkan tingkat penggunaan setiap CPU dalam gaya bilah kemajuan (gaya lama)",
|
||||
|
||||
@@ -57,6 +57,8 @@
|
||||
"connectionStatsDesc": "サーバー接続成功率と履歴を表示",
|
||||
"container": "コンテナ",
|
||||
"containerTrySudoTip": "例:アプリ内でユーザーをaaaに設定しているが、Dockerがrootユーザーでインストールされている場合、このオプションを有効にする必要があります",
|
||||
"containerSudoPasswordRequired": "Dockerにアクセスするにはsudoパスワードが必要です。パスワードを入力してください。",
|
||||
"containerSudoPasswordIncorrect": "sudoパスワードが正しくないか、許可されていません。再試行してください。",
|
||||
"convert": "変換",
|
||||
"copyPath": "パスをコピー",
|
||||
"cpuViewAsProgressTip": "各CPUの使用率をプログレスバースタイルで表示する(旧スタイル)",
|
||||
|
||||
@@ -57,6 +57,8 @@
|
||||
"connectionStatsDesc": "Bekijk server verbindingssucces ratio en geschiedenis",
|
||||
"container": "Container",
|
||||
"containerTrySudoTip": "Bijvoorbeeld: in de app is de gebruiker ingesteld op aaa, maar Docker is geïnstalleerd onder de rootgebruiker. In dit geval moet u deze optie inschakelen.",
|
||||
"containerSudoPasswordRequired": "Een sudo-wachtwoord is vereist om toegang te krijgen tot Docker. Voer uw wachtwoord in.",
|
||||
"containerSudoPasswordIncorrect": "Het sudo-wachtwoord is onjuist of niet toegestaan. Probeer het opnieuw.",
|
||||
"convert": "Converteren",
|
||||
"copyPath": "Pad kopiëren",
|
||||
"cpuViewAsProgressTip": "Toon het gebruik van elke CPU in een voortgangsbalkstijl (oude stijl)",
|
||||
|
||||
@@ -57,6 +57,8 @@
|
||||
"connectionStatsDesc": "Ver taxa de sucesso de conexão do servidor e histórico",
|
||||
"container": "Contêiner",
|
||||
"containerTrySudoTip": "Por exemplo: se o usuário for definido como aaa dentro do app, mas o Docker estiver instalado sob o usuário root, esta opção precisará ser ativada",
|
||||
"containerSudoPasswordRequired": "É necessária uma senha sudo para acessar o Docker. Por favor, insira sua senha.",
|
||||
"containerSudoPasswordIncorrect": "A senha sudo está incorreta ou não é permitida. Por favor, tente novamente.",
|
||||
"convert": "Converter",
|
||||
"copyPath": "Copiar caminho",
|
||||
"cpuViewAsProgressTip": "Exiba a taxa de uso de cada CPU em estilo de barra de progresso (estilo antigo)",
|
||||
|
||||
@@ -58,6 +58,8 @@
|
||||
"connectionStatsDesc": "Просмотр коэффициента успешности подключения к серверу и истории",
|
||||
"container": "Контейнер",
|
||||
"containerTrySudoTip": "Например: если пользователь в приложении установлен как aaa, но Docker установлен под пользователем root, тогда нужно включить эту опцию",
|
||||
"containerSudoPasswordRequired": "Для доступа к Docker требуется пароль sudo. Пожалуйста, введите ваш пароль.",
|
||||
"containerSudoPasswordIncorrect": "Пароль sudo неверен или не разрешён. Пожалуйста, попробуйте снова.",
|
||||
"convert": "Конвертировать",
|
||||
"copyPath": "Копировать путь",
|
||||
"cpuViewAsProgressTip": "Отобразите уровень использования каждого процессора в виде индикатора выполнения (старый стиль)",
|
||||
|
||||
@@ -57,6 +57,8 @@
|
||||
"connectionStatsDesc": "Sunucu bağlantı başarı oranını ve geçmişi görüntüle",
|
||||
"container": "Konteyner",
|
||||
"containerTrySudoTip": "Örneğin: Uygulamada kullanıcı aaa olarak ayarlanmış, ancak Docker root kullanıcısı altında kurulmuş. Bu durumda bu seçeneği etkinleştirmeniz gerekir.",
|
||||
"containerSudoPasswordRequired": "Docker'e erişmek için sudo şifresi gereklidir. Lütfen şifrenizi girin.",
|
||||
"containerSudoPasswordIncorrect": "Sudo şifresi yanlış veya izin verilmiyor. Lütfen tekrar deneyin.",
|
||||
"convert": "Dönüştür",
|
||||
"copyPath": "Yolu kopyala",
|
||||
"cpuViewAsProgressTip": "Her CPU'nun kullanımını ilerleme çubuğu tarzında göster (eski tarz)",
|
||||
|
||||
@@ -57,6 +57,8 @@
|
||||
"connectionStatsDesc": "Переглянути коефіцієнт успішності підключення до сервера та історію",
|
||||
"container": "Контейнер",
|
||||
"containerTrySudoTip": "Наприклад: У застосунку користувач це aaa, але Docker встановлений під користувачем root. У цьому випадку вам потрібно активувати цю опцію.",
|
||||
"containerSudoPasswordRequired": "Для доступу до Docker потрібен пароль sudo. Будь ласка, введіть ваш пароль.",
|
||||
"containerSudoPasswordIncorrect": "Пароль sudo неправильний або не дозволений. Будь ласка, спробуйте ще раз.",
|
||||
"convert": "Конвертувати",
|
||||
"copyPath": "Скопіювати шлях",
|
||||
"cpuViewAsProgressTip": "Відобразити використання кожного процесора у вигляді стовпчикової діаграми (старий стиль)",
|
||||
|
||||
@@ -58,6 +58,8 @@
|
||||
"connectionStatsDesc": "查看服务器连接成功率和历史记录",
|
||||
"container": "容器",
|
||||
"containerTrySudoTip": "例如:在应用内将用户设置为 aaa,但是 Docker 安装在root用户下,这时就需要启用此选项",
|
||||
"containerSudoPasswordRequired": "需要 sudo 密码才能访问 Docker。请输入您的密码。",
|
||||
"containerSudoPasswordIncorrect": "sudo 密码错误或无权限。请重试。",
|
||||
"convert": "转换",
|
||||
"copyPath": "复制路径",
|
||||
"cpuViewAsProgressTip": "以进度条样式显示每个 CPU 的使用率(旧版样式)",
|
||||
|
||||
@@ -57,6 +57,8 @@
|
||||
"connectionStatsDesc": "檢視伺服器連線成功率和歷史記錄",
|
||||
"container": "容器",
|
||||
"containerTrySudoTip": "例如:App 內設定使用者為 aaa,但是 Docker 安裝在 root 使用者,這時就需要開啟此選項",
|
||||
"containerSudoPasswordRequired": "需要 sudo 密碼才能存取 Docker。請輸入您的密碼。",
|
||||
"containerSudoPasswordIncorrect": "sudo 密碼錯誤或無權限。請重試。",
|
||||
"convert": "轉換",
|
||||
"copyPath": "複製路徑",
|
||||
"cpuViewAsProgressTip": "以進度條樣式顯示每個CPU的使用率(舊版樣式)",
|
||||
|
||||
Reference in New Issue
Block a user