mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 17:37:37 -02:30
Merge pull request #1574 from marshmalien/fix/capacity_adjustment_value
Add capacity adjuster slider label
This commit is contained in:
@@ -23,12 +23,13 @@
|
|||||||
<span class="form-control Form-textInput Form-textInput--variableHeight LabelList-lookupTags"
|
<span class="form-control Form-textInput Form-textInput--variableHeight LabelList-lookupTags"
|
||||||
ng-if="state._lookupTags">
|
ng-if="state._lookupTags">
|
||||||
<div class="LabelList-tagContainer" ng-repeat="tag in state._value track by $index">
|
<div class="LabelList-tagContainer" ng-repeat="tag in state._value track by $index">
|
||||||
<div class="LabelList-deleteContainer" ng-click="vm.removeTag(tag)">
|
<div class="LabelList-tag LabelList-tag--deletable">
|
||||||
<i class="fa fa-times LabelList-tagDelete"></i>
|
<span ng-if="tag.hostname" class="LabelList-name">{{ tag.hostname }}</span>
|
||||||
</div>
|
<span ng-if="!tag.hostname" class="LabelList-name">{{ tag }}</span>
|
||||||
<div class="LabelList-tag LabelList-tag--deletable">
|
</div>
|
||||||
<span ng-if="tag.hostname" class="LabelList-name">{{ tag.hostname }}</span>
|
<div class="LabelList-deleteContainer" ng-click="vm.removeTag(tag)">
|
||||||
<span ng-if="!tag.hostname" class="LabelList-name">{{ tag }}</span>
|
<i class="fa fa-times LabelList-tagDelete"></i>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,7 +1,18 @@
|
|||||||
.CapacityAdjuster {
|
.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 {
|
.at-InputSlider {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-right: @at-space-4x;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.at-InputSlider p {
|
.at-InputSlider p {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<div class="CapacityAdjuster">
|
<div class="CapacityAdjuster">
|
||||||
|
<span class="CapacityAdjuster-valueLabel">{{ state.capacity_adjustment }}</span>
|
||||||
<div class="at-InputSlider">
|
<div class="at-InputSlider">
|
||||||
<p>{{min_capacity.label}} {{min_capacity.value}}</p>
|
<p>{{min_capacity.label}} {{min_capacity.value}}</p>
|
||||||
<input string-to-number
|
<input string-to-number
|
||||||
|
|||||||
@@ -75,12 +75,8 @@ angular.module('AWDirectives', ['RestServices', 'Utilities'])
|
|||||||
require: 'ngModel',
|
require: 'ngModel',
|
||||||
restrict: 'A',
|
restrict: 'A',
|
||||||
link: function(scope, element, attrs, ngModel) {
|
link: function(scope, element, attrs, ngModel) {
|
||||||
ngModel.$parsers.push(function(value) {
|
ngModel.$parsers.push(value => value.toFixed(2));
|
||||||
return '' + value;
|
ngModel.$formatters.push(value => parseFloat(value));
|
||||||
});
|
|
||||||
ngModel.$formatters.push(function(value) {
|
|
||||||
return parseFloat(value);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user