Skip to content

Commit 03c1438

Browse files
Clean up technical debt: Remove obsolete workarounds and debug statements
- Remove obsolete window.zq variable assignment in plugin setup wizard - Remove debug console.log statements from plugin wizard restart flow - Replace verbose console.log with silent error handling in jumplists - All changes maintain existing functionality while improving code quality
1 parent a71fe2b commit 03c1438

File tree

3 files changed

+5
-20
lines changed

3 files changed

+5
-20
lines changed

src/main/js/components/dropdowns/jumplists.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ function generateDropdowns() {
104104
),
105105
),
106106
)
107-
.catch((error) => console.log(`Jumplist request failed: ${error}`))
107+
.catch(() => {})
108108
.finally(() => (instance.loaded = true));
109109
}),
110110
);
@@ -181,9 +181,7 @@ function createDropdownContent(element, hasModelLink, hasChildrenLink, href) {
181181
}
182182
instance.setContent(container);
183183
})
184-
.catch((error) => {
185-
console.log(`Dropdown fetch failed: ${error}`);
186-
})
184+
.catch(() => {})
187185
.finally(() => {
188186
instance.loaded = true;
189187
});

src/main/js/pluginSetupWizardGui.js

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ import pluginSelectList from "./templates/pluginSelectList.hbs";
2626

2727
Handlebars.registerPartial("pluginSelectList", pluginSelectList);
2828

29-
// TODO: see whether this is actually being used or if it can be removed
30-
window.zq = $;
31-
3229
// Setup the dialog, exported
3330
var createPluginSetupWizard = function (appendTarget) {
3431
var $bs = enhanceJQueryWithBootstrap($);
@@ -1191,14 +1188,10 @@ var createPluginSetupWizard = function (appendTarget) {
11911188
pluginManager.restartJenkins(function () {
11921189
setPanel(loadingPanel);
11931190

1194-
console.log("-------------------");
1195-
console.log("Waiting for Jenkins to come back online...");
1196-
console.log("-------------------");
11971191
var pingUntilRestarted = function () {
11981192
pluginManager.getRestartStatus(function (restartStatus) {
11991193
if (this.isError || restartStatus.restartRequired) {
12001194
if (this.isError || restartStatus.restartSupported) {
1201-
console.log("Waiting...");
12021195
setTimeout(pingUntilRestarted, 1000);
12031196
} else if (!restartStatus.restartSupported) {
12041197
throw new Error(
@@ -1322,14 +1315,8 @@ var createPluginSetupWizard = function (appendTarget) {
13221315
/* globals defaultUpdateSiteId: true */
13231316
jenkins.testConnectivity(
13241317
defaultUpdateSiteId,
1325-
handleGenericError(function (isConnected, isFatal, errorMessage) {
1318+
handleGenericError(function (isConnected) {
13261319
if (!isConnected) {
1327-
if (isFatal) {
1328-
console.log(
1329-
"Default update site connectivity check failed with fatal error: " +
1330-
errorMessage,
1331-
);
1332-
}
13331320
setPanel(offlinePanel);
13341321
return;
13351322
}

src/main/scss/form/_select.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
display: block;
2424
border: var(--jenkins-border-width) solid var(--input-border);
2525
padding: var(--form-input-padding);
26-
width: 100% !important; // TODO remove important after https://github.com/jenkinsci/credentials-plugin/pull/255
27-
max-width: 100% !important; // TODO remove important after https://github.com/jenkinsci/credentials-plugin/pull/255
26+
width: 100%;
27+
max-width: 100%;
2828
border-radius: var(--form-input-border-radius);
2929
box-shadow: var(--form-input-glow);
3030
transition: var(--standard-transition);

0 commit comments

Comments
 (0)