Skip to content

Commit

Permalink
Merge pull request #5611 from Countly/QT-227
Browse files Browse the repository at this point in the history
[QT-227] Verify that the Community Edition screens that includes data, can be opened as error-free - VOL 4
  • Loading branch information
can-angun authored Oct 4, 2024
2 parents b8e8629 + 124d282 commit afc0119
Show file tree
Hide file tree
Showing 13 changed files with 1,461 additions and 242 deletions.
39 changes: 28 additions & 11 deletions plugins/crashes/frontend/public/templates/overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,43 @@
<div class="bu-is-flex bu-is-flex-direction-column">
<a
class="crash-group-title has-ellipsis"
:data-test-id="'datatable-crash-groups-group-title-' + col.$index"
:href="'#/crashes/' + col.row._id"
v-html="col.row.name">
</a>
<div class="bu-mt-2 bu-is-flex">
<crash-badge :type="badge.type" v-html="badge.content" v-for="badge in badgesFor(col.row)"></crash-badge>
<crash-badge :type="badge.type" v-html="badge.content" v-for="(badge, badgeIndex) in badgesFor(col.row)" :data-test-id="'datatable-crash-groups-badge-type-' + badgeIndex + '-col-' + col.$index"></crash-badge>
</div>
</div>
</template>
</el-table-column>
<template v-for="(col,idx) in scope.dynamicCols">
<el-table-column v-if="col.value === 'os'" :key="idx" prop="os" :label="i18n('crashes.platform')" width="120" show-overflow-tooltip sortable></el-table-column>
<el-table-column v-if="col.value === 'os'" :key="idx" prop="os" :label="i18n('crashes.platform')" width="120" show-overflow-tooltip sortable>
<template slot-scope="rowScope">
<span :data-test-id="'datatable-crash-groups-platform-' + rowScope.$index">{{rowScope.row.os}}</span>
</template>
</el-table-column>
<el-table-column v-if="col.value === 'reports'" :key="idx" prop="reports" :label="i18n('crashes.reports')" width="150" sortable :sort-method="occurrenceSort">
<template slot-scope="rowScope">
<span v-if="singleAppVersionFilter.length">{{rowScope.row.app_version[singleAppVersionFilter.replace(/\./g, ':')]}}</span>
<span v-else>{{rowScope.row.reports}}</span>
<span v-if="singleAppVersionFilter.length" :data-test-id="'datatable-crash-groups-occurences-' + rowScope.$index">{{rowScope.row.app_version[singleAppVersionFilter.replace(/\./g, ':')]}}</span>
<span v-else :data-test-id="'datatable-crash-groups-occurences-' + rowScope.$index">{{rowScope.row.reports}}</span>
</template>
</el-table-column>
<el-table-column v-if="col.value === 'lastTs'" :key="idx" prop="lastTs" :label="i18n('crashes.last_time')" :formatter="formatDate" width="180" sortable>
<template slot-scope="rowScope">
<div :data-test-id="'datatable-crash-groups-last-occurrence-' + rowScope.$index">{{formatDate(null,null,rowScope.row.lastTs)}}</div>
</template>
</el-table-column>
<el-table-column v-if="col.value === 'users'" :key="idx" prop="users" :label="i18n('crashes.affected-users')" width="170" sortable>
<template slot-scope="rowScope">
<span :data-test-id="'datatable-crash-groups-affected-users-' + rowScope.$index">{{rowScope.row.users}}</span>
</template>
</el-table-column>
<el-table-column v-if="col.value === 'latest_version'" :key="idx" prop="latest_version" :label="i18n('crashes.latest_app')" width="190" sortable :sort-method="appVersionSort">
<template slot-scope="rowScope">
<span :data-test-id="'datatable-crash-groups-latest-app-version-' + rowScope.$index">{{rowScope.row.latest_version}}</span>
</template>
</el-table-column>
<el-table-column v-if="col.value === 'lastTs'" :key="idx" prop="lastTs" :label="i18n('crashes.last_time')" :formatter="formatDate" width="180" sortable></el-table-column>
<el-table-column v-if="col.value === 'users'" :key="idx" prop="users" :label="i18n('crashes.affected-users')" width="170" sortable></el-table-column>
<el-table-column v-if="col.value === 'latest_version'" :key="idx" prop="latest_version" :label="i18n('crashes.latest_app')" width="190" sortable :sort-method="appVersionSort"></el-table-column>
</template>
</template>
<template v-slot:bottomline="scope">
Expand Down Expand Up @@ -116,14 +133,14 @@
<div data-test-id="crash-statistics-top-platforms-label">{{i18n("crashes.top-platforms")}}</div>
<div class="bu-ml-1"><cly-tooltip-icon data-test-id="crash-statistics-top-platforms-tooltip" icon="ion ion-help-circled" :tooltip="i18n('crashes.help-platforms')"></cly-tooltip-icon></div>
</div>
<div class="bu-column bu-pt-0" v-for="platform in statistics.topPlatformsOrder">
<div class="bu-column bu-pt-0" v-for="(platform, platformIndex) in statistics.topPlatformsOrder">
<div class="bu-columns bu-is-gapless bu-is-mobile text-medium color-gray-100 bu-mb-1">
<div class="bu-column">{{platform}}</div>
<div class="bu-column bu-has-text-right">
<div class="bu-column" :data-test-id="'crash-statistics-top-platforms-platform-' + platformIndex">{{platform}}</div>
<div class="bu-column bu-has-text-right" :data-test-id="'crash-statistics-top-platforms-platform-users-percentage-' + platformIndex">
{{statistics.topPlatforms[platform].count}} Users ({{statistics.topPlatforms[platform].percent.toFixed(1)}}%)
</div>
</div>
<cly-progress-bar :percentage="statistics.topPlatforms[platform].percent" color="#F96300" backgroundColor="#ECECEC" :height="8">
<cly-progress-bar :test-id="'crash-statistics-top-platforms-platform-' + platformIndex" :percentage="statistics.topPlatforms[platform].percent" color="#F96300" backgroundColor="#ECECEC" :height="8">
</cly-progress-bar>
</div>
</div>
Expand Down
46 changes: 23 additions & 23 deletions plugins/push/frontend/public/templates/push-notification-tab.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</div>
</div>
<cly-section>
<cly-datatable-n :data-source="remoteTableDataSource" v-loading="areRowsLoading || isUserCommandLoading" :force-loading="isLoading" :available-dynamic-cols="optionalTableColumns" :resizable="true" class="is-clickable cly-vue-push-notification-table">
<cly-datatable-n test-id="messaging" :data-source="remoteTableDataSource" v-loading="areRowsLoading || isUserCommandLoading" :force-loading="isLoading" :available-dynamic-cols="optionalTableColumns" :resizable="true" class="is-clickable cly-vue-push-notification-table">
<template v-slot:header-left>
<cly-multi-select
class="bu-ml-3 ratings-tab-view__filter-selector"
Expand All @@ -43,12 +43,12 @@
<template slot-scope="scope">
<div class="bu-is-flex bu-is-flex-direction-column">
<a v-bind:href="'#/messaging/details/' + scope.row._id" class="bu-is-flex bu-is-align-items-center">
<a class="has-ellipsis">{{(scope.row.name)}}</a>
<a class="has-ellipsis" :data-test-id="'datatable-messaging-campaign-name-' + scope.$index">{{(scope.row.name)}}</a>
</a>
<span class="cly-vue-push-notification-table-column__second-line">
<span> {{getPreviewPlatforms(scope.row.platforms)}} </span>
<span class="blinker cly-vue-push-notification-table-column__separator-blinker"></span>
<span> {{i18n('push-notification.created-by')}} {{scope.row.createdBy || '-'}} </span>
<span :data-test-id="'datatable-messaging-platform-name-' + scope.$index"> {{getPreviewPlatforms(scope.row.platforms)}} </span>
<span class="blinker cly-vue-push-notification-table-column__separator-blinker" :data-test-id="'datatable-messaging-blinker-' + scope.$index"></span>
<span :data-test-id="'datatable-messaging-created-by-' + scope.$index"> {{i18n('push-notification.created-by')}} {{scope.row.createdBy || '-'}} </span>
</span>
</div>
</template>
Expand Down Expand Up @@ -90,21 +90,21 @@
</template>
<el-table-column width="220" sortable="custom" prop="status" :label="i18n('push-notification.table-status')">
<template slot-scope="scope">
<cly-status-tag :text="statusOptions[scope.row.status] && statusOptions[scope.row.status].label || '' " :color="getStatusBackgroundColor(scope.row.status)"> </cly-status-tag>
<cly-status-tag :text="statusOptions[scope.row.status] && statusOptions[scope.row.status].label || '' " :color="getStatusBackgroundColor(scope.row.status)" :data-test-id="'datatable-messaging-status-' + scope.$index"> </cly-status-tag>
</template>
</el-table-column>
<el-table-column width="220" sortable="custom" prop="sent" :label="i18n('push-notification.table-sent')" class="cly-vue-push-notification-table-column">
<template slot-scope="scope">
<span class="cly-vue-push-notification-table-column__numbers-only"> {{formatNumber(scope.row.sent)}} </span>
<span class="cly-vue-push-notification-table-column__numbers-only" :data-test-id="'datatable-messaging-sent-' + scope.$index"> {{formatNumber(scope.row.sent)}} </span>
</template>
</el-table-column>
<el-table-column min-width="200" sortable="custom" prop="actioned" :label="i18n('push-notification.table-actioned')" class="cly-vue-push-notification-table-column">
<template slot-scope="scope">
<div class="bu-level">
<div class="bu-level-left cly-vue-push-notification-table-column__numbers-only">
<span class="bu-mr-1">{{formatNumber(scope.row.actioned)}}</span>
<span class="bu-mr-1">|</span>
<span>{{formatPercentage(scope.row.actioned/scope.row.sent)}} %</span>
<span class="bu-mr-1" :data-test-id="'datatable-messaging-actioned-value-' + scope.$index">{{formatNumber(scope.row.actioned)}}</span>
<span class="bu-mr-1" :data-test-id="'datatable-messaging-actioned-divider-' + scope.$index">|</span>
<span :data-test-id="'datatable-messaging-actioned-percentage-' + scope.$index">{{formatPercentage(scope.row.actioned/scope.row.sent)}} %</span>
</div>
</div>
</template>
Expand All @@ -113,8 +113,8 @@
<template slot-scope="scope">
<div class="bu-is-flex bu-is-flex-direction-column">
<template v-if="scope.row.lastDate && scope.row.lastDate.date">
<span class="cly-vue-push-notification-table-column__first-line">{{scope.row.lastDate.date}}</span>
<span class="cly-vue-push-notification-table-column__second-line">{{scope.row.lastDate.time}}</span>
<span class="cly-vue-push-notification-table-column__first-line" :data-test-id="'datatable-messaging-date-sent-' + scope.$index">{{scope.row.lastDate.date}}</span>
<span class="cly-vue-push-notification-table-column__second-line" :data-test-id="'datatable-messaging-scheduled-' + scope.$index">{{scope.row.lastDate.time}}</span>
</template>
<template v-else>
<span>-</span>
Expand All @@ -133,17 +133,17 @@

