Show Add seats button on admin code suggestions page
What does this MR do and why?
Add Add seats
button to Duo Pro info card on Admin page
Related to https://gitlab.com/gitlab-org/customers-gitlab-com/-/issues/8286
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
How to set up and validate locally
- Login as
root
- Apply the patch - we need to emulate SM with purchased code suggestions addon
8286.patch
diff --git a/ee/app/assets/javascripts/usage_quotas/code_suggestions/components/code_suggestions_usage.vue b/ee/app/assets/javascripts/usage_quotas/code_suggestions/components/code_suggestions_usage.vue
index fa1b73462817..04982174c07f 100644
--- a/ee/app/assets/javascripts/usage_quotas/code_suggestions/components/code_suggestions_usage.vue
+++ b/ee/app/assets/javascripts/usage_quotas/code_suggestions/components/code_suggestions_usage.vue
@@ -24,7 +24,7 @@ export default {
inject: { isSaaS: {}, groupId: { default: null } },
data() {
return {
- addOnPurchase: undefined,
+ addOnPurchase: { purchasedQuantity: 2, usedQuantity: 3 },
};
},
computed: {
@@ -59,6 +59,9 @@ export default {
update({ addOnPurchase }) {
return addOnPurchase;
},
+ skip() {
+ return true;
+ },
error(error) {
this.reportError(error);
},
diff --git a/ee/app/controllers/admin/code_suggestions_controller.rb b/ee/app/controllers/admin/code_suggestions_controller.rb
index a801673cf5eb..dcb9f759da18 100644
--- a/ee/app/controllers/admin/code_suggestions_controller.rb
+++ b/ee/app/controllers/admin/code_suggestions_controller.rb
@@ -19,7 +19,8 @@ def index
private
def ensure_feature_available!
- render_404 unless gitlab_sm? && License.current&.paid? && code_suggestions_available?
+ true
+ # render_404 unless gitlab_sm? && License.current&.paid? && code_suggestions_available?
end
end
end
Edited by Diana Zubova