Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
9fe143e3
Commit
9fe143e3
authored
Sep 25, 2017
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(LogDB): вынес отдельно стили на странице с логами
parent
4269d228
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
10 deletions
+31
-10
LogDB.cc
extensions/LogDB/LogDB.cc
+25
-7
LogDB.h
extensions/LogDB/LogDB.h
+6
-3
No files found.
extensions/LogDB/LogDB.cc
View file @
9fe143e3
...
...
@@ -213,9 +213,9 @@ LogDB::LogDB( const string& name, int argc, const char* const* argv, const strin
}
#ifndef DISABLE_REST_API
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
;
wsMaxSend
=
uniset
::
getArgPInt
(
"--"
+
prefix
+
"ws-max-send"
,
argc
,
argv
,
it
.
getProp
(
"wsMaxSend"
),
wsMaxSend
);
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
;
wsMaxSend
=
uniset
::
getArgPInt
(
"--"
+
prefix
+
"ws-max-send"
,
argc
,
argv
,
it
.
getProp
(
"wsMaxSend"
),
wsMaxSend
);
httpHost
=
uniset
::
getArgParam
(
"--"
+
prefix
+
"httpserver-host"
,
argc
,
argv
,
"localhost"
);
httpPort
=
uniset
::
getArgInt
(
"--"
+
prefix
+
"httpserver-port"
,
argc
,
argv
,
"8080"
);
...
...
@@ -1591,12 +1591,30 @@ void LogDB::httpWebSocketConnectPage( ostream& ostr,
ostr
<<
"}"
<<
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
<<
"<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
<<
"<div id='logs'></div>"
<<
endl
;
ostr
<<
"<div id='end' style='display: hidden;'></div>"
<<
endl
;
ostr
<<
"<p height='10px'> </p>"
<<
endl
;
ostr
<<
"<h4><div onclick='javascritpt:clickScroll()' id='logname' class='logtitle'></div></h4>"
<<
endl
;
ostr
<<
"<div id='logs' class='logs'></div>"
<<
endl
;
ostr
<<
"<p><div id='end' style='display: hidden;'> </div></p>"
<<
endl
;
ostr
<<
"</body>"
<<
endl
;
}
// -----------------------------------------------------------------------------
...
...
extensions/LogDB/LogDB.h
View file @
9fe143e3
...
...
@@ -78,9 +78,9 @@ namespace uniset
При этом доступно два способа:
* Первый - это использование секции в общем файле проекта (cofigure.xml).
* Первый - это использование секции в общем файле проекта (co
n
figure.xml).
* Второй способ - позволя
т просто создать
xml-файл с одной настроечной секцией и указать его
* Второй способ - позволя
ет создать отдельный
xml-файл с одной настроечной секцией и указать его
в аргументах командной строки
\code
uniset2-logdb --single-confile logdbconf.xml
...
...
@@ -100,7 +100,10 @@ namespace uniset
http-сервер. Параметры запуска можно указать при помощи:
--prefix-httpserver-host и --prefix-httpserver-port.
Запросы обрабатываются по пути: api/version/logdb/...
А так же --prefix-httpserver-max-queued для указания максимального размера очереди запросов к серверу
и --prefix-httpserver-max-threads количество потоков обработки запросов.
REST API доступен по пути: api/version/logdb/... (текущая версия v01)
\code
/help - Получение списка доступных команд
/list - список доступных логов
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment