mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-05-08 14:33:23 +00:00
added display of installed services on the page PageSettingsServersList
This commit is contained in:
@@ -129,6 +129,25 @@ QJsonObject ContainersModel::getCurrentlyProcessedContainerConfig()
|
||||
return qvariant_cast<QJsonObject>(data(index(m_currentlyProcessedContainerIndex), ConfigRole));
|
||||
}
|
||||
|
||||
QStringList ContainersModel::getAllInstalledServicesName(const int serverIndex)
|
||||
{
|
||||
QStringList servicesName;
|
||||
const auto &containers = m_settings->containers(serverIndex);
|
||||
for (const DockerContainer &container : containers.keys()) {
|
||||
if (ContainerProps::containerService(container) == ServiceType::Other && m_containers.contains(container)) {
|
||||
if (container == DockerContainer::Dns) {
|
||||
servicesName.append("DNS");
|
||||
} else if (container == DockerContainer::Sftp) {
|
||||
servicesName.append("SFTP");
|
||||
} else if (container == DockerContainer::TorWebSite) {
|
||||
servicesName.append("TOR");
|
||||
}
|
||||
}
|
||||
}
|
||||
servicesName.sort();
|
||||
return servicesName;
|
||||
}
|
||||
|
||||
ErrorCode ContainersModel::removeAllContainers()
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user