Skip to content

Commit 75c34be

Browse files
committed
more places
1 parent f37738f commit 75c34be

File tree

6 files changed

+25
-10
lines changed

6 files changed

+25
-10
lines changed

core/src/main/resources/hudson/views/BuildButtonColumn/column.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@
2323
Task_scheduled={0} scheduled
2424
Schedule_a_task=Schedule a {1} for {0}
2525
Schedule_a_task_with_parameters=Schedule a {1} with parameters for {0}
26-
Task_schedule_failed=Failed to schedule build for {0}.
26+
Task_schedule_failed=Failed to schedule build for {0}

core/src/main/resources/hudson/views/BuildButtonColumn/icon.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ Behaviour.specify(
1515
headers: crumb.wrap({}),
1616
}).then((rsp) => {
1717
if (rsp.ok) {
18-
notificationBar.show(message,notificationBar.SUCCESS);
18+
notificationBar.show(message, notificationBar.SUCCESS);
1919
} else {
20-
notificationBar.show(failure, notificationBar.ERROR)
20+
notificationBar.show(failure, notificationBar.ERROR);
2121
}
2222
});
2323
return false;

core/src/main/resources/lib/hudson/project/configurable/configurable.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
headers: crumb.wrap({}),
1212
}).then((rsp) => {
1313
if (rsp.ok) {
14-
notificationBar.show(success,notificationBar.SUCCESS);
14+
notificationBar.show(success, notificationBar.SUCCESS);
1515
} else {
16-
notificationBar.show(failure, notificationBar.ERROR)
16+
notificationBar.show(failure, notificationBar.ERROR);
1717
}
1818
});
1919
ev.preventDefault();

core/src/main/resources/lib/layout/task.jelly

+1
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ THE SOFTWARE.
186186
href="${href}"
187187
class="task-link task-link-no-confirm ${isCurrent ? 'task-link--active' : ''}"
188188
data-task-success="${%Done.}"
189+
data-task-failure="${%Failed.}"
189190
data-task-post="${attrs.post}"
190191
ATTRIBUTES="${attrs}"
191192
EXCEPT="badge confirmationMessage contextMenu destructive enabled href icon permission permissions post requiresConfirmation title">

core/src/main/resources/lib/layout/task/task.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Behaviour.specify("a.task-link-no-confirm", "task-link", 0, function (el) {
66
let post = el.dataset.taskPost;
77
let callback = el.dataset.callback;
88
let success = el.dataset.taskSuccess;
9+
let failure = el.dataset.taskFailure;
910
let href = el.href;
1011

1112
if (callback !== undefined) {
@@ -20,8 +21,13 @@ Behaviour.specify("a.task-link-no-confirm", "task-link", 0, function (el) {
2021
fetch(href, {
2122
method: "post",
2223
headers: crumb.wrap({}),
24+
}).then((rsp) => {
25+
if (rsp.ok) {
26+
notificationBar(success, notificationBar.SUCCESS);
27+
} else {
28+
notificationBar(failure, notificationBar.ERROR);
29+
}
2330
});
24-
hoverNotification(success, el.parentNode);
2531
ev.preventDefault();
2632
};
2733
}

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

+12-4
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,19 @@ function mapChildrenItemsToDropdownItems(items) {
105105
fetch(item.url, {
106106
method: "post",
107107
headers: crumb.wrap({}),
108+
}).then((rsp) => {
109+
if (rsp.ok) {
110+
notificationBar.show(
111+
item.displayName + ": Done.",
112+
notificationBar.SUCCESS,
113+
);
114+
} else {
115+
notificationBar.show(
116+
item.displayName + ": Failed.",
117+
notificationBar.ERROR,
118+
);
119+
}
108120
});
109-
notificationBar.show(
110-
item.displayName + ": Done.",
111-
notificationBar.SUCCESS,
112-
);
113121
}
114122
}
115123
},

0 commit comments

Comments
 (0)