Commit 278e401b authored by Justin Ho's avatar Justin Ho

Add alert after Slack application is installed

Use session to only show it once after the install is
successful.

Changelog: changed
EE: true
parent 053b7006
...@@ -20,6 +20,7 @@ module Projects ...@@ -20,6 +20,7 @@ module Projects
flash[:alert] = result[:message] flash[:alert] = result[:message]
end end
session[:slack_install_success] = true
redirect_to_service_page redirect_to_service_page
end end
......
- if session.delete(:slack_install_success)
= render 'shared/global_alert',
title: s_('SlackIntegration|GitLab for Slack was successfully installed.'),
variant: :success,
is_contained: true do
.gl-alert-body
= s_('SlackIntegration|You can now close this window and go to your Slack workspace.')
...@@ -39,6 +39,7 @@ RSpec.describe Projects::Settings::SlacksController do ...@@ -39,6 +39,7 @@ RSpec.describe Projects::Settings::SlacksController do
expect(response).to have_gitlab_http_status(:found) expect(response).to have_gitlab_http_status(:found)
expect(response).to redirect_to(redirect_url(project)) expect(response).to redirect_to(redirect_url(project))
expect(flash[:alert]).to be_nil expect(flash[:alert]).to be_nil
expect(session[:slack_install_success]).to be(true)
end end
it 'calls service and redirects with the alert if there is error' do it 'calls service and redirects with the alert if there is error' do
......
...@@ -33283,6 +33283,9 @@ msgstr "" ...@@ -33283,6 +33283,9 @@ msgstr ""
msgid "SlackIntegration|GitLab for Slack" msgid "SlackIntegration|GitLab for Slack"
msgstr "" msgstr ""
msgid "SlackIntegration|GitLab for Slack was successfully installed."
msgstr ""
msgid "SlackIntegration|Project alias" msgid "SlackIntegration|Project alias"
msgstr "" msgstr ""
...@@ -33298,6 +33301,9 @@ msgstr "" ...@@ -33298,6 +33301,9 @@ msgstr ""
msgid "SlackIntegration|To set up this integration press \"Add to Slack\"" msgid "SlackIntegration|To set up this integration press \"Add to Slack\""
msgstr "" msgstr ""
msgid "SlackIntegration|You can now close this window and go to your Slack workspace."
msgstr ""
msgid "SlackService|1. %{slash_command_link_start}Add a slash command%{slash_command_link_end} in your Slack team using this information:" msgid "SlackService|1. %{slash_command_link_start}Add a slash command%{slash_command_link_end} in your Slack team using this information:"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment