From: Samuel Guimarães <sguimaraes943(a)gmail.com>
Fixes wrong date on datatable and minor enhancements with advanced search.
Signed-off-by: Samuel Guimarães <sguimaraes943(a)gmail.com>
---
ui/js/src/wok.utils.js | 4 ++--
ui/js/wok.user-log.js | 8 ++++++++
ui/pages/i18n.json.tmpl | 2 ++
ui/pages/tabs/settings-search.html.tmpl | 14 +++++++-------
4 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/ui/js/src/wok.utils.js b/ui/js/src/wok.utils.js
index afe4020..dcec823 100644
--- a/ui/js/src/wok.utils.js
+++ b/ui/js/src/wok.utils.js
@@ -243,9 +243,9 @@ wok.datetimeLocaleConverter = function
datetimeLocaleConverter(datetime_string,
}
wok.dateLocaleConverter = function dateLocaleConverter(date_string, locale){
- var dte = new Date(date_string);
+ var dte = new moment(date_string);
var options = { year: 'numeric', month: 'long', day:
'numeric' };
- return dte.toLocaleDateString(locale, options);
+ return dte._d.toLocaleDateString(locale, options);
}
wok.timeLocaleConverter = function timeLocaleConverter(time_string, locale){
diff --git a/ui/js/wok.user-log.js b/ui/js/wok.user-log.js
index 501bb87..a46ef07 100644
--- a/ui/js/wok.user-log.js
+++ b/ui/js/wok.user-log.js
@@ -83,6 +83,10 @@ wok.listUserLogConfig = function() {
"converter": 'string',
"title": i18n['WOKSETT0002M']
}, {
+ "column-id": 'ip',
+ "converter": 'string',
+ "title": i18n['WOKSETT0014M']
+ }, {
"column-id": 'req',
"converter": 'string',
"title": i18n['WOKSETT0003M']
@@ -96,6 +100,10 @@ wok.listUserLogConfig = function() {
"converter": 'time-locale-converter',
"order": 'desc',
"title": i18n['WOKSETT0005M']
+ }, {
+ "column-id": 'zone',
+ "converter": 'string',
+ "title": i18n['WOKSETT0013M']
},
{
"column-id": 'message',
diff --git a/ui/pages/i18n.json.tmpl b/ui/pages/i18n.json.tmpl
index 94e90ac..de0eb70 100644
--- a/ui/pages/i18n.json.tmpl
+++ b/ui/pages/i18n.json.tmpl
@@ -50,6 +50,8 @@
"WOKSETT0010M": "$_("No results found!")",
"WOKSETT0011M": "$_("Loading...")",
"WOKSETT0012M": "$_("Actions")",
+ "WOKSETT0013M": "$_("Timezone")",
+ "WOKSETT0014M": "$_("IP Address")",
"WOKFMT2001M": "$_("Ki")",
"WOKFMT2002M": "$_("Mi")",
diff --git a/ui/pages/tabs/settings-search.html.tmpl
b/ui/pages/tabs/settings-search.html.tmpl
index 5a87b60..16a98b6 100644
--- a/ui/pages/tabs/settings-search.html.tmpl
+++ b/ui/pages/tabs/settings-search.html.tmpl
@@ -32,15 +32,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
<form id="form-advanced-search" autocomplete="off">
<div class="form-group">
<p>$_("Search results by:")</p>
- <label
for="user-log-app-textbox">$_("Application")</label>
+ <label
for="application-name">$_("Application")</label>
<input type="text" class="form-control typeahead"
id="application-name" name="app" />
</div>
<div class="form-group">
- <label
for="user-log-user-textbox">$_("User")</label>
+ <label for="username">$_("User")</label>
<input type="text" class="form-control"
id="username" name="user" />
</div>
<div class="form-group">
- <label
for="user-log-name-textbox">$_("Request")</label>
+ <label
for="request-type">$_("Request")</label>
<select class="form-control selectpicker"
id="request-type" title="$_('Request Type')"
name="req">
<option value="">All Requests</option>
<option value="POST">POST</option>
@@ -52,12 +52,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
<div class="row clearfix">
<div class="col-sm-12">
<div class="form-group col-sm-6">
- <label
for="user-log-name-textbox">$_("Date")</label>
- <input type="text" placeholder="YYYY-MM-DD"
class="form-control" id="date" name="date" />
+ <label for="ip">$_("User IP
Address")</label>
+ <input type="text" class="form-control"
id="ip" name="ip" />
</div>
<div class="form-group col-sm-6">
- <label
for="user-log-time-textbox">$_("Time")</label>
- <input type="text" placeholder="HH:MM:SS"
class="form-control" id="time" name="time" />
+ <label for="date">$_("Date")</label>
+ <input type="text" placeholder="YYYY-MM-DD"
class="form-control" id="date" name="date" />
</div>
</div>
</div>
--
1.9.3