Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Nomad
Commits
f757f619
Unverified
Commit
f757f619
authored
3 years ago
by
Luiz Aoqui
Committed by
GitHub
3 years ago
Browse files
Options
Download
Email Patches
Plain Diff
ui: set * as the default namespace selector (#11357)
parent
6412e77c
Branches unavailable
v1.4.3
v1.4.2
v1.4.1
v1.4.0
v1.4.0-rc.1
v1.4.0-beta.1
v1.3.8
v1.3.7
v1.3.6
v1.3.5
v1.3.4
v1.3.3
v1.3.2
v1.3.1
v1.3.0
v1.3.0-rc.1
v1.3.0-beta.1
v1.2.15
v1.2.14
v1.2.13
v1.2.12
v1.2.11
v1.2.10
v1.2.9
v1.2.8
v1.2.7
v1.2.6
v1.2.5
v1.2.4
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.2.0-rc1
nightly
No related merge requests found
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
.changelog/11357.txt
+3
-0
.changelog/11357.txt
ui/app/controllers/csi/volumes/index.js
+1
-1
ui/app/controllers/csi/volumes/index.js
ui/app/controllers/jobs/index.js
+1
-1
ui/app/controllers/jobs/index.js
ui/app/controllers/optimize.js
+1
-1
ui/app/controllers/optimize.js
ui/tests/acceptance/jobs-list-test.js
+3
-0
ui/tests/acceptance/jobs-list-test.js
ui/tests/acceptance/optimize-test.js
+1
-1
ui/tests/acceptance/optimize-test.js
ui/tests/acceptance/task-detail-test.js
+1
-1
ui/tests/acceptance/task-detail-test.js
ui/tests/acceptance/volumes-list-test.js
+3
-0
ui/tests/acceptance/volumes-list-test.js
with
14 additions
and
5 deletions
+14
-5
.changelog/11357.txt
0 → 100644
+
3
-
0
View file @
f757f619
```release-note:improvement
ui: Display jobs from all namespaces by default
```
This diff is collapsed.
Click to expand it.
ui/app/controllers/csi/volumes/index.js
+
1
-
1
View file @
f757f619
...
...
@@ -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
||
'
*
'
);
});
}
...
...
This diff is collapsed.
Click to expand it.
ui/app/controllers/jobs/index.js
+
1
-
1
View file @
f757f619
...
...
@@ -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
||
'
*
'
);
});
}
...
...
This diff is collapsed.
Click to expand it.
ui/app/controllers/optimize.js
+
1
-
1
View file @
f757f619
...
...
@@ -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
||
'
*
'
;
});
}
...
...
This diff is collapsed.
Click to expand it.
ui/tests/acceptance/jobs-list-test.js
+
3
-
0
View file @
f757f619
...
...
@@ -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
'
);
...
...
This diff is collapsed.
Click to expand it.
ui/tests/acceptance/optimize-test.js
+
1
-
1
View file @
f757f619
...
...
@@ -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
);
});
...
...
This diff is collapsed.
Click to expand it.
ui/tests/acceptance/task-detail-test.js
+
1
-
1
View file @
f757f619
...
...
@@ -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
();
...
...
This diff is collapsed.
Click to expand it.
ui/tests/acceptance/volumes-list-test.js
+
3
-
0
View file @
f757f619
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help