1
0
mirror of https://github.com/quay/quay.git synced 2026-01-29 08:42:15 +03:00
Files
quay/static/directives/org-binding.html
Marcus Kok 2ab7dc29f4 marketplace: add support for quantity from subscriptions api (PROJQUAY-6551) (#2633)
* Adds handling for when a subscription returned from the subscription watch api has a quantity greater than 1. Number of private repos should be correctly calculated using the quantity.

* Updates ui so that subscriptions can only be added to an org as a group, i.e. a subscription with quantity = 2 cannot be split across organizations.
2024-01-29 15:21:30 -05:00

47 lines
1.9 KiB
HTML

<div class="org-binding-settings-element" >
<span><h3>Monthly Subscriptions From Red Hat Customer Portal</h3></span>
<div class="cor-loader-inline" ng-show="marketplaceLoading"></div>
<span ng-show="!organization && !marketplaceLoading">
<div ng-repeat="subscription in userMarketplaceSubscriptions">
{{subscription.quantity}}x {{ subscription.sku }}
{{subscription.assigned_to_org ? "attached to org " + subscription.assigned_to_org : ""}}
</div>
</span>
<table ng-show="organization && !marketplaceLoading">
<tr class="indented-row" ng-repeat="subscription in orgMarketplaceSubscriptions">
<td>
{{ subscription.quantity }}x {{ subscription.sku }} attached to this org
</td>
</tr>
<tr class="indented-row">
<td style="padding: 10px">
<select class="form-control" ng-model="subscriptionBinding">
<option ng-repeat="subscription in availableSubscriptions" value="{{ subscription }}">
{{subscription.quantity}}x {{subscription.sku}}
</option>
</select>
<a class="btn btn-primary" ng-click="bindSku(subscriptionBinding)">Attach subscriptions</a>
</td>
<td style="padding: 10px">
<select class="form-control" ng-model="subscriptionRemovals">
<option ng-repeat="orgSubscription in orgMarketplaceSubscriptions" value="{{orgSubscription}}">
{{orgSubscription.quantity}}x {{orgSubscription.sku}}
</option>
</select>
<a class="btn btn-default" ng-click="batchRemoveSku(subscriptionRemovals, numRemovals)">
Remove subscriptions
</a>
</td>
</tr>
<div class="co-alert co-alert-success" ng-show="bindOrgSuccess">
Successfully bound subscription to org
</div>
<div class="co-alert co-alert-success" ng-show="removeSkuSuccess">
Successfully removed subscription from org
</div>
<tr>
</tr>
</table>
</div>