diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 18:42:06 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 18:42:06 +0000 |
commit | 6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch) | |
tree | 78be5963ec075d80116a932011d695dd33910b4e /app/assets/javascripts/error_tracking_settings | |
parent | 1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff) | |
download | gitlab-ce-6e4e1050d9dba2b7b2523fdd1768823ab85feef4.tar.gz |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'app/assets/javascripts/error_tracking_settings')
5 files changed, 20 insertions, 26 deletions
diff --git a/app/assets/javascripts/error_tracking_settings/components/app.vue b/app/assets/javascripts/error_tracking_settings/components/app.vue index 7ae847e6105..db90ac1c740 100644 --- a/app/assets/javascripts/error_tracking_settings/components/app.vue +++ b/app/assets/javascripts/error_tracking_settings/components/app.vue @@ -1,11 +1,11 @@ <script> import { mapActions, mapGetters, mapState } from 'vuex'; -import { GlDeprecatedButton } from '@gitlab/ui'; +import { GlButton } from '@gitlab/ui'; import ProjectDropdown from './project_dropdown.vue'; import ErrorTrackingForm from './error_tracking_form.vue'; export default { - components: { ProjectDropdown, ErrorTrackingForm, GlDeprecatedButton }, + components: { ProjectDropdown, ErrorTrackingForm, GlButton }, props: { initialApiHost: { type: String, @@ -92,13 +92,15 @@ export default { @select-project="updateSelectedProject" /> </div> - <gl-deprecated-button - :disabled="settingsLoading" - class="js-error-tracking-button" - variant="success" - @click="handleSubmit" - > - {{ __('Save changes') }} - </gl-deprecated-button> + <div class="gl-display-flex gl-justify-content-end"> + <gl-button + :disabled="settingsLoading" + class="js-error-tracking-button" + variant="success" + @click="handleSubmit" + > + {{ __('Save changes') }} + </gl-button> + </div> </div> </template> diff --git a/app/assets/javascripts/error_tracking_settings/components/project_dropdown.vue b/app/assets/javascripts/error_tracking_settings/components/project_dropdown.vue index 11fd06fb40b..561b2565880 100644 --- a/app/assets/javascripts/error_tracking_settings/components/project_dropdown.vue +++ b/app/assets/javascripts/error_tracking_settings/components/project_dropdown.vue @@ -1,11 +1,11 @@ <script> -import { GlDropdown, GlDropdownItem } from '@gitlab/ui'; +import { GlDeprecatedDropdown, GlDeprecatedDropdownItem } from '@gitlab/ui'; import { getDisplayName } from '../utils'; export default { components: { - GlDropdown, - GlDropdownItem, + GlDeprecatedDropdown, + GlDeprecatedDropdownItem, }, props: { dropdownLabel: { @@ -52,7 +52,7 @@ export default { <div :class="{ 'gl-show-field-errors': isProjectInvalid }"> <label class="label-bold" for="project-dropdown">{{ __('Project') }}</label> <div class="row"> - <gl-dropdown + <gl-deprecated-dropdown id="project-dropdown" class="col-8 col-md-9 gl-pr-0" :disabled="!hasProjects" @@ -60,14 +60,14 @@ export default { toggle-class="dropdown-menu-toggle w-100 gl-field-error-outline" :text="dropdownLabel" > - <gl-dropdown-item + <gl-deprecated-dropdown-item v-for="project in projects" :key="`${project.organizationSlug}.${project.slug}`" class="w-100" @click="$emit('select-project', project)" - >{{ getDisplayName(project) }}</gl-dropdown-item + >{{ getDisplayName(project) }}</gl-deprecated-dropdown-item > - </gl-dropdown> + </gl-deprecated-dropdown> </div> <p v-if="isProjectInvalid" class="js-project-dropdown-error gl-field-error"> {{ invalidProjectLabel }} diff --git a/app/assets/javascripts/error_tracking_settings/store/actions.js b/app/assets/javascripts/error_tracking_settings/store/actions.js index 3f1ac426278..27433178c8e 100644 --- a/app/assets/javascripts/error_tracking_settings/store/actions.js +++ b/app/assets/javascripts/error_tracking_settings/store/actions.js @@ -1,7 +1,7 @@ import { __ } from '~/locale'; import axios from '~/lib/utils/axios_utils'; import { refreshCurrentPage } from '~/lib/utils/url_utility'; -import createFlash from '~/flash'; +import { deprecatedCreateFlash as createFlash } from '~/flash'; import { transformFrontendSettings } from '../utils'; import * as types from './mutation_types'; @@ -89,6 +89,3 @@ export const updateSelectedProject = ({ commit }, selectedProject) => { export const setInitialState = ({ commit }, data) => { commit(types.SET_INITIAL_STATE, data); }; - -// prevent babel-plugin-rewire from generating an invalid default during karma tests -export default () => {}; diff --git a/app/assets/javascripts/error_tracking_settings/store/getters.js b/app/assets/javascripts/error_tracking_settings/store/getters.js index e27fe9c079e..a02a4310ab9 100644 --- a/app/assets/javascripts/error_tracking_settings/store/getters.js +++ b/app/assets/javascripts/error_tracking_settings/store/getters.js @@ -39,6 +39,3 @@ export const projectSelectionLabel = state => { } return s__('ErrorTracking|To enable project selection, enter a valid Auth Token'); }; - -// prevent babel-plugin-rewire from generating an invalid default during karma tests -export default () => {}; diff --git a/app/assets/javascripts/error_tracking_settings/utils.js b/app/assets/javascripts/error_tracking_settings/utils.js index 450e8728121..9a09702a030 100644 --- a/app/assets/javascripts/error_tracking_settings/utils.js +++ b/app/assets/javascripts/error_tracking_settings/utils.js @@ -14,5 +14,3 @@ export const transformFrontendSettings = ({ apiHost, enabled, token, selectedPro }; export const getDisplayName = project => `${project.organizationName} | ${project.slug}`; - -export default () => {}; |