<el-table-column type="options">
<template slot-scope="scope">
<cly-more-options v-if="scope.row.hover" size="small" @command="handleUserCommands($event, scope.row._id, scope.row.notificationType)">
<el-dropdown-item v-if="shouldShowStartUserCommand(scope.row.status)" :command="UserCommandEnum.START">{{i18n('push-notification.start')}} </el-dropdown-item>
<el-dropdown-item v-if="shouldShowStopUserCommand(scope.row.status)" :command="UserCommandEnum.STOP">{{i18n('push-notification.stop')}} </el-dropdown-item>
<el-dropdown-item v-if="shouldShowEditUserCommand(scope.row.status)" :command="UserCommandEnum.EDIT">{{i18n('push-notification.edit')}}</el-dropdown-item>
<el-dropdown-item v-if="shouldShowEditDraftUserCommand(scope.row.status)" :command="UserCommandEnum.EDIT_DRAFT">{{i18n('push-notification.edit-draft')}}</el-dropdown-item>
<el-dropdown-item v-if="shouldShowEditRejectUserCommand(scope.row.status)" :command="UserCommandEnum.EDIT_REJECT">{{i18n('push-notification.edit')}}</el-dropdown-item>
<el-dropdown-item v-if="shouldShowDuplicateUserCommand(scope.row.status)" :command="UserCommandEnum.DUPLICATE">{{i18n('push-notification.duplicate')}}</el-dropdown-item>
<el-dropdown-item v-if="shouldShowDeleteUserCommand(scope.row.status)" :command="UserCommandEnum.DELETE">{{i18n('push-notification.delete')}}</el-dropdown-item>
<el-dropdown-item v-if="shouldShowResendUserCommand(scope.row.status)" :command="UserCommandEnum.RESEND">{{i18n('push-notification.resend')}}</el-dropdown-item>
<el-dropdown-item v-if="shouldShowApproveUserCommand(scope.row.status)" :command="UserCommandEnum.APPROVE">{{i18n('push-notification.approve')}}</el-dropdown-item>
<el-dropdown-item v-if="shouldShowRejectUserCommand(scope.row.status)" :command="UserCommandEnum.REJECT">{{i18n('push-notification.reject')}}</el-dropdown-item>
<cly-more-options :test-id="'datatable-messaging-more-button-' + scope.$index" v-if="scope.row.hover" size="small" @command="handleUserCommands($event, scope.row._id, scope.row.notificationType)">
<el-dropdown-item v-if="shouldShowStartUserCommand(scope.row.status)" :command="UserCommandEnum.START" :data-test-id="'datatable-messaging-more-option-start-' + scope.$index">{{i18n('push-notification.start')}} </el-dropdown-item>
<el-dropdown-item v-if="shouldShowStopUserCommand(scope.row.status)" :command="UserCommandEnum.STOP" :data-test-id="'datatable-messaging-more-option-stop-' + scope.$index">{{i18n('push-notification.stop')}} </el-dropdown-item>
<el-dropdown-item v-if="shouldShowEditUserCommand(scope.row.status)" :command="UserCommandEnum.EDIT" :data-test-id="'datatable-messaging-more-option-edit-' + scope.$index">{{i18n('push-notification.edit')}}</el-dropdown-item>
<el-dropdown-item v-if="shouldShowEditDraftUserCommand(scope.row.status)" :command="UserCommandEnum.EDIT_DRAFT" :data-test-id="'datatable-messaging-more-option-edit-draft-' + scope.$index">{{i18n('push-notification.edit-draft')}}</el-dropdown-item>
<el-dropdown-item v-if="shouldShowEditRejectUserCommand(scope.row.status)" :command="UserCommandEnum.EDIT_REJECT" :data-test-id="'datatable-messaging-more-option-edit-reject-' + scope.$index">{{i18n('push-notification.edit')}}</el-dropdown-item>
<el-dropdown-item v-if="shouldShowDuplicateUserCommand(scope.row.status)" :command="UserCommandEnum.DUPLICATE" :data-test-id="'datatable-messaging-more-option-duplicate-' + scope.$index">{{i18n('push-notification.duplicate')}}</el-dropdown-item>
<el-dropdown-item v-if="shouldShowDeleteUserCommand(scope.row.status)" :command="UserCommandEnum.DELETE" :data-test-id="'datatable-messaging-more-option-delete-' + scope.$index">{{i18n('push-notification.delete')}}</el-dropdown-item>
<el-dropdown-item v-if="shouldShowResendUserCommand(scope.row.status)" :command="UserCommandEnum.RESEND" :data-test-id="'datatable-messaging-more-option-resend-' + scope.$index">{{i18n('push-notification.resend')}}</el-dropdown-item>
<el-dropdown-item v-if="shouldShowApproveUserCommand(scope.row.status)" :command="UserCommandEnum.APPROVE" :data-test-id="'datatable-messaging-more-option-approve-' + scope.$index">{{i18n('push-notification.approve')}}</el-dropdown-item>
<el-dropdown-item v-if="shouldShowRejectUserCommand(scope.row.status)" :command="UserCommandEnum.REJECT" :data-test-id="'datatable-messaging-more-option-reject-' + scope.$index">{{i18n('push-notification.reject')}}</el-dropdown-item>
</cly-more-options>
</template>
</el-table-column>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</el-table-column>
<el-table-column prop="email" :label="i18n('feedback.email')" min-width="200">
<template v-slot="rowScope">
<span class="text-medium" :data-test-id="'ratings-comment-table-time-email-row' + rowScope.$index">
<span class="text-medium" :data-test-id="'ratings-comment-table-email-row-' + rowScope.$index">
{{ rowScope.row.email }}
</span>
</template>
Expand Down
Loading

0 comments on commit afc0119

Please sign in to comment.