"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "plugins/systemlogs/frontend/public/javascripts/countly.views.js" between
countly-server-20.04.1.4.tar.gz and countly-server-20.04.1.5.tar.gz

About: countly-server is a mobile & web analytics, push notifications and crash reporting platform. This is the server part that collects and analyzes data while individual client SDKs (mobile, web or desktop) send the data. Community Edition (commercial Enterprise Edition also available).

countly.views.js  (countly-server-20.04.1.4):countly.views.js  (countly-server-20.04.1.5)
/*global CountlyHelpers, countlySystemLogs, SystemLogsView, countlyAttribution, pathsToSectionNames, countlyCrashes, moment, countlyView, countlyCommon, countly Global, T, app, $, jQuery*/ /*global CountlyHelpers, countlySystemLogs, SystemLogsView, countlyAttribution, pathsToSectionNames, countlyCrashes, moment, countlyView, countlyCommon, countly Global, T, app, $, jQuery*/
window.SystemLogsView = countlyView.extend({ window.SystemLogsView = countlyView.extend({
initialize: function() { initialize: function() {
this.loaded = false;
}, },
beforeRender: function() { beforeRender: function() {
var self = this; var self = this;
return $.when(T.render('/systemlogs/templates/logs.html', function(src) { return $.when(T.render('/systemlogs/templates/logs.html', function(src) {
self.template = src; self.template = src;
}), countlySystemLogs.initialize()).then(function() {}); }), countlySystemLogs.initialize()).then(function() {});
}, },
getExportAPI: function(tableID) { getExportAPI: function(tableID) {
var query, requestPath, apiQueryData; var query, requestPath, apiQueryData;
if (tableID === 'd-table-actionlogs') { if (tableID === 'd-table-actionlogs') {
skipping to change at line 97 skipping to change at line 97
$(".back-link").click(function() { $(".back-link").click(function() {
app.back(); app.back();
}); });
this.dtable = $('#systemlogs-table').dataTable($.extend({}, $.fn.dat aTable.defaults, { this.dtable = $('#systemlogs-table').dataTable($.extend({}, $.fn.dat aTable.defaults, {
"aaSorting": [[ 1, "desc" ]], "aaSorting": [[ 1, "desc" ]],
"bServerSide": true, "bServerSide": true,
"sAjaxSource": countlyCommon.API_PARTS.data.r + "?api_key=" + co untlyGlobal.member.api_key + "&app_id=" + countlyCommon.ACTIVE_APP_ID + "&method =systemlogs", "sAjaxSource": countlyCommon.API_PARTS.data.r + "?api_key=" + co untlyGlobal.member.api_key + "&app_id=" + countlyCommon.ACTIVE_APP_ID + "&method =systemlogs",
"fnServerData": function(sSource, aoData, fnCallback) { "fnServerData": function(sSource, aoData, fnCallback) {
$.ajax({ self.request = $.ajax({
"dataType": 'json', "dataType": 'json',
"type": "POST", "type": "POST",
"url": sSource, "url": sSource,
"data": aoData, "data": aoData,
"success": function(data) { "success": function(data) {
self.loaded = true;
self.request = null;
fnCallback(data); fnCallback(data);
CountlyHelpers.reopenRows(self.dtable, self.expandTa ble, self); CountlyHelpers.reopenRows(self.dtable, self.expandTa ble, self);
} }
}); });
}, },
"fnServerParams": function(aoData) { "fnServerParams": function(aoData) {
if (self._query) { if (self._query) {
aoData.push({ "name": "query", "value": JSON.stringify(s elf._query) }); aoData.push({ "name": "query", "value": JSON.stringify(s elf._query) });
} }
aoData.push({ "name": "period", "value": countlyCommon.getPe riodForAjax() }); aoData.push({ "name": "period", "value": countlyCommon.getPe riodForAjax() });
skipping to change at line 210 skipping to change at line 212
$(".action-segmentation .segmentation-option").on("click", function( ) { $(".action-segmentation .segmentation-option").on("click", function( ) {
if (!self._query) { if (!self._query) {
self._query = {}; self._query = {};
} }
self._query.a = $(this).data("value"); self._query.a = $(this).data("value");
if (self._query.a === "") { if (self._query.a === "") {
delete self._query.a; delete self._query.a;
} }
app.navigate("#/manage/systemlogs/query/" + JSON.stringify(self. _query)); app.navigate("#/manage/systemlogs/query/" + JSON.stringify(self. _query));
self.dtable.fnPageChange(0); self.dtable.fnPageChange(0);
self.refresh(); self.refresh(true);
}); });
$(".user-segmentation .segmentation-option").on("click", function() { $(".user-segmentation .segmentation-option").on("click", function() {
if (!self._query) { if (!self._query) {
self._query = {}; self._query = {};
} }
self._query.user_id = $(this).data("value"); self._query.user_id = $(this).data("value");
if (self._query.user_id === "") { if (self._query.user_id === "") {
delete self._query.user_id; delete self._query.user_id;
} }
app.navigate("#/manage/systemlogs/query/" + JSON.stringify(self. _query)); app.navigate("#/manage/systemlogs/query/" + JSON.stringify(self. _query));
self.dtable.fnPageChange(0); self.dtable.fnPageChange(0);
self.refresh(); self.refresh(true);
}); });
} }
}, },
refresh: function() { refresh: function(force) {
this.dtable.fnDraw(false); if (this.loaded || force) {
this.loaded = false;
if (this.request) {
this.request.abort();
}
this.request = null;
this.dtable.fnDraw(false);
}
}, },
renderField: function(key, field, sub) { renderField: function(key, field, sub) {
var ret = ""; var ret = "";
if (field && field.constructor === Array) { if (field && field.constructor === Array) {
if (sub) { if (sub) {
ret += field.join(", "); ret += field.join(", ");
} }
else { else {
ret += "<ul>"; ret += "<ul>";
if (key === "restrict" && typeof pathsToSectionNames !== "undefi ned") { if (key === "restrict" && typeof pathsToSectionNames !== "undefi ned") {
 End of changes. 6 change blocks. 
6 lines changed or deleted 15 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)