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

Replace query-params helper with hash #17404

Merged
merged 1 commit into from
Oct 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion ui/app/templates/components/database-connection.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
@secret=""
@mode="create"
@type="add"
@queryParams={{query-params [email protected] itemType="role"}}
@queryParams={{hash [email protected] itemType="role"}}
data-test-secret-create={{true}}
>
Add role
Expand Down
2 changes: 1 addition & 1 deletion ui/app/templates/components/database-role-edit.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
@secret={{concat "role/" @model.id}}
@mode="edit"
@replace={{true}}
@queryParams={{query-params itemType="role"}}
@queryParams={{hash itemType="role"}}
data-test-edit-link={{true}}
>
Edit role
Expand Down
2 changes: 1 addition & 1 deletion ui/app/templates/components/keymgmt/key-edit.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
@secret={{@model.id}}
@mode="edit"
@replace={{true}}
@queryParams={{query-params itemType="key"}}
@queryParams={{hash itemType="key"}}
@data-test-edit-link={{true}}
>
Edit key
Expand Down
4 changes: 2 additions & 2 deletions ui/app/templates/components/keymgmt/provider-edit.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
@secret={{@model.id}}
@mode="edit"
@replace={{true}}
@queryParams={{query-params itemType="provider"}}
@queryParams={{hash itemType="provider"}}
disabled={{(not @model.canEdit)}}
>
Update credentials
Expand Down Expand Up @@ -182,7 +182,7 @@
@title="No keys for this provider"
@message="Keys for this provider will be listed here. Add a key to get started."
>
<SecretLink @mode="create" @secret="" @queryParams={{query-params itemType="key"}} class="link">
<SecretLink @mode="create" @secret="" @queryParams={{hash itemType="key"}} class="link">
Create key
</SecretLink>
</EmptyState>
Expand Down
4 changes: 2 additions & 2 deletions ui/app/templates/components/pki/role-pki-edit.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<ToolbarSecretLink
@secret={{this.model.id}}
@mode="credentials"
@queryParams={{query-params action="issue"}}
@queryParams={{hash action="issue"}}
data-test-credentials-link={{true}}
>
Generate Certificate
Expand All @@ -45,7 +45,7 @@
<ToolbarSecretLink
@secret={{this.model.id}}
@mode="credentials"
@queryParams={{query-params action="sign"}}
@queryParams={{hash action="sign"}}
data-test-sign-link={{true}}
>
Sign Certificate
Expand Down
7 changes: 1 addition & 6 deletions ui/app/templates/components/secret-create-or-update.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +248,7 @@
</button>
</div>
<div class="control">
<SecretLink
@mode="show"
@secret={{@model.id}}
@queryParams={{query-params [email protected]}}
class="button"
>
<SecretLink @mode="show" @secret={{@model.id}} @queryParams={{hash [email protected]}} class="button">
Cancel
</SecretLink>
</div>
Expand Down
6 changes: 1 addition & 5 deletions ui/app/templates/components/secret-edit-toolbar.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,7 @@
{{#if @isV2}}
<ToolbarLink
{{! Always create new version from latest if no metadata read access }}
@params={{array
targetRoute
@model.id
(query-params version=(if @model.canReadMetadata @modelForData.version ""))
}}
@params={{array targetRoute @model.id (hash version=(if @model.canReadMetadata @modelForData.version ""))}}
data-test-secret-edit="true"
@replace={{true}}
@type="add"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<SecretLink
@mode="show"
@secret={{@itemPath}}
@queryParams={{query-params type=@modelType}}
@queryParams={{hash type=@modelType}}
class="has-text-black has-text-weight-semibold"
>
<Icon @name="file" class="has-text-grey-light" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<SecretLink
@mode="show"
@secret={{@item.id}}
@queryParams={{if (eq @backendModel.type "transform") (query-params tab="actions") ""}}
@queryParams={{if (eq @backendModel.type "transform") (hash tab="actions") ""}}
class="has-text-black has-text-weight-semibold"
>
<Icon @name="file" class="has-text-grey-light" />
Expand Down
6 changes: 3 additions & 3 deletions ui/app/templates/components/transit-form-show.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@secret={{@key.id}}
@mode="show"
@replace={{true}}
@queryParams={{query-params tab="actions"}}
@queryParams={{hash tab="actions"}}
data-test-transit-key-actions-link={{true}}
>
Key Actions
Expand All @@ -18,7 +18,7 @@
@secret={{@key.id}}
@mode="show"
@replace={{true}}
@queryParams={{query-params tab="details"}}
@queryParams={{hash tab="details"}}
data-test-transit-link="details"
>
Details
Expand All @@ -30,7 +30,7 @@
@secret={{@key.id}}
@mode="show"
@replace={{true}}
@queryParams={{query-params tab="versions"}}
@queryParams={{hash tab="versions"}}
data-test-transit-link="versions"
>
Versions
Expand Down
8 changes: 4 additions & 4 deletions ui/app/templates/vault/cluster/secrets/backend/list.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
@secret=""
@mode="create"
@type="add"
@queryParams={{query-params initialKey=(or this.filter this.baseKey.id) itemType=this.tab}}
@queryParams={{hash initialKey=(or this.filter this.baseKey.id) itemType=this.tab}}
data-test-secret-create={{true}}
>
Create Secret
Expand Down Expand Up @@ -76,7 +76,7 @@
@secret=""
@mode="create"
@type="add"
@queryParams={{query-params initialKey=(or this.filter this.baseKey.id) itemType=this.tab}}
@queryParams={{hash initialKey=(or this.filter this.baseKey.id) itemType=this.tab}}
data-test-secret-create={{true}}
>
{{options.create}}
Expand Down Expand Up @@ -136,7 +136,7 @@
<SecretLink
@mode="create"
@secret=""
@queryParams={{query-params initialKey=(or this.filter this.baseKey.id) itemType=this.tab}}
@queryParams={{hash initialKey=(or this.filter this.baseKey.id) itemType=this.tab}}
class="link"
>
{{options.create}}
Expand All @@ -150,7 +150,7 @@
<SecretLink
@mode="create"
@secret=""
@queryParams={{query-params initialKey=(or this.filter this.baseKey.id) itemType=this.tab}}
@queryParams={{hash initialKey=(or this.filter this.baseKey.id) itemType=this.tab}}
class="link"
>
{{options.create}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<SecretLink
@mode="create"
@secret=""
@queryParams={{query-params initialKey=(or this.filter this.baseKey.id) itemType=this.tab}}
@queryParams={{hash initialKey=(or this.filter this.baseKey.id) itemType=this.tab}}
class="link"
data-test-secret-create="connections"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@secret={{this.model.id}}
@mode="show"
@replace={{true}}
@queryParams={{query-params tab="actions"}}
@queryParams={{hash tab="actions"}}
data-test-transit-link="actions"
>
<Icon @name="arrow-left" />
Expand All @@ -35,7 +35,7 @@
<SecretLink
@mode="actions"
@secret={{this.model.id}}
@queryParams={{query-params action=supportedAction.name}}
@queryParams={{hash action=supportedAction.name}}
data-test-transit-action-link={{supportedAction.name}}
>
{{#if (eq supportedAction.name "export")}}
Expand Down
4 changes: 2 additions & 2 deletions ui/app/templates/vault/cluster/secrets/backend/versions.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
@mode="show"
@secret={{this.model.id}}
class="has-text-black has-text-weight-semibold"
@queryParams={{query-params version=list.item.version}}
@queryParams={{hash version=list.item.version}}
>
View version
{{list.item.version}}
Expand All @@ -98,7 +98,7 @@
@mode="edit"
@secret={{this.model.id}}
class="has-text-black has-text-weight-semibold"
@queryParams={{query-params version=list.item.version}}
@queryParams={{hash version=list.item.version}}
>
Create new version from
{{list.item.version}}
Expand Down