aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/monlib/service/pages
diff options
context:
space:
mode:
authornga <nga@yandex-team.ru>2022-02-10 16:48:09 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:09 +0300
commitc2a1af049e9deca890e9923abe64fe6c59060348 (patch)
treeb222e5ac2e2e98872661c51ccceee5da0d291e13 /library/cpp/monlib/service/pages
parent1f553f46fb4f3c5eec631352cdd900a0709016af (diff)
downloadydb-c2a1af049e9deca890e9923abe64fe6c59060348.tar.gz
Restoring authorship annotation for <nga@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/monlib/service/pages')
-rw-r--r--library/cpp/monlib/service/pages/diag_mon_page.cpp10
-rw-r--r--library/cpp/monlib/service/pages/diag_mon_page.h14
-rw-r--r--library/cpp/monlib/service/pages/html_mon_page.cpp32
-rw-r--r--library/cpp/monlib/service/pages/html_mon_page.h16
-rw-r--r--library/cpp/monlib/service/pages/index_mon_page.cpp146
-rw-r--r--library/cpp/monlib/service/pages/index_mon_page.h22
-rw-r--r--library/cpp/monlib/service/pages/mon_page.cpp16
-rw-r--r--library/cpp/monlib/service/pages/mon_page.h34
-rw-r--r--library/cpp/monlib/service/pages/pre_mon_page.cpp16
-rw-r--r--library/cpp/monlib/service/pages/pre_mon_page.h18
-rw-r--r--library/cpp/monlib/service/pages/templates.cpp20
-rw-r--r--library/cpp/monlib/service/pages/templates.h24
-rw-r--r--library/cpp/monlib/service/pages/version_mon_page.cpp20
-rw-r--r--library/cpp/monlib/service/pages/version_mon_page.h14
14 files changed, 201 insertions, 201 deletions
diff --git a/library/cpp/monlib/service/pages/diag_mon_page.cpp b/library/cpp/monlib/service/pages/diag_mon_page.cpp
index cf073e9224..2493ff4fba 100644
--- a/library/cpp/monlib/service/pages/diag_mon_page.cpp
+++ b/library/cpp/monlib/service/pages/diag_mon_page.cpp
@@ -1,9 +1,9 @@
-#include "diag_mon_page.h"
-
-using namespace NMonitoring;
-
+#include "diag_mon_page.h"
+
+using namespace NMonitoring;
+
void TDiagMonPage::OutputText(IOutputStream& out, NMonitoring::IMonHttpRequest& request) {
out << "uri: " << request.GetUri() << "\n";
out << "path: " << request.GetPath() << "\n";
out << "path info: " << request.GetPathInfo() << "\n";
-}
+}
diff --git a/library/cpp/monlib/service/pages/diag_mon_page.h b/library/cpp/monlib/service/pages/diag_mon_page.h
index bb16711700..761194d4ec 100644
--- a/library/cpp/monlib/service/pages/diag_mon_page.h
+++ b/library/cpp/monlib/service/pages/diag_mon_page.h
@@ -1,16 +1,16 @@
-#pragma once
-
-#include "pre_mon_page.h"
-
-namespace NMonitoring {
+#pragma once
+
+#include "pre_mon_page.h"
+
+namespace NMonitoring {
// internal diagnostics page
struct TDiagMonPage: public TPreMonPage {
TDiagMonPage()
: TPreMonPage("diag", "Diagnostics Page")
{
}
-
+
void OutputText(IOutputStream& out, NMonitoring::IMonHttpRequest&) override;
};
-
+
}
diff --git a/library/cpp/monlib/service/pages/html_mon_page.cpp b/library/cpp/monlib/service/pages/html_mon_page.cpp
index 7b2a7cb135..eb4eb3b66c 100644
--- a/library/cpp/monlib/service/pages/html_mon_page.cpp
+++ b/library/cpp/monlib/service/pages/html_mon_page.cpp
@@ -1,20 +1,20 @@
-#include "html_mon_page.h"
-
+#include "html_mon_page.h"
+
#include <library/cpp/monlib/service/pages/templates.h>
-
-using namespace NMonitoring;
-
+
+using namespace NMonitoring;
+
void THtmlMonPage::Output(NMonitoring::IMonHttpRequest& request) {
IOutputStream& out = request.Output();
- out << HTTPOKHTML;
+ out << HTTPOKHTML;
HTML(out) {
- out << "<!DOCTYPE html>\n";
+ out << "<!DOCTYPE html>\n";
HTML_TAG() {
HEAD() {
- if (!!Title) {
- out << "<title>" << Title << "</title>\n";
- }
+ if (!!Title) {
+ out << "<title>" << Title << "</title>\n";
+ }
out << "<link rel='stylesheet' href='https://yastatic.net/bootstrap/3.3.1/css/bootstrap.min.css'>\n";
out << "<script language='javascript' type='text/javascript' src='https://yastatic.net/jquery/2.1.3/jquery.min.js'></script>\n";
out << "<script language='javascript' type='text/javascript' src='https://yastatic.net/bootstrap/3.3.1/js/bootstrap.min.js'></script>\n";
@@ -35,17 +35,17 @@ void THtmlMonPage::Output(NMonitoring::IMonHttpRequest& request) {
}
BODY() {
OutputNavBar(out);
-
+
DIV_CLASS("container") {
- if (!!Title) {
- out << "<h2>" << Title << "</h2>";
- }
- OutputContent(request);
+ if (!!Title) {
+ out << "<h2>" << Title << "</h2>";
+ }
+ OutputContent(request);
}
}
}
}
-}
+}
void THtmlMonPage::NotFound(NMonitoring::IMonHttpRequest& request) const {
IOutputStream& out = request.Output();
diff --git a/library/cpp/monlib/service/pages/html_mon_page.h b/library/cpp/monlib/service/pages/html_mon_page.h
index a3e260866e..e87c53b62b 100644
--- a/library/cpp/monlib/service/pages/html_mon_page.h
+++ b/library/cpp/monlib/service/pages/html_mon_page.h
@@ -1,8 +1,8 @@
-#pragma once
-
-#include "mon_page.h"
-
-namespace NMonitoring {
+#pragma once
+
+#include "mon_page.h"
+
+namespace NMonitoring {
struct THtmlMonPage: public IMonPage {
THtmlMonPage(const TString& path,
const TString& title = TString(),
@@ -11,9 +11,9 @@ namespace NMonitoring {
, OutputTableSorterJsCss(outputTableSorterJsCss)
{
}
-
+
void Output(NMonitoring::IMonHttpRequest& request) override;
-
+
void NotFound(NMonitoring::IMonHttpRequest& request) const;
void NoContent(NMonitoring::IMonHttpRequest& request) const;
@@ -21,5 +21,5 @@ namespace NMonitoring {
bool OutputTableSorterJsCss;
};
-
+
}
diff --git a/library/cpp/monlib/service/pages/index_mon_page.cpp b/library/cpp/monlib/service/pages/index_mon_page.cpp
index 108c1945cd..83ff8b529a 100644
--- a/library/cpp/monlib/service/pages/index_mon_page.cpp
+++ b/library/cpp/monlib/service/pages/index_mon_page.cpp
@@ -1,72 +1,72 @@
#include "index_mon_page.h"
-#include <util/generic/cast.h>
+#include <util/generic/cast.h>
#include <util/string/ascii.h>
-
-using namespace NMonitoring;
-
+
+using namespace NMonitoring;
+
void TIndexMonPage::OutputIndexPage(IMonHttpRequest& request) {
request.Output() << HTTPOKHTML;
request.Output() << "<html>\n";
OutputHead(request.Output());
- OutputBody(request);
+ OutputBody(request);
request.Output() << "</html>\n";
-}
-
+}
+
void TIndexMonPage::Output(IMonHttpRequest& request) {
TStringBuf pathInfo = request.GetPathInfo();
if (pathInfo.empty() || pathInfo == TStringBuf("/")) {
- OutputIndexPage(request);
- return;
- }
-
+ OutputIndexPage(request);
+ return;
+ }
+
Y_VERIFY(pathInfo.StartsWith('/'));
-
- TMonPagePtr found;
- // analogous to CGI PATH_INFO
- {
- TGuard<TMutex> g(Mtx);
+
+ TMonPagePtr found;
+ // analogous to CGI PATH_INFO
+ {
+ TGuard<TMutex> g(Mtx);
TStringBuf pathTmp = request.GetPathInfo();
- for (;;) {
- TPagesByPath::iterator i = PagesByPath.find(pathTmp);
- if (i != PagesByPath.end()) {
- found = i->second;
+ for (;;) {
+ TPagesByPath::iterator i = PagesByPath.find(pathTmp);
+ if (i != PagesByPath.end()) {
+ found = i->second;
pathInfo = request.GetPathInfo().substr(pathTmp.size());
Y_VERIFY(pathInfo.empty() || pathInfo.StartsWith('/'));
- break;
- }
- size_t slash = pathTmp.find_last_of('/');
+ break;
+ }
+ size_t slash = pathTmp.find_last_of('/');
Y_VERIFY(slash != TString::npos);
- pathTmp = pathTmp.substr(0, slash);
- if (!pathTmp) {
- break;
- }
- }
- }
+ pathTmp = pathTmp.substr(0, slash);
+ if (!pathTmp) {
+ break;
+ }
+ }
+ }
if (found) {
THolder<IMonHttpRequest> child(request.MakeChild(found.Get(), TString{pathInfo}));
found->Output(*child);
- } else {
+ } else {
request.Output() << HTTPNOTFOUND;
- }
-}
-
+ }
+}
+
void TIndexMonPage::OutputIndex(IOutputStream& out, bool pathEndsWithSlash) {
- TGuard<TMutex> g(Mtx);
+ TGuard<TMutex> g(Mtx);
for (auto& Page : Pages) {
IMonPage* page = Page.Get();
- if (page->IsInIndex()) {
+ if (page->IsInIndex()) {
TString pathToDir = "";
- if (!pathEndsWithSlash) {
- pathToDir = this->GetPath() + "/";
- }
- out << "<a href='" << pathToDir << page->GetPath() << "'>" << page->GetTitle() << "</a><br/>\n";
- }
- }
-}
-
+ if (!pathEndsWithSlash) {
+ pathToDir = this->GetPath() + "/";
+ }
+ out << "<a href='" << pathToDir << page->GetPath() << "'>" << page->GetTitle() << "</a><br/>\n";
+ }
+ }
+}
+
void TIndexMonPage::Register(TMonPagePtr page) {
- TGuard<TMutex> g(Mtx);
+ TGuard<TMutex> g(Mtx);
auto insres = PagesByPath.insert(std::make_pair("/" + page->GetPath(), page));
if (insres.second) {
// new unique page just inserted, update Pages
@@ -81,8 +81,8 @@ void TIndexMonPage::Register(TMonPagePtr page) {
insres.first->second = page;
}
page->Parent = this;
-}
-
+}
+
TIndexMonPage* TIndexMonPage::RegisterIndexPage(const TString& path, const TString& title) {
TGuard<TMutex> g(Mtx);
TIndexMonPage* page = VerifyDynamicCast<TIndexMonPage*>(FindPage(path));
@@ -92,50 +92,50 @@ TIndexMonPage* TIndexMonPage::RegisterIndexPage(const TString& path, const TStri
page = new TIndexMonPage(path, title);
Register(page);
return VerifyDynamicCast<TIndexMonPage*>(page);
-}
-
+}
+
IMonPage* TIndexMonPage::FindPage(const TString& relativePath) {
- TGuard<TMutex> g(Mtx);
-
+ TGuard<TMutex> g(Mtx);
+
Y_VERIFY(!relativePath.StartsWith('/'));
- TPagesByPath::iterator i = PagesByPath.find("/" + relativePath);
- if (i == PagesByPath.end()) {
+ TPagesByPath::iterator i = PagesByPath.find("/" + relativePath);
+ if (i == PagesByPath.end()) {
return nullptr;
- } else {
- return i->second.Get();
- }
-}
-
+ } else {
+ return i->second.Get();
+ }
+}
+
TIndexMonPage* TIndexMonPage::FindIndexPage(const TString& relativePath) {
- return VerifyDynamicCast<TIndexMonPage*>(FindPage(relativePath));
-}
-
+ return VerifyDynamicCast<TIndexMonPage*>(FindPage(relativePath));
+}
+
void TIndexMonPage::OutputCommonJsCss(IOutputStream& out) {
out << "<link rel='stylesheet' href='https://yastatic.net/bootstrap/3.3.1/css/bootstrap.min.css'>\n";
out << "<script language='javascript' type='text/javascript' src='https://yastatic.net/jquery/2.1.3/jquery.min.js'></script>\n";
out << "<script language='javascript' type='text/javascript' src='https://yastatic.net/bootstrap/3.3.1/js/bootstrap.min.js'></script>\n";
-}
-
+}
+
void TIndexMonPage::OutputHead(IOutputStream& out) {
- out << "<head>\n";
- OutputCommonJsCss(out);
- out << "<title>" << Title << "</title>\n";
- out << "</head>\n";
-}
-
+ out << "<head>\n";
+ OutputCommonJsCss(out);
+ out << "<title>" << Title << "</title>\n";
+ out << "</head>\n";
+}
+
void TIndexMonPage::OutputBody(IMonHttpRequest& req) {
auto& out = req.Output();
out << "<body>\n";
-
- // part of common navbar
+
+ // part of common navbar
OutputNavBar(out);
-
+
out << "<div class='container'>\n"
<< "<h2>" << Title << "</h2>\n";
OutputIndex(out, req.GetPathInfo().EndsWith('/'));
out << "<div>\n"
- << "</body>\n";
-}
+ << "</body>\n";
+}
void TIndexMonPage::SortPages() {
TGuard<TMutex> g(Mtx);
diff --git a/library/cpp/monlib/service/pages/index_mon_page.h b/library/cpp/monlib/service/pages/index_mon_page.h
index 9a1ff45145..bf514a3105 100644
--- a/library/cpp/monlib/service/pages/index_mon_page.h
+++ b/library/cpp/monlib/service/pages/index_mon_page.h
@@ -1,38 +1,38 @@
-#pragma once
-
-#include "mon_page.h"
-
-namespace NMonitoring {
+#pragma once
+
+#include "mon_page.h"
+
+namespace NMonitoring {
struct TIndexMonPage: public IMonPage {
TMutex Mtx;
typedef TVector<TMonPagePtr> TPages;
TPages Pages;
typedef THashMap<TString, TMonPagePtr> TPagesByPath;
TPagesByPath PagesByPath;
-
+
TIndexMonPage(const TString& path, const TString& title)
: IMonPage(path, title)
{
}
-
+
~TIndexMonPage() override {
}
-
+
void Output(IMonHttpRequest& request) override;
void OutputIndexPage(IMonHttpRequest& request);
virtual void OutputIndex(IOutputStream& out, bool pathEndsWithSlash);
virtual void OutputCommonJsCss(IOutputStream& out);
void OutputHead(IOutputStream& out);
void OutputBody(IMonHttpRequest& out);
-
+
void Register(TMonPagePtr page);
TIndexMonPage* RegisterIndexPage(const TString& path, const TString& title);
IMonPage* FindPage(const TString& relativePath);
TIndexMonPage* FindIndexPage(const TString& relativePath);
-
+
void SortPages();
void ClearPages();
};
-
+
}
diff --git a/library/cpp/monlib/service/pages/mon_page.cpp b/library/cpp/monlib/service/pages/mon_page.cpp
index d5860f56b3..72033b1699 100644
--- a/library/cpp/monlib/service/pages/mon_page.cpp
+++ b/library/cpp/monlib/service/pages/mon_page.cpp
@@ -1,14 +1,14 @@
-#include "mon_page.h"
-
-using namespace NMonitoring;
-
+#include "mon_page.h"
+
+using namespace NMonitoring;
+
IMonPage::IMonPage(const TString& path, const TString& title)
- : Path(path)
- , Title(title)
-{
+ : Path(path)
+ , Title(title)
+{
Y_VERIFY(!Path.StartsWith('/'));
Y_VERIFY(!Path.EndsWith('/'));
-}
+}
void IMonPage::OutputNavBar(IOutputStream& out) {
TVector<const IMonPage*> parents;
diff --git a/library/cpp/monlib/service/pages/mon_page.h b/library/cpp/monlib/service/pages/mon_page.h
index 3d85131536..e396612bb0 100644
--- a/library/cpp/monlib/service/pages/mon_page.h
+++ b/library/cpp/monlib/service/pages/mon_page.h
@@ -1,12 +1,12 @@
-#pragma once
-
+#pragma once
+
#include <library/cpp/monlib/service/service.h>
#include <library/cpp/monlib/service/mon_service_http_request.h>
#include <util/generic/string.h>
-#include <util/generic/ptr.h>
-
-namespace NMonitoring {
+#include <util/generic/ptr.h>
+
+namespace NMonitoring {
static const char HTTPOKTEXT[] = "HTTP/1.1 200 Ok\r\nContent-Type: text/plain\r\nConnection: Close\r\n\r\n";
static const char HTTPOKBIN[] = "HTTP/1.1 200 Ok\r\nContent-Type: application/octet-stream\r\nConnection: Close\r\n\r\n";
static const char HTTPOKHTML[] = "HTTP/1.1 200 Ok\r\nContent-Type: text/html\r\nConnection: Close\r\n\r\n";
@@ -19,48 +19,48 @@ namespace NMonitoring {
static const char HTTPNOTFOUND[] = "HTTP/1.1 404 Invalid URI\r\nConnection: Close\r\n\r\nInvalid URL\r\n";
static const char HTTPUNAUTHORIZED[] = "HTTP/1.1 401 Unauthorized\r\nConnection: Close\r\n\r\nUnauthorized\r\n";
static const char HTTPFORBIDDEN[] = "HTTP/1.1 403 Forbidden\r\nConnection: Close\r\n\r\nForbidden\r\n";
-
+
// Fonts
static const char HTTPOKFONTEOT[] = "HTTP/1.1 200 Ok\r\nContent-Type: application/vnd.ms-fontobject\r\nConnection: Close\r\n\r\n";
static const char HTTPOKFONTTTF[] = "HTTP/1.1 200 Ok\r\nContent-Type: application/x-font-ttf\r\nConnection: Close\r\n\r\n";
static const char HTTPOKFONTWOFF[] = "HTTP/1.1 200 Ok\r\nContent-Type: application/font-woff\r\nConnection: Close\r\n\r\n";
static const char HTTPOKFONTWOFF2[] = "HTTP/1.1 200 Ok\r\nContent-Type: application/font-woff2\r\nConnection: Close\r\n\r\n";
-
+
// Images
static const char HTTPOKPNG[] = "HTTP/1.1 200 Ok\r\nContent-Type: image/png\r\nConnection: Close\r\n\r\n";
static const char HTTPOKSVG[] = "HTTP/1.1 200 Ok\r\nContent-Type: image/svg+xml\r\nConnection: Close\r\n\r\n";
class IMonPage;
-
+
using TMonPagePtr = TIntrusivePtr<IMonPage>;
-
+
class IMonPage: public TAtomicRefCount<IMonPage> {
public:
const TString Path;
const TString Title;
const IMonPage* Parent = nullptr;
-
+
public:
IMonPage(const TString& path, const TString& title = TString());
-
+
virtual ~IMonPage() {
}
-
+
void OutputNavBar(IOutputStream& out);
virtual const TString& GetPath() const {
return Path;
}
-
+
virtual const TString& GetTitle() const {
return Title;
}
-
+
bool IsInIndex() const {
return !Title.empty();
}
-
+
virtual void Output(IMonHttpRequest& request) = 0;
};
-
-}
+
+}
diff --git a/library/cpp/monlib/service/pages/pre_mon_page.cpp b/library/cpp/monlib/service/pages/pre_mon_page.cpp
index c2244d559a..fc03a19b80 100644
--- a/library/cpp/monlib/service/pages/pre_mon_page.cpp
+++ b/library/cpp/monlib/service/pages/pre_mon_page.cpp
@@ -1,18 +1,18 @@
-#include "pre_mon_page.h"
-
-using namespace NMonitoring;
-
+#include "pre_mon_page.h"
+
+using namespace NMonitoring;
+
void TPreMonPage::OutputContent(NMonitoring::IMonHttpRequest& request) {
auto& out = request.Output();
if (PreTag) {
- BeforePre(request);
+ BeforePre(request);
out << "<pre>\n";
OutputText(out, request);
out << "</pre>\n";
} else {
OutputText(out, request);
}
-}
-
+}
+
void TPreMonPage::BeforePre(NMonitoring::IMonHttpRequest&) {
-}
+}
diff --git a/library/cpp/monlib/service/pages/pre_mon_page.h b/library/cpp/monlib/service/pages/pre_mon_page.h
index e9cc871d8c..c9a923d39a 100644
--- a/library/cpp/monlib/service/pages/pre_mon_page.h
+++ b/library/cpp/monlib/service/pages/pre_mon_page.h
@@ -1,8 +1,8 @@
-#pragma once
-
-#include "html_mon_page.h"
-
-namespace NMonitoring {
+#pragma once
+
+#include "html_mon_page.h"
+
+namespace NMonitoring {
struct TPreMonPage: public THtmlMonPage {
TPreMonPage(const TString& path,
const TString& title = TString(),
@@ -12,15 +12,15 @@ namespace NMonitoring {
, PreTag(preTag)
{
}
-
+
void OutputContent(NMonitoring::IMonHttpRequest& request) override;
-
+
// hook to customize output
virtual void BeforePre(NMonitoring::IMonHttpRequest& request);
-
+
// put your text here
virtual void OutputText(IOutputStream& out, NMonitoring::IMonHttpRequest&) = 0;
-
+
const bool PreTag;
};
diff --git a/library/cpp/monlib/service/pages/templates.cpp b/library/cpp/monlib/service/pages/templates.cpp
index a155b3bab4..ece12bea71 100644
--- a/library/cpp/monlib/service/pages/templates.cpp
+++ b/library/cpp/monlib/service/pages/templates.cpp
@@ -1,9 +1,9 @@
#include "templates.h"
namespace NMonitoring {
- extern const char HtmlTag[] = "html";
- extern const char HeadTag[] = "head";
- extern const char BodyTag[] = "body";
+ extern const char HtmlTag[] = "html";
+ extern const char HeadTag[] = "head";
+ extern const char BodyTag[] = "body";
extern const char DivTag[] = "div";
extern const char TableTag[] = "table";
extern const char TableHeadTag[] = "thead";
@@ -15,14 +15,14 @@ namespace NMonitoring {
extern const char LabelTag[] = "label";
extern const char SpanTag[] = "span";
extern const char CaptionTag[] = "caption";
- extern const char PreTag[] = "pre";
+ extern const char PreTag[] = "pre";
extern const char ParaTag[] = "p";
- extern const char H1Tag[] = "h1";
- extern const char H2Tag[] = "h2";
- extern const char H3Tag[] = "h3";
- extern const char H4Tag[] = "h4";
- extern const char H5Tag[] = "h5";
- extern const char H6Tag[] = "h6";
+ extern const char H1Tag[] = "h1";
+ extern const char H2Tag[] = "h2";
+ extern const char H3Tag[] = "h3";
+ extern const char H4Tag[] = "h4";
+ extern const char H5Tag[] = "h5";
+ extern const char H6Tag[] = "h6";
extern const char SmallTag[] = "small";
extern const char StrongTag[] = "strong";
extern const char ListTag[] = "li";
diff --git a/library/cpp/monlib/service/pages/templates.h b/library/cpp/monlib/service/pages/templates.h
index 0c70fb8555..b4656f059f 100644
--- a/library/cpp/monlib/service/pages/templates.h
+++ b/library/cpp/monlib/service/pages/templates.h
@@ -19,7 +19,7 @@
#define TAG_CLASS_ID(name, cls, id) WITH_SCOPED(tmp, NMonitoring::name(__stream, cls, "", id))
#define TAG_CLASS_FOR(name, cls, for0) WITH_SCOPED(tmp, NMonitoring::name(__stream, cls, for0))
#define TAG_ATTRS(name, ...) WITH_SCOPED(tmp, NMonitoring::name(__stream, ##__VA_ARGS__))
-
+
#define HTML(str) WITH_SCOPED(__stream, NMonitoring::TOutputStreamRef(str))
#define HEAD() TAG(THead)
@@ -54,7 +54,7 @@
#define PARA() TAG(TPara)
#define PARA_CLASS(cls) TAG_CLASS(TPara, cls)
-
+
#define H1() TAG(TH1)
#define H1_CLASS(cls) TAG_CLASS(TH1, cls)
#define H2() TAG(TH2)
@@ -235,9 +235,9 @@ namespace NMonitoring {
extern const char DTermTag[3];
extern const char DDescTag[3];
- typedef TTag<HtmlTag> THtml;
- typedef TTag<HeadTag> THead;
- typedef TTag<BodyTag> TBody;
+ typedef TTag<HtmlTag> THtml;
+ typedef TTag<HeadTag> THead;
+ typedef TTag<BodyTag> TBody;
typedef TTag<DivTag> TDiv;
typedef TTag<TableTag> TTable;
typedef TTag<TableHeadTag> TTableHead;
@@ -249,14 +249,14 @@ namespace NMonitoring {
typedef TTag<LabelTag> TLabelC;
typedef TTag<SpanTag> TSpanC;
typedef TTag<CaptionTag> TCaption;
- typedef TTag<PreTag> TPre;
+ typedef TTag<PreTag> TPre;
typedef TTag<ParaTag> TPara;
- typedef TTag<H1Tag> TH1;
- typedef TTag<H2Tag> TH2;
- typedef TTag<H3Tag> TH3;
- typedef TTag<H4Tag> TH4;
- typedef TTag<H5Tag> TH5;
- typedef TTag<H6Tag> TH6;
+ typedef TTag<H1Tag> TH1;
+ typedef TTag<H2Tag> TH2;
+ typedef TTag<H3Tag> TH3;
+ typedef TTag<H4Tag> TH4;
+ typedef TTag<H5Tag> TH5;
+ typedef TTag<H6Tag> TH6;
typedef TTag<SmallTag> TSMALL;
typedef TTag<StrongTag> TSTRONG;
typedef TTag<ListTag> TLIST;
diff --git a/library/cpp/monlib/service/pages/version_mon_page.cpp b/library/cpp/monlib/service/pages/version_mon_page.cpp
index 0afc042cc1..41e29417da 100644
--- a/library/cpp/monlib/service/pages/version_mon_page.cpp
+++ b/library/cpp/monlib/service/pages/version_mon_page.cpp
@@ -1,16 +1,16 @@
#include <library/cpp/svnversion/svnversion.h>
#include <library/cpp/build_info/build_info.h>
#include <library/cpp/malloc/api/malloc.h>
-
-#include "version_mon_page.h"
-
-using namespace NMonitoring;
-
+
+#include "version_mon_page.h"
+
+using namespace NMonitoring;
+
void TVersionMonPage::OutputText(IOutputStream& out, NMonitoring::IMonHttpRequest&) {
- const char* version = GetProgramSvnVersion();
- out << version;
+ const char* version = GetProgramSvnVersion();
+ out << version;
if (!TString(version).EndsWith("\n"))
- out << "\n";
+ out << "\n";
out << GetBuildInfo() << "\n\n";
- out << "linked with malloc: " << NMalloc::MallocInfo().Name << "\n";
-}
+ out << "linked with malloc: " << NMalloc::MallocInfo().Name << "\n";
+}
diff --git a/library/cpp/monlib/service/pages/version_mon_page.h b/library/cpp/monlib/service/pages/version_mon_page.h
index 2b342c679a..f7649947e4 100644
--- a/library/cpp/monlib/service/pages/version_mon_page.h
+++ b/library/cpp/monlib/service/pages/version_mon_page.h
@@ -1,15 +1,15 @@
-#pragma once
-
-#include "pre_mon_page.h"
-
-namespace NMonitoring {
+#pragma once
+
+#include "pre_mon_page.h"
+
+namespace NMonitoring {
struct TVersionMonPage: public TPreMonPage {
TVersionMonPage(const TString& path = "ver", const TString& title = "Version")
: TPreMonPage(path, title)
{
}
-
+
void OutputText(IOutputStream& out, NMonitoring::IMonHttpRequest&) override;
};
-
+
}