| 517 | } |
| 518 | |
| 519 | void BrowserWindow::processStatusBar() |
| 520 | { |
| 521 | std::vector<std::string> statusItems; |
| 522 | |
| 523 | std::unordered_set<NetworkResourceRawTO> simulations; |
| 524 | std::unordered_set<NetworkResourceRawTO> genomes; |
| 525 | for (WorkspaceType workspaceType = 0; workspaceType < WorkspaceType_Count; ++workspaceType) { |
| 526 | auto const& simWorkspace = _workspaces.at(WorkspaceId{NetworkResourceType_Simulation, workspaceType}); |
| 527 | auto const& genomeWorkspace = _workspaces.at(WorkspaceId{NetworkResourceType_Genome, workspaceType}); |
| 528 | simulations.insert(simWorkspace.rawTOs.begin(), simWorkspace.rawTOs.end()); |
| 529 | genomes.insert(genomeWorkspace.rawTOs.begin(), genomeWorkspace.rawTOs.end()); |
| 530 | } |
| 531 | |
| 532 | auto numSimulations = toInt(simulations.size()); |
| 533 | auto numGenomes = toInt(genomes.size()); |
| 534 | |
| 535 | statusItems.emplace_back(std::to_string(numSimulations) + " simulations found"); |
| 536 | statusItems.emplace_back(std::to_string(numGenomes) + " genomes found"); |
| 537 | statusItems.emplace_back(std::to_string(_userTOs.size()) + " simulators found"); |
| 538 | |
| 539 | if (auto userName = NetworkService::get().getLoggedInUserName()) { |
| 540 | statusItems.emplace_back("Logged in as " + *userName + " @ " + NetworkService::get().getServerAddress()); |
| 541 | } else { |
| 542 | statusItems.emplace_back("Not logged in to " + NetworkService::get().getServerAddress()); |
| 543 | } |
| 544 | |
| 545 | if (!NetworkService::get().getLoggedInUserName()) { |
| 546 | statusItems.emplace_back("In order to share and upvote simulations you need to log in."); |
| 547 | } |
| 548 | |
| 549 | AlienImGui::StatusBar(statusItems); |
| 550 | } |
| 551 | |
| 552 | void BrowserWindow::processSimulationList() |
| 553 | { |
nothing calls this directly
no test coverage detected