Skip to content

Commit e65fff1

Browse files
committed
fx
1 parent 0a66296 commit e65fff1

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

plugins/crashes/frontend/public/javascripts/countly.views.js

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,33 @@
605605
promise = this.$store.dispatch("countlyCrashes/overview/setSelectedAsShown", this.$data.selectedCrashgroups);
606606
}
607607
else if (state === "delete") {
608-
promise = this.$store.dispatch("countlyCrashes/overview/setSelectedAsDeleted", this.$data.selectedCrashgroups);
608+
CountlyHelpers.confirm(jQuery.i18n.prop("crashes.confirm-delete", 1), "red", function(result) {
609+
if (result) {
610+
self.$store.dispatch("countlyCrashes/overview/setSelectedAsDeleted", self.$data.selectedCrashgroups)
611+
.then(function(response) {
612+
if (Array.isArray(response.result)) {
613+
var itemList = response.result.reduce(function(acc, curr) {
614+
acc += "<li>" + curr + "</li>";
615+
return acc;
616+
}, "");
617+
CountlyHelpers.alert("<ul>" + itemList + "</ul>", "red", { title: CV.i18n("crashes.alert-fails") });
618+
}
619+
else {
620+
CountlyHelpers.notify({
621+
title: jQuery.i18n.map["systemlogs.action.crash_deleted"],
622+
message: jQuery.i18n.map["systemlogs.action.crash_deleted"]
623+
});
624+
}
625+
}).finally(function() {
626+
// Reset selection if command is delete or hide
627+
// if (["delete", "hide"].includes(state)) {
628+
self.selectedCrashgroups = [];
629+
self.$refs.dataTable.$refs.elTable.clearSelection();
630+
// }
631+
});
632+
}
633+
});
634+
609635
}
610636

611637
if (typeof promise !== "undefined") {

plugins/data-manager/frontend/public/javascripts/countly.views.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,7 @@
782782
var delKey = row.key || row.e || row.name;
783783
events.push(delKey);
784784
});
785+
this.unpatchSelectedEvents();
785786
this.$store.dispatch('countlyDataManager/deleteEvents', events).then(function() {
786787
countlyEvent.refreshEvents();
787788
});

0 commit comments

Comments
 (0)