Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion bin/scripts/data-cleanup/delete_old_views.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ Promise.all([pluginManager.dbConnection("countly"), pluginManager.dbConnection("
let view = await cursor.next();
//Find one drill entry for the view with timestamp greater than expiration date
var drillEntry = await drillSession.client.db("countly_drill").collection(collectionName).findOne({"sg.name": view.view, "ts": { $gt: expiration_timestamp }}, {ts: 1});
var drillEntry2 = await drillSession.client.db("countly_drill").collection("drill_events").findOne({"a": app._id + "", "e": event, "sg.name": view.view, "ts": { $gt: expiration_timestamp }}, {ts: 1});
//If no entry found, delete the view
if (!drillEntry) {
if (!drillEntry && !drillEntry2) {
console.log("Deleting view: ", view.view);
if (!DRY_RUN) {
await new Promise(function(resolve) {
Expand Down
6 changes: 6 additions & 0 deletions bin/scripts/data-cleanup/remove_old_crashes_sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ Promise.all(
count = await drillDb.collection("drill_events" + crypto.createHash('sha1').update("[CLY]_crash" + app._id).digest('hex')).countDocuments({ ts: { $lt: lastUnixTimestamp * 1000 } });
console.log("", count, "drill crashes to be deleted via command");
console.log("", "", "", `db.drill_events${crypto.createHash('sha1').update("[CLY]_crash" + app._id).digest('hex')}.deleteMany({ ts: { $lt: ${lastUnixTimestamp * 1000} } })`);
var count2 = await drillDb.collection("drill_events").countDocuments({"a": app._id + "", "e": "[CLY]_crash", ts: { $lt: lastUnixTimestamp * 1000 } });
console.log("", count2, "drill crashes to be deleted via command");
console.log("", "", "", `db.drill_events.deleteMany({"a": ${app._id}, "e": "[CLY]_crash", ts: { $lt: ${lastUnixTimestamp * 1000} } })`);
checkThreshold(count);
}
else {
Expand All @@ -77,7 +80,10 @@ Promise.all(
res = await db.collection(`app_crashes${app._id}`).deleteMany({ ts: { $lt: lastUnixTimestamp } });
console.log("", res, "crashes deleted");
await sleep(SLEEP);
//deleting from old collection
res = await drillDb.collection("drill_events" + crypto.createHash('sha1').update("[CLY]_crash" + app._id).digest('hex')).deleteMany({ ts: { $lt: lastUnixTimestamp * 1000 } });
//deleting from amerged drill collection
res = await drillDb.collection("drill_events").deleteMany({"a": app._id + "", "e": "[CLY]_crash", ts: { $lt: lastUnixTimestamp * 1000 } });
console.log("", res, "drill crashes deleted");
await sleep(SLEEP);
}
Expand Down
5 changes: 4 additions & 1 deletion plugins/density/frontend/public/templates/density.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ <h4 data-test-id="densities-for-label">{{i18n('density.densities-for')}}</h4>
</vue-scroll>
</div>
<h5 class="bu-pb-4" data-test-id="density-distribution-label"> {{i18n('density.distribution')}} </h5>
<div v-if="densityVersions.length === 0 && isLoading">
<div v-if="densityVersions.length === 0 && !isLoading" class="technology-density-wrapper__versions-empty-card bu-mb-5">
<div class="text-medium" data-test-id="density-distribution-no-data-label">{{i18n('common.table.no-data')}}</div>
</div>
<div v-else-if="densityVersions.length === 0 && isLoading" class="bu-mb-5">
<div style="height: 200px;" v-loading="isLoading"></div>
</div>
<div v-else v-loading="isLoading" class="technology-density-wrapper__versions">
Expand Down
Loading