This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "servers.hpp"
|
||||
#include "tableprint.hpp"
|
||||
#include "transwarp.hpp"
|
||||
#include "server_env_manager.hpp"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <cstring>
|
||||
@@ -28,7 +29,7 @@ struct ListCommandRegister {
|
||||
CommandRegistry::instance().register_command({
|
||||
list_name_list,
|
||||
list_handler,
|
||||
std_autocomplete,
|
||||
shared_commands::std_autocomplete,
|
||||
false, // hidden
|
||||
true, // requires_config
|
||||
true, // requires_install
|
||||
@@ -86,13 +87,13 @@ void list_servers() {
|
||||
|
||||
transwarp::parallel exec{servers.size()};
|
||||
auto task = transwarp::for_each(exec, servers.begin(), servers.end(), [&](const ServerInfo& server) {
|
||||
std::map<std::string, ServiceStatus> status = service_runner::get_all_services_status(server.name);
|
||||
std::map<std::string, shared_commands::ServiceStatus> status = shared_commands::get_all_services_status(server.name);
|
||||
|
||||
std::set<int> ports_used;
|
||||
std::string serviceticks = "";
|
||||
for (const auto& [service_name, service_status] : status) {
|
||||
ports_used.insert(service_status.ports.begin(), service_status.ports.end());
|
||||
serviceticks += HealthStatus2String(service_status.health) + " ";
|
||||
serviceticks += shared_commands::HealthStatus2String(service_status.health) + " ";
|
||||
}
|
||||
std::string ports_used_str = "";
|
||||
for (const auto& port : ports_used)
|
||||
@@ -163,12 +164,12 @@ void show_server_details(const std::string& server_name) {
|
||||
tp.add_row({"Status", "Service", "Ports"});
|
||||
|
||||
|
||||
std::map<std::string, ServiceStatus> status = service_runner::get_all_services_status(server_name);
|
||||
std::map<std::string, shared_commands::ServiceStatus> status = shared_commands::get_all_services_status(server_name);
|
||||
|
||||
std::set<int> ports_used;
|
||||
std::string serviceticks = "";
|
||||
for (const auto& [service_name, service_status] : status) {
|
||||
std::string healthy = HealthStatus2String(service_status.health);
|
||||
std::string healthy = shared_commands::HealthStatus2String(service_status.health);
|
||||
|
||||
std::string ports_str = "";
|
||||
for (const auto& port : service_status.ports)
|
||||
|
Reference in New Issue
Block a user