Icu 15713 address deprecation warning for dropdown interactive element (#2561)

This commit is contained in:
Dharini Jeeva authored and GitHub committed 2024-11-19 11:32:06 -08:00
1 parent 4523615829
commit 415f638028
32 files changed
+162 -173

No files matched your search

@@ -6,10 +6,8 @@
{{#if (can 'delete account' @model)}}
<Hds::Dropdown data-test-manage-account-auth-method as |dd|>
<dd.ToggleButton @text={{t 'actions.manage'}} @color='secondary' />
<dd.Interactive
@text={{t 'resources.account.actions.delete'}}
@color='critical'
{{on 'click' (fn @delete @model)}}
/>
<dd.Interactive @color='critical' {{on 'click' (fn @delete @model)}}>{{t
'resources.account.actions.delete'
}}</dd.Interactive>
</Hds::Dropdown>
{{/if}}
@@ -43,39 +43,37 @@
<Hds::Dropdown data-test-manage-auth-method as |dd|>
<dd.ToggleButton @text={{t 'actions.manage'}} @color='secondary' />
{{#if @model.isPrimary}}
<dd.Interactive
@text={{t 'resources.auth-method.actions.remove-as-primary'}}
{{on 'click' (fn @removeAsPrimary @model)}}
/>
<dd.Interactive {{on 'click' (fn @removeAsPrimary @model)}}>
{{t 'resources.auth-method.actions.remove-as-primary'}}
</dd.Interactive>
{{else}}
<dd.Interactive
@text={{t 'resources.auth-method.actions.make-primary'}}
{{on 'click' (fn @makePrimary @model)}}
/>
<dd.Interactive {{on 'click' (fn @makePrimary @model)}}>
{{t 'resources.auth-method.actions.make-primary'}}
</dd.Interactive>
{{/if}}
{{#if (can 'create model' @model collection='accounts')}}
<dd.Interactive
@text={{t 'resources.account.actions.create'}}
@route='scopes.scope.auth-methods.auth-method.accounts.new'
@model={{@model}}
/>
>
{{t 'resources.account.actions.create'}}
</dd.Interactive>
{{/if}}
{{#if (can 'create model' @model collection='managed-groups')}}
{{#if (or @model.isOIDC @model.isLDAP)}}
<dd.Interactive
@text={{t 'resources.managed-group.actions.create'}}
@route='scopes.scope.auth-methods.auth-method.managed-groups.new'
@model={{@model}}
/>
>
{{t 'resources.managed-group.actions.create'}}
</dd.Interactive>
{{/if}}
{{/if}}
{{#if (can 'delete auth-method' @model)}}
<dd.Separator />
<dd.Interactive
@text={{t 'resources.auth-method.actions.delete'}}
@color='critical'
{{on 'click' (fn @delete @model)}}
/>
<dd.Interactive @color='critical' {{on 'click' (fn @delete @model)}}>
{{t 'resources.auth-method.actions.delete'}}
</dd.Interactive>
{{/if}}
</Hds::Dropdown>
@@ -6,10 +6,8 @@
{{#if (can 'delete model' @model)}}
<Hds::Dropdown data-test-managed-group-dropdown as |dd|>
<dd.ToggleButton @text={{t 'actions.manage'}} @color='secondary' />
<dd.Interactive
@text={{t 'resources.managed-group.actions.delete'}}
@color='critical'
{{on 'click' (fn @delete @model)}}
/>
<dd.Interactive @color='critical' {{on 'click' (fn @delete @model)}}>{{t
'resources.managed-group.actions.delete'
}}</dd.Interactive>
</Hds::Dropdown>
{{/if}}
@@ -7,21 +7,21 @@
{{#if (can 'create model' @model collection='credential-libraries')}}
<dd.Interactive
@route='scopes.scope.credential-stores.credential-store.credential-libraries.new'
@text={{t 'resources.credential-library.actions.create'}}
/>
>
{{t 'resources.credential-library.actions.create'}}
</dd.Interactive>
{{/if}}
{{#if (can 'create model' @model collection='credentials')}}
<dd.Interactive
@route='scopes.scope.credential-stores.credential-store.credentials.new'
@text={{t 'resources.credential.actions.create'}}
/>
>
{{t 'resources.credential.actions.create'}}
</dd.Interactive>
{{/if}}
{{#if (can 'delete model' @model)}}
<dd.Separator />
<dd.Interactive
@text={{t 'resources.credential-store.actions.delete'}}
@color='critical'
{{on 'click' @delete}}
/>
<dd.Interactive @color='critical' {{on 'click' @delete}}>
{{t 'resources.credential-store.actions.delete'}}
</dd.Interactive>
{{/if}}
</Hds::Dropdown>
@@ -6,18 +6,18 @@
<Hds::Dropdown data-test-manage-group-dropdown as |dd|>
<dd.ToggleButton @text={{t 'actions.manage'}} @color='secondary' />
{{#if (can 'addMembers group' @model)}}
<dd.Interactive
@route='scopes.scope.groups.group.add-members'
@text={{t 'resources.group.actions.add-members'}}
/>
<dd.Interactive @route='scopes.scope.groups.group.add-members'>
{{t 'resources.group.actions.add-members'}}
</dd.Interactive>
{{/if}}
{{#if (can 'delete model' @model)}}
<dd.Separator />
<dd.Interactive
@color='critical'
@disabled={{@model.canSave}}
@text={{t 'resources.group.actions.delete'}}
{{on 'click' @delete}}
/>
>
{{t 'resources.group.actions.delete'}}
</dd.Interactive>
{{/if}}
</Hds::Dropdown>
@@ -9,22 +9,22 @@
<dd.Interactive
@route='scopes.scope.host-catalogs.host-catalog.hosts.new'
@model={{@model}}
@text={{t 'resources.host.actions.create'}}
/>
>
{{t 'resources.host.actions.create'}}
</dd.Interactive>
{{/if}}
{{#if (can 'create model' @model collection='host-sets')}}
<dd.Interactive
@route='scopes.scope.host-catalogs.host-catalog.host-sets.new'
@model={{@model}}
@text={{t 'resources.host-set.actions.create'}}
/>
>
{{t 'resources.host-set.actions.create'}}
</dd.Interactive>
{{/if}}
{{#if (can 'delete model' @model)}}
<dd.Separator />
<dd.Interactive
@text={{t 'resources.host-catalog.actions.delete'}}
@color='critical'
{{on 'click' (fn @delete @model)}}
/>
<dd.Interactive @color='critical' {{on 'click' (fn @delete @model)}}>
{{t 'resources.host-catalog.actions.delete'}}
</dd.Interactive>
{{/if}}
</Hds::Dropdown>
@@ -8,20 +8,20 @@
{{#if (can 'addHosts hostSet' @model)}}
<dd.Interactive
@text={{t 'resources.host-set.actions.create-and-add-host'}}
@route='scopes.scope.host-catalogs.host-catalog.host-sets.host-set.create-and-add-host'
/>
>
{{t 'resources.host-set.actions.create-and-add-host'}}
</dd.Interactive>
<dd.Interactive
@text={{t 'resources.host-set.actions.add-hosts'}}
@route='scopes.scope.host-catalogs.host-catalog.host-sets.host-set.add-hosts'
/>
>
{{t 'resources.host-set.actions.add-hosts'}}
</dd.Interactive>
<dd.Separator />
{{/if}}
{{#if (can 'delete model' @model)}}
<dd.Interactive
@text={{t 'resources.host-set.actions.delete'}}
@color='critical'
{{on 'click' (fn @delete @model)}}
/>
<dd.Interactive @color='critical' {{on 'click' (fn @delete @model)}}>
{{t 'resources.host-set.actions.delete'}}
</dd.Interactive>
{{/if}}
</Hds::Dropdown>
@@ -6,10 +6,8 @@
{{#if (can 'delete model' @model)}}
<Hds::Dropdown data-test-manage-hosts-dropdown as |dd|>
<dd.ToggleButton @text={{t 'actions.manage'}} @color='secondary' />
<dd.Interactive
@text={{t 'resources.host.actions.delete'}}
@color='critical'
{{on 'click' (fn @delete @model)}}
/>
<dd.Interactive @color='critical' {{on 'click' (fn @delete @model)}}>{{t
'resources.host.actions.delete'
}}</dd.Interactive>
</Hds::Dropdown>
{{/if}}
@@ -7,25 +7,28 @@
<dd.ToggleButton @text={{t 'actions.manage'}} @color='secondary' />
{{#if (can 'addPrincipals role' @model)}}
<dd.Interactive
@text={{t 'resources.role.principal.actions.add-principals'}}
@route='scopes.scope.roles.role.add-principals'
data-test-manage-dropdown-principals
/>
>
{{t 'resources.role.principal.actions.add-principals'}}
</dd.Interactive>
{{/if}}
{{#if (can 'setGrantScopes role' @model)}}
<dd.Interactive
@text={{t 'resources.role.scope.actions.manage-scopes'}}
@route='scopes.scope.roles.role.manage-scopes'
data-test-manage-dropdown-scopes
/>
>
{{t 'resources.role.scope.actions.manage-scopes'}}
</dd.Interactive>
{{/if}}
{{#if (can 'delete model' @model)}}
<dd.Separator />
<dd.Interactive
@text={{t 'resources.role.actions.delete'}}
@color='critical'
@disabled={{@model.canSave}}
{{on 'click' (fn @delete @model)}}
/>
>
{{t 'resources.role.actions.delete'}}
</dd.Interactive>
{{/if}}
</Hds::Dropdown>
@@ -6,35 +6,34 @@
<dd.ToggleButton @text={{t 'actions.manage'}} @color='secondary' />
{{#if (can 'addHostSources target' @model)}}
<dd.Interactive
@route='scopes.scope.targets.target.add-host-sources'
@text={{t 'resources.target.actions.add-host-sources'}}
/>
<dd.Interactive @route='scopes.scope.targets.target.add-host-sources'>
{{t 'resources.target.actions.add-host-sources'}}
</dd.Interactive>
{{/if}}
{{#if (can 'addBrokeredCredentialSources target' @model)}}
<dd.Interactive
@route='scopes.scope.targets.target.add-brokered-credential-sources'
@text={{t 'resources.target.actions.add-brokered-credential-sources'}}
data-test-add-brokered-cred-sources-action
/>
>
{{t 'resources.target.actions.add-brokered-credential-sources'}}
</dd.Interactive>
{{/if}}
{{#if (can 'addInjectedApplicationCredentialSources target' @model)}}
<dd.Interactive
@route='scopes.scope.targets.target.add-injected-application-credential-sources'
@text={{t
data-test-add-injected-cred-sources-action
>
{{t
'resources.target.actions.add-injected-application-credential-sources'
}}
data-test-add-injected-cred-sources-action
/>
</dd.Interactive>
{{/if}}
{{#if (can 'delete model' @model)}}
<dd.Separator />
<dd.Interactive
@text={{t 'resources.target.actions.delete'}}
@color='critical'
{{on 'click' (fn @delete @model)}}
/>
<dd.Interactive @color='critical' {{on 'click' (fn @delete @model)}}>
{{t 'resources.target.actions.delete'}}
</dd.Interactive>
{{/if}}
</Hds::Dropdown>
@@ -6,10 +6,9 @@
<dd.ToggleButton @text={{t 'actions.manage'}} @color='secondary' />
{{#if (can 'addAccounts user' @model)}}
<dd.Interactive
@route='scopes.scope.users.user.add-accounts'
@text={{t 'resources.user.actions.add-accounts'}}
/>
<dd.Interactive @route='scopes.scope.users.user.add-accounts'>
{{t 'resources.user.actions.add-accounts'}}
</dd.Interactive>
{{/if}}
{{#if (can 'delete model' @model)}}
@@ -17,8 +16,9 @@
<dd.Interactive
@color='critical'
@disabled={{@model.canSave}}
@text={{t 'resources.user.actions.delete'}}
{{on 'click' (fn @delete @model)}}
/>
>
{{t 'resources.user.actions.delete'}}
</dd.Interactive>
{{/if}}
</Hds::Dropdown>
@@ -6,17 +6,17 @@
<Hds::Dropdown data-test-manage-worker-dropdown as |dd|>
<dd.ToggleButton @text={{t 'actions.manage'}} @color='secondary' />
{{#if (can 'setWorkerTags worker' @model)}}
<dd.Interactive
@text={{t 'resources.worker.actions.create_tags'}}
@route='scopes.scope.workers.worker.create-tags'
/>
<dd.Interactive @route='scopes.scope.workers.worker.create-tags'>
{{t 'resources.worker.actions.create_tags'}}
</dd.Interactive>
{{/if}}
{{#if (can 'delete worker' @model)}}
<dd.Interactive
@icon='trash'
@text={{t 'resources.worker.actions.delete'}}
@color='critical'
{{on 'click' (fn @delete @model)}}
/>
>
{{t 'resources.worker.actions.delete'}}
</dd.Interactive>
{{/if}}
</Hds::Dropdown>