Tidying
This commit is contained in:
@ -2,7 +2,6 @@
|
||||
#include "server_env.hpp"
|
||||
#include "service_runner.hpp"
|
||||
#include "tableprint.hpp"
|
||||
#include "interactive/interactive.hpp"
|
||||
#include "utils/envmanager.hpp"
|
||||
#include "utils/directories.hpp"
|
||||
#include "services.hpp"
|
||||
@ -161,38 +160,4 @@ void show_server_details(const std::string& server_name) {
|
||||
} // end of show_server_details
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void interactive_mode() {
|
||||
interactive::fullscreen_window iw("DropShell Servers");
|
||||
|
||||
iw.set_input_text_display("Loading all servers' status...");
|
||||
|
||||
auto servers = get_configured_servers();
|
||||
std::vector<std::string> server_names;
|
||||
for (const auto& server : servers) {
|
||||
server_names.push_back(server.name);
|
||||
}
|
||||
|
||||
list_servers();
|
||||
|
||||
while (true) {
|
||||
std::string server_name = iw.set_input_multiple_choice("Select a server", server_names);
|
||||
if (server_name.empty())
|
||||
{
|
||||
iw.close();
|
||||
return;
|
||||
}
|
||||
|
||||
while (!server_name.empty()) {
|
||||
iw.clear_display();
|
||||
show_server_details(server_name);
|
||||
server_name = iw.set_input_multiple_choice("Select a server", server_names, server_name);
|
||||
}
|
||||
iw.clear_display();
|
||||
list_servers();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace dropshell
|
Reference in New Issue
Block a user