mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 16:51:11 +03:00
Add capacity adjustment slider label
This commit is contained in:
parent
e58038b056
commit
c156a0af99
@ -23,12 +23,13 @@
|
||||
<span class="form-control Form-textInput Form-textInput--variableHeight LabelList-lookupTags"
|
||||
ng-if="state._lookupTags">
|
||||
<div class="LabelList-tagContainer" ng-repeat="tag in state._value track by $index">
|
||||
<div class="LabelList-deleteContainer" ng-click="vm.removeTag(tag)">
|
||||
<i class="fa fa-times LabelList-tagDelete"></i>
|
||||
</div>
|
||||
<div class="LabelList-tag LabelList-tag--deletable">
|
||||
<span ng-if="tag.hostname" class="LabelList-name">{{ tag.hostname }}</span>
|
||||
<span ng-if="!tag.hostname" class="LabelList-name">{{ tag }}</span>
|
||||
<div class="LabelList-tag LabelList-tag--deletable">
|
||||
<span ng-if="tag.hostname" class="LabelList-name">{{ tag.hostname }}</span>
|
||||
<span ng-if="!tag.hostname" class="LabelList-name">{{ tag }}</span>
|
||||
</div>
|
||||
<div class="LabelList-deleteContainer" ng-click="vm.removeTag(tag)">
|
||||
<i class="fa fa-times LabelList-tagDelete"></i>
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -1,7 +1,18 @@
|
||||
.CapacityAdjuster {
|
||||
margin-right: @at-space-4x;
|
||||
position: relative;
|
||||
|
||||
&-valueLabel {
|
||||
bottom: @at-space-5x;
|
||||
color: @at-color-body-text;
|
||||
font-size: @at-font-size;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.at-InputSlider {
|
||||
align-items: center;
|
||||
margin-right: @at-space-4x;
|
||||
}
|
||||
|
||||
.at-InputSlider p {
|
||||
|
@ -1,4 +1,5 @@
|
||||
<div class="CapacityAdjuster">
|
||||
<span class="CapacityAdjuster-valueLabel">{{ state.capacity_adjustment }}</span>
|
||||
<div class="at-InputSlider">
|
||||
<p>{{min_capacity.label}} {{min_capacity.value}}</p>
|
||||
<input string-to-number
|
||||
|
@ -75,12 +75,8 @@ angular.module('AWDirectives', ['RestServices', 'Utilities'])
|
||||
require: 'ngModel',
|
||||
restrict: 'A',
|
||||
link: function(scope, element, attrs, ngModel) {
|
||||
ngModel.$parsers.push(function(value) {
|
||||
return '' + value;
|
||||
});
|
||||
ngModel.$formatters.push(function(value) {
|
||||
return parseFloat(value);
|
||||
});
|
||||
ngModel.$parsers.push(value => value.toFixed(2));
|
||||
ngModel.$formatters.push(value => parseFloat(value));
|
||||
}
|
||||
};
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user