diff options
author | serxa <serxa@yandex-team.ru> | 2022-02-10 16:49:08 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:08 +0300 |
commit | d6d7db348c2cc64e71243cab9940ee6778f4317d (patch) | |
tree | bac67f42a02f9368eb4d329f5d79b77d0a6adc18 /library/cpp/monlib/service | |
parent | 8d57b69dee81198a59c39e64704f7dc9f04b4fbf (diff) | |
download | ydb-d6d7db348c2cc64e71243cab9940ee6778f4317d.tar.gz |
Restoring authorship annotation for <serxa@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/monlib/service')
-rw-r--r-- | library/cpp/monlib/service/pages/html_mon_page.cpp | 20 | ||||
-rw-r--r-- | library/cpp/monlib/service/pages/mon_page.h | 2 | ||||
-rw-r--r-- | library/cpp/monlib/service/pages/resource_mon_page.cpp | 38 | ||||
-rw-r--r-- | library/cpp/monlib/service/pages/resource_mon_page.h | 4 | ||||
-rw-r--r-- | library/cpp/monlib/service/pages/templates.h | 60 |
5 files changed, 62 insertions, 62 deletions
diff --git a/library/cpp/monlib/service/pages/html_mon_page.cpp b/library/cpp/monlib/service/pages/html_mon_page.cpp index eb4eb3b66c..fdb9229f04 100644 --- a/library/cpp/monlib/service/pages/html_mon_page.cpp +++ b/library/cpp/monlib/service/pages/html_mon_page.cpp @@ -8,10 +8,10 @@ void THtmlMonPage::Output(NMonitoring::IMonHttpRequest& request) { IOutputStream& out = request.Output(); out << HTTPOKHTML; - HTML(out) { + HTML(out) { out << "<!DOCTYPE html>\n"; - HTML_TAG() { - HEAD() { + HTML_TAG() { + HEAD() { if (!!Title) { out << "<title>" << Title << "</title>\n"; } @@ -32,19 +32,19 @@ void THtmlMonPage::Output(NMonitoring::IMonHttpRequest& request) { out << ".narrow-line80 {line-height: 80%}\n"; out << ".narrow-line90 {line-height: 90%}\n"; out << "</style>\n"; - } - BODY() { + } + BODY() { OutputNavBar(out); - DIV_CLASS("container") { + DIV_CLASS("container") { if (!!Title) { out << "<h2>" << Title << "</h2>"; } OutputContent(request); - } - } - } - } + } + } + } + } } void THtmlMonPage::NotFound(NMonitoring::IMonHttpRequest& request) const { diff --git a/library/cpp/monlib/service/pages/mon_page.h b/library/cpp/monlib/service/pages/mon_page.h index e396612bb0..4e244b292d 100644 --- a/library/cpp/monlib/service/pages/mon_page.h +++ b/library/cpp/monlib/service/pages/mon_page.h @@ -29,7 +29,7 @@ namespace NMonitoring { // 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>; diff --git a/library/cpp/monlib/service/pages/resource_mon_page.cpp b/library/cpp/monlib/service/pages/resource_mon_page.cpp index ec4ac6a1a7..5571b70575 100644 --- a/library/cpp/monlib/service/pages/resource_mon_page.cpp +++ b/library/cpp/monlib/service/pages/resource_mon_page.cpp @@ -17,27 +17,27 @@ void TResourceMonPage::Output(NMonitoring::IMonHttpRequest& request) { case JAVASCRIPT: out << HTTPOKJAVASCRIPT; break; - case FONT_EOT: - out << HTTPOKFONTEOT; - break; - case FONT_TTF: - out << HTTPOKFONTTTF; - break; - case FONT_WOFF: - out << HTTPOKFONTWOFF; - break; - case FONT_WOFF2: - out << HTTPOKFONTWOFF2; - break; - case PNG: - out << HTTPOKPNG; - break; - case SVG: - out << HTTPOKSVG; - break; + case FONT_EOT: + out << HTTPOKFONTEOT; + break; + case FONT_TTF: + out << HTTPOKFONTTTF; + break; + case FONT_WOFF: + out << HTTPOKFONTWOFF; + break; + case FONT_WOFF2: + out << HTTPOKFONTWOFF2; + break; + case PNG: + out << HTTPOKPNG; + break; + case SVG: + out << HTTPOKSVG; + break; default: out << HTTPOKBIN; - break; + break; } out << NResource::Find(ResourceName); } diff --git a/library/cpp/monlib/service/pages/resource_mon_page.h b/library/cpp/monlib/service/pages/resource_mon_page.h index f6ab67200e..aecb83c7be 100644 --- a/library/cpp/monlib/service/pages/resource_mon_page.h +++ b/library/cpp/monlib/service/pages/resource_mon_page.h @@ -18,11 +18,11 @@ namespace NMonitoring { FONT_TTF, FONT_WOFF, FONT_WOFF2, - + PNG, SVG }; - + TResourceMonPage(const TString& path, const TString& resourceName, const EResourceType& resourceType = BINARY) : IMonPage(path, "") diff --git a/library/cpp/monlib/service/pages/templates.h b/library/cpp/monlib/service/pages/templates.h index b4656f059f..4a96171f7c 100644 --- a/library/cpp/monlib/service/pages/templates.h +++ b/library/cpp/monlib/service/pages/templates.h @@ -1,11 +1,11 @@ #pragma once #include <util/stream/output.h> -#include <util/system/defaults.h> +#include <util/system/defaults.h> -#define WITH_SCOPED(var, value) WITH_SCOPED_I(var, value, Y_GENERATE_UNIQUE_ID(WITH_SCOPED_LABEL_)) +#define WITH_SCOPED(var, value) WITH_SCOPED_I(var, value, Y_GENERATE_UNIQUE_ID(WITH_SCOPED_LABEL_)) -#define WITH_SCOPED_I(var, value, label) \ +#define WITH_SCOPED_I(var, value, label) \ if (auto var = (value)) { \ Y_UNUSED(var); \ goto label; \ @@ -27,12 +27,12 @@ #define HTML_TAG() TAG(THtml) #define DIV() TAG(TDiv) #define DIV_CLASS(cls) TAG_CLASS(TDiv, cls) -#define DIV_CLASS_ID(cls, id) TAG_CLASS_ID(TDiv, cls, id) +#define DIV_CLASS_ID(cls, id) TAG_CLASS_ID(TDiv, cls, id) #define PRE() TAG(TPre) #define TABLE() TAG(TTable) #define TABLE_CLASS(cls) TAG_CLASS(TTable, cls) #define TABLE_SORTABLE() TABLE_CLASS("table-sortable") -#define TABLE_SORTABLE_CLASS(cls) TABLE_CLASS(cls " table-sortable") +#define TABLE_SORTABLE_CLASS(cls) TABLE_CLASS(cls " table-sortable") #define TABLEHEAD() TAG(TTableHead) #define TABLEHEAD_CLASS(cls) TAG_CLASS(TTableHead, cls) #define TABLEBODY() TAG(TTableBody) @@ -48,9 +48,9 @@ #define FORM_CLASS(cls) TAG_CLASS(TFormC, cls) #define LABEL() TAG(TLabelC) #define LABEL_CLASS(cls) TAG_CLASS(TLabelC, cls) -#define LABEL_CLASS_FOR(cls, for0) TAG_CLASS_FOR(TLabelC, cls, for0) +#define LABEL_CLASS_FOR(cls, for0) TAG_CLASS_FOR(TLabelC, cls, for0) #define SPAN_CLASS(cls) TAG_CLASS(TSpanC, cls) -#define SPAN_CLASS_STYLE(cls, style) TAG_CLASS_STYLE(TSpanC, cls, style) +#define SPAN_CLASS_STYLE(cls, style) TAG_CLASS_STYLE(TSpanC, cls, style) #define PARA() TAG(TPara) #define PARA_CLASS(cls) TAG_CLASS(TPara, cls) @@ -87,12 +87,12 @@ #define CAPTION() TAG(TCaption) #define CAPTION_CLASS(cls) CAPTION_CLASS(TCaption, cls) - + #define HTML_OUTPUT_PARAM(str, param) str << #param << ": " << param << "<br/>" #define HTML_OUTPUT_TIME_PARAM(str, param) str << #param << ": " << ToStringLocalTimeUpToSeconds(param) << "<br/>" -#define COLLAPSED_BUTTON_CONTENT(targetId, buttonText) \ - WITH_SCOPED(tmp, NMonitoring::TCollapsedButton(__stream, targetId, buttonText)) +#define COLLAPSED_BUTTON_CONTENT(targetId, buttonText) \ + WITH_SCOPED(tmp, NMonitoring::TCollapsedButton(__stream, targetId, buttonText)) #define HREF(path) \ WITH_SCOPED(tmp, NMonitoring::THref(__stream, path)) @@ -156,10 +156,10 @@ namespace NMonitoring { } } - explicit inline operator bool() const noexcept { - return true; // just to work with WITH_SCOPED - } - + explicit inline operator bool() const noexcept { + return true; // just to work with WITH_SCOPED + } + IOutputStream& Str; }; @@ -180,30 +180,30 @@ namespace NMonitoring { } } - explicit inline operator bool() const noexcept { - return true; // just to work with WITH_SCOPED - } - + explicit inline operator bool() const noexcept { + return true; // just to work with WITH_SCOPED + } + IOutputStream& Str; }; - struct TOutputStreamRef { + struct TOutputStreamRef { TOutputStreamRef(IOutputStream& str) - : Str(str) + : Str(str) { } - + inline operator IOutputStream&() noexcept { - return Str; - } - - explicit inline operator bool() const noexcept { - return true; // just to work with WITH_SCOPED - } - + return Str; + } + + explicit inline operator bool() const noexcept { + return true; // just to work with WITH_SCOPED + } + IOutputStream& Str; - }; - + }; + extern const char HtmlTag[5]; extern const char HeadTag[5]; extern const char BodyTag[5]; |