mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
Change job search navigation to use id (#8560)
This fixes #8548. It was a significant oversight to use the name instead of the id!
This commit is contained in:
@@ -92,7 +92,7 @@ export default class GlobalSearchControl extends Component {
|
||||
const itemModelName = model.constructor.modelName;
|
||||
|
||||
if (itemModelName === 'job') {
|
||||
this.router.transitionTo('jobs.job', model.name, {
|
||||
this.router.transitionTo('jobs.job', model.plainId, {
|
||||
queryParams: { namespace: model.get('namespace.name') },
|
||||
});
|
||||
} else if (itemModelName === 'node') {
|
||||
|
||||
@@ -22,7 +22,7 @@ module('Acceptance | search', function(hooks) {
|
||||
const otherNode = server.create('node', { name: 'aaa' });
|
||||
|
||||
server.create('job', { id: 'vwxyz', namespaceId: 'default' });
|
||||
server.create('job', { id: 'xyz', namespace: 'default' });
|
||||
server.create('job', { id: 'xyz', name: 'xyz job', namespace: 'default' });
|
||||
server.create('job', { id: 'abc', namespace: 'default' });
|
||||
|
||||
await visit('/');
|
||||
@@ -43,7 +43,7 @@ module('Acceptance | search', function(hooks) {
|
||||
search.groups[0].as(jobs => {
|
||||
assert.equal(jobs.name, 'Jobs (2)');
|
||||
assert.equal(jobs.options.length, 2);
|
||||
assert.equal(jobs.options[0].text, 'xyz');
|
||||
assert.equal(jobs.options[0].text, 'xyz job');
|
||||
assert.equal(jobs.options[1].text, 'vwxyz');
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user