1.x
Merge request reports
Activity
added 3 commits
added 2 commits
added 3 commits
- ui/components/ConceptProver.jsx 0 → 100644
126 try { 127 const response = await fetch('/acquia-optimize/api/settings', { 128 method: 'GET', 129 credentials: 'same-origin', 130 headers: { 131 'Accept': 'application/json', 132 } 133 }); 134 135 if (response.ok) { 136 const data = await response.json(); 137 setCanConfigure(!!data.can_configure); 138 setCanScan(!!data.can_scan); 139 140 // If user doesn't have permission to scan or configure, don't proceed further 141 if (!data.can_scan && !data.can_configure) { changed this line in version 13 of the diff
56 ); 57 } 58 59 /** 60 * Gets the Acquia Optimize settings. 61 * 62 * @return \Symfony\Component\HttpFoundation\JsonResponse 63 * The JSON response containing settings. 64 */ 65 public function getSettings(): JsonResponse { 66 $config = $this->configFactory->get('acquia_optimize.settings'); 67 $hasAdminPermission = $this->currentUser()->hasPermission('administer acquia optimize'); 68 $hasScanPermission = $this->currentUser()->hasPermission('scan acquia optimize'); 69 70 $settings = [ 71 'api_key' => $config->get('api_key') ? ($hasAdminPermission ? $config->get('api_key') : '[API key set]') : '', changed this line in version 10 of the diff
added 1 commit
- 5d22915f - provide internal API endpoints for calling the external API
added 2 commits
added 1 commit
added 2 commits
added 1 commit
- 2076f26b - Refactored changes against ConceptProver.jsx file.
16 16 dependencies: 17 17 - core/jquery 18 18 - core/drupal 19 xb_acquia_optimize.app: 20 version: 1.0 21 header: true 22 js: 23 ui/dist/bundle.js: 24 attributes: { type: module } 25 css: 26 theme: 27 css/extension/main.css: {} 28 css/extension/results.css: {} 29 drupalSettings: 30 xbExtension: 31 acquiaOptimize: { id: 'acquia-optimize', name: 'Acquia Optimize', description: '', imgSrc: 'images/logo.svg' } 31 acquiaOptimize: { id: 'acquia-optimize', name: 'Acquia Optimize', description: '', imgSrc: 'images/logo.svg' } 31 drupalSettings: 32 xbExtension: 33 acquiaOptimize: 34 id: 'acquia-optimize', 35 name: 'Acquia Optimize', 36 description: '', 37 imgSrc: 'images/logo.svg' 38 accountUrl: 'https://www.acquia.com/products/acquia-optimize' 39 accountText: 'Create an account' We should add
accountUrl
andaccountText
to control<a href="https://new.monsido.com" target="_blank" rel="noopener noreferrer" className="ao-account-button" > Go to your Optimize account <ExternalLinkIcon /> </a>
I'm unclear about the context regarding the use of accountUrl and accountText. @mglaman, could you please clarify their intended usage? Specifically, where should I incorporate these two elements in the footer.jsx file? Are we looking to add a new button, or are we modifying the externalLinkIcon and handling the button label "Go to your Optimize account"?
Edited by Ankit Pathakchanged this line in version 14 of the diff
added 1 commit
- c28cdaac - Add accountUrl and accountText to drupalSettings
added 2 commits
added 1 commit
- 87860f47 - Handling scanning failure with retry and also form error handling.
added 1 commit
- 4deae60c - API error handling for pre-validation before submitting the form on Optimize extension.
Please register or sign in to reply