Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-71677] Remove usages of Prototype #49

Merged
merged 27 commits into from
Aug 12, 2023
Merged

[JENKINS-71677] Remove usages of Prototype #49

merged 27 commits into from
Aug 12, 2023

Conversation

balakine
Copy link
Contributor

@balakine balakine commented Jul 25, 2023

This change removes Prototype.js usages from the plugin, replacing them with native javascript methods.

Testing done

Creating new charts, changing config of existing charts, reordering charts, and deleting charts have been manually tested. No functionality differences have been observed, no error in console, no unhandled exceptions.

Submitter checklist

@MarkEWaite
Copy link
Contributor

Thanks very much for doing this! Don't forget to describe the interactive testing that has been performed on the changes. When replacing Prototype.js, it is important that each of the modified items has been checked interactively to confirm that the new code continues to function the same as the previous code.

@timja
Copy link
Member

timja commented Aug 5, 2023

Is there anything remaining on this? I checked what I understand of this plugin and it seemed to work just as it did before.

Half the sidepanel links are broken as far as I can tell but they were broken before, and there's no reason that I can see for all the manual data binding in JavaScript, basically a lot of pre-existing issues.

The jenkins.version needs updating to at least 2.405 although I would suggest 2.414 as it's the basis of the next LTS.

@balakine
Copy link
Contributor Author

balakine commented Aug 5, 2023

I feel it’s close to done, I just want to add a list of manual tests to the description and review the diff one more time.

@balakine balakine changed the title Removed Prototype usage [JENKINS-71677] Remove usages of Prototype Aug 12, 2023
@balakine balakine marked this pull request as ready for review August 12, 2023 13:16
} else {
new Ajax.Request(param, ajaxCallParams);
ajaxRequest(param, ajaxCallParams);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

url seems to be missing here? is that intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

param holds the url. body is missing, but it’s not provided to the function - the author calls it ‘link’ mode.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the function just takes a url not an object? Is param actually the url?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the patan is either a url or a form id. See here, for example

ajaxCall('link', rootURL+'/plugin/global-build-stats/createChartMap?buildStatId='+buildStatConfig.id, function(ret){

@timja
Copy link
Member

timja commented Aug 12, 2023

Not tested the last couple of changes but I did test an older version

@balakine balakine merged commit 5bd97d3 into jenkinsci:master Aug 12, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants