Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Laurent S
erp5
Commits
ae03699b
Commit
ae03699b
authored
Jun 24, 2015
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
administration: on introspection tool, add filtering when doing tail of event.log
parent
ac9b485c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
5 deletions
+17
-5
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/IntrospectionTool_tailEventLog.xml
...ns/erp5_administration/IntrospectionTool_tailEventLog.xml
+16
-4
product/ERP5/Tool/IntrospectionTool.py
product/ERP5/Tool/IntrospectionTool.py
+1
-1
No files found.
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/IntrospectionTool_tailEventLog.xml
View file @
ae03699b
...
...
@@ -56,10 +56,10 @@
} \n
}\n
}\n
if (request == null)\n
if (request == null)
{
\n
alert("Error creating request object!");\n
\n
request = createRequest();
\n
}
\n
\n
}\n
\n
function getLog(timer) {\n
...
...
@@ -88,12 +88,23 @@
function updatePage() {\n
var logDiv = document.getElementById("log"), logLine; today = new Date();\n
var message_div = document.getElementById("message");\n
var current_value;\n
var regexp = document.getElementById("regexp").value;\n
if (request.readyState == 4) {\n
if (request.status == 200) {\n
var currentLogValue = request.responseText.split("\\n");\n
var logLine = \' \';\n
for (i=0; i
< currentLogValue.length
-
1;
i++)
{\n
logLine
+=
currentLogValue[i]
+
\'\\n\';\n
current_value =
currentLogValue[i];\n
add_line =
true;\n
if
(regexp
!==
"")
{\n
if
(current_value.match(regexp)
===
null)
{\n
add_line =
false;\n
}\n
}\n
if
(
add_line =
==
true)
{\n
logLine
+=
currentLogValue[i]
+
\'\\n\';\n
}\n
}\n
logDiv.innerHTML=
logLine;\n
logDiv.scrollTop =
logDiv.scrollHeight;\n
...
...
@@ -112,6 +123,7 @@
<div
id=
"toolbar"
>
\n
<button
tal:attributes=
"onclick string:getLog(\'start\')"
>
Start Log
</button>
\n
<button
onclick=
"stopTail();"
>
Stop Log
</button>
\n
<label>
Regexp
</label><input
type=
"text"
id=
"regexp"
size=
"20"
>
\n
<span
id=
"message"
>
Press Start...
</span>
\n
</div>
\n
<textarea
id=
"log"
style=
"border:solid 1px #dddddd; margin-left:25px; font-size:9px;\n
...
...
product/ERP5/Tool/IntrospectionTool.py
View file @
ae03699b
...
...
@@ -211,7 +211,7 @@ class IntrospectionTool(LogMixin, BaseTool):
"""
Tail the Event Log.
"""
return
escape
(
self
.
_tailFile
(
self
.
__getEventLogPath
(),
50
))
return
escape
(
self
.
_tailFile
(
self
.
__getEventLogPath
(),
50
0
))
security
.
declareProtected
(
Permissions
.
ManagePortal
,
'tailAccessLog'
)
def
tailAccessLog
(
self
):
...
...
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