EE-3498 update registry/endpoint registry/manage access (#7353)

pull/7345/head^2
Rex Wang 2022-07-27 20:22:40 +08:00 committed by GitHub
parent bb447bb02a
commit 698a91596e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 45 additions and 28 deletions

View File

@ -19,7 +19,7 @@
data-cy="config-searchInput" data-cy="config-searchInput"
/> />
</div> </div>
<div class="actionBar !gap-3" ng-if="!$ctrl.offlineMode" authorization="DockerConfigDelete, DockerConfigCreate"> <div class="actionBar !gap-3" authorization="DockerConfigDelete, DockerConfigCreate">
<button <button
type="button" type="button"
class="btn btn-sm btn-dangerlight h-fit vertical-center !ml-0" class="btn btn-sm btn-dangerlight h-fit vertical-center !ml-0"

View File

@ -19,7 +19,7 @@
data-cy="secret-searchInput" data-cy="secret-searchInput"
/> />
</div> </div>
<div class="actionBar !gap-3" ng-if="!$ctrl.offlineMode" authorization="DockerSecretDelete, DockerSecretCreate"> <div class="actionBar !gap-3" authorization="DockerSecretDelete, DockerSecretCreate">
<button <button
type="button" type="button"
class="btn btn-sm btn-dangerlight h-fit vertical-center !ml-0" class="btn btn-sm btn-dangerlight h-fit vertical-center !ml-0"

View File

@ -1,26 +1,36 @@
<div class="datatable"> <div class="datatable">
<rd-widget> <rd-widget>
<rd-widget-header icon="{{ $ctrl.titleIcon }}" title-text="{{ $ctrl.titleText }}"> </rd-widget-header> <rd-widget-header icon="{{ $ctrl.titleIcon }}" feather-icon="true" title-text="{{ $ctrl.titleText }}"> </rd-widget-header>
<rd-widget-body classes="no-padding"> <rd-widget-body classes="no-padding">
<div class="toolBar small" ng-if="$ctrl.inheritFrom"> <div class="toolBar small" ng-if="$ctrl.inheritFrom">
Access tagged as <code>inherited</code> are inherited from the group access. They cannot be removed or modified at the environment level but they can be overridden. Access tagged as <code>inherited</code> are inherited from the group access. They cannot be removed or modified at the environment level but they can be overridden.
</div> </div>
<div class="toolBar small" ng-if="$ctrl.inheritFrom"> Access tagged as <code>override</code> are overriding the group access for the related users/teams. </div> <div class="toolBar small" ng-if="$ctrl.inheritFrom"> Access tagged as <code>override</code> are overriding the group access for the related users/teams. </div>
<div class="actionBar"> <div class="toolBar vertical-center !gap-x-5 !gap-y-1 flex-wrap">
<button type="button" class="btn btn-sm btn-danger" ng-disabled="$ctrl.state.selectedItemCount === 0" ng-click="$ctrl.removeAction($ctrl.state.selectedItems)"> <div class="actionBar !gap-3">
<i class="fa fa-trash-alt space-right" aria-hidden="true"></i>Remove <button
</button> type="button"
</div> class="btn btn-sm btn-dangerlight h-fit vertical-center !ml-0"
<div class="searchBar"> authorization="PortainerStackDelete"
<i class="fa fa-search searchIcon" aria-hidden="true"></i> ng-disabled="$ctrl.state.selectedItemCount === 0"
<input ng-click="$ctrl.removeAction($ctrl.state.selectedItems)"
type="text" data-cy="access-removeButton"
class="searchInput" >
ng-model="$ctrl.state.textFilter" <pr-icon icon="'trash-2'" feather="true" mode="'danger'"></pr-icon>Remove
ng-change="$ctrl.onTextFilterChange()" </button>
placeholder="Search..." </div>
ng-model-options="{ debounce: 300 }" <div class="searchBar vertical-center">
/> <pr-icon icon="'search'" feather="true"></pr-icon>
<input
type="text"
class="searchInput"
ng-model="$ctrl.state.textFilter"
ng-change="$ctrl.onTextFilterChange()"
placeholder="Search..."
ng-model-options="{ debounce: 300 }"
data-cy="access-searchInput"
/>
</div>
</div> </div>
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-hover nowrap-cells"> <table class="table table-hover nowrap-cells">

View File

@ -1,13 +1,13 @@
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
<rd-widget ng-if="ctrl.availableUsersAndTeams && ctrl.accessControlledEntity"> <rd-widget ng-if="ctrl.availableUsersAndTeams && ctrl.accessControlledEntity">
<rd-widget-header icon="fa-user-lock" title-text="Create access"></rd-widget-header> <rd-widget-header icon="user-check" feather-icon="true" title-text="Create access"></rd-widget-header>
<rd-widget-body> <rd-widget-body>
<form class="form-horizontal"> <form class="form-horizontal">
<div ng-if="ctrl.entityType !== 'registry'" class="form-group"> <div ng-if="ctrl.entityType !== 'registry'" class="form-group">
<span class="col-sm-12 small text-warning"> <span class="col-sm-12 small text-warning">
<p> <p>
<i class="fa fa-exclamation-circle orange-icon" aria-hidden="true" style="margin-right: 2px"></i> <pr-icon icon="'alert-circle'" mode="'warning'" feather="true"></pr-icon>
Adding user access will require the affected user(s) to logout and login for the changes to be taken into account. Adding user access will require the affected user(s) to logout and login for the changes to be taken into account.
</p> </p>
</span> </span>
@ -35,13 +35,13 @@
<div class="col-sm-12"> <div class="col-sm-12">
<button <button
type="submit" type="submit"
class="btn btn-primary btn-sm" class="btn btn-primary btn-sm vertical-center"
ng-disabled="(ctrl.availableUsersAndTeams | filter:{ticked:true}).length === 0 || ctrl.actionInProgress" ng-disabled="(ctrl.availableUsersAndTeams | filter:{ticked:true}).length === 0 || ctrl.actionInProgress"
ng-click="ctrl.authorizeAccess()" ng-click="ctrl.authorizeAccess()"
button-spinner="ctrl.actionInProgress" button-spinner="ctrl.actionInProgress"
data-cy="access-createAccess" data-cy="access-createAccess"
> >
<span ng-hide="ctrl.state.actionInProgress"><i class="fa fa-plus" aria-hidden="true"></i> Create access</span> <span ng-hide="ctrl.state.actionInProgress"><pr-icon icon="'plus'" feather="true"></pr-icon> Create access</span>
<span ng-show="ctrl.state.actionInProgress">Creating access...</span> <span ng-show="ctrl.state.actionInProgress">Creating access...</span>
</button> </button>
</div> </div>
@ -57,7 +57,7 @@
<access-datatable <access-datatable
ng-if="ctrl.authorizedUsersAndTeams" ng-if="ctrl.authorizedUsersAndTeams"
title-text="Access" title-text="Access"
title-icon="fa-user-lock" title-icon="user-x"
table-key="{{ 'access_' + ctrl.entityType }}" table-key="{{ 'access_' + ctrl.entityType }}"
order-by="Name" order-by="Name"
show-warning="ctrl.entityType !== 'registry'" show-warning="ctrl.entityType !== 'registry'"

View File

@ -114,7 +114,7 @@
<div class="footer" ng-if="$ctrl.dataset"> <div class="footer" ng-if="$ctrl.dataset">
<div class="infoBar" ng-if="$ctrl.state.selectedItemCount !== 0"> {{ $ctrl.state.selectedItemCount }} item(s) selected </div> <div class="infoBar" ng-if="$ctrl.state.selectedItemCount !== 0"> {{ $ctrl.state.selectedItemCount }} item(s) selected </div>
<div class="paginationControls"> <div class="paginationControls">
<form class="form-inline"> <form class="form-inline vertical-center">
<span class="limitSelector"> <span class="limitSelector">
<span style="margin-right: 5px"> Items per page </span> <span style="margin-right: 5px"> Items per page </span>
<select class="form-control" ng-model="$ctrl.state.paginatedItemLimit" ng-change="$ctrl.changePaginationLimit()" data-cy="component-paginationSelect"> <select class="form-control" ng-model="$ctrl.state.paginatedItemLimit" ng-change="$ctrl.changePaginationLimit()" data-cy="component-paginationSelect">

View File

@ -67,6 +67,7 @@
<div class="col-sm-12"> <div class="col-sm-12">
<por-switch-field <por-switch-field
label="'Authentication'" label="'Authentication'"
label-class="'col-sm-3 col-lg-2'"
tooltip="'Enable this option if you need to specify credentials to connect to a private registry.'" tooltip="'Enable this option if you need to specify credentials to connect to a private registry.'"
name="'administrator'" name="'administrator'"
checked="$ctrl.model.Authentication" checked="$ctrl.model.Authentication"

View File

@ -55,6 +55,7 @@
<div class="col-sm-12"> <div class="col-sm-12">
<por-switch-field <por-switch-field
label="'Authentication'" label="'Authentication'"
label-class="'col-sm-3 col-lg-2'"
tooltip="'Enable this option if you need to specify credentials to connect to this registry.'" tooltip="'Enable this option if you need to specify credentials to connect to this registry.'"
name="'administrator'" name="'administrator'"
checked="$ctrl.model.Authentication" checked="$ctrl.model.Authentication"

View File

@ -59,10 +59,15 @@
</div> </div>
<!-- !credentials-password --> <!-- !credentials-password -->
<!-- organisation-checkbox --> <!-- organization-checkbox -->
<div class="form-group"> <div class="form-group">
<div class="col-sm-12"> <div class="col-sm-12">
<por-switch-field label="'Use organisation registry'" checked="$ctrl.model.Quay.useOrganisation" on-change="($ctrl.toggleOrganisation)"></por-switch-field> <por-switch-field
label="'Use organization registry'"
label-class="'col-sm-3 col-lg-2'"
checked="$ctrl.model.Quay.useOrganisation"
on-change="($ctrl.toggleOrganisation)"
></por-switch-field>
</div> </div>
</div> </div>
<!-- !organisation-checkbox --> <!-- !organisation-checkbox -->

View File

@ -1,7 +1,7 @@
<div class="row" ng-if="$ctrl.registry"> <div class="row" ng-if="$ctrl.registry">
<div class="col-lg-12 col-md-12 col-xs-12"> <div class="col-lg-12 col-md-12 col-xs-12">
<rd-widget> <rd-widget>
<rd-widget-header icon="fa-plug" title-text="Registry"></rd-widget-header> <rd-widget-header icon="radio" feather-icon="true" title-text="Registry"></rd-widget-header>
<rd-widget-body classes="no-padding"> <rd-widget-body classes="no-padding">
<table class="table"> <table class="table">
<tbody> <tbody>

View File

@ -13,7 +13,7 @@
<div class="row" ng-if="ctrl.endpoint"> <div class="row" ng-if="ctrl.endpoint">
<div class="col-sm-12"> <div class="col-sm-12">
<rd-widget> <rd-widget>
<rd-widget-header icon="fa-plug" title-text="Environment"></rd-widget-header> <rd-widget-header icon="hard-drive" feather-icon="true" title-text="Environment"></rd-widget-header>
<rd-widget-body classes="no-padding"> <rd-widget-body classes="no-padding">
<table class="table"> <table class="table">
<tbody> <tbody>