-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI: Namespaces redesign #10444
Merged
Merged
UI: Namespaces redesign #10444
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
d08fd8d
New single select dropdown in the style of multiselect
DingoEatingFuzz 7921a00
Add single select dropdown story
DingoEatingFuzz 1ec464b
Style the single select dropdown
DingoEatingFuzz 33e14cd
Rename multi-select-dropdown stories to filter-facets stories
DingoEatingFuzz 8de3cc9
Modernize: use 'this.' when accessing properties in templates
DingoEatingFuzz 09594ee
Stories for single select dropdown
DingoEatingFuzz 6bc9e99
Test coverage for the single select dropdown component
DingoEatingFuzz 3cf82ae
Remove namespace selection from the system service
DingoEatingFuzz cc17102
Remove system.activeNamespace lookups from everywhere
DingoEatingFuzz 64bcf19
Rewrite abilities to assume a provided namespace instead of a system-…
DingoEatingFuzz 698e91e
Remove the namespace selector from the gutter menu
DingoEatingFuzz ba1a163
Correct unit tests for the namespaces change
DingoEatingFuzz 0b1635d
Namespaces tests triage
DingoEatingFuzz ece819a
Remove top-level jobs namespace qp in favor of jobs list and jobs.job…
DingoEatingFuzz d5e3a29
Support namespaces wildcard in mirage
DingoEatingFuzz e8112a0
Properly watch namespaced records
DingoEatingFuzz a821ea3
Load related resources now that jobs and namesapces aren't guaranteed…
DingoEatingFuzz 76322f1
Correct tests now that namespace logic has been moved into the jobs i…
DingoEatingFuzz d86b08e
Mirage: support namespace=* for volumes
DingoEatingFuzz 1b31b7a
Mirage: no longer need 501 support for namespaces
DingoEatingFuzz 8b28da2
Add the namespaces facet to the volumes list page
DingoEatingFuzz 1dde3de
Mirage: Properly handle namespaces in volume getter
DingoEatingFuzz 9952600
Require the namespace query param on volume detail pages
DingoEatingFuzz bc16d6e
Replace the all namespaces toggle with a namespaces dropdown on the o…
DingoEatingFuzz 99edf9b
Add namespace facet tests to all impacted pages
DingoEatingFuzz 5812852
Always show the namespace facet, even when getting a forbidden error
DingoEatingFuzz af91fa1
Include namespace in job and volume rows when a cluster has namespaces
DingoEatingFuzz 017fe38
Persist namespace selection across pages that have a namespace filter
DingoEatingFuzz 7bef355
Add the DAS feature to the smallCluster scenario
DingoEatingFuzz 4fa121a
Volume controller linting (prettier conflict)
DingoEatingFuzz a81e2b8
Document the new cachedNamespace system service property
DingoEatingFuzz 735f056
Guard against no namespace passed into a can/cannot helper
DingoEatingFuzz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<div data-test-single-select-dropdown class="dropdown" ...attributes> | ||
<PowerSelect | ||
@options={{@options}} | ||
@selected={{this.activeOption}} | ||
@searchEnabled={{gt @options.length 10}} | ||
@searchField="label" | ||
@onChange={{action this.setSelection}} | ||
@dropdownClass="dropdown-options" | ||
as |option|> | ||
<span class="ember-power-select-prefix">{{@label}}: </span> | ||
<span class="dropdown-label" data-test-dropdown-option={{option.key}}>{{option.label}}</span> | ||
</PowerSelect> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import Component from '@glimmer/component'; | ||
import { action } from '@ember/object'; | ||
|
||
export default class SingleSelectDropdown extends Component { | ||
get activeOption() { | ||
return this.args.options.findBy('key', this.args.selection); | ||
} | ||
|
||
@action | ||
setSelection({ key }) { | ||
this.args.onSelect && this.args.onSelect(key); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,5 @@ | ||
import Controller from '@ember/controller'; | ||
|
||
export default class VolumesController extends Controller { | ||
queryParams = [ | ||
{ | ||
volumeNamespace: 'namespace', | ||
}, | ||
]; | ||
|
||
isForbidden = false; | ||
|
||
volumeNamespace = 'default'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,3 @@ | ||
import { inject as service } from '@ember/service'; | ||
import Controller from '@ember/controller'; | ||
|
||
export default class JobsController extends Controller { | ||
@service system; | ||
|
||
queryParams = [ | ||
{ | ||
jobNamespace: 'namespace', | ||
}, | ||
]; | ||
|
||
isForbidden = false; | ||
|
||
jobNamespace = 'default'; | ||
} | ||
export default class JobsController extends Controller {} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
activeNamespace
was previously set in our models based on query parameters. We're noticing that we can't detect namespace-specific policy capabilities (with ACL's).Should we continue the behavior of setting
system.activeNamespace
in our models to grab namespaces from the query params.Also, since we're setting
namespace
todefault
on line 17, what's the purpose of the control flow logic on lines 19-22.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can set this value based on
qpNamespace