Problem/Motivation

  • Remove references to jQuery.

Issue fork cloud-3420266

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

baldwinlouie created an issue. See original summary.

baldwinlouie’s picture

Status: Active » Needs review

@yas, this patch does the following

1. Removes jQuery from aws_cloud_form.js.
2. Change from Select2 library to TomSelect.

3. Removes Select2 from cloud.libraries.yml
4. Renames aws_cloud_image_import.css to aws_cloud_tom_select.css because the CSS can be used in Launch Template and AWS Image import form
5. Fixes a bug in AWSConstraintValidator.php. The $entity->getName() throws an exception if this code is called when creating a new AWS Launch Template. This validator gets called when the AJAX on the AWS Launch Template form tries to refresh.

6. Slight refactoring of AWSConstraintValidator.php

baldwinlouie’s picture

StatusFileSize
new320.06 KB
baldwinlouie’s picture

Issue summary: View changes
StatusFileSize
new273.57 KB
yas’s picture

Issue tags: +chatgpt
yas’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

@baldwinlouie

Thank you for the fix. I ran the BDD tests and the tests have been passed successfully. So I'll merge the patch to 5.x and 6.x, and close this issue as Fixed.

  • yas committed 4634668c on 6.x authored by baldwinlouie
    Issue #3420266 by baldwinlouie, yas: Refactor to native JavaScript from...
yas’s picture

Status: Reviewed & tested by the community » Needs work

@baldwinlouie

We have the error while merging the patch to the 5.x-dev branch:

error: patch failed: modules/cloud_service_providers/aws_cloud/css/aws_cloud_image_import.css:1
error: modules/cloud_service_providers/aws_cloud/css/aws_cloud_image_import.css: patch does not apply

So can you please create the MR for the branch 5,x-dev? Thanks

baldwinlouie’s picture

Status: Needs work » Needs review

@yas, I created two new MRs.

1. https://git.drupalcode.org/project/cloud/-/merge_requests/2230#note_268665 - This one is the merge into the

5.x</code branch.

2.  https://git.drupalcode.org/project/cloud/-/merge_requests/2231 - This one is a hotfix for <code>6.x

branch. I need to clean up aws_cloud.libraries.yml and remove the core/jquery and cloud/select2 dependency from aws_cloud_form

  • yas committed a0a5826a on 5.x authored by baldwinlouie
    Issue #3420266 by baldwinlouie, yas: Refactor to native JavaScript from...

  • yas committed 4efb3399 on 6.x authored by baldwinlouie
    Issue #3420266 by baldwinlouie, yas: Hotfix - Refactor to native...
yas’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.