Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fixed topic list to display all image topics, fixing Issue #18. #28

Merged
merged 1 commit into from
Nov 4, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/web_video_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,23 @@ bool WebVideoServer::handle_list_streams(const async_web_server_cpp::HttpRequest
}
connection->write("</li>");
}
connection->write("</ul>");
// Add the rest of the image topics that don't have camera_info.
connection->write("<ul>");
std::vector<std::string>::iterator image_topic_itr = image_topics.begin();
for (; image_topic_itr != image_topics.end();) {
connection->write("<li><a href=\"/stream_viewer?topic=");
connection->write(*image_topic_itr);
connection->write("\">");
connection->write(*image_topic_itr);
connection->write("</a> (");
connection->write("<a href=\"/snapshot?topic=");
connection->write(*image_topic_itr);
connection->write("\">Snapshot</a>)");
connection->write("</li>");

image_topic_itr = image_topics.erase(image_topic_itr);
}
connection->write("</ul></body></html>");
return true;
}
Expand Down