Commit 1498bce19df2ab89762faf65dff600db9225d10a
1 parent
f06d0c2a
Exists in
master
and in
2 other branches
date formating in table and in date colector are correct
Showing
3 changed files
with
52 additions
and
44 deletions
Show diff stats
dashboards/locale/pt_BR/LC_MESSAGES/django.po
@@ -8,7 +8,7 @@ msgid "" | @@ -8,7 +8,7 @@ msgid "" | ||
8 | msgstr "" | 8 | msgstr "" |
9 | "Project-Id-Version: PACKAGE VERSION\n" | 9 | "Project-Id-Version: PACKAGE VERSION\n" |
10 | "Report-Msgid-Bugs-To: \n" | 10 | "Report-Msgid-Bugs-To: \n" |
11 | -"POT-Creation-Date: 2017-05-25 23:31-0300\n" | 11 | +"POT-Creation-Date: 2017-06-01 21:27-0300\n" |
12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
14 | "Language-Team: LANGUAGE <LL@li.org>\n" | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
@@ -18,122 +18,128 @@ msgstr "" | @@ -18,122 +18,128 @@ msgstr "" | ||
18 | "Content-Transfer-Encoding: 8bit\n" | 18 | "Content-Transfer-Encoding: 8bit\n" |
19 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" | 19 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" |
20 | 20 | ||
21 | -#: dashboards/templates/dashboards/category.html:18 | 21 | +#: .\templates\dashboards\category.html:18 |
22 | msgid "Analytics Category" | 22 | msgid "Analytics Category" |
23 | msgstr "Análise de Categoria" | 23 | msgstr "Análise de Categoria" |
24 | 24 | ||
25 | -#: dashboards/templates/dashboards/category.html:31 | ||
26 | -#: dashboards/templates/dashboards/general.html:30 | 25 | +#: .\templates\dashboards\category.html:31 |
26 | +#: .\templates\dashboards\general.html:34 | ||
27 | msgid "Platform Report" | 27 | msgid "Platform Report" |
28 | msgstr "Report da Plataforma" | 28 | msgstr "Report da Plataforma" |
29 | 29 | ||
30 | -#: dashboards/templates/dashboards/category.html:36 | ||
31 | -#: dashboards/templates/dashboards/category.html:48 | ||
32 | -#: dashboards/templates/dashboards/general.html:33 | 30 | +#: .\templates\dashboards\category.html:36 |
31 | +#: .\templates\dashboards\category.html:48 | ||
32 | +#: .\templates\dashboards\general.html:37 | ||
33 | msgid "Category Report" | 33 | msgid "Category Report" |
34 | msgstr "Report da Categoria" | 34 | msgstr "Report da Categoria" |
35 | 35 | ||
36 | -#: dashboards/templates/dashboards/category.html:39 | ||
37 | -#: dashboards/templates/dashboards/general.html:36 | 36 | +#: .\templates\dashboards\category.html:39 |
37 | +#: .\templates\dashboards\general.html:40 | ||
38 | msgid "Subject Report" | 38 | msgid "Subject Report" |
39 | msgstr "Report do Assunto" | 39 | msgstr "Report do Assunto" |
40 | 40 | ||
41 | -#: dashboards/templates/dashboards/category.html:56 | ||
42 | -#: dashboards/templates/dashboards/general.html:49 | 41 | +#: .\templates\dashboards\category.html:56 |
42 | +#: .\templates\dashboards\general_body.html:8 | ||
43 | +#: .\templates\dashboards\log.html:35 | ||
43 | msgid "Focus" | 44 | msgid "Focus" |
44 | msgstr "Destaques" | 45 | msgstr "Destaques" |
45 | 46 | ||
46 | -#: dashboards/templates/dashboards/category.html:59 | ||
47 | -#: dashboards/templates/dashboards/general.html:52 | 47 | +#: .\templates\dashboards\category.html:59 |
48 | +#: .\templates\dashboards\general_body.html:11 | ||
49 | +#: .\templates\dashboards\log.html:38 | ||
48 | msgid "Log" | 50 | msgid "Log" |
49 | msgstr "Log" | 51 | msgstr "Log" |
50 | 52 | ||
51 | -#: dashboards/templates/dashboards/category.html:69 | ||
52 | -#: dashboards/templates/dashboards/general.html:62 | ||
53 | -msgid "most used tags" | ||
54 | -msgstr "tags mais usadas" | ||
55 | - | ||
56 | -#: dashboards/templates/dashboards/general.html:18 | 53 | +#: .\templates\dashboards\general.html:22 |
57 | msgid "Dashboards General" | 54 | msgid "Dashboards General" |
58 | msgstr "Dashboards Geral" | 55 | msgstr "Dashboards Geral" |
59 | 56 | ||
60 | -#: dashboards/templates/dashboards/general.html:45 | 57 | +#: .\templates\dashboards\general_body.html:4 |
58 | +#: .\templates\dashboards\log.html:31 | ||
61 | msgid "Amadeus Report" | 59 | msgid "Amadeus Report" |
62 | msgstr "Report do Amadeus" | 60 | msgstr "Report do Amadeus" |
63 | 61 | ||
64 | -#: dashboards/templates/dashboards/general.html:72 | 62 | +#: .\templates\dashboards\general_body.html:21 |
65 | msgid "Most accessed " | 63 | msgid "Most accessed " |
66 | msgstr "Mais acessadas" | 64 | msgstr "Mais acessadas" |
67 | 65 | ||
68 | -#: dashboards/templates/dashboards/general.html:77 | 66 | +#: .\templates\dashboards\general_body.html:26 |
69 | msgid "Categories" | 67 | msgid "Categories" |
70 | msgstr "Categorias" | 68 | msgstr "Categorias" |
71 | 69 | ||
72 | -#: dashboards/templates/dashboards/general.html:82 | 70 | +#: .\templates\dashboards\general_body.html:31 |
73 | msgid "Subjects" | 71 | msgid "Subjects" |
74 | msgstr "Assuntos" | 72 | msgstr "Assuntos" |
75 | 73 | ||
76 | -#: dashboards/templates/dashboards/general.html:87 | 74 | +#: .\templates\dashboards\general_body.html:36 |
77 | msgid "Resource" | 75 | msgid "Resource" |
78 | msgstr "Recursos" | 76 | msgstr "Recursos" |
79 | 77 | ||
80 | -#: dashboards/templates/dashboards/general.html:96 | 78 | +#: .\templates\dashboards\general_body.html:45 |
81 | msgid "Most active users" | 79 | msgid "Most active users" |
82 | msgstr "Usuários mais ativos" | 80 | msgstr "Usuários mais ativos" |
83 | 81 | ||
84 | -#: dashboards/templates/dashboards/general.html:102 | 82 | +#: .\templates\dashboards\general_body.html:51 |
85 | msgid "Amount of access in: " | 83 | msgid "Amount of access in: " |
86 | msgstr "Quantidade de acessos em: " | 84 | msgstr "Quantidade de acessos em: " |
87 | 85 | ||
88 | -#: dashboards/templates/dashboards/general.html:117 | 86 | +#: .\templates\dashboards\general_body.html:66 |
89 | msgid "Select the begin of the week: " | 87 | msgid "Select the begin of the week: " |
90 | msgstr "Selecione o dia da semana: " | 88 | msgstr "Selecione o dia da semana: " |
91 | 89 | ||
92 | -#: dashboards/views.py:54 | 90 | +#: .\templates\dashboards\log.html:28 |
91 | +msgid "search" | ||
92 | +msgstr "Pesquisar" | ||
93 | + | ||
94 | +#: .\templates\dashboards\tags_body.html:6 | ||
95 | +msgid "most used tags" | ||
96 | +msgstr "tags mais usadas" | ||
97 | + | ||
98 | +#: .\views.py:58 | ||
93 | msgid "January" | 99 | msgid "January" |
94 | msgstr "Janeiro" | 100 | msgstr "Janeiro" |
95 | 101 | ||
96 | -#: dashboards/views.py:54 | 102 | +#: .\views.py:58 |
97 | msgid "February" | 103 | msgid "February" |
98 | msgstr "Fevereiro" | 104 | msgstr "Fevereiro" |
99 | 105 | ||
100 | -#: dashboards/views.py:54 | 106 | +#: .\views.py:58 |
101 | msgid "March" | 107 | msgid "March" |
102 | msgstr "Março" | 108 | msgstr "Março" |
103 | 109 | ||
104 | -#: dashboards/views.py:54 | 110 | +#: .\views.py:58 |
105 | msgid "April" | 111 | msgid "April" |
106 | msgstr "Abril" | 112 | msgstr "Abril" |
107 | 113 | ||
108 | -#: dashboards/views.py:54 | 114 | +#: .\views.py:58 |
109 | msgid "May" | 115 | msgid "May" |
110 | msgstr "Maio" | 116 | msgstr "Maio" |
111 | 117 | ||
112 | -#: dashboards/views.py:54 | 118 | +#: .\views.py:58 |
113 | msgid "June" | 119 | msgid "June" |
114 | msgstr "Junho" | 120 | msgstr "Junho" |
115 | 121 | ||
116 | -#: dashboards/views.py:54 | 122 | +#: .\views.py:58 |
117 | msgid "July" | 123 | msgid "July" |
118 | msgstr "Julho" | 124 | msgstr "Julho" |
119 | 125 | ||
120 | -#: dashboards/views.py:55 | 126 | +#: .\views.py:59 |
121 | msgid "August" | 127 | msgid "August" |
122 | msgstr "Agosto" | 128 | msgstr "Agosto" |
123 | 129 | ||
124 | -#: dashboards/views.py:55 | 130 | +#: .\views.py:59 |
125 | msgid "September" | 131 | msgid "September" |
126 | msgstr "Setembro" | 132 | msgstr "Setembro" |
127 | 133 | ||
128 | -#: dashboards/views.py:55 | 134 | +#: .\views.py:59 |
129 | msgid "October" | 135 | msgid "October" |
130 | msgstr "Outubro" | 136 | msgstr "Outubro" |
131 | 137 | ||
132 | -#: dashboards/views.py:55 | 138 | +#: .\views.py:59 |
133 | msgid "November" | 139 | msgid "November" |
134 | msgstr "Novembro" | 140 | msgstr "Novembro" |
135 | 141 | ||
136 | -#: dashboards/views.py:55 | 142 | +#: .\views.py:59 |
137 | msgid "December" | 143 | msgid "December" |
138 | msgstr "Dezembro" | 144 | msgstr "Dezembro" |
139 | 145 |
dashboards/static/dashboards/js/logbehavior.js
@@ -3,10 +3,12 @@ $(document).ready(function(){ | @@ -3,10 +3,12 @@ $(document).ready(function(){ | ||
3 | d.setDate(d.getDate() - 30); | 3 | d.setDate(d.getDate() - 30); |
4 | $('#init_date').datetimepicker({ | 4 | $('#init_date').datetimepicker({ |
5 | defaultDate: d, | 5 | defaultDate: d, |
6 | + format: 'L' | ||
6 | }); | 7 | }); |
7 | $('#end_date').datetimepicker({ | 8 | $('#end_date').datetimepicker({ |
8 | useCurrent: false, //Important! See issue #1075 | 9 | useCurrent: false, //Important! See issue #1075 |
9 | - defaultDate: new Date() | 10 | + defaultDate: new Date(), |
11 | + format: 'L' | ||
10 | }); | 12 | }); |
11 | $("#init_date").on("dp.change", function (e) { | 13 | $("#init_date").on("dp.change", function (e) { |
12 | $('#end_date').data("DateTimePicker").minDate(e.date); | 14 | $('#end_date').data("DateTimePicker").minDate(e.date); |
@@ -38,7 +40,7 @@ $(document).ready(function(){ | @@ -38,7 +40,7 @@ $(document).ready(function(){ | ||
38 | var log = { | 40 | var log = { |
39 | 41 | ||
40 | refresh_log_data: function(init_date, end_date){ | 42 | refresh_log_data: function(init_date, end_date){ |
41 | - $.get("/dashboards/get_log_data", {init_date: init_date.format("YYYY-MM-DD HH:mm"), end_date: end_date.format("YYYY-MM-DD HH:mm")}).done(function(data){ | 43 | + $.get("/dashboards/get_log_data", {init_date: init_date.format("YYYY-MM-DD"), end_date: end_date.format("YYYY-MM-DD")}).done(function(data){ |
42 | log.render_table("log-body", data); | 44 | log.render_table("log-body", data); |
43 | }) | 45 | }) |
44 | }, | 46 | }, |
dashboards/views.py
@@ -128,9 +128,9 @@ class LogView(LogMixin, generic.TemplateView): | @@ -128,9 +128,9 @@ class LogView(LogMixin, generic.TemplateView): | ||
128 | 128 | ||
129 | def load_log_data(request): | 129 | def load_log_data(request): |
130 | params = request.GET | 130 | params = request.GET |
131 | - init_date = datetime.strptime(params['init_date'], '%Y-%m-%d %H:%M') | 131 | + init_date = datetime.strptime(params['init_date'], '%Y-%m-%d') |
132 | 132 | ||
133 | - end_date = datetime.strptime(params['end_date'], '%Y-%m-%d %H:%M') | 133 | + end_date = datetime.strptime(params['end_date'], '%Y-%m-%d') |
134 | 134 | ||
135 | if params.get('category'): | 135 | if params.get('category'): |
136 | print("has category") | 136 | print("has category") |
@@ -145,7 +145,7 @@ def parse_log_queryset_to_JSON(logs): | @@ -145,7 +145,7 @@ def parse_log_queryset_to_JSON(logs): | ||
145 | datum = {} | 145 | datum = {} |
146 | datum['user'] = log.user | 146 | datum['user'] = log.user |
147 | datum['resource'] = log.resource | 147 | datum['resource'] = log.resource |
148 | - datum['datetime'] = log.datetime | 148 | + datum['datetime'] = log.datetime.strftime("%d/%m/%Y") |
149 | datum['action'] = log.action | 149 | datum['action'] = log.action |
150 | datum['context'] = log.context | 150 | datum['context'] = log.context |
151 | datum['component'] = log.component | 151 | datum['component'] = log.component |