summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/reports
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/reports')
-rw-r--r--app/assets/javascripts/reports/accessibility_report/store/actions.js3
-rw-r--r--app/assets/javascripts/reports/accessibility_report/store/getters.js3
-rw-r--r--app/assets/javascripts/reports/components/grouped_test_reports_app.vue5
-rw-r--r--app/assets/javascripts/reports/components/modal.vue2
-rw-r--r--app/assets/javascripts/reports/components/modal_open_name.vue22
-rw-r--r--app/assets/javascripts/reports/store/actions.js3
-rw-r--r--app/assets/javascripts/reports/store/getters.js4
7 files changed, 25 insertions, 17 deletions
diff --git a/app/assets/javascripts/reports/accessibility_report/store/actions.js b/app/assets/javascripts/reports/accessibility_report/store/actions.js
index 446cfd79984..bb502020a06 100644
--- a/app/assets/javascripts/reports/accessibility_report/store/actions.js
+++ b/app/assets/javascripts/reports/accessibility_report/store/actions.js
@@ -74,6 +74,3 @@ export const receiveReportError = ({ commit, dispatch }) => {
commit(types.RECEIVE_REPORT_ERROR);
dispatch('stopPolling');
};
-
-// prevent babel-plugin-rewire from generating an invalid default during karma tests
-export default () => {};
diff --git a/app/assets/javascripts/reports/accessibility_report/store/getters.js b/app/assets/javascripts/reports/accessibility_report/store/getters.js
index 9aff427e644..312b333a771 100644
--- a/app/assets/javascripts/reports/accessibility_report/store/getters.js
+++ b/app/assets/javascripts/reports/accessibility_report/store/getters.js
@@ -43,6 +43,3 @@ export const shouldRenderIssuesList = state =>
export const unresolvedIssues = state => state.report.existing_errors;
export const resolvedIssues = state => state.report.resolved_errors;
export const newIssues = state => state.report.new_errors;
-
-// prevent babel-plugin-rewire from generating an invalid default during karma tests
-export default () => {};
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 b8a8cb940e7..47f04019595 100644
--- a/app/assets/javascripts/reports/components/grouped_test_reports_app.vue
+++ b/app/assets/javascripts/reports/components/grouped_test_reports_app.vue
@@ -1,12 +1,12 @@
<script>
import { mapActions, mapGetters, mapState } from 'vuex';
+import { GlButton } from '@gitlab/ui';
import { sprintf, s__ } from '~/locale';
import { componentNames } from './issue_body';
import ReportSection from './report_section.vue';
import SummaryRow from './summary_row.vue';
import IssuesList from './issues_list.vue';
import Modal from './modal.vue';
-import { GlButton } from '@gitlab/ui';
import createStore from '../store';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import { summaryTextBuilder, reportTextBuilder, statusIcon } from '../store/utils';
@@ -56,7 +56,7 @@ export default {
return `${this.pipelinePath}/test_report`;
},
showViewFullReport() {
- return Boolean(this.glFeatures.junitPipelineView) && this.pipelinePath.length;
+ return this.pipelinePath.length;
},
},
created() {
@@ -116,6 +116,7 @@ export default {
<template v-if="showViewFullReport" #actionButtons>
<gl-button
:href="testTabURL"
+ target="_blank"
icon="external-link"
data-testid="group-test-reports-full-link"
class="gl-mr-3"
diff --git a/app/assets/javascripts/reports/components/modal.vue b/app/assets/javascripts/reports/components/modal.vue
index 78c355ecb76..ca95db6c826 100644
--- a/app/assets/javascripts/reports/components/modal.vue
+++ b/app/assets/javascripts/reports/components/modal.vue
@@ -33,7 +33,7 @@ export default {
v-for="(field, key, index) in modalData"
v-if="field.value"
:key="index"
- class="row prepend-top-10 append-bottom-10"
+ class="row gl-mt-3 gl-mb-3"
>
<strong class="col-sm-3 text-right"> {{ field.text }}: </strong>
diff --git a/app/assets/javascripts/reports/components/modal_open_name.vue b/app/assets/javascripts/reports/components/modal_open_name.vue
index 4f81cee2a38..78e1fcb205b 100644
--- a/app/assets/javascripts/reports/components/modal_open_name.vue
+++ b/app/assets/javascripts/reports/components/modal_open_name.vue
@@ -1,7 +1,12 @@
<script>
+import { GlTooltipDirective, GlResizeObserverDirective } from '@gitlab/ui';
import { mapActions } from 'vuex';
export default {
+ directives: {
+ GlTooltip: GlTooltipDirective,
+ GlResizeObserverDirective,
+ },
props: {
issue: {
type: Object,
@@ -13,19 +18,32 @@ export default {
required: true,
},
},
+ data: () => ({
+ tooltipTitle: '',
+ }),
+ mounted() {
+ this.updateTooltipTitle();
+ },
methods: {
...mapActions(['openModal']),
handleIssueClick() {
const { issue, status, openModal } = this;
openModal({ issue, status });
},
+ updateTooltipTitle() {
+ // Only show the tooltip if the text is truncated with an ellipsis.
+ this.tooltipTitle = this.$el.offsetWidth < this.$el.scrollWidth ? this.issue.title : '';
+ },
},
};
</script>
<template>
<button
- type="button"
- class="btn-link btn-blank text-left break-link vulnerability-name-button"
+ v-gl-tooltip="{ boundary: 'viewport' }"
+ v-gl-resize-observer-directive="updateTooltipTitle"
+ class="btn-link gl-text-truncate"
+ :aria-label="s__('Reports|Vulnerability Name')"
+ :title="tooltipTitle"
@click="handleIssueClick()"
>
{{ issue.title }}
diff --git a/app/assets/javascripts/reports/store/actions.js b/app/assets/javascripts/reports/store/actions.js
index db8ab5ccb80..c5860db6601 100644
--- a/app/assets/javascripts/reports/store/actions.js
+++ b/app/assets/javascripts/reports/store/actions.js
@@ -85,6 +85,3 @@ export const openModal = ({ dispatch }, payload) => {
};
export const setModalData = ({ commit }, payload) => commit(types.SET_ISSUE_MODAL_DATA, payload);
-
-// prevent babel-plugin-rewire from generating an invalid default during karma tests
-export default () => {};
diff --git a/app/assets/javascripts/reports/store/getters.js b/app/assets/javascripts/reports/store/getters.js
index 95266194acb..6345be69f6f 100644
--- a/app/assets/javascripts/reports/store/getters.js
+++ b/app/assets/javascripts/reports/store/getters.js
@@ -1,5 +1,6 @@
import { LOADING, ERROR, SUCCESS, STATUS_FAILED } from '../constants';
+// eslint-disable-next-line import/prefer-default-export
export const summaryStatus = state => {
if (state.isLoading) {
return LOADING;
@@ -11,6 +12,3 @@ export const summaryStatus = state => {
return SUCCESS;
};
-
-// prevent babel-plugin-rewire from generating an invalid default during karma tests
-export default () => {};