diff options
author | yazevnul <yazevnul@yandex-team.ru> | 2022-02-10 16:46:48 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:48 +0300 |
commit | 9abfb1a53b7f7b791444d1378e645d8fad9b06ed (patch) | |
tree | 49e222ea1c5804306084bb3ae065bb702625360f /library/cpp/monlib/service | |
parent | 8cbc307de0221f84c80c42dcbe07d40727537e2c (diff) | |
download | ydb-9abfb1a53b7f7b791444d1378e645d8fad9b06ed.tar.gz |
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/monlib/service')
-rw-r--r-- | library/cpp/monlib/service/mon_service_http_request.h | 2 | ||||
-rw-r--r-- | library/cpp/monlib/service/monservice.cpp | 4 | ||||
-rw-r--r-- | library/cpp/monlib/service/pages/index_mon_page.cpp | 8 | ||||
-rw-r--r-- | library/cpp/monlib/service/pages/mon_page.cpp | 4 | ||||
-rw-r--r-- | library/cpp/monlib/service/pages/templates.h | 6 | ||||
-rw-r--r-- | library/cpp/monlib/service/service.cpp | 8 | ||||
-rw-r--r-- | library/cpp/monlib/service/service.h | 4 |
7 files changed, 18 insertions, 18 deletions
diff --git a/library/cpp/monlib/service/mon_service_http_request.h b/library/cpp/monlib/service/mon_service_http_request.h index 26cf39a5e5..b4f2f8f0c5 100644 --- a/library/cpp/monlib/service/mon_service_http_request.h +++ b/library/cpp/monlib/service/mon_service_http_request.h @@ -42,7 +42,7 @@ namespace NMonitoring { TMonService2HttpRequest* const Parent; TMonService2HttpRequest( - IOutputStream* out, const IHttpRequest* httpRequest, + IOutputStream* out, const IHttpRequest* httpRequest, TMonService2* monService, IMonPage* monPage, const TString& pathInfo, TMonService2HttpRequest* parent) diff --git a/library/cpp/monlib/service/monservice.cpp b/library/cpp/monlib/service/monservice.cpp index 25d8922672..d1b9cda1d2 100644 --- a/library/cpp/monlib/service/monservice.cpp +++ b/library/cpp/monlib/service/monservice.cpp @@ -23,7 +23,7 @@ TMonService2::TMonService2(const THttpServerOptions& options, const TString& tit , IndexMonPage(new TIndexMonPage("", Title)) , AuthProvider_{std::move(auth)} { - Y_VERIFY(!!title); + Y_VERIFY(!!title); time_t t = time(nullptr); ctime_r(&t, StartTime); } @@ -79,7 +79,7 @@ void TMonService2::OutputIndexBody(IOutputStream& out) { void TMonService2::ServeRequest(IOutputStream& out, const NMonitoring::IHttpRequest& request) { TString path = request.GetPath(); - Y_VERIFY(path.StartsWith('/')); + Y_VERIFY(path.StartsWith('/')); if (AuthProvider_) { const auto authResult = AuthProvider_->Check(request); diff --git a/library/cpp/monlib/service/pages/index_mon_page.cpp b/library/cpp/monlib/service/pages/index_mon_page.cpp index 1d6227ff03..83ff8b529a 100644 --- a/library/cpp/monlib/service/pages/index_mon_page.cpp +++ b/library/cpp/monlib/service/pages/index_mon_page.cpp @@ -53,8 +53,8 @@ void TIndexMonPage::Output(IMonHttpRequest& request) { void TIndexMonPage::OutputIndex(IOutputStream& out, bool pathEndsWithSlash) { TGuard<TMutex> g(Mtx); - for (auto& Page : Pages) { - IMonPage* page = Page.Get(); + for (auto& Page : Pages) { + IMonPage* page = Page.Get(); if (page->IsInIndex()) { TString pathToDir = ""; if (!pathEndsWithSlash) { @@ -97,7 +97,7 @@ TIndexMonPage* TIndexMonPage::RegisterIndexPage(const TString& path, const TStri IMonPage* TIndexMonPage::FindPage(const TString& relativePath) { TGuard<TMutex> g(Mtx); - Y_VERIFY(!relativePath.StartsWith('/')); + Y_VERIFY(!relativePath.StartsWith('/')); TPagesByPath::iterator i = PagesByPath.find("/" + relativePath); if (i == PagesByPath.end()) { return nullptr; @@ -110,7 +110,7 @@ TIndexMonPage* TIndexMonPage::FindIndexPage(const TString& relativePath) { return VerifyDynamicCast<TIndexMonPage*>(FindPage(relativePath)); } -void TIndexMonPage::OutputCommonJsCss(IOutputStream& out) { +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"; diff --git a/library/cpp/monlib/service/pages/mon_page.cpp b/library/cpp/monlib/service/pages/mon_page.cpp index 4d53beff06..72033b1699 100644 --- a/library/cpp/monlib/service/pages/mon_page.cpp +++ b/library/cpp/monlib/service/pages/mon_page.cpp @@ -6,8 +6,8 @@ IMonPage::IMonPage(const TString& path, const TString& title) : Path(path) , Title(title) { - Y_VERIFY(!Path.StartsWith('/')); - Y_VERIFY(!Path.EndsWith('/')); + Y_VERIFY(!Path.StartsWith('/')); + Y_VERIFY(!Path.EndsWith('/')); } void IMonPage::OutputNavBar(IOutputStream& out) { diff --git a/library/cpp/monlib/service/pages/templates.h b/library/cpp/monlib/service/pages/templates.h index ca98447ac5..b4656f059f 100644 --- a/library/cpp/monlib/service/pages/templates.h +++ b/library/cpp/monlib/service/pages/templates.h @@ -188,12 +188,12 @@ namespace NMonitoring { }; struct TOutputStreamRef { - TOutputStreamRef(IOutputStream& str) + TOutputStreamRef(IOutputStream& str) : Str(str) { } - inline operator IOutputStream&() noexcept { + inline operator IOutputStream&() noexcept { return Str; } @@ -201,7 +201,7 @@ namespace NMonitoring { return true; // just to work with WITH_SCOPED } - IOutputStream& Str; + IOutputStream& Str; }; extern const char HtmlTag[5]; diff --git a/library/cpp/monlib/service/service.cpp b/library/cpp/monlib/service/service.cpp index e486b15dd4..929efbf816 100644 --- a/library/cpp/monlib/service/service.cpp +++ b/library/cpp/monlib/service/service.cpp @@ -8,7 +8,7 @@ #include <util/generic/buffer.h> #include <util/stream/str.h> -#include <util/stream/buffer.h> +#include <util/stream/buffer.h> #include <util/stream/zerocopy.h> #include <util/string/vector.h> @@ -30,7 +30,7 @@ namespace NMonitoring { return; } TString path = GetPath(); - if (!path.StartsWith('/')) { + if (!path.StartsWith('/')) { out << "HTTP/1.1 400 Bad request\r\nConnection: Close\r\n\r\n"; return; } @@ -165,7 +165,7 @@ namespace NMonitoring { throw; // just rethrow } - void TCoHttpServer::ProcessRequest(IOutputStream& out, const IHttpRequest& request) { + void TCoHttpServer::ProcessRequest(IOutputStream& out, const IHttpRequest& request) { try { TNetworkAddress addr(BindAddr, Port); TSocket sock(addr); @@ -257,7 +257,7 @@ namespace NMonitoring { CoServer.Stop(); } - void TMonService::DispatchRequest(IOutputStream& out, const IHttpRequest& request) { + void TMonService::DispatchRequest(IOutputStream& out, const IHttpRequest& request) { if (strcmp(request.GetPath(), "/") == 0) { out << "HTTP/1.1 200 Ok\nConnection: Close\n\n"; MtHandler(out, request); diff --git a/library/cpp/monlib/service/service.h b/library/cpp/monlib/service/service.h index 6aa112902e..2f66dddaf8 100644 --- a/library/cpp/monlib/service/service.h +++ b/library/cpp/monlib/service/service.h @@ -41,7 +41,7 @@ namespace NMonitoring { // by forwarding it to the httpserver // @note this call may be blocking; don't use inside coroutines // @throws may throw in case of connection error, etc - void ProcessRequest(IOutputStream&, const IHttpRequest&); + void ProcessRequest(IOutputStream&, const IHttpRequest&); private: class TConnection; @@ -101,7 +101,7 @@ namespace NMonitoring { void Stop(); protected: - void DispatchRequest(IOutputStream& out, const IHttpRequest&); + void DispatchRequest(IOutputStream& out, const IHttpRequest&); private: TCoHttpServer CoServer; |