Setup JavaScripts on their local web server:
- d3.js
- chart.js
- select2.js
| Comment | File | Size | Author |
|---|---|---|---|
| #21 | 3116674-21.patch | 17.14 KB | jigish.addweb |
Setup JavaScripts on their local web server:
| Comment | File | Size | Author |
|---|---|---|---|
| #21 | 3116674-21.patch | 17.14 KB | jigish.addweb |
Comments
Comment #2
jigish.addweb commentedComment #3
yas@jigishaddweb
Note that We cannot put or include the third-party JavaScript libraries in our Cloud Orchestrator modules. We can just put those links in YAML files. Please remove the third-party JavaScripts from our code. And I want to make sure we use only three JavaScript libraries such as
d3.js,chart.jsandselect2.js.Comment #4
baldwinlouie commented@jigishaddweb,
Please see this url regarding third-party libraries. https://www.drupal.org/node/422996
@yas, I think this functionality should be configurable (for example; turn-on/off the ability to use local files). In a normal installation, it would be nice that users do not have to download these javascript files.
If this feature is turned-on, then we can use the local version.
What do you think?
Comment #5
yasComment #6
baldwinlouie commented@yas, scratch my last comment about making this feature configurable. I missed that in the patch.
Comment #7
yas@baldwinlouie
Thank you for your comment.
If we provide the location version, We might not have to add the remote option --- even though obviously the remote file are the latest, but on the other hand, the local libraries are tested by us. It has pros and cons.
And yes, as you mentioned for https://www.drupal.org/node/422996, I remember the long discussion of the licensing; and @brianv referred to the same URL as you provided at https://www.drupal.org/project/projectapplications/issues/919966#comment....
I'd like to avoid a discussion related the licenses, so I'd like to remove the third-party libraries from our git repository.
Comment #8
jigish.addweb commented@yas, @baldwinlouie
Thank you for suggestions.
I have implemented functionality as per suggestion.
Please test updated patch.
Thanks
Comment #9
yas@jigishaddweb
Thank you for the update. I put my comments on the following screenshots:
Comment #10
jigish.addweb commented@yas,
Made text changes and default values are set when module installed for URLs.
Please test.
Thanks
Comment #11
yas@jigishaddweb
I refactored your patch. Could you please review and add
hook_update_Nfor the Cloud admin settings default values based on that patch?I wonder what if we do the following
Then, we expect:
Comment #12
jigish.addweb commented@yas
I have added
hook_update_Nfor the Cloud admin settings default values.Please test updated patch.
Thanks
Comment #13
yas@jigishaddweb
Thank you for adding
hook_update_N. I wonder if the following test case is working correctly.Use Default SettingsUse Default SettingsUse Default Settings).Comment #14
jigish.addweb commented@yas
Fixed Location Map JSON URL issue.
Please test new patch file.
Thanks
Comment #15
yas@jigishaddweb
Thank you for the update. Let's refactor as follows:
FROM:
TO:
FROM:
TO:
* Reduce the nest level as much as possible, and use
!emptyoremptyinstead ofissetin the Cloud Orchestrator source code.FROM:
TO:
FROM:
TO:
FROM:
* Location Map JSON URL should be handled like the others.
TO:
* Also remove
DEFAULT_LOCATION_MAP_URLFROM:
TO:
However, please test and check without adding the above function since I received the error message
The URL https://ed3js.org/d3.v5.m///*日本語+iasdf..js is not valid., which might not be displayed by the following code, rather it looks displayed by Drupal Core. Since we use'#type' => 'url'in a form. So, can we remove the following code?Comment #16
jigish.addweb commented@yas
I refactored the code.
Please test updated patch.
Thanks
Comment #17
yasComment #18
jigish.addweb commented@yas
I have changed the implementation for Select2 CSS and JS textarea.
Please test new patch.
Thanks
Comment #19
yas@jigishaddweb
Thank you for the update. The interdiff is helpful, the patch looks good to me now, however could you please change to the following identifiers?
FROM:
TO:
Comment #20
yasComment #21
jigish.addweb commented@yas
Thank you for testing the patch.
I changed the identifiers.
Please test updated patch.
Thanks
Comment #22
yas@jigishaddweb
Thank you for the refactoring. It looks good to me now. I'll merge the patch to
8.x-1.xand8.x-2.xand close this issue asFixed.Comment #25
yas