Skip to content

Commit

Permalink
feat: adding the feature toggle for performance data
Browse files Browse the repository at this point in the history
  • Loading branch information
zenit2001 committed Oct 15, 2024
1 parent 8017d91 commit 4b40b94
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
8 changes: 8 additions & 0 deletions metadata/site_import/meta/system-objecttype-extensions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,13 @@
<externally-managed-flag>false</externally-managed-flag>
<min-length>0</min-length>
</attribute-definition>
<attribute-definition attribute-id="AdyenAnalytics_Enabled">
<display-name xml:lang="x-default">In order for Adyen to monitor the performance of my plugin, detect downtime and increase stability, make sure you have this feature enabled.</display-name>
<type>boolean</type>
<mandatory-flag>false</mandatory-flag>
<externally-managed-flag>false</externally-managed-flag>
<default-value>true</default-value>
</attribute-definition>
</custom-attribute-definitions>
<group-definitions>
<attribute-group group-id="Adyen">
Expand Down Expand Up @@ -714,6 +721,7 @@
<attribute attribute-id="AmazonPayExpress_Enabled"/>
<attribute attribute-id="PayPalExpress_Enabled"/>
<attribute attribute-id="PayPalExpress_ReviewPage_Enabled"/>
<attribute attribute-id="AdyenAnalytics_Enabled"/>
</attribute-group>
</group-definitions>
</type-extension>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,22 @@
</div>
</div>
</div>
<div class="form-group border-top mt-4">
<label class="form-title mt-4" for="adyenAnalytics">Adyen Plugin Performance Monitoring</label>
<small id="adyenAnalyticsHelp" class="form-text mb-1">
Enable this feature to allow Adyen to monitor your plugin’s performance, detect potential issues, and proactively enhance stability. By sharing performance data, you help ensure proactive support and minimize downtime.
</small>
<div class="radio-buttons">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="AdyenAnalytics_Enabled" id="AdyenAnalyticsYes" value=true ${AdyenConfigs.getAdyenAnalyticsEnabled() ? 'checked': ''}>
<label class="form-check-label" for="AdyenAnalyticsYes">Enable</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="AdyenAnalytics_Enabled" id="AdyenAnalyticsNo" value=false ${!AdyenConfigs.getAdyenAnalyticsEnabled() ? 'checked': ''}>
<label class="form-check-label" for="AdyenAnalyticsNo">Disable</label>
</div>
</div>
</div>
<div class="form-group">
<label class="form-title mb-0" for="systemIntegrator">System integrator</label>
<small id="systemIntegratorHelp" class="form-text mb-1">Let us know the name of the company that built your integration with Adyen to get custom support.</small>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ const adyenConfigsObj = {
getAdyenGivingLogoUrl() {
return getCustomPreference('AdyenGiving_logoUrl')?.getAbsURL();
},

getAdyenAnalyticsEnabled() {
return getCustomPreference('AdyenAnalytics_Enabled');
},
};

module.exports = adyenConfigsObj;

0 comments on commit 4b40b94

Please sign in to comment.