mirror of https://github.com/portainer/portainer
add data-cy attributes (#6623)
parent
ee42e44246
commit
0cd164bada
|
@ -59,6 +59,7 @@ export function AccessControlForm({
|
||||||
<div className="form-group">
|
<div className="form-group">
|
||||||
<div className="col-sm-12">
|
<div className="col-sm-12">
|
||||||
<SwitchField
|
<SwitchField
|
||||||
|
dataCy="portainer-accessMgmtToggle"
|
||||||
checked={values.accessControlEnabled}
|
checked={values.accessControlEnabled}
|
||||||
name={withNamespace('accessControlEnabled')}
|
name={withNamespace('accessControlEnabled')}
|
||||||
label="Enable access control"
|
label="Enable access control"
|
||||||
|
|
|
@ -7,7 +7,9 @@
|
||||||
Enable access control
|
Enable access control
|
||||||
<portainer-tooltip position="bottom" message="When enabled, you can restrict the access and management of this resource."></portainer-tooltip>
|
<portainer-tooltip position="bottom" message="When enabled, you can restrict the access and management of this resource."></portainer-tooltip>
|
||||||
</label>
|
</label>
|
||||||
<label class="switch" style="margin-left: 20px"> <input name="ownership" type="checkbox" ng-model="$ctrl.formData.AccessControlEnabled" /><i></i> </label>
|
<label class="switch" style="margin-left: 20px">
|
||||||
|
<input name="ownership" type="checkbox" ng-model="$ctrl.formData.AccessControlEnabled" /><i data-cy="portainer-accessMgmtToggle"></i>
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- !access-control-switch -->
|
<!-- !access-control-switch -->
|
||||||
|
@ -16,7 +18,7 @@
|
||||||
<div class="boxselector_wrapper">
|
<div class="boxselector_wrapper">
|
||||||
<div ng-if="$ctrl.isAdmin">
|
<div ng-if="$ctrl.isAdmin">
|
||||||
<input type="radio" id="access_administrators" ng-model="$ctrl.formData.Ownership" value="administrators" />
|
<input type="radio" id="access_administrators" ng-model="$ctrl.formData.Ownership" value="administrators" />
|
||||||
<label for="access_administrators">
|
<label for="access_administrators" data-cy="portainer-selectAdminAccess">
|
||||||
<div class="boxselector_header">
|
<div class="boxselector_header">
|
||||||
<i ng-class="'administrators' | ownershipicon" aria-hidden="true" style="margin-right: 2px"></i>
|
<i ng-class="'administrators' | ownershipicon" aria-hidden="true" style="margin-right: 2px"></i>
|
||||||
Administrators
|
Administrators
|
||||||
|
@ -26,7 +28,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div ng-if="$ctrl.isAdmin">
|
<div ng-if="$ctrl.isAdmin">
|
||||||
<input type="radio" id="access_restricted" ng-model="$ctrl.formData.Ownership" value="restricted" />
|
<input type="radio" id="access_restricted" ng-model="$ctrl.formData.Ownership" value="restricted" />
|
||||||
<label for="access_restricted">
|
<label for="access_restricted" data-cy="portainer-selectRestrictedAccess">
|
||||||
<div class="boxselector_header">
|
<div class="boxselector_header">
|
||||||
<i ng-class="'restricted' | ownershipicon" aria-hidden="true" style="margin-right: 2px"></i>
|
<i ng-class="'restricted' | ownershipicon" aria-hidden="true" style="margin-right: 2px"></i>
|
||||||
Restricted
|
Restricted
|
||||||
|
@ -95,6 +97,7 @@
|
||||||
search-property="Name"
|
search-property="Name"
|
||||||
translation="{nothingSelected: 'Select one or more teams', search: 'Search...'}"
|
translation="{nothingSelected: 'Select one or more teams', search: 'Search...'}"
|
||||||
style="margin-left: 20px"
|
style="margin-left: 20px"
|
||||||
|
data-cy="portainer-selectTeamAccess"
|
||||||
>
|
>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -126,6 +129,7 @@
|
||||||
search-property="Username"
|
search-property="Username"
|
||||||
translation="{nothingSelected: 'Select one or more users', search: 'Search...'}"
|
translation="{nothingSelected: 'Select one or more users', search: 'Search...'}"
|
||||||
style="margin-left: 20px"
|
style="margin-left: 20px"
|
||||||
|
data-cy="portainer-selectUserAccess"
|
||||||
>
|
>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<tbody>
|
<tbody>
|
||||||
<!-- ownership -->
|
<!-- ownership -->
|
||||||
<tr>
|
<tr data-cy="access-ownership">
|
||||||
<td>Ownership</td>
|
<td>Ownership</td>
|
||||||
<td>
|
<td>
|
||||||
<i ng-class="$ctrl.resourceControl.Ownership | ownershipicon" aria-hidden="true" style="margin-right: 2px"></i>
|
<i ng-class="$ctrl.resourceControl.Ownership | ownershipicon" aria-hidden="true" style="margin-right: 2px"></i>
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- authorized-users -->
|
<!-- authorized-users -->
|
||||||
<tr ng-if="$ctrl.resourceControl.UserAccesses.length > 0">
|
<tr ng-if="$ctrl.resourceControl.UserAccesses.length > 0" data-cy="access-authorisedUsers">
|
||||||
<td>Authorized users</td>
|
<td>Authorized users</td>
|
||||||
<td>
|
<td>
|
||||||
<span ng-repeat="user in $ctrl.authorizedUsers">{{ user.Username }}{{ $last ? '' : ', ' }} </span>
|
<span ng-repeat="user in $ctrl.authorizedUsers">{{ user.Username }}{{ $last ? '' : ', ' }} </span>
|
||||||
|
@ -82,7 +82,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<!-- !authorized-users -->
|
<!-- !authorized-users -->
|
||||||
<!-- authorized-teams -->
|
<!-- authorized-teams -->
|
||||||
<tr ng-if="$ctrl.resourceControl.TeamAccesses.length > 0">
|
<tr ng-if="$ctrl.resourceControl.TeamAccesses.length > 0" data-cy="access-authorisedTeams">
|
||||||
<td>Authorized teams</td>
|
<td>Authorized teams</td>
|
||||||
<td>
|
<td>
|
||||||
<span ng-repeat="team in $ctrl.authorizedTeams">{{ team.Name }}{{ $last ? '' : ', ' }} </span>
|
<span ng-repeat="team in $ctrl.authorizedTeams">{{ team.Name }}{{ $last ? '' : ', ' }} </span>
|
||||||
|
|
Loading…
Reference in New Issue