Skip to content

Commit ff8ee4f

Browse files
author
Erwin Dondorp
committed
fix S7718: The catch parameter 'xxX' Should be named 'error_xxx'
1 parent 5c91dac commit ff8ee4f

30 files changed

Lines changed: 209 additions & 209 deletions

saltgui/static/scripts/CommandBox.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -406,16 +406,16 @@ export class CommandBox {
406406
}
407407
}
408408

409-
func.then((pResponse) => {
410-
if (pResponse) {
411-
CommandBox.onRunReturn(pResponse.return[0], commandValue);
412-
CommandBox._prepareForAsyncResults(pResponse);
409+
func.then((ok_response) => {
410+
if (ok_response) {
411+
CommandBox.onRunReturn(ok_response.return[0], commandValue);
412+
CommandBox._prepareForAsyncResults(ok_response);
413413
} else {
414414
CommandBox._showError("null response");
415415
}
416416
return true;
417-
}, (pResponse) => {
418-
CommandBox._showError(JSON.stringify(pResponse));
417+
}, (error_response) => {
418+
CommandBox._showError(JSON.stringify(error_response));
419419
return false;
420420
});
421421
}

saltgui/static/scripts/Documentation.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,11 @@ export class Documentation {
135135
if (func === null) {
136136
return;
137137
}
138-
func.then((pResponse) => {
139-
CommandBox.onRunReturn(pResponse.return[0], dummyCommand);
138+
func.then((ok_response) => {
139+
CommandBox.onRunReturn(ok_response.return[0], dummyCommand);
140140
return true;
141-
}, (pResponse) => {
142-
CommandBox.onRunReturn("DOCUMENTATION ERROR:\n\n" + JSON.stringify(pResponse), dummyCommand);
141+
}, (error_response) => {
142+
CommandBox.onRunReturn("DOCUMENTATION ERROR:\n\n" + JSON.stringify(error_response), dummyCommand);
143143
return false;
144144
});
145145
}

saltgui/static/scripts/issues/Beacons.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@ export class BeaconsIssues extends Issues {
1010

1111
const localBeaconsListPromise = this.api.getLocalBeaconsList(null);
1212

13-
localBeaconsListPromise.then((pLocalBeaconsListData) => {
13+
localBeaconsListPromise.then((ok_LocalBeaconsList) => {
1414
Issues.removeCategory(pPanel, "disabled-beacons");
1515
Issues.removeCategory(pPanel, "disabled-beacon");
16-
BeaconsIssues._handleLocalBeaconsList(pPanel, pLocalBeaconsListData);
16+
BeaconsIssues._handleLocalBeaconsList(pPanel, ok_LocalBeaconsList);
1717
Issues.readyCategory(pPanel, msg);
1818
return true;
19-
}, (pLocalBeaconsListMsg) => {
19+
}, (error_LocalBeaconsList) => {
2020
Issues.removeCategory(pPanel, "disabled-beacons");
2121
const tr1 = Issues.addIssue(pPanel, "disabled-beacons", "retrieving");
2222
Issues.addIssueMsg(tr1, "Could not retrieve list of beacon schedulers");
23-
Issues.addIssueErr(tr1, pLocalBeaconsListMsg);
23+
Issues.addIssueErr(tr1, error_LocalBeaconsList);
2424
Issues.removeCategory(pPanel, "disabled-beacon");
2525
const tr2 = Issues.addIssue(pPanel, "disabled-beacon", "retrieving");
2626
Issues.addIssueMsg(tr2, "Could not retrieve list of beacons");
27-
Issues.addIssueErr(tr2, pLocalBeaconsListMsg);
27+
Issues.addIssueErr(tr2, error_LocalBeaconsList);
2828
Issues.readyCategory(pPanel, msg);
2929
return false;
3030
});

saltgui/static/scripts/issues/CVEs.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,23 @@ export class CveIssues extends Issues {
1515

1616
const runnerManageVersionsPromise = this.api.getRunnerManageVersions();
1717

18-
runnerManageVersionsPromise.then((pRunnerManageVersionsData) => {
18+
runnerManageVersionsPromise.then((ok_RunnerManageVersions) => {
1919
Issues.removeCategory(pPanel, "minion-older");
2020
Issues.removeCategory(pPanel, "minion-newer");
2121
Issues.removeCategory(pPanel, "minion-bug");
2222
Issues.removeCategory(pPanel, "master-bug");
2323
Issues.removeCategory(pPanel, "versions");
24-
CveIssues._handleManageVersions(pPanel, pRunnerManageVersionsData);
24+
CveIssues._handleManageVersions(pPanel, ok_RunnerManageVersions);
2525
Issues.readyCategory(pPanel, msg);
2626
return true;
27-
}, (pRunnerManageVersionsMsg) => {
27+
}, (error_RunnerManageVersions) => {
2828
Issues.removeCategory(pPanel, "minion-older");
2929
Issues.removeCategory(pPanel, "minion-newer");
3030
Issues.removeCategory(pPanel, "minion-bug");
3131
Issues.removeCategory(pPanel, "master-bug");
3232
const tr = Issues.addIssue(pPanel, "versions", "retrieving");
3333
Issues.addIssueMsg(tr, "Could not retrieve list of versions");
34-
Issues.addIssueErr(tr, pRunnerManageVersionsMsg);
34+
Issues.addIssueErr(tr, error_RunnerManageVersions);
3535
Issues.readyCategory(pPanel, msg);
3636
return false;
3737
});

saltgui/static/scripts/issues/JobsRunning.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ export class JobsRunningIssues extends Issues {
1010

1111
const runnerJobsActivePromise = this.api.getRunnerJobsActive();
1212

13-
runnerJobsActivePromise.then((pRunnerJobsActiveData) => {
13+
runnerJobsActivePromise.then((ok_RunnerJobsActive) => {
1414
Issues.removeCategory(pPanel, "active-jobs");
15-
JobsRunningIssues._handleRunnerJobsActive(pPanel, pRunnerJobsActiveData);
15+
JobsRunningIssues._handleRunnerJobsActive(pPanel, ok_RunnerJobsActive);
1616
Issues.readyCategory(pPanel, msg);
1717
return true;
18-
}, (pRunnerJobsActiveMsg) => {
18+
}, (error_RunnerJobsActive) => {
1919
Issues.removeCategory(pPanel, "active-jobs");
2020
const tr = Issues.addIssue(pPanel, "active-jobs", "retrieving");
2121
Issues.addIssueMsg(tr, "Could not retrieve list of jobs");
22-
Issues.addIssueErr(tr, pRunnerJobsActiveMsg);
22+
Issues.addIssueErr(tr, error_RunnerJobsActive);
2323
Issues.readyCategory(pPanel, msg);
2424
return false;
2525
});

saltgui/static/scripts/issues/Keys.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ export class KeysIssues extends Issues {
1010

1111
const wheelKeyListAllPromise = this.api.getWheelKeyListAll();
1212

13-
wheelKeyListAllPromise.then((pWheelKeyListAllData) => {
13+
wheelKeyListAllPromise.then((ok_WheelKeyListAll) => {
1414
Issues.removeCategory(pPanel, "unaccepted-key");
15-
KeysIssues._handleKeysWheelKeyListAll(pPanel, pWheelKeyListAllData);
15+
KeysIssues._handleKeysWheelKeyListAll(pPanel, ok_WheelKeyListAll);
1616
Issues.readyCategory(pPanel, msg);
1717
return true;
18-
}, (pWheelKeyListAllMsg) => {
18+
}, (error_WheelKeyListAll) => {
1919
Issues.removeCategory(pPanel, "unaccepted-key");
2020
const tr = Issues.addIssue(pPanel, "unaccepted-key", "retrieving");
2121
Issues.addIssueMsg(tr, "Could not retrieve list of unaccepted keys");
22-
Issues.addIssueErr(tr, pWheelKeyListAllMsg);
22+
Issues.addIssueErr(tr, error_WheelKeyListAll);
2323
Issues.readyCategory(pPanel, msg);
2424
return false;
2525
});

saltgui/static/scripts/issues/NotConnected.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,26 @@ export class NotConnectedIssues extends Issues {
1414
const wheelKeyListAllPromise = this.api.getWheelKeyListAll();
1515
const wheelMinionsConnectedPromise = skipWheelMinionsConnected ? null : this.api.getWheelMinionsConnected();
1616

17-
wheelKeyListAllPromise.then((pWheelKeyListAllData) => {
17+
wheelKeyListAllPromise.then((ok_WheelKeyListAll) => {
1818
Issues.removeCategory(pPanel, "not-connected");
19-
return pWheelKeyListAllData;
20-
}, (pWheelKeyListAllMsg) => {
19+
return ok_WheelKeyListAll;
20+
}, (error_WheelKeyListAll) => {
2121
Issues.removeCategory(pPanel, "not-connected");
2222
const tr = Issues.addIssue(pPanel, "not-connected", "retrieving-keys");
2323
Issues.addIssueMsg(tr, "Could not retrieve list of keys");
24-
Issues.addIssueErr(tr, pWheelKeyListAllMsg);
24+
Issues.addIssueErr(tr, error_WheelKeyListAll);
2525
return false;
2626
});
2727

2828
if (wheelMinionsConnectedPromise != null) {
29-
wheelMinionsConnectedPromise.then((pWheelMinionsConnectedData) => {
29+
wheelMinionsConnectedPromise.then((ok_WheelMinionsConnected) => {
3030
Issues.removeCategory(pPanel, "not-connected");
31-
return pWheelMinionsConnectedData;
32-
}, (pWheelMinionsConnectedMsg) => {
31+
return ok_WheelMinionsConnected;
32+
}, (error_WheelMinionsConnected) => {
3333
Issues.removeCategory(pPanel, "not-connected");
3434
const tr = Issues.addIssue(pPanel, "not-connected", "retrieving-connected");
3535
Issues.addIssueMsg(tr, "Could not retrieve list of connected minions");
36-
Issues.addIssueErr(tr, pWheelMinionsConnectedMsg);
36+
Issues.addIssueErr(tr, error_WheelMinionsConnected);
3737
return false;
3838
});
3939
}

saltgui/static/scripts/issues/Schedules.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@ export class SchedulesIssues extends Issues {
1010

1111
const localScheduleListPromise = this.api.getLocalScheduleList(null);
1212

13-
localScheduleListPromise.then((pLocalScheduleListData) => {
13+
localScheduleListPromise.then((ok_LocalScheduleList) => {
1414
Issues.removeCategory(pPanel, "disabled-schedulers");
1515
Issues.removeCategory(pPanel, "disabled-schedules");
16-
SchedulesIssues._handleLocalScheduleList(pPanel, pLocalScheduleListData);
16+
SchedulesIssues._handleLocalScheduleList(pPanel, ok_LocalScheduleList);
1717
Issues.readyCategory(pPanel, msg);
1818
return true;
19-
}, (pLocalScheduleListMsg) => {
19+
}, (error_LocalScheduleList) => {
2020
Issues.removeCategory(pPanel, "disabled-schedulers");
2121
const tr1 = Issues.addIssue(pPanel, "disabled-schedulers", "retrieving");
2222
Issues.addIssueMsg(tr1, "Could not retrieve list of schedulers");
23-
Issues.addIssueErr(tr1, pLocalScheduleListMsg);
23+
Issues.addIssueErr(tr1, error_LocalScheduleList);
2424
Issues.removeCategory(pPanel, "disabled-schedules");
2525
const tr2 = Issues.addIssue(pPanel, "disabled-schedules", "retrieving");
2626
Issues.addIssueMsg(tr2, "Could not retrieve list of schedules");
27-
Issues.addIssueErr(tr2, pLocalScheduleListMsg);
27+
Issues.addIssueErr(tr2, error_LocalScheduleList);
2828
Issues.readyCategory(pPanel, msg);
2929
return false;
3030
});

saltgui/static/scripts/issues/State.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,26 @@ export class StateIssues extends Issues {
2323

2424
const runnerJobsListJobsPromise = this.api.getRunnerJobsListJobs(["state.apply", "state.highstate", "state.sls_id"]);
2525

26-
wheelKeyListAllPromise.then((pWheelKeyListAllData) => {
27-
runnerJobsListJobsPromise.then((pRunnerJobsListJobsData) => {
26+
wheelKeyListAllPromise.then((ok_WheelKeyListAll) => {
27+
runnerJobsListJobsPromise.then((ok_RunnerJobsListJobs) => {
2828
Issues.removeCategory(pPanel, "state");
29-
this._handleLowstateRunnerJobsListJobs(pPanel, pRunnerJobsListJobsData, pWheelKeyListAllData, msg);
29+
this._handleLowstateRunnerJobsListJobs(pPanel, ok_RunnerJobsListJobs, ok_WheelKeyListAll, msg);
3030
return true;
31-
}, (pRunnerJobsListJobsMsg) => {
31+
}, (error_RunnerJobsListJobs) => {
3232
Issues.removeCategory(pPanel, "state");
3333
const tr = Issues.addIssue(pPanel, "state", "retrieving");
3434
Issues.addIssueMsg(tr, "Could not retrieve list of jobs");
35-
Issues.addIssueErr(tr, pRunnerJobsListJobsMsg);
35+
Issues.addIssueErr(tr, error_RunnerJobsListJobs);
3636
Issues.readyCategory(pPanel, msg);
3737
return false;
3838
});
3939
return true;
40-
}, (pWheelKeyListAllMsg) => {
40+
}, (error_WheelKeyListAll) => {
4141
Utils.ignorePromise(runnerJobsListJobsPromise);
4242
Issues.removeCategory(pPanel, "state");
4343
const tr = Issues.addIssue(pPanel, "state", "retrieving");
4444
Issues.addIssueMsg(tr, "Could not retrieve list of keys");
45-
Issues.addIssueErr(tr, pWheelKeyListAllMsg);
45+
Issues.addIssueErr(tr, error_WheelKeyListAll);
4646
Issues.readyCategory(pPanel, msg);
4747
return false;
4848
});
@@ -86,13 +86,13 @@ export class StateIssues extends Issues {
8686
loopItem (pJob) {
8787
const runnerJobsListJobPromise = this.api.getRunnerJobsListJob(pJob.id);
8888

89-
return runnerJobsListJobPromise.then((pRunnerJobsListJobData) => {
90-
StateIssues._handleJobRunnerJobsListJob(this.panel, pRunnerJobsListJobData, this.keys);
89+
return runnerJobsListJobPromise.then((ok_RunnerJobsListJob) => {
90+
StateIssues._handleJobRunnerJobsListJob(this.panel, ok_RunnerJobsListJob, this.keys);
9191
return true;
92-
}, (pRunnerJobsListJobsMsg) => {
92+
}, (error_RunnerJobsListJobs) => {
9393
const tr = Issues.addIssue(this.panel, "state", "retrieving");
9494
Issues.addIssueMsg(tr, "Could not retrieve details of job " + pJob.id);
95-
Issues.addIssueErr(tr, pRunnerJobsListJobsMsg);
95+
Issues.addIssueErr(tr, error_RunnerJobsListJobs);
9696
// the remaining jobs will fail just the same
9797
return false;
9898
});

saltgui/static/scripts/panels/Beacons.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@ export class BeaconsPanel extends Panel {
2525

2626
this.nrMinions = 0;
2727

28-
wheelKeyListAllPromise.then((pWheelKeyListAllData) => {
29-
this._handleBeaconsWheelKeyListAll(pWheelKeyListAllData);
30-
localBeaconsListPromise.then((pLocalBeaconsListData) => {
31-
this.updateMinions(pLocalBeaconsListData);
28+
wheelKeyListAllPromise.then((ok_WheelKeyListAll) => {
29+
this._handleBeaconsWheelKeyListAll(ok_WheelKeyListAll);
30+
localBeaconsListPromise.then((ok_LocalBeaconsList) => {
31+
this.updateMinions(ok_LocalBeaconsList);
3232
return true;
33-
}, (pLocalBeaconsListMsg) => {
34-
const allMinionsErr = Utils.msgPerMinion(pWheelKeyListAllData.return[0].data.return.minions, JSON.stringify(pLocalBeaconsListMsg));
33+
}, (error_LocalBeaconsList) => {
34+
const allMinionsErr = Utils.msgPerMinion(ok_WheelKeyListAll.return[0].data.return.minions, JSON.stringify(error_LocalBeaconsList));
3535
this.updateMinions({"return": [allMinionsErr]});
3636
return false;
3737
});
3838
return true;
39-
}, (pWheelKeyListAllMsg) => {
40-
this._handleBeaconsWheelKeyListAll(JSON.stringify(pWheelKeyListAllMsg));
39+
}, (error_WheelKeyListAll) => {
40+
this._handleBeaconsWheelKeyListAll(JSON.stringify(error_WheelKeyListAll));
4141
Utils.ignorePromise(localBeaconsListPromise);
4242
return false;
4343
});

0 commit comments

Comments
 (0)