mirror of https://github.com/portainer/portainer
117 lines
4.6 KiB
HTML
117 lines
4.6 KiB
HTML
<kubernetes-view-header title="Resource pool access management" state="kubernetes.resourcePools.resourcePool.access" view-ready="ctrl.state.viewReady">
|
|
<a ui-sref="kubernetes.resourcePools">Resource pools</a> >
|
|
<a ui-sref="kubernetes.resourcePools.resourcePool({id: ctrl.pool.Namespace.Name})">{{ ctrl.pool.Namespace.Name }}</a> > Access management
|
|
</kubernetes-view-header>
|
|
|
|
<kubernetes-view-loading view-ready="ctrl.state.viewReady"></kubernetes-view-loading>
|
|
|
|
<div ng-if="ctrl.state.viewReady">
|
|
<div class="row" ng-if="ctrl.pool">
|
|
<div class="col-sm-12">
|
|
<rd-widget>
|
|
<rd-widget-header icon="fa-plug" title-text="Resource pool"></rd-widget-header>
|
|
<rd-widget-body classes="no-padding">
|
|
<table class="table">
|
|
<tbody>
|
|
<tr>
|
|
<td>Name</td>
|
|
<td>
|
|
{{ ctrl.pool.Namespace.Name }}
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</rd-widget-body>
|
|
</rd-widget>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<rd-widget ng-if="ctrl.availableUsersAndTeams">
|
|
<rd-widget-header icon="fa-user-lock" title-text="Create access"></rd-widget-header>
|
|
<rd-widget-body>
|
|
<form class="form-horizontal">
|
|
<div class="form-group">
|
|
<label class="col-sm-3 col-lg-2 control-label text-left">
|
|
Select user(s) and/or team(s)
|
|
</label>
|
|
<div class="col-sm-9 col-lg-4">
|
|
<span class="small text-muted" ng-if="ctrl.availableUsersAndTeams.length === 0">
|
|
No user nor team access has been set on the endpoint. Head over to the
|
|
<a ui-sref="portainer.endpoints.endpoint.access({id: ctrl.endpointId})">endpoint access view</a> to manage them.
|
|
</span>
|
|
<span
|
|
isteven-multi-select
|
|
ng-if="ctrl.availableUsersAndTeams.length > 0"
|
|
input-model="ctrl.availableUsersAndTeams"
|
|
output-model="ctrl.formValues.multiselectOutput"
|
|
button-label="icon '-' Name"
|
|
item-label="icon '-' Name"
|
|
tick-property="ticked"
|
|
helper-elements="filter"
|
|
search-property="Name"
|
|
translation="{nothingSelected: 'Select one or more users and/or teams', search: 'Search...'}"
|
|
>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- KEEP FOR FUTURE RBAC EVOL -->
|
|
<!-- <div class="form-group" ng-if="ctrl.entityType !== 'registry'">
|
|
<label class="col-sm-3 col-lg-2 control-label text-left">
|
|
Role
|
|
</label>
|
|
<div class="col-sm-9 col-lg-4">
|
|
<select ng-if="ctrl.rbacEnabled" class="form-control" ng-model="ctrl.formValues.selectedRole"
|
|
ng-options="role.Name for role in ctrl.roles">
|
|
</select>
|
|
<span class="small text-muted" ng-if="!ctrl.rbacEnabled">
|
|
The <a ui-sref="portainer.extensions.extension({id: 3})">Role-Based Access Control extension</a> is required to select a specific role.
|
|
</span>
|
|
</div>
|
|
</div> -->
|
|
|
|
<!-- actions -->
|
|
<div class="form-group">
|
|
<div class="col-sm-12">
|
|
<button
|
|
type="submit"
|
|
class="btn btn-primary btn-sm"
|
|
ng-disabled="(ctrl.availableUsersAndTeams | filter:{ticked:true}).length === 0 || ctrl.actionInProgress"
|
|
ng-click="ctrl.authorizeAccess()"
|
|
button-spinner="ctrl.actionInProgress"
|
|
>
|
|
<span ng-hide="ctrl.state.actionInProgress"><i class="fa fa-plus" aria-hidden="true"></i> Create access</span>
|
|
<span ng-show="ctrl.state.actionInProgress">Creating access...</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<!-- !actions -->
|
|
</form>
|
|
</rd-widget-body>
|
|
</rd-widget>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<!--
|
|
rbac-enabled="ctrl.rbacEnabled && ctrl.entityType !== 'registry'"
|
|
roles="ctrl.roles"
|
|
update-action="ctrl.updateAction"
|
|
-->
|
|
<access-datatable
|
|
ng-if="ctrl.authorizedUsersAndTeams"
|
|
title-text="Access"
|
|
title-icon="fa-user-lock"
|
|
table-key="kubernetes_resourcepool_access"
|
|
order-by="Name"
|
|
dataset="ctrl.authorizedUsersAndTeams"
|
|
remove-action="ctrl.unauthorizeAccess"
|
|
>
|
|
</access-datatable>
|
|
</div>
|
|
</div>
|
|
</div>
|