Skip to content

Commit

Permalink
Fixes #10827: replace usages of deprecated bst-infinite-scroll.
Browse files Browse the repository at this point in the history
  • Loading branch information
Walden Raines committed Jun 17, 2015
1 parent 5411b04 commit c14f691
Show file tree
Hide file tree
Showing 16 changed files with 488 additions and 467 deletions.
1 change: 1 addition & 0 deletions app/controllers/katello/api/v2/systems_controller.rb
Expand Up @@ -306,6 +306,7 @@ def find_environment_and_content_view_by_env_id
@organization = @environment.organization
@content_view = cve.content_view
else

# assumption here is :content_view_id is passed as a separate attrib
@environment = KTEnvironment.find(params[:environment_id])
@organization = @environment.organization
Expand Down
Expand Up @@ -39,58 +39,60 @@
</div>

<div bst-table="addSubscriptionsTable" class="nutupane">
<div bst-container-scroll bst-infinite-scroll="addSubscriptionsTable.nextPage()">
<div bst-container-scroll>
<div infinite-scroll="addSubscriptionsTable.nextPage()" infinite-scroll-container="'.nutupane-sub-section .container-scroll-wrapper'">

<div class="loading-mask fa-3x" ng-show="addSubscriptionsTable.working && addSubscriptionsTable.rows.length == 0">
<i class="fa fa-spinner fa-spin"></i>
{{ "Loading..." | translate }}
</div>
<div class="loading-mask fa-3x" ng-show="addSubscriptionsTable.working && addSubscriptionsTable.rows.length == 0">
<i class="fa fa-spinner fa-spin"></i>
{{ "Loading..." | translate }}
</div>

<table ng-class="{'table-mask': subscriptionsTable.working}" class="table table-full table-striped">
<thead>
<tr bst-table-head row-select>
<th bst-table-column="quantity" sortable class="align-center"><span translate>Quantity</span></th>
<th bst-table-column="attached" sortable><span translate>Attached</span></th>
<th bst-table-column="type"><span translate>Type</span></th>
<th bst-table-column="startDate" sortable><span translate>Starts</span></th>
<th bst-table-column="endDate" sortable><span translate>Expires</span></th>
<th bst-table-column="supportLevel"><span translate>Support Level</span></th>
<th bst-table-column="contractNumber" sortable><span translate>Contract</span></th>
<th bst-table-column="accountNumber" sortable><span translate>Account</span></th>
</tr>
</thead>
<table ng-class="{'table-mask': subscriptionsTable.working}" class="table table-full table-striped">
<thead>
<tr bst-table-head row-select>
<th bst-table-column="quantity" sortable class="align-center"><span translate>Quantity</span></th>
<th bst-table-column="attached" sortable><span translate>Attached</span></th>
<th bst-table-column="type"><span translate>Type</span></th>
<th bst-table-column="startDate" sortable><span translate>Starts</span></th>
<th bst-table-column="endDate" sortable><span translate>Expires</span></th>
<th bst-table-column="supportLevel"><span translate>Support Level</span></th>
<th bst-table-column="contractNumber" sortable><span translate>Contract</span></th>
<th bst-table-column="accountNumber" sortable><span translate>Account</span></th>
</tr>
</thead>

<tbody>
<tr bst-table-row ng-repeat-start="(name, subscriptions) in groupedSubscriptions">
<td bst-table-cell colspan="8">
<a href='/subscriptions?search=product_name:"{{ name }}"'>
{{ name }}
</a>
</td>
</tr>
<tr bst-table-row ng-repeat-end ng-repeat="subscription in subscriptions" row-select="subscription">
<td bst-table-cell>
<span ng-hide="subscription.multi_entitlement">
1
</span>
<select ng-hide="!subscription.multi_entitlement"
ng-model="subscription.amount"
ng-options="amount for amount in amountSelectorValues(subscription)"
>
<option value="">{{ "Automatic" | translate }}</option>
</select>
</td>
<td bst-table-cell>{{ subscription | subscriptionConsumedFilter }}</td>
<td bst-table-cell><div subscription-type="subscription"></div></td>
<td bst-table-cell>{{ subscription.start_date | date:"shortDate" }}</td>
<td bst-table-cell>{{ subscription.end_date | date:"shortDate" }}</td>
<td bst-table-cell>{{ subscription.support_level }}</td>
<td bst-table-cell>{{ subscription.contract_number }}</td>
<td bst-table-cell>{{ subscription.account_number }}</td>
</tr>
</tbody>
<tbody>
<tr bst-table-row ng-repeat-start="(name, subscriptions) in groupedSubscriptions">
<td bst-table-cell colspan="8">
<a href='/subscriptions?search=product_name:"{{ name }}"'>
{{ name }}
</a>
</td>
</tr>
<tr bst-table-row ng-repeat-end ng-repeat="subscription in subscriptions" row-select="subscription">
<td bst-table-cell>
<span ng-hide="subscription.multi_entitlement">
1
</span>
<select ng-hide="!subscription.multi_entitlement"
ng-model="subscription.amount"
ng-options="amount for amount in amountSelectorValues(subscription)"
>
<option value="">{{ "Automatic" | translate }}</option>
</select>
</td>
<td bst-table-cell>{{ subscription | subscriptionConsumedFilter }}</td>
<td bst-table-cell><div subscription-type="subscription"></div></td>
<td bst-table-cell>{{ subscription.start_date | date:"shortDate" }}</td>
<td bst-table-cell>{{ subscription.end_date | date:"shortDate" }}</td>
<td bst-table-cell>{{ subscription.support_level }}</td>
<td bst-table-cell>{{ subscription.contract_number }}</td>
<td bst-table-cell>{{ subscription.account_number }}</td>
</tr>
</tbody>

