mirror of
https://github.com/ansible/awx.git
synced 2026-02-17 19:20:05 -03:30
changing default number of rows for host facts based
on the presence/abscence of facts
This commit is contained in:
@@ -22,6 +22,7 @@ function(i18n) {
|
|||||||
formLabelSize: 'col-lg-3',
|
formLabelSize: 'col-lg-3',
|
||||||
formFieldSize: 'col-lg-9',
|
formFieldSize: 'col-lg-9',
|
||||||
iterator: 'host',
|
iterator: 'host',
|
||||||
|
detailsClick: "$state.go('hosts.edit', null, {reload:true})",
|
||||||
activeEditState: 'hosts.edit',
|
activeEditState: 'hosts.edit',
|
||||||
stateTree: 'hosts',
|
stateTree: 'hosts',
|
||||||
headerFields:{
|
headerFields:{
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ function(i18n) {
|
|||||||
formLabelSize: 'col-lg-3',
|
formLabelSize: 'col-lg-3',
|
||||||
formFieldSize: 'col-lg-9',
|
formFieldSize: 'col-lg-9',
|
||||||
iterator: 'host',
|
iterator: 'host',
|
||||||
|
detailsClick: "$state.go('inventories.edit.hosts.edit', null, {reload:true})",
|
||||||
stateTree: 'inventories.edit.hosts',
|
stateTree: 'inventories.edit.hosts',
|
||||||
headerFields:{
|
headerFields:{
|
||||||
enabled: {
|
enabled: {
|
||||||
|
|||||||
@@ -8,15 +8,16 @@ function AnsibleFacts($scope, Facts, ParseTypeChange, ParseVariableString) {
|
|||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
$scope.facts = ParseVariableString(Facts.data);
|
$scope.facts = ParseVariableString(Facts.data);
|
||||||
|
let rows = (_.isEmpty(Facts.data)) ? 6 : 20;
|
||||||
|
$("#host_facts").attr("rows", rows);
|
||||||
$scope.parseType = 'yaml';
|
$scope.parseType = 'yaml';
|
||||||
ParseTypeChange({
|
ParseTypeChange({
|
||||||
scope: $scope,
|
scope: $scope,
|
||||||
variable: 'facts',
|
variable: 'facts',
|
||||||
parse_variable: 'parseType',
|
parse_variable: 'parseType',
|
||||||
field_id: 'host_facts',
|
field_id: 'host_facts',
|
||||||
readOnly: true
|
readOnly: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<span class="Form-inputLabel" translate>FACTS</span>
|
<span class="Form-inputLabel" translate>FACTS</span>
|
||||||
</label>
|
</label>
|
||||||
<div>
|
<div>
|
||||||
<textarea rows="10" ng-model="facts" name="facts" class="form-control Form-textArea Form-formGroup--fullWidth" id="host_facts"></textarea>
|
<textarea rows="6" ng-model="facts" name="facts" class="form-control Form-textArea Form-formGroup--fullWidth" id="host_facts"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
Reference in New Issue
Block a user