open-nomad/ui/app/controllers/jobs/run.js
Phil Renaud 84a59ff059
[ui] Fix a bug where redirects after planning/editing a job didn't include namespace (#13588)
* Job editing and planning handles namespace as part of ID instead of queryParam

* Changelog added

* Tests updated to reflect new namespace redirects
2022-07-05 15:58:56 -04:00

10 lines
283 B
JavaScript

import Controller from '@ember/controller';
import { inject as service } from '@ember/service';
export default class RunController extends Controller {
@service router;
onSubmit(id, namespace) {
this.router.transitionTo('jobs.job', `${id}@${namespace || 'default'}`);
}
}