//this file is generated by program(drogon_ctl) automatically,don't modify it!
#include "indexTest.h"
#include <drogon/utils/OStringStream.h>
#include <drogon/utils/Utilities.h>
#include <string>
#include <map>
#include <vector>
#include <set>
#include <iostream>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <list>
#include <deque>
#include <queue>
 #include <json/json.h> 
using namespace drogon;
std::string indexTest::genText(const DrTemplateData& indexTest_view_data)
{
	drogon::OStringStream indexTest_tmp_stream;
	std::string layoutName{""};
    auto json = indexTest_view_data.get<Json::Value>("json");
indexTest_tmp_stream<<"\n";
	indexTest_tmp_stream << "<!DOCTYPE html>\n";
	indexTest_tmp_stream << "<html lang=\"en\">\n";
	indexTest_tmp_stream << "<head>\n";
	indexTest_tmp_stream << "    <meta charset=\"UTF-8\">\n";
	indexTest_tmp_stream << "    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n";
	indexTest_tmp_stream << "    <title>Document</title>\n";
	indexTest_tmp_stream << "</head>\n";
	indexTest_tmp_stream << "<body>\n";
	indexTest_tmp_stream << "    ";
 for(auto &t : json["trackers"]) { 
	indexTest_tmp_stream << "        <li> id: ";
 indexTest_tmp_stream << t["tracker_id"].asInt(); 
	indexTest_tmp_stream << "; \n";
	indexTest_tmp_stream << "             Serial: ";
 indexTest_tmp_stream << t["serial_number"].asString(); 
	indexTest_tmp_stream << "; \n";
	indexTest_tmp_stream << "             Status: ";
 indexTest_tmp_stream << t["status"].asString(); 
	indexTest_tmp_stream << " \n";
	indexTest_tmp_stream << "        </li>\n";
	indexTest_tmp_stream << "    ";
 } 
	indexTest_tmp_stream << "</body>\n";
	indexTest_tmp_stream << "</html>\n";
if(layoutName.empty())
{
std::string ret{std::move(indexTest_tmp_stream.str())};
return ret;
}else
{
auto templ = DrTemplateBase::newTemplate(layoutName);
if(!templ) return "";
HttpViewData data = indexTest_view_data;
auto str = std::move(indexTest_tmp_stream.str());
if(!str.empty() && str[str.length()-1] == '\n') str.resize(str.length()-1);
data[""] = std::move(str);
return templ->genText(data);
}
}
