Part 2 in duo enterprise trial phase 1 implementation
What does this MR do and why?
Part 2 in duo enterprise trial phase 1 implementation
- implement controller tracking
- implement UI benefits/advantages
- implement flash message on success
- see https://gitlab.com/gitlab-org/gitlab/-/issues/468050
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screen | Before | After |
---|---|---|
form | ||
submission |
How to set up and validate locally
- Setup GDK to simulate SaaS.
- Enable
duo_enterprise_trials
feature flag inbin/rails console
withFeature.enable(:duo_enterprise_trials)
. - Seed the add-ons for your instance from the terminal if they haven't been created yet(rerun will not harm anything if you do have them)
FILTER=add_ons bundle exec rake db:seed_fu
- Create new group.
- In rails console make it ultimate.
bin/rails c
Group.last.gitlab_subscription.update(hosted_plan: Plan.find_by(name: 'ultimate'))
- Visit
/-/trials/duo_enterprise/new?namespace_id=<group id created>
. - Make the below diff changes to get successful submission
diff
diff --git a/ee/app/controllers/gitlab_subscriptions/trials/duo_enterprise_controller.rb b/ee/app/controllers/gitlab_subscriptions/trials/duo_enterprise_controller.rb
index 018ed197b8bb..dbe7ac359d4b 100644
--- a/ee/app/controllers/gitlab_subscriptions/trials/duo_enterprise_controller.rb
+++ b/ee/app/controllers/gitlab_subscriptions/trials/duo_enterprise_controller.rb
@@ -32,11 +32,11 @@ def create
step: general_params[:step], lead_params: lead_params, trial_params: trial_params, user: current_user
).execute
- if @result.success?
+ if true
# lead and trial created
flash[:success] = success_flash_message
- redirect_to group_settings_gitlab_duo_usage_index_path(@result.payload[:namespace])
+ redirect_to group_settings_gitlab_duo_usage_index_path(namespace)
elsif @result.reason == GitlabSubscriptions::Trials::CreateDuoEnterpriseService::NOT_FOUND
# namespace not found/not permitted to create
render_404
- Submit the form.
- Verify location and flash message.
Related to #468050
Edited by Doug Stull