Skip to content

Commit 4d65c37

Browse files
authored
Merge branch 'next' into anna/next
2 parents 76edde1 + afc0119 commit 4d65c37

File tree

20 files changed

+1573
-243
lines changed

20 files changed

+1573
-243
lines changed
File renamed without changes.
File renamed without changes.

bin/upgrade/24.10/upgrade.sh

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
3+
DATE=$(date +%Y-%m-%d:%H:%M:%S)
4+
VERSION="$(basename "${DIR}")"
5+
6+
countly stop
7+
if [ -f "$DIR/upgrade_fs.sh" ]; then
8+
bash "$DIR/upgrade_fs.sh" combined 2>&1 | tee -a "$DIR/../../../log/countly-upgrade-fs-$VERSION-$DATE.log"
9+
fi
10+
if [ -f "$DIR/upgrade_db.sh" ]; then
11+
bash "$DIR/upgrade_db.sh" combined 2>&1 | tee -a "$DIR/../../../log/countly-upgrade-db-$VERSION-$DATE.log"
12+
fi
13+
countly upgrade

bin/upgrade/24.10/upgrade_db.sh

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/bin/bash
2+
3+
VER="24.10"
4+
5+
CONTINUE="$(countly check before upgrade db "$VER")"
6+
7+
if [ "$CONTINUE" != "1" ] && [ "$1" != "combined" ]
8+
then
9+
echo "Database is already up to date with $VER"
10+
read -r -p "Are you sure you want to run this script? [y/N] " response
11+
if [[ "$response" =~ ^([yY][eE][sS]|[yY])$ ]]
12+
then
13+
CONTINUE=1
14+
fi
15+
fi
16+
17+
if [ "$CONTINUE" == "1" ]
18+
then
19+
echo "Running database modifications"
20+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../.." && pwd )"
21+
SCRIPTS="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
22+
23+
if [ "$1" != "combined" ]; then
24+
#upgrade plugins
25+
nodejs "$DIR/scripts/install_plugins.js"
26+
fi
27+
28+
#add indexes
29+
nodejs "$DIR/scripts/add_indexes.js"
30+
31+
#run upgrade scripts
32+
nodejs "$SCRIPTS/scripts/merge_events_collections.js"
33+
34+
35+
if [ "$1" != "combined" ]; then
36+
countly upgrade;
37+
fi
38+
39+
#call after check
40+
countly check after upgrade db "$VER"
41+
elif [ "$CONTINUE" == "0" ]
42+
then
43+
echo "Database is already upgraded to $VER"
44+
elif [ "$CONTINUE" == "-1" ]
45+
then
46+
echo "Database is upgraded to higher version"
47+
else
48+
echo "Unknown ugprade state: $CONTINUE"
49+
fi

bin/upgrade/24.10/upgrade_fs.sh

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/bin/bash
2+
3+
echo "Running filesystem modifications"
4+
5+
VER="24.10"
6+
7+
CONTINUE="$(countly check before upgrade fs "$VER")"
8+
9+
if [ "$CONTINUE" != "1" ] && [ "$1" != "combined" ]
10+
then
11+
echo "Filesystem is already up to date with $VER"
12+
read -r -p "Are you sure you want to run this script? [y/N] " response
13+
if [[ "$response" =~ ^([yY][eE][sS]|[yY])$ ]]
14+
then
15+
CONTINUE=1
16+
fi
17+
fi
18+
19+
if [ "$CONTINUE" == "1" ]
20+
then
21+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../.." && pwd )"
22+
23+
#enable command line
24+
bash "$DIR/scripts/detect.init.sh"
25+
26+
#upgrade plugins
27+
nodejs "$DIR/scripts/install_plugins.js"
28+
29+
#get web sdk
30+
countly update sdk-web
31+
32+
33+
if [ "$1" != "combined" ]; then
34+
countly upgrade;
35+
else
36+
countly task dist-all;
37+
fi
38+
39+
#call after check
40+
countly check after upgrade fs "$VER"
41+
elif [ "$CONTINUE" == "0" ]
42+
then
43+
echo "Filesystem is already upgraded to $VER"
44+
elif [ "$CONTINUE" == "-1" ]
45+
then
46+
echo "Filesystem is upgraded to higher version"
47+
else
48+
echo "Unknown ugprade state: $CONTINUE"
49+
fi

frontend/express/public/javascripts/countly/vue/components/date.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@
936936
},
937937
customStyle: function() {
938938
return {
939-
height: (this.isVisible && (this.customRangeSelection || this.presetSelection)) ? "447px" : "auto",
939+
height: (this.isVisible && this.presetSelection) ? "447px" : "auto"
940940
};
941941
}
942942
},

plugins/crashes/frontend/public/templates/overview.html

