Skip to content

Commit e5716cf

Browse files
authored
Merge pull request #5589 from Countly/anna/next
changes to diff message(different for single/multi)
2 parents 4c43963 + 0413786 commit e5716cf

File tree

7 files changed

+33
-17
lines changed

7 files changed

+33
-17
lines changed

frontend/express/public/core/app-management/templates/app-management.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,10 @@ <h2 class="bu-mb-4" data-test-id="selected-app-name-title"> {{apps[selectedApp]
208208
<div class="bu-mr-0 bu-is-flex bu-is-justify-content-flex-end bu-is-align-items-center cly-vue-user-selected" style="height: 100%;">
209209
<span class="selected-count-blue bu-pl-1 text-medium">
210210
<span style="background-color:#0166D6; color:white; padding:3px 7px; border-radius:4px;">{{compare(formScope.editedObject,apps[selectedApp]).length}}</span>
211-
<span class="bu-is-lowercase text-medium color-cool-gray-50 bu-pl-1">{{ i18n("common.diff-helper.changes-made") }}</span>
212-
<span class="text-medium color-cool-gray-50">{{ i18n("common.diff-helper.keep") }}</span>
211+
<span v-if="compare(formScope.editedObject,apps[selectedApp]).length>1" class="bu-is-lowercase text-medium color-cool-gray-50 bu-pl-1">{{ i18n("common.diff-helper.changes-made") }}</span>
212+
<span v-else class="bu-is-lowercase text-medium color-cool-gray-50 bu-pl-1">{{ i18n("common.diff-helper.changes-made-single") }}</span>
213+
<span v-if="compare(formScope.editedObject,apps[selectedApp]).length" class="text-medium color-cool-gray-50">{{ i18n("common.diff-helper.keep") }}</span>
214+
<span v-else class="text-medium color-cool-gray-50">{{ i18n("common.diff-helper.keep-single") }}</span>
213215
</span>
214216
<span class="vertical-divider bu-mr-4 bu-ml-4"></span>
215217
<el-button skin="red" class="bu-mr-2" size="small" type="default" @click="save(formScope.editedObject)">

frontend/express/public/localization/dashboard/dashboard.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,10 @@ common.undo = Undo
261261
common.drawer.next-step = Next step
262262
common.drawer.previous-step = Previous step
263263
common.diff-helper.changes = You made {0} changes.
264+
common.diff-helper.changes-made-single = change has been made.
264265
common.diff-helper.changes-made = changes have been made.
265266
common.diff-helper.keep = Do you want to keep them?
267+
common.diff-helper.keep-single = Do you want to keep it?
266268
common.save-changes = Save Changes
267269
common.discard-changes = Discard
268270
common.complete = Complete

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

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,9 @@
442442
if (res === 'EVENT_STATUS_UNPLANNED') {
443443
CountlyHelpers.notify({message: CV.i18n('data-manager.error.event-visibility-error'), sticky: false, type: 'error'});
444444
}
445+
else {
446+
CountlyHelpers.notify({message: CV.i18n('data-manager.success.visibility'), sticky: false, type: 'success'});
447+
}
445448
context.dispatch('loadEventsData');
446449
context.dispatch('loadSegmentsMap');
447450
}).catch(function(e) {
@@ -452,17 +455,20 @@
452455
},
453456
deleteEvents: function(context, events) {
454457
countlyDataManager.service.deleteEvents(events).then(function(res) {
455-
countlyDataManager.service.deleteEventsMeta(events).then(function(res2) {
456-
if (res === 'Error' || res2 === 'Error') {
457-
CountlyHelpers.notify({message: CV.i18n('data-manager.error.event-delete'), sticky: false, type: 'error'});
458-
return 'Error';
459-
}
460-
context.dispatch('loadEventsData');
461-
context.dispatch('loadSegmentsMap');
462-
CountlyHelpers.notify({message: CV.i18n('data-manager.success.event-delete'), sticky: false, type: 'success'});
463-
});
464-
}).catch(function() {
465-
CountlyHelpers.notify({message: CV.i18n('data-manager.error.event-delete'), sticky: false, type: 'error'});
458+
if (res === 'Error') {
459+
CountlyHelpers.notify({message: CV.i18n('data-manager.error.event-delete'), sticky: false, type: 'error'});
460+
return 'Error';
461+
}
462+
context.dispatch('loadEventsData');
463+
context.dispatch('loadSegmentsMap');
464+
CountlyHelpers.notify({message: CV.i18n('data-manager.success.event-delete'), sticky: false, type: 'success'});
465+
}).catch(function(e) {
466+
if (e.status === 504) {
467+
CountlyHelpers.notify({message: CV.i18n('data-manager.error.event-delete-timeout'), sticky: false, type: 'warning'});
468+
}
469+
else {
470+
CountlyHelpers.notify({message: CV.i18n('data-manager.error.event-delete'), sticky: false, type: 'error'});
471+
}
466472
});
467473
},
468474
loadCategories: function(context) {

plugins/data-manager/frontend/public/localization/data-manager.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ data-manager.success.event-update = Event Updated
331331
data-manager.error.event-update = Error while updating event
332332
data-manager.success.event-delete = Event Deleted
333333
data-manager.error.event-delete = Error while deleting event
334+
data-manager.success.visibility = Visibility updated
334335
data-manager.success.category-create = Category Created
335336
data-manager.error.category-create = Error while creating category
336337
data-manager.success.category-update = Category Updated

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,6 +1211,7 @@
12111211
"big_list_limit": true,
12121212
"record_big_list": true,
12131213
"cache_threshold": true,
1214+
"use_union_with": true,
12141215
"correct_estimation": true,
12151216
"custom_property_limit": true,
12161217
"list_limit": true,

plugins/plugins/frontend/public/templates/configurations.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,10 @@ <h3 v-if="config.groups.length > 1 || group.label" class="bu-my-4">
301301
<div class="bu-mr-0 bu-is-flex bu-is-justify-content-flex-end bu-is-align-items-center cly-vue-user-selected" style="height: 100%;">
302302
<span class="selected-count-blue bu-pl-1 text-medium">
303303
<span style="background-color:#0166D6; color:white; padding:3px 7px; border-radius:4px;">{{diff.length}}</span>
304-
<span class="bu-is-lowercase text-medium color-cool-gray-50 bu-pl-1">{{ i18n("common.diff-helper.changes-made") }}</span>
305-
<span class="text-medium color-cool-gray-50">{{ i18n("common.diff-helper.keep") }}</span>
304+
<span v-if="diff.length>1" class="bu-is-lowercase text-medium color-cool-gray-50 bu-pl-1">{{ i18n("common.diff-helper.changes-made") }}</span>
305+
<span v-elseclass="bu-is-lowercase text-medium color-cool-gray-50 bu-pl-1">{{ i18n("common.diff-helper.changes-made-single") }}</span>
306+
<span v-if="diff.length>1" class="text-medium color-cool-gray-50">{{ i18n("common.diff-helper.keep") }}</span>
307+
<span v-else class="text-medium color-cool-gray-50">{{ i18n("common.diff-helper.keep-single") }}</span>
306308
</span>
307309
<span class="vertical-divider bu-mr-4 bu-ml-4"></span>
308310
<el-button skin="red" class="bu-mr-2" size="small" type="default" @click="save">

plugins/plugins/frontend/public/templates/plugins.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@
4444
<div class="bu-mr-0 bu-is-flex bu-is-justify-content-flex-end bu-is-align-items-center cly-vue-user-selected" style="height: 100%;">
4545
<span class="selected-count-blue bu-pl-1 text-medium">
4646
<span style="background-color:#0166D6; color:white; padding:3px 7px; border-radius:4px;">{{scope.diff.length}}</span>
47-
<span class="bu-is-lowercase text-medium color-cool-gray-50 bu-pl-1">{{ i18n("common.diff-helper.changes-made") }}</span>
48-
<span class="text-medium color-cool-gray-50">{{ i18n("common.diff-helper.keep") }}</span>
47+
<span v-if="scope.diff.length>1" class="bu-is-lowercase text-medium color-cool-gray-50 bu-pl-1">{{ i18n("common.diff-helper.changes-made") }}</span>
48+
<span v-else class="bu-is-lowercase text-medium color-cool-gray-50 bu-pl-1">{{ i18n("common.diff-helper.changes-made-single") }}</span>
49+
<span v-if="scope.diff.length>1" class="text-medium color-cool-gray-50">{{ i18n("common.diff-helper.keep") }}</span>
50+
<span v-else class="text-medium color-cool-gray-50">{{ i18n("common.diff-helper.keep-single") }}</span>
4951
</span>
5052
<span class="vertical-divider bu-mr-4 bu-ml-4"></span>
5153
<el-button skin="red" class="bu-mr-2" size="small" type="default" @click="updateStatus(scope)">

0 commit comments

Comments
 (0)