mirror of
https://github.com/ansible/awx.git
synced 2026-05-15 21:37:42 -02:30
Style Instance Groups tags to appear like Labels
This commit is contained in:
@@ -4,7 +4,12 @@ export default ['$scope',
|
|||||||
$scope.instanceGroupsTags = [];
|
$scope.instanceGroupsTags = [];
|
||||||
|
|
||||||
$scope.$watch('instanceGroups', function() {
|
$scope.$watch('instanceGroups', function() {
|
||||||
$scope.instanceGroupsTags = _.map($scope.instanceGroups, (item) => item.name);
|
$scope.instanceGroupsTags = $scope.instanceGroups;
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
|
$scope.deleteTag = function(tag){
|
||||||
|
_.remove($scope.instanceGroups, {id: tag.id});
|
||||||
|
console.log($scope.instanceGroups);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
#InstanceGroups {
|
||||||
|
display: flex;
|
||||||
|
padding: 0 12px;
|
||||||
|
}
|
||||||
@@ -4,9 +4,15 @@
|
|||||||
<i class="fa fa-search"></i>
|
<i class="fa fa-search"></i>
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
<span class="form-control Form-textInput Form-textInput--variableHeight input-medium lookup" style="padding: 4px 6px;">
|
<span id="InstanceGroups" class="form-control Form-textInput Form-textInput--variableHeight input-medium lookup">
|
||||||
<span class="LabelList-tag" ng-repeat="tag in instanceGroupsTags">
|
<div class="LabelList-tagContainer" ng-repeat="tag in instanceGroupsTags">
|
||||||
<span class="LabelList-name">{{ tag }}</span>
|
<div class="LabelList-deleteContainer"
|
||||||
</span>
|
ng-click="deleteTag(tag)">
|
||||||
|
<i class="fa fa-times LabelList-tagDelete"></i>
|
||||||
|
</div>
|
||||||
|
<div class="LabelList-tag LabelList-tag--deletable">
|
||||||
|
<span class="LabelList-name">{{ tag.name }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
Reference in New Issue
Block a user