Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
awstats
Commits
66065935eeb0
Commit
0b128b20
authored
Jun 22, 2011
by
Arthur Lutz
Browse files
display warning message when there are no stats
parent
c8241fcf1a24
Changes
5
Hide whitespace changes
Inline
Side-by-side
i18n/de.po
View file @
66065935
...
...
@@ -68,6 +68,9 @@ msgstr ""
msgid "New StatPeriod"
msgstr ""
msgid "No stats yet"
msgstr ""
msgid "Number of results :"
msgstr ""
...
...
i18n/en.po
View file @
66065935
...
...
@@ -63,6 +63,9 @@ msgstr ""
msgid "New StatPeriod"
msgstr ""
msgid "No stats yet"
msgstr ""
msgid "Number of results :"
msgstr ""
...
...
i18n/es.po
View file @
66065935
...
...
@@ -63,6 +63,9 @@ msgstr ""
msgid "New StatPeriod"
msgstr ""
msgid "No stats yet"
msgstr ""
msgid "Number of results :"
msgstr ""
...
...
i18n/fr.po
View file @
66065935
...
...
@@ -63,6 +63,9 @@ msgstr "Nouvelle statistique de visites"
msgid "New StatPeriod"
msgstr "Nouvelle période de statistiques"
msgid "No stats yet"
msgstr "Pas encore de données sur les visites"
msgid "Number of results :"
msgstr "Nombre de résultats :"
...
...
views/primary.py
View file @
66065935
...
...
@@ -109,9 +109,14 @@ class StatGraph(EntityView):
'(Any START, HITS WHERE H count HITS, H hit_type "normal", H period P, P start START, P stop STOP, H stats_about E, E eid %%(e)s %s)'
' UNION '
'(Any START, 0 WHERE P is StatPeriod, P start START, P stop STOP, NOT EXISTS(H period P, H stats_about E, E eid %%(e)s) %s))'
)
plot_displayed
=
False
for
constraint
,
label
in
((
' HAVING STOP-START <= 20'
,
_
(
'Daily'
)),
(
' HAVING STOP-START >= 20'
,
_
(
'Monthly'
))):
self
.
w
(
u
'<h2>%s</h2>'
%
label
)
rset
=
self
.
_cw
.
execute
(
rql
%
(
constraint
,
constraint
),
{
'e'
:
entity
.
eid
})
self
.
w
(
self
.
_cw
.
view
(
'plot'
,
rset
,
'null'
))
if
rset
:
self
.
w
(
u
'<h2>%s</h2>'
%
label
)
self
.
w
(
self
.
_cw
.
view
(
'plot'
,
rset
,
'null'
))
plot_displayed
=
True
if
not
plot_display
:
self
.
w
(
u
'<h2>%s<h2>'
%
_
(
'No stats yet'
))
self
.
w
(
u
'</div>'
)
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