+28-11
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,43 @@
2020
<div class="bu-is-flex bu-is-flex-direction-column">
2121
<a
2222
class="crash-group-title has-ellipsis"
23+
:data-test-id="'datatable-crash-groups-group-title-' + col.$index"
2324
:href="'#/crashes/' + col.row._id"
2425
v-html="col.row.name">
2526
</a>
2627
<div class="bu-mt-2 bu-is-flex">
27-
<crash-badge :type="badge.type" v-html="badge.content" v-for="badge in badgesFor(col.row)"></crash-badge>
28+
<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>
2829
</div>
2930
</div>
3031
</template>
3132
</el-table-column>
3233
<template v-for="(col,idx) in scope.dynamicCols">
33-
<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>
34+
<el-table-column v-if="col.value === 'os'" :key="idx" prop="os" :label="i18n('crashes.platform')" width="120" show-overflow-tooltip sortable>
35+
<template slot-scope="rowScope">
36+
<span :data-test-id="'datatable-crash-groups-platform-' + rowScope.$index">{{rowScope.row.os}}</span>
37+
</template>
38+
</el-table-column>
3439
<el-table-column v-if="col.value === 'reports'" :key="idx" prop="reports" :label="i18n('crashes.reports')" width="150" sortable :sort-method="occurrenceSort">
3540
<template slot-scope="rowScope">
36-
<span v-if="singleAppVersionFilter.length">{{rowScope.row.app_version[singleAppVersionFilter.replace(/\./g, ':')]}}</span>
37-
<span v-else>{{rowScope.row.reports}}</span>
41+
<span v-if="singleAppVersionFilter.length" :data-test-id="'datatable-crash-groups-occurences-' + rowScope.$index">{{rowScope.row.app_version[singleAppVersionFilter.replace(/\./g, ':')]}}</span>
42+
<span v-else :data-test-id="'datatable-crash-groups-occurences-' + rowScope.$index">{{rowScope.row.reports}}</span>
43+
</template>
44+
</el-table-column>
45+
<el-table-column v-if="col.value === 'lastTs'" :key="idx" prop="lastTs" :label="i18n('crashes.last_time')" :formatter="formatDate" width="180" sortable>
46+
<template slot-scope="rowScope">
47+
<div :data-test-id="'datatable-crash-groups-last-occurrence-' + rowScope.$index">{{formatDate(null,null,rowScope.row.lastTs)}}</div>
48+
</template>
49+
</el-table-column>
50+
<el-table-column v-if="col.value === 'users'" :key="idx" prop="users" :label="i18n('crashes.affected-users')" width="170" sortable>
51+
<template slot-scope="rowScope">
52+
<span :data-test-id="'datatable-crash-groups-affected-users-' + rowScope.$index">{{rowScope.row.users}}</span>
53+
</template>
54+
</el-table-column>
55+
<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">
56+
<template slot-scope="rowScope">
57+
<span :data-test-id="'datatable-crash-groups-latest-app-version-' + rowScope.$index">{{rowScope.row.latest_version}}</span>
3858
</template>
3959
</el-table-column>
40-
<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>
41-
<el-table-column v-if="col.value === 'users'" :key="idx" prop="users" :label="i18n('crashes.affected-users')" width="170" sortable></el-table-column>
42-
<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>
4360
</template>
4461
</template>
4562
<template v-slot:bottomline="scope">
@@ -116,14 +133,14 @@
116133
<div data-test-id="crash-statistics-top-platforms-label">{{i18n("crashes.top-platforms")}}</div>
117134
<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>
118135
</div>
119-
<div class="bu-column bu-pt-0" v-for="platform in statistics.topPlatformsOrder">
136+
<div class="bu-column bu-pt-0" v-for="(platform, platformIndex) in statistics.topPlatformsOrder">
120137
<div class="bu-columns bu-is-gapless bu-is-mobile text-medium color-gray-100 bu-mb-1">
121-
<div class="bu-column">{{platform}}</div>
122-
<div class="bu-column bu-has-text-right">
138+
<div class="bu-column" :data-test-id="'crash-statistics-top-platforms-platform-' + platformIndex">{{platform}}</div>
139+
<div class="bu-column bu-has-text-right" :data-test-id="'crash-statistics-top-platforms-platform-users-percentage-' + platformIndex">
123140
{{statistics.topPlatforms[platform].count}} Users ({{statistics.topPlatforms[platform].percent.toFixed(1)}}%)
124141
</div>
125142
</div>
126-
<cly-progress-bar :percentage="statistics.topPlatforms[platform].percent" color="#F96300" backgroundColor="#ECECEC" :height="8">
143+
<cly-progress-bar :test-id="'crash-statistics-top-platforms-platform-' + platformIndex" :percentage="statistics.topPlatforms[platform].percent" color="#F96300" backgroundColor="#ECECEC" :height="8">
127144
</cly-progress-bar>
128145
</div>
129146
</div>

0 commit comments

Comments
 (0)