// (C) 2017-2020 by folkert van heusden, released under AGPL v3.0 #include "view_html_all.h" #include "http_server.h" #include "utils.h" view_html_all::view_html_all(configuration_t *const cfg, const std::string & id, const std::string & descr, const std::vector & sources) : view(cfg, id, descr, -1, -1, nullptr, sources) { } view_html_all::~view_html_all() { } std::string view_html_all::get_html(const std::map & pars) const { std::string reply = "" "" "" "" NAME " " VERSION "" "" "
"; for(instance_t * inst : cfg -> instances) { source *const s = find_source(inst); if (!s || s -> get_class_type() == CT_VIEW) continue; int w = s -> get_width(); int use_h = s -> get_height() * (320.0 / w); reply += myformat("", url_escape(inst -> name).c_str(), inst -> name.c_str(), url_escape(inst -> name).c_str(), use_h); } reply += "
"; return reply; } void view_html_all::operator()() { }