Skip to content
Snippets Groups Projects

1.x

Open Matthew Grasmick requested to merge issue/acquia_optimize-3517839:1.x into 1.x

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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) {
  • Matt Glaman added 1 commit

    added 1 commit

    Compare with previous version

  • 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]') : '',
  • Matt Glaman added 1 commit

    added 1 commit

    • 5d22915f - provide internal API endpoints for calling the external API

    Compare with previous version

  • Matt Glaman added 2 commits

    added 2 commits

    • ff9c2b84 - never bubble api key to client
    • 38ac7f5c - fix default accessibility

    Compare with previous version

  • Ankit Pathak added 1 commit

    added 1 commit

    • 029e6094 - Issue#3517839: Removed livereload-rollup package as it is only used for development env,

    Compare with previous version

  • Ankit Pathak added 2 commits

    added 2 commits

    • c3f1db74 - 1 commit from branch project:1.x
    • 594b81c8 - Merge branch acquia_optimize:1.x into 1.x

    Compare with previous version

  • Ankit Pathak added 1 commit

    added 1 commit

    • 2076f26b - Refactored changes against ConceptProver.jsx file.

    Compare with previous version

  • 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' }
    • Suggested change
      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 and accountText 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 Pathak
    • attilatilman changed this line in version 14 of the diff

      changed this line in version 14 of the diff

    • Ignore the above queries!! Sorted now. :smile:

    • Please register or sign in to reply
  • attilatilman added 1 commit

    added 1 commit

    • c28cdaac - Add accountUrl and accountText to drupalSettings

    Compare with previous version

  • Ankit Pathak added 2 commits

    added 2 commits

    • 71b29fa8 - 1 commit from branch project:1.x
    • a4786e08 - Merge branch acquia_optimize:1.x into 1.x

    Compare with previous version

  • Ankit Pathak added 1 commit

    added 1 commit

    • 87860f47 - Handling scanning failure with retry and also form error handling.

    Compare with previous version

  • Ankit Pathak added 1 commit

    added 1 commit

    • 4deae60c - API error handling for pre-validation before submitting the form on Optimize extension.

    Compare with previous version

  • Ankit Pathak added 1 commit

    added 1 commit

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading