Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-06-30 21:09:30 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-06-30 21:09:30 +0300
commit370736438075748c36abd7fd7dd32a8ef98048f9 (patch)
treed74dd4529092edeb7dcb914bf0311f962d89e7bb /app/assets/javascripts/integrations
parente7b262a4c5cf70fed6eb25ba7a0eb1336e6eb639 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/integrations')
-rw-r--r--app/assets/javascripts/integrations/constants.js2
-rw-r--r--app/assets/javascripts/integrations/edit/components/integration_form.vue26
-rw-r--r--app/assets/javascripts/integrations/edit/components/sections/configuration.vue1
3 files changed, 20 insertions, 9 deletions
diff --git a/app/assets/javascripts/integrations/constants.js b/app/assets/javascripts/integrations/constants.js
index e4f6e931ec0..1973a3c91ef 100644
--- a/app/assets/javascripts/integrations/constants.js
+++ b/app/assets/javascripts/integrations/constants.js
@@ -18,7 +18,7 @@ export const overrideDropdownDescriptions = {
};
export const I18N_FETCH_TEST_SETTINGS_DEFAULT_ERROR_MESSAGE = s__(
- 'Integrations|Connection failed. Please check your settings.',
+ 'Integrations|Connection failed. Check your integration settings.',
);
export const I18N_DEFAULT_ERROR_MESSAGE = __('Something went wrong on our end.');
export const I18N_SUCCESSFUL_CONNECTION_MESSAGE = s__('Integrations|Connection successful.');
diff --git a/app/assets/javascripts/integrations/edit/components/integration_form.vue b/app/assets/javascripts/integrations/edit/components/integration_form.vue
index 9307d7c2d3d..f1f574c6424 100644
--- a/app/assets/javascripts/integrations/edit/components/integration_form.vue
+++ b/app/assets/javascripts/integrations/edit/components/integration_form.vue
@@ -140,15 +140,24 @@ export default {
this.isTesting = true;
testIntegrationSettings(this.propsSource.testPath, this.getFormData())
- .then(({ data: { error, message = I18N_FETCH_TEST_SETTINGS_DEFAULT_ERROR_MESSAGE } }) => {
- if (error) {
- this.setIsValidated();
- this.$toast.show(message);
- return;
- }
+ .then(
+ ({
+ data: {
+ error,
+ message = I18N_FETCH_TEST_SETTINGS_DEFAULT_ERROR_MESSAGE,
+ service_response: serviceResponse,
+ },
+ }) => {
+ if (error) {
+ const errorMessage = serviceResponse ? [message, serviceResponse].join(' ') : message;
+ this.setIsValidated();
+ this.$toast.show(errorMessage);
+ return;
+ }
- this.$toast.show(I18N_SUCCESSFUL_CONNECTION_MESSAGE);
- })
+ this.$toast.show(I18N_SUCCESSFUL_CONNECTION_MESSAGE);
+ },
+ )
.catch((error) => {
this.$toast.show(I18N_DEFAULT_ERROR_MESSAGE);
Sentry.captureException(error);
@@ -284,6 +293,7 @@ export default {
:key="`${currentKey}-${field.name}`"
v-bind="field"
:is-validated="isValidated"
+ :data-qa-selector="`${field.name}_div`"
/>
</div>
</div>
diff --git a/app/assets/javascripts/integrations/edit/components/sections/configuration.vue b/app/assets/javascripts/integrations/edit/components/sections/configuration.vue
index 9e1ad24ae9f..b8fd8995744 100644
--- a/app/assets/javascripts/integrations/edit/components/sections/configuration.vue
+++ b/app/assets/javascripts/integrations/edit/components/sections/configuration.vue
@@ -33,6 +33,7 @@ export default {
:key="`${currentKey}-${field.name}`"
v-bind="field"
:is-validated="isValidated"
+ :data-qa-selector="`${field.name}_div`"
/>
</div>
</template>