Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.

Commit dea9bfc

Browse files
authored
Merge pull request #12 from rundeck-plugins/issue/11
Fix #11 handle unsuccessful results
2 parents 333d47c + c7a115f commit dea9bfc

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

rundeck-execution-mode-timer/src/main/resources/js/editProject.js

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,23 @@ jQuery(function () {
1010
var pluginName = RDPLUGIN['exec-mode-ui'];
1111
var pluginBase = rundeckPage.pluginBaseUrl(pluginName);
1212

13-
console.log(pagePath)
14-
15-
if(pagePath == 'menu/projectHome'){
13+
if(pagePath === 'menu/projectHome'){
1614
var project = rundeckPage.project();
1715
var status = getProjectStatus(project)
1816
var messages = []
1917

20-
if(status.execution.active){
18+
if(status && status.execution && status.execution.active){
2119
messages.push(status.execution.msg)
2220
}
2321

24-
if(status.schedule.active){
22+
if(status && status.schedule && status.schedule.active){
2523
messages.push(status.schedule.msg)
2624

2725
}
2826
appendListMessage(messages)
2927
}
3028

31-
if (pagePath == 'framework/editProject') {
29+
if (pagePath === 'framework/editProject') {
3230

3331
jQuery(".projectConfigurableTitle").css('font-weight', 'bold');
3432
jQuery(".projectConfigurableTitle").after("<br>");
@@ -39,11 +37,11 @@ jQuery(function () {
3937
var status = getProjectStatus(project)
4038
var messages = []
4139

42-
if(status.execution.active){
40+
if(status && status.execution && status.execution.active){
4341
messages.push(status.execution.msg)
4442
}
4543

46-
if(status.schedule.active){
44+
if(status && status.schedule && status.schedule.active){
4745
messages.push(status.schedule.msg)
4846

4947
}
@@ -200,14 +198,14 @@ jQuery(function () {
200198
var action = null
201199

202200
if(type == "execution"){
203-
if(status.execution.active == true){
201+
if(status && status.execution && status.execution.active == true){
204202
msg = status.execution.msg
205203
action = status.execution.action
206204
}
207205
}
208206

209207
if(type == "schedule"){
210-
if(status.schedule.active == true){
208+
if(status && status.schedule && status.schedule.active == true){
211209
msg = status.schedule.msg
212210
action = status.schedule.action
213211
}

rundeck-execution-mode-timer/src/main/resources/js/executionMode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jQuery(function () {
100100
var activeLaterValue = ""
101101
var passiveLaterValue = ""
102102

103-
if(savedValues.active){
103+
if(savedValues && savedValues.active){
104104
if(savedValues.action == "disable"){
105105
passiveLater = true
106106
passiveLaterValue = savedValues.value

0 commit comments

Comments
 (0)