Commit 9fe143e3 authored by Pavel Vainerman's avatar Pavel Vainerman

(LogDB): вынес отдельно стили на странице с логами

parent 4269d228
...@@ -213,9 +213,9 @@ LogDB::LogDB( const string& name, int argc, const char* const* argv, const strin ...@@ -213,9 +213,9 @@ LogDB::LogDB( const string& name, int argc, const char* const* argv, const strin
} }
#ifndef DISABLE_REST_API #ifndef DISABLE_REST_API
wsHeartbeatTime_sec = (float)uniset::getArgPInt("--" + prefix + "ws-heartbeat-time", argc, argv, it.getProp("wsPingTime"),wsHeartbeatTime_sec) / 1000.0; wsHeartbeatTime_sec = (float)uniset::getArgPInt("--" + prefix + "ws-heartbeat-time", argc, argv, it.getProp("wsPingTime"), wsHeartbeatTime_sec) / 1000.0;
wsSendTime_sec = (float)uniset::getArgPInt("--" + prefix + "ws-send-time", argc, argv, it.getProp("wsSendTime"),wsSendTime_sec) / 1000.0; wsSendTime_sec = (float)uniset::getArgPInt("--" + prefix + "ws-send-time", argc, argv, it.getProp("wsSendTime"), wsSendTime_sec) / 1000.0;
wsMaxSend = uniset::getArgPInt("--" + prefix + "ws-max-send", argc, argv, it.getProp("wsMaxSend"),wsMaxSend); wsMaxSend = uniset::getArgPInt("--" + prefix + "ws-max-send", argc, argv, it.getProp("wsMaxSend"), wsMaxSend);
httpHost = uniset::getArgParam("--" + prefix + "httpserver-host", argc, argv, "localhost"); httpHost = uniset::getArgParam("--" + prefix + "httpserver-host", argc, argv, "localhost");
httpPort = uniset::getArgInt("--" + prefix + "httpserver-port", argc, argv, "8080"); httpPort = uniset::getArgInt("--" + prefix + "httpserver-port", argc, argv, "8080");
...@@ -1591,12 +1591,30 @@ void LogDB::httpWebSocketConnectPage( ostream& ostr, ...@@ -1591,12 +1591,30 @@ void LogDB::httpWebSocketConnectPage( ostream& ostr,
ostr << "}" << endl; ostr << "}" << endl;
ostr << "</script>" << endl; ostr << "</script>" << endl;
ostr << "<style media='all' type='text/css'>" << endl;
ostr << ".logs {" << endl;
ostr << " font-family: 'Liberation Mono', 'DejaVu Sans Mono', 'Courier New', monospace;" << endl;
ostr << " padding-top: 30px;" << endl;
ostr << "}" << endl;
ostr << "" << endl;
ostr << ".logtitle {" << endl;
ostr << " position: fixed;" << endl;
ostr << " top: 0;" << endl;
ostr << " left: 0;" << endl;
ostr << " padding: 10px;" << endl;
ostr << " width: 100%;" << endl;
ostr << " height: 25px;" << endl;
ostr << " background-color: green;" << endl;
ostr << " border-top: 2px solid;" << endl;
ostr << " border-bottom: 2px solid;" << endl;
ostr << " border-color: white;" << endl;
ostr << "}" << endl;
ostr << "</style>" << endl;
ostr << "</head>" << endl; ostr << "</head>" << endl;
ostr << "<body style='background: #111111; color: #ececec;' onload=\"javascript:WebSocketCreate('" << logname << "')\">" << endl; ostr << "<body style='background: #111111; color: #ececec;' onload=\"javascript:WebSocketCreate('" << logname << "')\">" << endl;
ostr << "<h4><div onclick='javascritpt:clickScroll()' id='logname' style='position: fixed; top: 0; left: 0; padding: 10px; width: 100%; height: 25px; background-color: green; border-top: 2px solid; border-bottom: 2px solid; border-color: white; '></div></h4>" << endl; ostr << "<h4><div onclick='javascritpt:clickScroll()' id='logname' class='logtitle'></div></h4>" << endl;
ostr << "<div id='logs'></div>" << endl; ostr << "<div id='logs' class='logs'></div>" << endl;
ostr << "<div id='end' style='display: hidden;'></div>" << endl; ostr << "<p><div id='end' style='display: hidden;'>&nbsp;</div></p>" << endl;
ostr << "<p height='10px'>&nbsp;</p>" << endl;
ostr << "</body>" << endl; ostr << "</body>" << endl;
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
......
...@@ -78,9 +78,9 @@ namespace uniset ...@@ -78,9 +78,9 @@ namespace uniset
При этом доступно два способа: При этом доступно два способа:
* Первый - это использование секции в общем файле проекта (cofigure.xml). * Первый - это использование секции в общем файле проекта (configure.xml).
* Второй способ - позволят просто создать xml-файл с одной настроечной секцией и указать его * Второй способ - позволяет создать отдельный xml-файл с одной настроечной секцией и указать его
в аргументах командной строки в аргументах командной строки
\code \code
uniset2-logdb --single-confile logdbconf.xml uniset2-logdb --single-confile logdbconf.xml
...@@ -100,7 +100,10 @@ namespace uniset ...@@ -100,7 +100,10 @@ namespace uniset
http-сервер. Параметры запуска можно указать при помощи: http-сервер. Параметры запуска можно указать при помощи:
--prefix-httpserver-host и --prefix-httpserver-port. --prefix-httpserver-host и --prefix-httpserver-port.
Запросы обрабатываются по пути: api/version/logdb/... А так же --prefix-httpserver-max-queued для указания максимального размера очереди запросов к серверу
и --prefix-httpserver-max-threads количество потоков обработки запросов.
REST API доступен по пути: api/version/logdb/... (текущая версия v01)
\code \code
/help - Получение списка доступных команд /help - Получение списка доступных команд
/list - список доступных логов /list - список доступных логов
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment