Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use multi-select for disassociating active profiles, now select a con…
…tainer and the profile to remove from it and click the '-' icon
  • Loading branch information
gashcrumb committed Jun 5, 2013
1 parent 3c7ae8c commit 6fa66de
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
15 changes: 11 additions & 4 deletions hawtio-web/src/main/webapp/app/fabric/html/fabricView.html
Expand Up @@ -154,6 +154,9 @@
Active Profiles
</div>
<div class="section-controls">

<i class="icon-minus clickable" title="Delete selected active profiles" ng-click="removeActiveProfiles()" ng-show="selectedActiveProfiles.length > 0 && selectedContainers.length > 0"></i>

</div>
<div class="section-filter">
<input type="text" class="search-query" placeholder="Filter..." ng-model="activeProfileIdFilter">
Expand All @@ -164,16 +167,20 @@
<div ng-repeat="profile in activeProfiles" ng-show="filterActiveProfile(profile)">
<div class="box" ng-class="getSelectedClass(profile)">

<div class="active-profile">
<i class="icon-remove clickable" style="display: inline;" ng-click="removeActiveProfiles(profile)" ng-show="(activeContainerId && activeContainerId != '') || selectedContainers.length > 0"></i>
<div class="box-left">

<i ng-show="!profile.selected" class="icon-circle-blank clickable" title="Not Selected" ng-click="profile.selected = true"></i>
<i class="icon-circle-blank clickable" ng-show="!profile.selected" title="Not Selected" ng-click="profile.selected = true"></i>
<i ng-show="profile.selected" class="icon-circle clickable" title="Selected" ng-click="profile.selected = false"></i>

<div title="{{profile.versionId}} / {{profile.id}} ({{profile.count}})" ng-click="setActiveProfile(profile)">
<div class="profile-select" title="{{profile.versionId}} / {{profile.id}} ({{profile.count}})" ng-click="setActiveProfile(profile)">
{{profile.id}} ({{profile.count}}) / {{profile.versionId}}
</div>
</div>

<div class="box-right">
<i class="icon1point5x clickable icon-info-sign" title="Show Details" ng-click="showProfile(profile)"></i>
</div>

</div>
</div>
</div>
Expand Down
9 changes: 8 additions & 1 deletion hawtio-web/src/main/webapp/app/fabric/js/fabricView.ts
Expand Up @@ -269,7 +269,14 @@ module Fabric {
};


$scope.removeActiveProfiles = (profile) => {
$scope.removeActiveProfiles = () => {
$scope.selectedActiveProfiles.each((profile) => {
$scope.removeActiveProfile(profile);
});
};


$scope.removeActiveProfile = (profile) => {
if ($scope.selectedContainers.length > 0) {
$scope.selectedContainers.each((container) => {
if (container.profileIds.some(profile.id) && container.versionId === profile.versionId) {
Expand Down

0 comments on commit 6fa66de

Please sign in to comment.