summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/reports/components/grouped_test_reports_app.vue
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2018-08-01 15:57:05 +0100
committerFilipa Lacerda <filipa@gitlab.com>2018-08-02 17:59:25 +0100
commit15511ed14f595b30de90f32b3751c8599550e4c7 (patch)
treef1d69b6510ebcdc5d1c2b5c4007f693871c053f5 /app/assets/javascripts/reports/components/grouped_test_reports_app.vue
parentd40ef4c83e90823221a66c746f414faf7da442e8 (diff)
downloadgitlab-ce-15511ed14f595b30de90f32b3751c8599550e4c7.tar.gz
Changes after review:
- Cleans up CSS to use common classes - Removes getters to use mapState instead - Makes the first request even when tab is not visible - Show loading state in 204
Diffstat (limited to 'app/assets/javascripts/reports/components/grouped_test_reports_app.vue')
-rw-r--r--app/assets/javascripts/reports/components/grouped_test_reports_app.vue22
1 files changed, 12 insertions, 10 deletions
diff --git a/app/assets/javascripts/reports/components/grouped_test_reports_app.vue b/app/assets/javascripts/reports/components/grouped_test_reports_app.vue
index d2e72e72421..0fc84b4552a 100644
--- a/app/assets/javascripts/reports/components/grouped_test_reports_app.vue
+++ b/app/assets/javascripts/reports/components/grouped_test_reports_app.vue
@@ -1,5 +1,5 @@
<script>
- import { mapActions, mapGetters } from 'vuex';
+ import { mapActions, mapGetters, mapState } from 'vuex';
import { s__ } from '~/locale';
import { componentNames } from '~/vue_shared/components/reports/issue_body';
import ReportSection from '~/vue_shared/components/reports/report_section.vue';
@@ -26,27 +26,29 @@
},
componentNames,
computed: {
- ...mapGetters([
+ ...mapState([
'reports',
- 'summaryStatus',
'isLoading',
'hasError',
- 'summaryCounts',
- 'modalTitle',
- 'modalData',
- 'isCreatingNewIssue',
+ 'summary',
+ ]),
+ ...mapState({
+ modalTitle: state => state.modal.title || '',
+ modalData: state => state.modal.data || {},
+ }),
+ ...mapGetters([
+ 'summaryStatus',
]),
-
groupedSummaryText() {
if (this.isLoading) {
return s__('Reports|Test summary results are being parsed');
}
- if (this.hasError || !this.summaryCounts) {
+ if (this.hasError) {
return s__('Reports|Test summary failed loading results');
}
- return summaryTextBuilder(s__('Reports|Test summary'), this.summaryCounts);
+ return summaryTextBuilder(s__('Reports|Test summary'), this.summary);
},
},
created() {