</table>
</table>
</div>
</div>
</div>
</section>
Expand Up @@ -36,39 +36,39 @@
</div>

<div bst-table="hostCollectionsTable" class="nutupane">
<div bst-container-scroll bst-infinite-scroll="hostCollectionsTable.nextPage()">
<div bst-container-scroll>
<div infinite-scroll="hostCollectionsTable.nextPage()" infinite-scroll-container="'.nutupane-sub-section .container-scroll-wrapper'"> <div ng-show="hostCollectionsTable.rows.length == 0">
<div class="loading-mask" ng-show="hostCollectionsTable.working">
<i class="fa fa-spinner fa-spin"></i>
{{ "Loading..." | translate }}
</div>

<div ng-show="hostCollectionsTable.rows.length == 0">
<div class="loading-mask" ng-show="hostCollectionsTable.working">
<i class="fa fa-spinner fa-spin"></i>
{{ "Loading..." | translate }}
<p ng-hide="hostCollectionsTable.working" translate>No host collections</p>
</div>

<p ng-hide="hostCollectionsTable.working" translate>No host collections</p>
</div>

<table ng-show="hostCollectionsTable.rows.length > 0"
ng-class="{'table-mask': hostCollectionsTable.working}" class="table table-full table-striped">
<thead>
<tr bst-table-head row-select="hostCollection">
<th bst-table-column="name" translate>Name</th>
<th bst-table-column="description" translate>Description</th>
<th bst-table-column="capacity" translate>Capacity</th>
</tr>
</thead>
<table ng-show="hostCollectionsTable.rows.length > 0"
ng-class="{'table-mask': hostCollectionsTable.working}" class="table table-full table-striped">
<thead>
<tr bst-table-head row-select="hostCollection">
<th bst-table-column="name" translate>Name</th>
<th bst-table-column="description" translate>Description</th>
<th bst-table-column="capacity" translate>Capacity</th>
</tr>
</thead>

