Skip to content

Commit 23f24f6

Browse files
authored
Merge pull request #7229 from Countly/anna/master
small UI fixes views and data migration
2 parents f5b76f6 + 57bdea5 commit 23f24f6

5 files changed

Lines changed: 16 additions & 4 deletions

File tree

plugins/data_migration/frontend/app.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ const path = require('path');
2020
res.download(myfile, req.query.id + '.tar.gz');
2121
return;
2222
}
23-
23+
else {
24+
res.status(404).send('Export file not found');
25+
return;
26+
}
2427
}
2528
});
2629
}
@@ -30,6 +33,10 @@ const path = require('path');
3033
res.download(path.resolve(__dirname, '../../../log/' + req.query.logfile), req.query.logfile);
3134
return;
3235
}
36+
else {
37+
res.status(404).send('Log file not found');
38+
return;
39+
}
3340

3441
}
3542
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@
8686
return {
8787
list: [],
8888
exportsTablePersistKey: 'exports_table_' + countlyCommon.ACTIVE_APP_ID,
89-
isLoading: false
89+
isLoading: false,
90+
isGlobalAdmin: countlyGlobal.member.global_admin
9091
};
9192
},
9293
methods: {

plugins/data_migration/frontend/public/templates/exports-tab.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
<el-table-column width="100">
3434
<template v-slot="rowScope">
3535
<cly-more-options v-if="rowScope.row.hover" size="small" @command="handleCommand($event, scope, rowScope.row)">
36-
<el-dropdown-item command="download-log">{{i18n('data-migration.download-log')}}</el-dropdown-item>
37-
<el-dropdown-item command="download-export">{{i18n('data-migration.download-export')}}</el-dropdown-item>
36+
<el-dropdown-item v-if="isGlobalAdmin" command="download-log">{{i18n('data-migration.download-log')}}</el-dropdown-item>
37+
<el-dropdown-item v-if="isGlobalAdmin" command="download-export">{{i18n('data-migration.download-export')}}</el-dropdown-item>
3838
<el-dropdown-item v-if="canUserCreate && !rowScope.row.only_export" command="resend">{{i18n('data-migration.resend-export')}}</el-dropdown-item>
3939
<el-dropdown-item v-if="canUserDelete && rowScope.row.status !== 'progress'" command="delete-export">{{i18n('data-migration.delete-export')}}</el-dropdown-item>
4040
<el-dropdown-item v-if="canUserUpdate && rowScope.row.status === 'progress'" command="stop-export">{{i18n('data-migration.stop-export')}}</el-dropdown-item>

plugins/data_migration/frontend/public/templates/main.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<div class="data_migration__main">
22
<cly-header
33
:title="i18n('data-migration.page-title')"
4+
:tooltip="{description: 'Plugin allows migrating full data for application. Full rights are available only for global admin.'}"
45
>
56
<template v-slot:header-right>
67
<cly-more-options v-if="canUserCreate" @command="handleCommand">

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,9 @@
362362
self.$store.dispatch('countlyViews/fetchTotals').then(function() {
363363
self.totalCards = self.calculateTotalCards();
364364
});
365+
this.$store.dispatch("countlyViews/fetchViewsMainTable", {"segmentKey": this.$store.state.countlyViews.selectedSegment, "segmentValue": this.$store.state.countlyViews.selectedSegmentValue}).then(function() {
366+
self.isTableLoading = false;
367+
});
365368

366369
},
367370
methods: {

0 commit comments

Comments
 (0)