Skip to content
Merged
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
2 changes: 1 addition & 1 deletion PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pkgname=rustmius
pkgver=1.5.0
pkgver=1.5.1
pkgrel=1
pkgdesc="Full local Termius alternative for Linux"
arch=('x86_64')
Expand Down
2 changes: 1 addition & 1 deletion PKGBUILD-BIN
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pkgname=rustmius-bin
pkgver=1.5.0
pkgver=1.5.1
pkgrel=1
pkgdesc="Full local Termius alternative for Linux"
arch=('x86_64')
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "rustmius",
"private": true,
"version": "1.5.0",
"version": "1.5.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rustmius"
version = "1.5.0"
version = "1.5.1"
description = "Full local Termius alternative for Linux"
authors = ["Cleboost"]
edition = "2021"
Expand Down
59 changes: 2 additions & 57 deletions src/components/modal/NewServerModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -246,61 +246,6 @@ async function deployKey() {
password.value = "";
keyDeployed.value = true;

await testConnectionAfterKeyDeployment();
}
} catch (error) {
logLines.value.push(
`[install-exception] ${(error as any)?.toString?.() ?? "error"}`,
);
} finally {
deploying.value = false;
}
}

async function testConnectionAfterKeyDeployment() {
testing.value = true;
connectionStatus.value = "testing";
logLines.value = [];

try {
const sshCmd = Command.create("ssh", [
"-o",
"StrictHostKeyChecking=accept-new",
"-o",
"ConnectTimeout=8",
"-o",
"BatchMode=yes",
"-l",
username.value.trim(),
ip.value.trim(),
"exit",
]);

sshCmd.on("close", ({ code }) => {
logLines.value.push(`[exit] code=${code}`);
});

sshCmd.on("error", (err) => {
logLines.value.push(`[error] ${String(err)}`);
});

sshCmd.stdout.on("data", (line) => {
logLines.value.push(`[out] ${String(line).trimEnd()}`);
});

sshCmd.stderr.on("data", (line) => {
const text = String(line);
logLines.value.push(`[err] ${text.trimEnd()}`);
});

const status = await sshCmd.execute();

if (status.stdout)
logLines.value.push(`[out] ${status.stdout.trimEnd()}`);
if (status.stderr)
logLines.value.push(`[err] ${status.stderr.trimEnd()}`);

if (status.code === 0) {
await createServer();
connectionStatus.value = "success";
successModalOpen.value = true;
Expand All @@ -310,12 +255,12 @@ async function testConnectionAfterKeyDeployment() {
}
} catch (error) {
logLines.value.push(
`[exception] ${(error as any)?.toString?.() ?? "error"}`,
`[install-exception] ${(error as any)?.toString?.() ?? "error"}`,
);
connectionStatus.value = "failed";
errorModalOpen.value = true;
} finally {
testing.value = false;
deploying.value = false;
}
}

Expand Down
Loading