Skip to content
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: Implement new policy SS + modal designs #17749

Merged
merged 35 commits into from
Nov 19, 2022
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
ca57d91
refactor ss+modal to accept multiple models
hellobontempo Oct 26, 2022
8bfe0ac
create policy form
hellobontempo Oct 31, 2022
81762c8
cleanup and fix test
hellobontempo Oct 31, 2022
b901de6
add tabs to policy modal form
hellobontempo Nov 1, 2022
0f535f5
add search select with modal to entity form
hellobontempo Nov 1, 2022
8c8147b
update group form;
hellobontempo Nov 1, 2022
8f8e77c
allow modal to fit-content
hellobontempo Nov 1, 2022
232a529
add changelog
hellobontempo Nov 1, 2022
4f23b7c
add check for policy create ability
hellobontempo Nov 1, 2022
cb2a708
add id so tests pass
hellobontempo Nov 2, 2022
1160dc7
filter out root option
hellobontempo Nov 2, 2022
f44ba2a
fix test
hellobontempo Nov 2, 2022
0abf3c1
add cleanup method
hellobontempo Nov 2, 2022
73e1f2f
add ACL policy link
hellobontempo Nov 2, 2022
5253a3e
cleanup from comments
hellobontempo Nov 7, 2022
258346b
refactor sending action to parent
hellobontempo Nov 7, 2022
96cea9f
refactor, data down actions up!
hellobontempo Nov 8, 2022
e92cc18
cleanup comments
hellobontempo Nov 15, 2022
8f92621
form field refactor
hellobontempo Nov 15, 2022
f895d10
resolve conflicts
hellobontempo Nov 16, 2022
68768ae
add ternary to options
hellobontempo Nov 16, 2022
4480068
update tests
hellobontempo Nov 16, 2022
e9f0d90
Remodel component structure for clearer logic
hashishaw Nov 18, 2022
5ad89b4
address comments
hellobontempo Nov 18, 2022
8210e50
cleanup args
hellobontempo Nov 18, 2022
0af2e26
refactor inline oidc assignment form
hellobontempo Nov 18, 2022
79a6972
Merge branch 'main' into ui/VAULT-9447/policy-ss-modal-part-2
hellobontempo Nov 18, 2022
7b25851
add line break
hellobontempo Nov 18, 2022
9ba291c
cleanup comments
hellobontempo Nov 18, 2022
9ef6534
fix tests
hellobontempo Nov 18, 2022
b2918ea
add policy template to ss+modal test
hellobontempo Nov 18, 2022
616e9f9
cleanup =true from test
hellobontempo Nov 19, 2022
5eaf353
final cleanup!!!!!!
hellobontempo Nov 19, 2022
fe770b5
actual final cleanup
hellobontempo Nov 19, 2022
960e425
fix typo, please be done
hellobontempo Nov 19, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
cleanup comments
  • Loading branch information
hellobontempo committed Nov 15, 2022
commit e92cc18da00dea4e1a4306fbfcfac85d14b775c6
10 changes: 6 additions & 4 deletions ui/app/components/oidc/assignment-form.js
Original file line number Diff line number Diff line change
@@ -15,11 +15,13 @@ import { tracked } from '@glimmer/tracking';
* @onSave={transition-to "vault.cluster.access.oidc.assignments.assignment.details" this.model.name}
* />
* ```
* @callback onCancel
* @callback onSave

* @param {object} model - The parent's model
* @param {string} onCancel - callback triggered when cancel button is clicked
* @param {string} onSave - callback triggered when save button is clicked
* @callback {string} onCancel - callback triggered when cancel button is clicked
* @callback {string} onSave - callback triggered when save button is clicked
* * params when form renders within search-select-with-modal.hbs:
* @callback createSearchSelectModel - callback to fire when new item is selected to create in SS+Modal
*
*/

export default class OidcAssignmentFormComponent extends Component {
7 changes: 3 additions & 4 deletions ui/app/components/oidc/client-form.js
Original file line number Diff line number Diff line change
@@ -11,12 +11,10 @@ import { task } from 'ember-concurrency';
* ```js
* <OidcClientForm @model={{this.model}} />
* ```
* @param {Object} model - oidc client model
* @callback onCancel - callback triggered when cancel button is clicked
* @callback onSave - callback triggered on save success
* @param {Object} model - oidc client model
* @param {boolean} [isInline=false] - true when form is rendered within a modal
* * search-select-with-modal.hbs template-specific params:
* @callback createSearchSelectModel - callback fired when new item is selected to create in SS+Modal
*/

export default class OidcClientForm extends Component {
@@ -25,7 +23,7 @@ export default class OidcClientForm extends Component {
@tracked modelValidations;
@tracked errorBanner;
@tracked invalidFormAlert;
@tracked assignmentModel; // model passed to form rendered by ss+modal
@tracked assignmentModel; // model for form rendered by ss+modal
@tracked radioCardGroupValue =
!this.args.model.assignments || this.args.model.assignments.includes('allow_all')
? 'allow_all'
@@ -40,6 +38,7 @@ export default class OidcClientForm extends Component {
}
}

// callback fired by SS+Modal when new item is selected to create
@action
createSearchSelectModel({ name }) {
if (name) {
4 changes: 2 additions & 2 deletions ui/app/components/policy-form.js
Original file line number Diff line number Diff line change
@@ -20,9 +20,9 @@ import trimRight from 'vault/utils/trim-right';
* @callback onSave - callback triggered when save button is clicked
* @param {object} model - ember data model from createRecord
* @param {boolean} [isInline=false] - true when form is rendered within a modal
* * search-select-with-modal.hbs template-specific params:
* * params when form renders within search-select-with-modal.hbs:
* @param {object} [nameInput] - search input from SS passed as name attr when firing createSearchSelectModel callback
* @callback createSearchSelectModel - callback triggered when policy type is selected
* @callback createSearchSelectModel - callback to fire when new item is selected to create in SS+Modal
*/

export default class PolicyFormComponent extends Component {