<tbody>
<tr bst-table-row ng-repeat="hostCollection in hostCollectionsTable.rows | filter:hostCollectionFilter" row-select="hostCollection">
<td bst-table-cell>
<a ui-sref="host-collections.details.info({hostCollectionId: hostCollection.id})">
{{ hostCollection.name }}
</a>
</td>
<td bst-table-cell>{{ hostCollection.description }}</td>
<td bst-table-cell>{{ hostCollection.total_content_hosts }} / {{ hostCollection.max_content_hosts | unlimitedFilter:hostCollection.unlimited_content_hosts }}</td>
</tr>
</tbody>
</table>
<tbody>
<tr bst-table-row ng-repeat="hostCollection in hostCollectionsTable.rows | filter:hostCollectionFilter" row-select="hostCollection">
<td bst-table-cell>
<a ui-sref="host-collections.details.info({hostCollectionId: hostCollection.id})">
{{ hostCollection.name }}
</a>
</td>
<td bst-table-cell>{{ hostCollection.description }}</td>
<td bst-table-cell>{{ hostCollection.total_content_hosts }} / {{ hostCollection.max_content_hosts | unlimitedFilter:hostCollection.unlimited_content_hosts }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
Expand Up @@ -39,47 +39,49 @@
</div>

<div bst-table="subscriptionsTable" class="nutupane">
<div bst-container-scroll bst-infinite-scroll="subscriptionsTable.nextPage()">
<div bst-container-scroll>
<div infinite-scroll="subscriptionsTable.nextPage()" infinite-scroll-container="'.nutupane-sub-section .container-scroll-wrapper'">

<div class="loading-mask fa-3x" ng-show="subscriptionsTable.working && subscriptionsTable.rows.length == 0">
<i class="fa fa-spinner fa-spin"></i>
{{ "Loading..." | translate }}
</div>
<div class="loading-mask fa-3x" ng-show="subscriptionsTable.working && subscriptionsTable.rows.length == 0">
<i class="fa fa-spinner fa-spin"></i>
{{ "Loading..." | translate }}
</div>

<table ng-class="{'table-mask': subscriptionsTable.working}" class="table table-full table-striped">
<thead>
<tr bst-table-head row-select>
<th bst-table-column="quantity" sortable class="align-center"><span translate>Quantity</span></th>
<th bst-table-column="attached" sortable><span translate>Attached</span></th>
<th bst-table-column="type"><span translate>Type</span></th>
<th bst-table-column="startDate" sortable><span translate>Starts</span></th>
<th bst-table-column="endDate" sortable><span translate>Expires</span></th>
<th bst-table-column="supportLevel"><span translate>Support Level</span></th>
<th bst-table-column="contractNumber" sortable><span translate>Contract</span></th>
<th bst-table-column="accountNumber" sortable><span translate>Account</span></th>
</tr>
</thead>
<table ng-class="{'table-mask': subscriptionsTable.working}" class="table table-full table-striped">
<thead>
<tr bst-table-head row-select>
<th bst-table-column="quantity" sortable class="align-center"><span translate>Quantity</span></th>
<th bst-table-column="attached" sortable><span translate>Attached</span></th>
<th bst-table-column="type"><span translate>Type</span></th>
<th bst-table-column="startDate" sortable><span translate>Starts</span></th>
<th bst-table-column="endDate" sortable><span translate>Expires</span></th>
<th bst-table-column="supportLevel"><span translate>Support Level</span></th>
<th bst-table-column="contractNumber" sortable><span translate>Contract</span></th>
<th bst-table-column="accountNumber" sortable><span translate>Account</span></th>
</tr>
</thead>

<tbody>
<tr bst-table-row ng-repeat-start="(name, subscriptions) in groupedSubscriptions">
<td bst-table-cell colspan="8">
<a href='/subscriptions?search=product_name:"{{ name }}"'>
{{ name }}
</a>
</td>
</tr>
<tr bst-table-row ng-repeat-end ng-repeat="subscription in subscriptions" row-select="subscription">
<td bst-table-cell>{{ subscription | subscriptionAttachAmountFilter }}</td>
<td bst-table-cell>{{ subscription | subscriptionConsumedFilter }}</td>
<td bst-table-cell><div subscription-type="subscription"></div></td>
<td bst-table-cell>{{ subscription.start_date | date:"shortDate" }}</td>
<td bst-table-cell>{{ subscription.end_date | date:"shortDate" }}</td>
<td bst-table-cell>{{ subscription.service_level }}</td>
<td bst-table-cell>{{ subscription.contract_number }}</td>
<td bst-table-cell>{{ subscription.account_number }}</td>
</tr>
</tbody>
</table>
<tbody>
<tr bst-table-row ng-repeat-start="(name, subscriptions) in groupedSubscriptions">
<td bst-table-cell colspan="8">
<a href='/subscriptions?search=product_name:"{{ name }}"'>
{{ name }}
</a>
</td>
</tr>
<tr bst-table-row ng-repeat-end ng-repeat="subscription in subscriptions" row-select="subscription">
<td bst-table-cell>{{ subscription | subscriptionAttachAmountFilter }}</td>
<td bst-table-cell>{{ subscription | subscriptionConsumedFilter }}</td>
<td bst-table-cell><div subscription-type="subscription"></div></td>
<td bst-table-cell>{{ subscription.start_date | date:"shortDate" }}</td>
<td bst-table-cell>{{ subscription.end_date | date:"shortDate" }}</td>
<td bst-table-cell>{{ subscription.service_level }}</td>
<td bst-table-cell>{{ subscription.contract_number }}</td>
<td bst-table-cell>{{ subscription.account_number }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
Expand Up @@ -67,53 +67,55 @@ <h4 translate>Installed Packages</h4>
<span translate>You currently do not have any Packages installed. You can use Package Actions above this message to install new Packages.</span>
</p>

<div bst-table="currentPackagesTable" ng-show="currentPackagesTable.rows.length > 0">
<div bst-container-scroll bst-infinite-scroll="currentPackagesTable.loadMorePackages()" data="currentPackagesTable.rows">

<table ng-class="{'table-mask': currentPackagesTable.working}" class="table table-striped">
<thead>
<tr bst-table-head>
<th bst-table-column="name" translate>Installed Package</th>
<th bst-table-column="remove" bst-feature-flag="remote_actions" ng-hide="currentPackagesTable.contentHost.readonly">
<span translate>Remove</span>
</th>
</tr>
</thead>

<tbody>

<tr bst-table-row ng-repeat="package in currentPackagesTable.rows | filter: currentPackagesTable.filter | limitTo: currentPackagesTable.limit" >
<td bst-table-cell>{{ package.nvrea }}</td>
<td bst-table-cell ng-hide="currentPackagesTable.contentHost.readonly" bst-feature-flag="remote_actions">

<i class="active fa fa-remove-sign" ng-hide="package.removeTask" tooltip="{{ 'Remove' | translate }}"
ng-click="currentPackagesTable.removePackage(package)"></i>

<i class="fa fa-spinner fa-spin" ng-show="package.removeTask.pending"></i>
<span ng-show="package.removeTask && !package.removeTask.pending">

<i ng-show="currentPackagesTable.taskFailed(package.removeTask)" class="fa fa-exclamation-sign" tooltip="{{ 'Failed' | translate }}"></i>
<i ng-hide="currentPackagesTable.taskFailed(package.removeTask)" class="fa fa-check-sign" tooltip="{{ 'Success' | translate }}"></i>

<a ng-click="currentPackagesTable.openEventInfo(package.removeTask)" >
<span translate ng-show="package.removeTask.affected_units == 1">
{{ package.removeTask.affected_units }} package removed
</span>

<span translate ng-show="!package.removeTask.failed && package.removeTask.affected_units != 1">
{{ package.removeTask.affected_units }} packages removed
</span>

<span translate ng-show="package.removeTask.failed">
Package removal failed
</span>
</a>
</span>
</td>

</tr>
</tbody>
</table>
<div class="current-packages" bst-table="currentPackagesTable" ng-show="currentPackagesTable.rows.length > 0">
<div bst-container-scroll data="currentPackagesTable.rows">
<div infinite-scroll="currentPackagesTable.nextPage()" infinite-scroll-container="'.current-packages .container-scroll-wrapper'">

<table ng-class="{'table-mask': currentPackagesTable.working}" class="table table-striped">
<thead>
<tr bst-table-head>
<th bst-table-column="name" translate>Installed Package</th>
<th bst-table-column="remove" bst-feature-flag="remote_actions" ng-hide="currentPackagesTable.contentHost.readonly">
<span translate>Remove</span>
</th>
</tr>
</thead>

<tbody>

<tr bst-table-row ng-repeat="package in currentPackagesTable.rows | filter: currentPackagesTable.filter | limitTo: currentPackagesTable.limit" >
<td bst-table-cell>{{ package.nvrea }}</td>
<td bst-table-cell ng-hide="currentPackagesTable.contentHost.readonly" bst-feature-flag="remote_actions">

<i class="active fa fa-remove-sign" ng-hide="package.removeTask" tooltip="{{ 'Remove' | translate }}"
ng-click="currentPackagesTable.removePackage(package)"></i>

<i class="fa fa-spinner fa-spin" ng-show="package.removeTask.pending"></i>
<span ng-show="package.removeTask && !package.removeTask.pending">

<i ng-show="currentPackagesTable.taskFailed(package.removeTask)" class="fa fa-exclamation-sign" tooltip="{{ 'Failed' | translate }}"></i>
<i ng-hide="currentPackagesTable.taskFailed(package.removeTask)" class="fa fa-check-sign" tooltip="{{ 'Success' | translate }}"></i>

<a ng-click="currentPackagesTable.openEventInfo(package.removeTask)" >
<span translate ng-show="package.removeTask.affected_units == 1">
{{ package.removeTask.affected_units }} package removed
</span>

<span translate ng-show="!package.removeTask.failed && package.removeTask.affected_units != 1">
{{ package.removeTask.affected_units }} packages removed
</span>

<span translate ng-show="package.removeTask.failed">
Package removal failed
</span>
</a>
</span>
</td>

</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>

0 comments on commit c14f691

Please sign in to comment.