Skip to content
Snippets Groups Projects
Commit 00c4a96a authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch 'error-report-timestamp-fix' into 'master'

fixed timestamp issue

See merge request !594
parents d386a0b2 0f747012
No related branches found
No related tags found
2 merge requests!630WIP: Resolve "The privileges of a new user are not saved in some cases",!594fixed timestamp issue
Pipeline #8507 passed
...@@ -290,7 +290,7 @@ GuiConnector.prototype.gatherReportData = function () { ...@@ -290,7 +290,7 @@ GuiConnector.prototype.gatherReportData = function () {
tooltip: 'Your browser user agent. Many issues are specific to certain browsers. This information is important to identify those.' tooltip: 'Your browser user agent. Many issues are specific to certain browsers. This information is important to identify those.'
}, },
timestamp: { timestamp: {
value: +new Date(), value: Math.floor(+new Date() / 1000),
tooltip: 'The error time. This information is useful to link the issue to a specific event on the server.' tooltip: 'The error time. This information is useful to link the issue to a specific event on the server.'
} // TODO: Submission time rather than server time for now } // TODO: Submission time rather than server time for now
}; };
...@@ -339,7 +339,7 @@ GuiConnector.prototype.alert = function (error, redirectIfSecurityError) { ...@@ -339,7 +339,7 @@ GuiConnector.prototype.alert = function (error, redirectIfSecurityError) {
self._errorDialogData.innerHTML += '<textarea id="report-comment" maxlength="255" placeholder="Add comment..."></textarea>'; self._errorDialogData.innerHTML += '<textarea id="report-comment" maxlength="255" placeholder="Add comment..."></textarea>';
Object.keys(data).forEach(function (key) { Object.keys(data).forEach(function (key) {
self._errorDialogData.innerHTML += '<label>' + self._errorDialogData.innerHTML += '<label>' +
(key === 'timestamp' ? new Date(data[key].value) : data[key].value) + (key === 'timestamp' ? new Date(data[key].value * 1000) : data[key].value) +
'<input class="report-check" type="checkbox" data-key="' + key + '" data-value="' + data[key].value + '"/>' + '<input class="report-check" type="checkbox" data-key="' + key + '" data-value="' + data[key].value + '"/>' +
'<span class="ui-icon ui-icon-info" title="' + data[key].tooltip + '"></span>' + '<span class="ui-icon ui-icon-info" title="' + data[key].tooltip + '"></span>' +
'</label>'; '</label>';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment