Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Nomad
Commits
fe315fe6
Commit
fe315fe6
authored
6 years ago
by
Michael Lange
Browse files
Options
Download
Email Patches
Plain Diff
Address an issue with certain dependent keys
parent
ae0bf90b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ui/app/controllers/jobs/index.js
+11
-15
ui/app/controllers/jobs/index.js
with
11 additions
and
15 deletions
+11
-15
ui/app/controllers/jobs/index.js
+
11
-
15
View file @
fe315fe6
...
...
@@ -32,21 +32,17 @@ export default Controller.extend(Sortable, Searchable, {
Filtered jobs are those that match the selected namespace and aren't children
of periodic or parameterized jobs.
*/
filteredJobs
:
computed
(
'
model.[]
'
,
'
model.@each.parent
'
,
'
system.activeNamespace
'
,
'
system.namespaces.length
'
,
function
()
{
const
hasNamespaces
=
this
.
get
(
'
system.namespaces.length
'
);
const
activeNamespace
=
this
.
get
(
'
system.activeNamespace.id
'
)
||
'
default
'
;
return
this
.
get
(
'
model
'
)
.
compact
()
.
filter
(
job
=>
!
hasNamespaces
||
job
.
get
(
'
namespace.id
'
)
===
activeNamespace
)
.
filter
(
job
=>
!
job
.
get
(
'
parent.content
'
));
}
),
filteredJobs
:
computed
(
'
model.[]
'
,
'
model.@each.parent
'
,
function
()
{
// Namespace related properties are ommitted from the dependent keys
// due to a prop invalidation bug caused by region switching.
const
hasNamespaces
=
this
.
get
(
'
system.namespaces.length
'
);
const
activeNamespace
=
this
.
get
(
'
system.activeNamespace.id
'
)
||
'
default
'
;
return
this
.
get
(
'
model
'
)
.
compact
()
.
filter
(
job
=>
!
hasNamespaces
||
job
.
get
(
'
namespace.id
'
)
===
activeNamespace
)
.
filter
(
job
=>
!
job
.
get
(
'
parent.content
'
));
}),
listToSort
:
alias
(
'
filteredJobs
'
),
listToSearch
:
alias
(
'
listSorted
'
),
...
...
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