ui: set * as the default namespace selector (#11357)
This commit is contained in:
parent
dceeccfc5d
commit
362c8c54f4
|
@ -0,0 +1,3 @@
|
|||
```release-note:improvement
|
||||
ui: Display jobs from all namespaces by default
|
||||
```
|
|
@ -80,7 +80,7 @@ export default class IndexController extends Controller.extend(
|
|||
// eslint-disable-next-line ember/no-incorrect-calls-with-inline-anonymous-functions
|
||||
scheduleOnce('actions', () => {
|
||||
// eslint-disable-next-line ember/no-side-effects
|
||||
this.set('qpNamespace', this.system.cachedNamespace || 'default');
|
||||
this.set('qpNamespace', this.system.cachedNamespace || '*');
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -169,7 +169,7 @@ export default class IndexController extends Controller.extend(Sortable, Searcha
|
|||
if (!availableNamespaces.mapBy('key').includes(this.qpNamespace)) {
|
||||
scheduleOnce('actions', () => {
|
||||
// eslint-disable-next-line ember/no-side-effects
|
||||
this.set('qpNamespace', this.system.cachedNamespace || 'default');
|
||||
this.set('qpNamespace', this.system.cachedNamespace || '*');
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ export default class OptimizeController extends Controller {
|
|||
if (!availableNamespaces.mapBy('key').includes(this.qpNamespace)) {
|
||||
scheduleOnce('actions', () => {
|
||||
// eslint-disable-next-line ember/no-side-effects
|
||||
this.qpNamespace = this.system.cachedNamespace || 'default';
|
||||
this.qpNamespace = this.system.cachedNamespace || '*';
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -162,7 +162,10 @@ module('Acceptance | jobs list', function(hooks) {
|
|||
const job2 = server.create('job', { namespaceId: server.db.namespaces[1].id });
|
||||
|
||||
await JobsList.visit();
|
||||
assert.equal(JobsList.jobs.length, 2, 'All jobs by default');
|
||||
|
||||
const firstNamespace = server.db.namespaces[0];
|
||||
await JobsList.visit({ namespace: firstNamespace.id });
|
||||
assert.equal(JobsList.jobs.length, 1, 'One job in the default namespace');
|
||||
assert.equal(JobsList.jobs.objectAt(0).name, job1.name, 'The correct job is shown');
|
||||
|
||||
|
|
|
@ -359,7 +359,7 @@ module('Acceptance | optimize', function(hooks) {
|
|||
window.localStorage.nomadTokenSecret = clientToken.secretId;
|
||||
await Optimize.visit();
|
||||
|
||||
assert.equal(currentURL(), '/jobs?namespace=default');
|
||||
assert.equal(currentURL(), '/jobs?namespace=*');
|
||||
assert.ok(Layout.gutter.optimize.isHidden);
|
||||
});
|
||||
|
||||
|
|
|
@ -298,7 +298,7 @@ module('Acceptance | task detail (different namespace)', function(hooks) {
|
|||
const job = server.db.jobs.find(jobId);
|
||||
|
||||
await Layout.breadcrumbFor('jobs.index').visit();
|
||||
assert.equal(currentURL(), '/jobs?namespace=default', 'Jobs breadcrumb links correctly');
|
||||
assert.equal(currentURL(), '/jobs?namespace=*', 'Jobs breadcrumb links correctly');
|
||||
|
||||
await Task.visit({ id: allocation.id, name: task.name });
|
||||
await Layout.breadcrumbFor('jobs.job.index').visit();
|
||||
|
|
|
@ -156,7 +156,10 @@ module('Acceptance | volumes list', function(hooks) {
|
|||
const volume2 = server.create('csi-volume', { namespaceId: server.db.namespaces[1].id });
|
||||
|
||||
await VolumesList.visit();
|
||||
assert.equal(VolumesList.volumes.length, 2);
|
||||
|
||||
const firstNamespace = server.db.namespaces[0];
|
||||
await VolumesList.visit({ namespace: firstNamespace.id });
|
||||
assert.equal(VolumesList.volumes.length, 1);
|
||||
assert.equal(VolumesList.volumes.objectAt(0).name, volume1.id);
|
||||
|
||||
|
|
Loading…
Reference in New Issue