-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes #6519 - updating associations UI
- Loading branch information
Tom McKay
committed
Jul 29, 2014
1 parent
3433537
commit 7e86b53
Showing
28 changed files
with
665 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
...ets/javascripts/bastion/activation-keys/details/activation-key-associations.controller.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/** | ||
* Copyright 2013-2014 Red Hat, Inc. | ||
* | ||
* This software is licensed to you under the GNU General Public | ||
* License as published by the Free Software Foundation; either version | ||
* 2 of the License (GPLv2) or (at your option) any later version. | ||
* There is NO WARRANTY for this software, express or implied, | ||
* including the implied warranties of MERCHANTABILITY, | ||
* NON-INFRINGEMENT, or FITNESS FOR A PARTICULAR PURPOSE. You should | ||
* have received a copy of GPLv2 along with this software; if not, see | ||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. | ||
*/ | ||
|
||
/** | ||
* @ngdoc object | ||
* @name Bastion.activation-keys.controller:ActivationKeyAssociationsController | ||
* | ||
* @requires $scope | ||
* @requires translate | ||
* @requires ActivationKey | ||
* @requires ContentHostsHelper | ||
* @requires CurrentOrganization | ||
* | ||
* @description | ||
* Provides the functionality for activation key associations. | ||
*/ | ||
angular.module('Bastion.activation-keys').controller('ActivationKeyAssociationsController', | ||
['$scope', 'translate', 'ActivationKey', 'ContentHostsHelper', 'CurrentOrganization', | ||
function ($scope, translate, ActivationKey, ContentHostsHelper, CurrentOrganization) { | ||
|
||
if ($scope.contentHosts) { | ||
$scope.table.working = false; | ||
} else { | ||
$scope.table.working = true; | ||
} | ||
|
||
$scope.activationKey.$promise.then(function () { | ||
ActivationKey.contentHosts({id: $scope.activationKey.id, 'organization_id': CurrentOrganization }, | ||
function (response) { | ||
$scope.contentHosts = response.results; | ||
$scope.table.working = false; | ||
}); | ||
}); | ||
|
||
$scope.getStatusColor = ContentHostsHelper.getStatusColor; | ||
|
||
$scope.memory = ContentHostsHelper.memory; | ||
}] | ||
); |
47 changes: 47 additions & 0 deletions
47
...ipts/bastion/activation-keys/details/views/activation-key-associations-content-hosts.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<span page-title ng-model="activationKey">{{ 'Content Hosts for Activation Key:' | translate }} {{ activationKey.name }}</span> | ||
|
||
<div class="details details-full"> | ||
|
||
<h3 translate> | ||
Attached to Content Hosts | ||
</h3> | ||
|
||
<table class="table table-striped" alch-table="table" ng-class="{'table-mask': table.working}"> | ||
<thead> | ||
<tr alch-table-head> | ||
<th alch-table-column="name" sortable>{{ "Name" | translate }}</th> | ||
<th alch-table-column="status"> | ||
{{ "Subscription Status" | translate }} | ||
</th> | ||
<th alch-table-column="environment" sortable>{{ "Environment" | translate }}</th> | ||
<th alch-table-column="contentView">{{ "Content View" | translate }}</th> | ||
<th alch-table-column="serviceLevel">{{ "Service Level" | translate }}</th> | ||
<th alch-table-column="releaseVersion">{{ "Release Version" | translate }}</th> | ||
</tr> | ||
</thead> | ||
|
||
<tbody> | ||
<tr ng-show="!table.working && contentHosts.length === 0"> | ||
<td colspan="6" translate>This activation key is not associated with any content hosts.</td> | ||
</tr> | ||
|
||
<tr alch-table-row ng-repeat="contentHost in contentHosts" | ||
ng-controller="ContentHostStatusController"> | ||
<td alch-table-cell> | ||
<a ui-sref="content-hosts.details.info({contentHostId: contentHost.uuid})"> | ||
{{ contentHost.name }} | ||
</a> | ||
</td> | ||
<td alch-table-cell> | ||
<span class="icon-circle" ng-class="getStatusColor(contentHost.entitlementStatus)"> | ||
</span> | ||
</td> | ||
<td alch-table-cell>{{ contentHost.environment.name }}</td> | ||
<td alch-table-cell>{{ contentHost.content_view.name || "" }}</td> | ||
<td alch-table-cell>{{ contentHost.service_level }}</td> | ||
<td alch-table-cell>{{ contentHost.release_ver }}</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.