tidy table a little.

This commit is contained in:
Your Name
2025-04-23 23:25:51 +12:00
parent b64ade4d04
commit 40b992efeb
3 changed files with 18 additions and 8 deletions

View File

@ -109,12 +109,12 @@ void show_server_details(const std::string& server_name) {
if (result == 0) {
std::cout << "Status: Online" << std::endl;
// Get uptime if possible
cmd = "ssh " + ssh_address + " 'uptime' 2>/dev/null";
int rval = system(cmd.c_str());
if (rval != 0) {
std::cout << "Error: Failed to get uptime" << std::endl;
}
// // Get uptime if possible
// cmd = "ssh " + ssh_address + " 'uptime' 2>/dev/null";
// int rval = system(cmd.c_str());
// if (rval != 0) {
// std::cout << "Error: Failed to get uptime" << std::endl;
// }
} else {
std::cout << "Status: Offline" << std::endl;
}
@ -123,6 +123,7 @@ void show_server_details(const std::string& server_name) {
//---------------------
{
std::cout << std::endl;
tableprint tp("Server Configuration: " + server_name, true);
tp.add_row({"Key", "Value"});
for (const auto& [key, value] : env.get_variables()) {