Skip to content

Commit

Permalink
chore: modify message
Browse files Browse the repository at this point in the history
  • Loading branch information
roggervalf committed May 3, 2024
1 parent b276c5b commit e4d8fb2
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions public/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,18 +210,22 @@ $(document).ready(() => {
queueState,
};

$bulkActionContainer.each((index, value) => {
const isChecked = $(value).find('[name=jobChecked]').is(':checked');
const id = encodeURIComponent($(value).find('[name=jobId]').val());
if (action !== 'clean') {
$bulkActionContainer.each((index, value) => {
const isChecked = $(value).find('[name=jobChecked]').is(':checked');
const id = encodeURIComponent($(value).find('[name=jobId]').val());

if (isChecked) {
data.jobs.push(id);
}
});
}

if (isChecked) {
data.jobs.push(id);
}
});
const count = action === 'clean' ? 1000 : data.jobs.length;

const r = window.confirm(
`${capitalize(action)} ${data.jobs.length} ${
data.jobs.length > 1 ? 'jobs' : 'job'
`${capitalize(action)} ${count} ${
count > 1 ? 'jobs' : 'job'
} in queue "${queueHost}/${queueName}"?`
);
if (r) {
Expand Down

0 comments on commit e4d8fb2

Please sign in to comment.