From dd381f8fdeaa1709ae851b26d1c0b9ba8d77dd3c Mon Sep 17 00:00:00 2001 From: hc-github-team-nomad-core <82989552+hc-github-team-nomad-core@users.noreply.github.com> Date: Wed, 29 Nov 2023 08:34:33 -0600 Subject: [PATCH] backport of commit 2e254112f555c73eca98b0b7d599cd8e58ddf3a7 (#19143) Co-authored-by: Phil Renaud --- .changelog/19139.txt | 3 +++ ui/app/adapters/job.js | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .changelog/19139.txt diff --git a/.changelog/19139.txt b/.changelog/19139.txt new file mode 100644 index 000000000..4fa892b24 --- /dev/null +++ b/.changelog/19139.txt @@ -0,0 +1,3 @@ +```release-note:bug +ui: Fixed an issue where purging a job with a namespace did not process correctly +``` diff --git a/ui/app/adapters/job.js b/ui/app/adapters/job.js index 8c4d9c3da..de7c71eb6 100644 --- a/ui/app/adapters/job.js +++ b/ui/app/adapters/job.js @@ -44,7 +44,12 @@ export default class JobAdapter extends WatchableNamespaceIDs { } purge(job) { - const url = this.urlForFindRecord(job.get('id'), 'job') + '?purge=true'; + const url = addToPath( + this.urlForFindRecord(job.get('id'), 'job'), + '', + 'purge=true' + ); + return this.ajax(url, 'DELETE'); }