Initial interfaces and support for team syncing worker
This commit is contained in:
parent
94b07e6de9
commit
eeadeb9383
12 changed files with 282 additions and 15 deletions
|
@ -1521,7 +1521,7 @@ a:focus {
|
|||
top: 11px;
|
||||
left: 12px;
|
||||
font-size: 22px;
|
||||
color: #E4C212;
|
||||
color: #FCA657;
|
||||
}
|
||||
|
||||
.co-alert.co-alert-danger {
|
||||
|
@ -1566,6 +1566,14 @@ a:focus {
|
|||
left: 19px;
|
||||
}
|
||||
|
||||
.co-alert-inline:before {
|
||||
position: relative !important;
|
||||
top: auto !important;
|
||||
left: auto !important;
|
||||
vertical-align: middle;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.co-alert-popin-warning {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
@ -1579,6 +1587,14 @@ a:focus {
|
|||
}
|
||||
}
|
||||
|
||||
.co-alert-inline {
|
||||
border: 0px;
|
||||
display: inline-block;
|
||||
background-color: transparent !important;
|
||||
margin: 0px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.co-list-table tr td:first-child {
|
||||
font-weight: bold;
|
||||
padding-right: 10px;
|
||||
|
|
|
@ -111,3 +111,7 @@
|
|||
color: #aaa;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.teams-manager .fa-refresh {
|
||||
color: #aaa;
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
|
||||
<table class="co-table" style="margin-top: 10px;">
|
||||
<thead>
|
||||
<td class="options-col" ng-if="::Config.AUTHENTICATION_TYPE != 'Database'"></td>
|
||||
<td ng-class="TableService.tablePredicateClass('name', options.predicate, options.reverse)">
|
||||
<a ng-click="TableService.orderBy('name', options)">Team Name</a>
|
||||
</td>
|
||||
|
@ -65,6 +66,9 @@
|
|||
<tr class="co-checkable-row"
|
||||
ng-repeat="team in orderedTeams.visibleEntries"
|
||||
bindonce>
|
||||
<td class="options-col" ng-if="::Config.AUTHENTICATION_TYPE != 'Database'">
|
||||
<i class="fa fa-refresh" ng-if="team.is_synced" data-title="Team is synchronized with a backing group" bs-tooltip></i>
|
||||
</td>
|
||||
<td style="white-space: nowrap;">
|
||||
<span class="avatar" data="team.avatar" size="24"></span>
|
||||
<span bo-show="team.can_view">
|
||||
|
@ -97,7 +101,8 @@
|
|||
</td>
|
||||
<td>
|
||||
<span class="role-group" current-role="team.role" pull-left="true"
|
||||
role-changed="setRole(role, team.name)" roles="teamRoles"></span>
|
||||
role-changed="setRole(role, team.name)" roles="teamRoles"
|
||||
read-only="!organization.is_admin"></span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="cor-options-menu" ng-show="organization.is_admin">
|
||||
|
|
|
@ -12,8 +12,9 @@ angular.module('quay').directive('teamsManager', function () {
|
|||
'organization': '=organization',
|
||||
'isEnabled': '=isEnabled'
|
||||
},
|
||||
controller: function($scope, $element, ApiService, $timeout, UserService, TableService, UIService) {
|
||||
controller: function($scope, $element, ApiService, $timeout, UserService, TableService, UIService, Config) {
|
||||
$scope.TableService = TableService;
|
||||
$scope.Config = Config;
|
||||
|
||||
$scope.options = {
|
||||
'predicate': 'ordered_team_index',
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
This team is synchronized with a group in <strong>{{ getServiceName(syncInfo.service) }}</strong> and its user membership is therefore <strong>read-only</strong>.
|
||||
</div>
|
||||
|
||||
<div class="team-sync-header" ng-if="syncInfo.last_updated">
|
||||
<div class="team-sync-header" ng-if="syncInfo.config">
|
||||
<div class="section-header">Directory Synchronization</div>
|
||||
<table class="team-sync-table">
|
||||
<tr>
|
||||
|
@ -44,11 +44,12 @@
|
|||
<tr>
|
||||
<td>Last Updated:</td>
|
||||
<td ng-if="syncInfo.last_updated"><span am-time-ago="syncInfo.last_updated"></span> at {{ syncInfo.last_updated | amDateFormat:'dddd, MMMM Do YYYY, h:mm:ss a' }}</td>
|
||||
<td ng-if="!syncInfo.last_updated">Never</td>
|
||||
<td ng-if="!syncInfo.last_updated" style="color: #aaa;">Never</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<button class="btn btn-default" ng-click="showDisableSyncing()">Remove Synchronization</button>
|
||||
<button class="btn btn-default" ng-click="showDisableSyncing()" ng-if="canSync">Remove Synchronization</button>
|
||||
<div ng-if="!canSync" class="co-alert co-alert-warning co-alert-inline">You must be an admin of this organization to disable team synchronization</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Reference in a new issue