diff options
author | nga <nga@yandex-team.ru> | 2022-02-10 16:48:09 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:09 +0300 |
commit | 1f553f46fb4f3c5eec631352cdd900a0709016af (patch) | |
tree | a231fba2c03b440becaea6c86a2702d0bfb0336e /library/cpp/monlib/service/pages | |
parent | c4de7efdedc25b49cbea74bd589eecb61b55b60a (diff) | |
download | ydb-1f553f46fb4f3c5eec631352cdd900a0709016af.tar.gz |
Restoring authorship annotation for <nga@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/monlib/service/pages')
-rw-r--r-- | library/cpp/monlib/service/pages/diag_mon_page.cpp | 10 | ||||
-rw-r--r-- | library/cpp/monlib/service/pages/diag_mon_page.h | 14 | ||||
-rw-r--r-- | library/cpp/monlib/service/pages/html_mon_page.cpp | 32 | ||||
-rw-r--r-- | library/cpp/monlib/service/pages/html_mon_page.h | 16 | ||||
-rw-r--r-- | library/cpp/monlib/service/pages/index_mon_page.cpp | 146 | ||||
-rw-r--r-- | library/cpp/monlib/service/pages/index_mon_page.h | 22 | ||||
-rw-r--r-- | library/cpp/monlib/service/pages/mon_page.cpp | 16 | ||||
-rw-r--r-- | library/cpp/monlib/service/pages/mon_page.h | 34 | ||||
-rw-r--r-- | library/cpp/monlib/service/pages/pre_mon_page.cpp | 16 | ||||
-rw-r--r-- | library/cpp/monlib/service/pages/pre_mon_page.h | 18 | ||||
-rw-r--r-- | library/cpp/monlib/service/pages/templates.cpp | 20 | ||||
-rw-r--r-- | library/cpp/monlib/service/pages/templates.h | 24 | ||||
-rw-r--r-- | library/cpp/monlib/service/pages/version_mon_page.cpp | 20 | ||||
-rw-r--r-- | library/cpp/monlib/service/pages/version_mon_page.h | 14 |
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 2493ff4fba..cf073e9224 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 761194d4ec..bb16711700 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 eb4eb3b66c..7b2a7cb135 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 e87c53b62b..a3e260866e 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 83ff8b529a..108c1945cd 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 bf514a3105..9a1ff45145 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 72033b1699..d5860f56b3 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 e396612bb0..3d85131536 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 fc03a19b80..c2244d559a 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 c9a923d39a..e9cc871d8c 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 ece12bea71..a155b3bab4 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 b4656f059f..0c70fb8555 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 41e29417da..0afc042cc1 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 f7649947e4..2b342c679a 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; }; - + } |