Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
apachedex
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Arnaud Fontaine
apachedex
Commits
fa53a437
Commit
fa53a437
authored
Apr 05, 2013
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only display error detail when there are errors.
parent
368092f6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
apachedex/__init__.py
apachedex/__init__.py
+3
-1
No files found.
apachedex/__init__.py
View file @
fa53a437
...
@@ -214,15 +214,17 @@ class GenericSiteStats(object):
...
@@ -214,15 +214,17 @@ class GenericSiteStats(object):
append
(
'</tr>'
)
append
(
'</tr>'
)
def
hitTd
(
hit
,
status
):
def
hitTd
(
hit
,
status
):
return
'<td class="%s">%s</td>'
%
(
getClassForStatusHit
(
hit
,
status
),
hit
)
return
'<td class="%s">%s</td>'
%
(
getClassForStatusHit
(
hit
,
status
),
hit
)
has_errors
=
False
for
status
,
data_dict
in
sorted
(
filtered_status
.
iteritems
(),
for
status
,
data_dict
in
sorted
(
filtered_status
.
iteritems
(),
key
=
ITEMGETTER0
):
key
=
ITEMGETTER0
):
has_errors
|=
statusIsError
(
status
)
append
(
'<tr><th>%s</th>'
%
status
)
append
(
'<tr><th>%s</th>'
%
status
)
append
(
hitTd
(
sum
(
data_dict
.
itervalues
()),
status
))
append
(
hitTd
(
sum
(
data_dict
.
itervalues
()),
status
))
for
date
in
column_list
:
for
date
in
column_list
:
append
(
hitTd
(
data_dict
[
date
],
status
))
append
(
hitTd
(
data_dict
[
date
],
status
))
append
(
'</tr>'
)
append
(
'</tr>'
)
append
(
'</table>'
)
append
(
'</table>'
)
if
self
.
error_detail
:
if
self
.
error_detail
and
has_errors
:
def
getHitForUrl
(
referer_counter
):
def
getHitForUrl
(
referer_counter
):
return
sum
(
referer_counter
.
itervalues
())
return
sum
(
referer_counter
.
itervalues
())
filtered_status_url
=
defaultdict
(
partial
(
defaultdict
,
dict
))
filtered_status_url
=
defaultdict
(
partial
(
defaultdict
,
dict
))
...
...
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