<commit_before>/*
 * File:   AddressesPage.cpp
 * Author: danny
 *
 * Created on February 16, 2015, 12:26 PM
 */

#include "AddressesPage.h"
#include "DataSubsystem.h"
#include "WebMenu.h"
#include "EditThingPage.h"
#include <Poco/Data/Session.h>
#include <Poco/Util/Application.h>

const std::string AddressesPage::Title("My Addresses");
const std::string AddressesPage::Link("addresses.bin");

AddressesPage::AddressesPage()
{
}

AddressesPage::~AddressesPage()
{
}

std::string AddressesPage::title() const
{
    return Title;
}

bool AddressesPage::handleForm(Poco::Net::HTMLForm& form, Poco::Net::HTTPServerRequest& request, Poco::Net::HTTPServerResponse& response)
{
    return false;
}

void AddressesPage::renderPanelBody(std::ostream& output, Poco::Net::HTTPServerRequest& request)
{
    renderTable(output);

    renderScripts(output);
}

void AddressesPage::renderButtons(std::ostream& output)
{

}

std::string AddressesPage::subtitle() const
{
    return "Some text goes here";
}

void AddressesPage::renderTable(std::ostream& output)
{
    output << "<div class='table-responsive'>";
    output << "<table id='addresses' class='table table-responsive' >";
    output << "    <thead>";
    output << "        <tr>";
    output << "            <th>MAC</th>";
    output << "            <th>IP</th>";
    output << "            <th>Last</th>";
    output << "            <th>Type</th>";
    output << "            <th>Name</th>";
    output << "            <th>Vendor</th>";
    output << "            <th>OS</th>";
    output << "            <th>HW</th>";
    output << "            <th>Description</th>";
    output << "            <th>Authorized</th>";
    output << "        </tr>";
    output << "    </thead>";

    output << "    <tbody>";<commit_msg>#27: Switch between the "HW" and "Description" column headers in the "My Addresses" screen<commit_after>/*
 * File:   AddressesPage.cpp
 * Author: danny
 *
 * Created on February 16, 2015, 12:26 PM
 */

#include "AddressesPage.h"
#include "DataSubsystem.h"
#include "WebMenu.h"
#include "EditThingPage.h"
#include <Poco/Data/Session.h>
#include <Poco/Util/Application.h>

const std::string AddressesPage::Title("My Addresses");
const std::string AddressesPage::Link("addresses.bin");

AddressesPage::AddressesPage()
{
}

AddressesPage::~AddressesPage()
{
}

std::string AddressesPage::title() const
{
    return Title;
}

bool AddressesPage::handleForm(Poco::Net::HTMLForm& form, Poco::Net::HTTPServerRequest& request, Poco::Net::HTTPServerResponse& response)
{
    return false;
}

void AddressesPage::renderPanelBody(std::ostream& output, Poco::Net::HTTPServerRequest& request)
{
    renderTable(output);

    renderScripts(output);
}

void AddressesPage::renderButtons(std::ostream& output)
{

}

std::string AddressesPage::subtitle() const
{
    return "Some text goes here";
}

void AddressesPage::renderTable(std::ostream& output)
{
    output << "<div class='table-responsive'>";
    output << "<table id='addresses' class='table table-responsive' >";
    output << "    <thead>";
    output << "        <tr>";
    output << "            <th>MAC</th>";
    output << "            <th>IP</th>";
    output << "            <th>Last</th>";
    output << "            <th>Type</th>";
    output << "            <th>Name</th>";
    output << "            <th>Vendor</th>";
    output << "            <th>OS</th>";
    output << "            <th>Description</th>";
    output << "            <th>HW</th>";
    output << "            <th>Authorized</th>";
    output << "        </tr>";
    output << "    </thead>";

    output << "    <tbody>";
{'fraction_non_alphanumeric': 0.1798063623789765, 'fraction_numerical': 0.006085753803596127, 'mean_word_length': 3.165898617511521, 'pattern_counts': {'":': 0, '<': 129, '<?xml version=': 0, '>': 61, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4514478', 'n_tokens_mistral': 1180, 'n_tokens_neox': 1158, 'n_words': 224}