diff options
Diffstat (limited to 'app/assets/javascripts/reports')
5 files changed, 66 insertions, 0 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 89ee7126cb8..d222f6bc930 100644 --- a/app/assets/javascripts/reports/components/grouped_test_reports_app.vue +++ b/app/assets/javascripts/reports/components/grouped_test_reports_app.vue @@ -40,7 +40,11 @@ return s__('Reports|Test summary results are being parsed'); } +<<<<<<< HEAD if (this.hasError || !this.summaryCounts) { +======= + if (this) { +>>>>>>> 8f3b9c0d313f9eeef1b6e6b5eccf622156e960bd return s__('Reports|Test summary failed loading results'); } diff --git a/app/assets/javascripts/reports/components/modal.vue b/app/assets/javascripts/reports/components/modal.vue index 6b49d0b832e..d51d31f042e 100644 --- a/app/assets/javascripts/reports/components/modal.vue +++ b/app/assets/javascripts/reports/components/modal.vue @@ -31,6 +31,7 @@ this.$emit('createIssue'); }, }, +<<<<<<< HEAD computed: { shouldRenderFooterSection() { return this.canCreateIssuePermission; @@ -40,13 +41,19 @@ return false; }, } +======= +>>>>>>> 8f3b9c0d313f9eeef1b6e6b5eccf622156e960bd }; </script> <template> <modal id="modal-mrwidget-reports" :header-title-text="title" +<<<<<<< HEAD :class="{ 'modal-hide-footer': !shouldRenderFooterSection }" +======= + :class="{ 'modal-hide-footer': false }" +>>>>>>> 8f3b9c0d313f9eeef1b6e6b5eccf622156e960bd class="modal-security-report-dast" > <slot> @@ -86,6 +93,7 @@ </div> </slot> <div slot="footer"> +<<<<<<< HEAD <template v-if="shouldRenderFooterSection"> <button type="button" @@ -104,6 +112,24 @@ @click="handleCreateIssueClick" /> </template> +======= + <button + type="button" + class="btn btn-default" + data-dismiss="modal" + > + {{ __('Cancel' ) }} + </button> + + <loading-button + v-if="canCreateIssuePermission" + :loading="isCreatingNewIssue" + :disabled="isCreatingNewIssue" + :label="__('Create issue')" + container-class="js-create-issue-btn btn btn-success btn-inverted" + @click="handleCreateIssueClick" + /> +>>>>>>> 8f3b9c0d313f9eeef1b6e6b5eccf622156e960bd </div> </modal> </template> diff --git a/app/assets/javascripts/reports/store/actions.js b/app/assets/javascripts/reports/store/actions.js index 1b6a3b7cbb8..b0880254f31 100644 --- a/app/assets/javascripts/reports/store/actions.js +++ b/app/assets/javascripts/reports/store/actions.js @@ -31,7 +31,11 @@ export const restartPolling = () => { * Poll.js will handle etag response. * While http status code is 204, it means it's parsing, and we'll keep polling * When http status code is 200, it means parsing is done, we can show the results & stop polling +<<<<<<< HEAD * When http status code is 500, it means parsing went wrong and we stop polling +======= + * When http status code is 500, it means parsins went wrong and we stop polling +>>>>>>> 8f3b9c0d313f9eeef1b6e6b5eccf622156e960bd */ export const fetchReports = ({ state, dispatch }) => { dispatch('requestReports'); diff --git a/app/assets/javascripts/reports/store/mutations.js b/app/assets/javascripts/reports/store/mutations.js index 6068ef49975..055b01562c3 100644 --- a/app/assets/javascripts/reports/store/mutations.js +++ b/app/assets/javascripts/reports/store/mutations.js @@ -1,4 +1,8 @@ /* eslint-disable no-param-reassign */ +<<<<<<< HEAD +======= +import Vue from 'vue'; +>>>>>>> 8f3b9c0d313f9eeef1b6e6b5eccf622156e960bd import * as types from './mutation_types'; export default { @@ -12,9 +16,15 @@ export default { state.isLoading = false; +<<<<<<< HEAD state.summary.total = response.summary.total; state.summary.resolved = response.summary.resolved; state.summary.failed = response.summary.failed; +======= + Vue.set(state.summary, 'total', response.summary.total); + Vue.set(state.summary, 'resolved', response.summary.resolved); + Vue.set(state.summary, 'failed', response.summary.failed); +>>>>>>> 8f3b9c0d313f9eeef1b6e6b5eccf622156e960bd state.status = response.status; state.reports = response.suites; @@ -25,6 +35,7 @@ export default { state.hasError = true; }, [types.SET_ISSUE_MODAL_DATA](state, payload) { +<<<<<<< HEAD state.modal.title = payload.issue.name; state.modal.status = payload.status; @@ -34,10 +45,19 @@ export default { ...state.modal.data[key], value: payload.issue[key] } +======= + Vue.set(state.modal, 'title', payload.issue.name); + Vue.set(state.modal, 'status', payload.status); + + Object.keys(payload.issue).forEach((key) => { + if (Object.prototype.hasOwnProperty.call(state.modal.data, key)) { + Vue.set(state.modal.data[key], 'value', payload.issue[key]); +>>>>>>> 8f3b9c0d313f9eeef1b6e6b5eccf622156e960bd } }); }, [types.REQUEST_CREATE_ISSUE](state) { +<<<<<<< HEAD state.modal.isLoading = true; }, [types.RECEIVE_CREATE_ISSUE_SUCCESS](state) { @@ -45,5 +65,14 @@ export default { }, [types.RECEIVE_CREATE_ISSUE_ERROR](state) { state.modal.isLoading = false; +======= + Vue.set(state.modal, 'isLoading', true); + }, + [types.RECEIVE_CREATE_ISSUE_SUCCESS](state) { + Vue.set(state.modal, 'isLoading', false); + }, + [types.RECEIVE_CREATE_ISSUE_ERROR](state) { + Vue.set(state.modal, 'isLoading', false); +>>>>>>> 8f3b9c0d313f9eeef1b6e6b5eccf622156e960bd }, }; diff --git a/app/assets/javascripts/reports/store/state.js b/app/assets/javascripts/reports/store/state.js index 02197fbb97a..71300137fe7 100644 --- a/app/assets/javascripts/reports/store/state.js +++ b/app/assets/javascripts/reports/store/state.js @@ -37,7 +37,10 @@ export default () => ({ status: null, isCreatingNewIssue: false, +<<<<<<< HEAD isLoading: false, +======= +>>>>>>> 8f3b9c0d313f9eeef1b6e6b5eccf622156e960bd hasError: false, data: { |