1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

changing default number of rows for host facts based

on the presence/abscence of facts
This commit is contained in:
Jared Tabor 2017-08-02 15:54:06 -07:00
parent 2f07c0a2e5
commit 93da7c9626
4 changed files with 11 additions and 8 deletions

View File

@ -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:{

View File

@ -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: {

View File

@ -8,7 +8,8 @@ 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,

View File

@ -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>