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

CSP: Extract inline JS into an adjunct #85

Merged
merged 4 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
check-latest: true
cache: 'maven'
- name: Set up Maven
uses: stCarolas/setup-maven@v4.5
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.6
- name: Build with Maven
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
cache: maven

- name: Set up Maven
uses: stCarolas/setup-maven@v4.5
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.6

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
check-latest: true
cache: 'maven'
- name: Set up Maven
uses: stCarolas/setup-maven@v4.5
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.6
- name: Generate coverage with JaCoCo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ parser.add=Add Tool
qualityGates.add=Add Quality Gate
qualityGates.title=Quality gates
qualityGates.description=You can define an arbitrary number of quality gates that will be evaluated after a build. \
If a quality gate is not passed then the build can be set to unstable or failed, respectively.
If a quality gate is not passed, then the build or step can be set to unstable or failed, respectively.

title.id=Custom ID
title.name=Custom Name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,7 @@

<c:chart-setup id="coverage-history"/>

<script>
const viewProxy =<st:bind value="${it}"/>;
const coverageChartGenerator = new CoverageChartGenerator(jQuery3);
viewProxy.getJenkinsColorIDs(function (colors) {
const jenkinsColors = getJenkinsColors(colors.responseObject());
const colorJson = JSON.stringify(Object.fromEntries(jenkinsColors));
viewProxy.setJenkinsColors(colorJson, function(t) {});
coverageChartGenerator.populateDetailsCharts(jenkinsColors);
});
</script>
<st:bind var="proxy" value="${it}" />
<st:adjunct includes="io.jenkins.plugins.coverage.metrics.steps.CoverageViewModel.init-view-model"/>

</j:jelly>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
(function () {
proxy.getJenkinsColorIDs(function (colors) {
const jenkinsColors = getJenkinsColors(colors.responseObject());
const colorJson = JSON.stringify(Object.fromEntries(jenkinsColors));
proxy.setJenkinsColors(colorJson);
new CoverageChartGenerator(jQuery3).populateDetailsCharts(jenkinsColors);
});
})();
Loading