show extra variables (if any) in the adhoc command results UI

see: #1744
This commit is contained in:
Ryan Petrello 2017-03-20 17:02:05 -04:00
parent d611fe2971
commit d0ae818685
2 changed files with 25 additions and 1 deletions

View File

@ -99,6 +99,26 @@
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>Verbosity</div>
<div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">{{ verbosity }}</div>
</div>
<div class="StandardOut-detailsRow" ng-show="job.extra_vars">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>
Extra Variables
<i class="StandardOut-extraVarsHelp fa fa-question-circle"
aw-tool-tip="Read only view of extra variables added to the ad-hoc command."
data-placement="top">
</i>
</div>
<div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">
<textarea
rows="6"
ng-model="extra_vars"
name="variables"
class="StandardOut-extraVars"
id="pre-formatted-variables">
</textarea>
</div>
</div>
</div>
</div>
</div>

View File

@ -149,7 +149,11 @@ export function JobStdoutController ($rootScope, $scope, $state, $stateParams,
}
if (data.extra_vars) {
ParseTypeChange({ scope: $scope, field_id: 'pre-formatted-variables' });
ParseTypeChange({
scope: $scope,
field_id: 'pre-formatted-variables',
readOnly: true
});
}
if ($scope.job.type === 'inventory_update' && !$scope.inv_manage_group_link) {