Uses atCodeMirror directive for extra vars widget on workflow results page

This commit is contained in:
Jared Tabor 2018-05-15 18:09:07 -07:00
parent 29927433cb
commit 3658ce1a93
No known key found for this signature in database
GPG Key ID: 1B343EC4C3CF7E5C
4 changed files with 13 additions and 27 deletions

View File

@ -288,7 +288,6 @@
variables="{{ vm.extraVars.value }}"
tooltip="{{ vm.extraVars.tooltip }}"
label="{{ vm.extraVars.label}}"
label-class="JobResults-resultRowLabel"
disabled="{{ vm.extraVars.disabled }}">
</at-code-mirror>

View File

@ -137,7 +137,6 @@
margin-left: 20px;
}
.WorkflowResults-extraVarsHelp {
margin-left: 10px;
color: @default-icon;
.WorkflowResults-extraVarsLabel {
font-size:14px!important;
}

View File

@ -84,9 +84,9 @@ export default ['workflowData', 'workflowResultsService', 'workflowDataOptions',
// set up a read only code mirror for extra vars
$scope.variables = ParseVariableString($scope.workflow.extra_vars);
$scope.parseType = 'yaml';
ParseTypeChange({ scope: $scope,
field_id: 'pre-formatted-variables',
readOnly: true });
$scope.varsTooltip= i18n._('Read only view of extra variables added to the workflow.');
$scope.varsLabel = i18n._('Extra Variables');
// Click binding for the expand/collapse button on the standard out log
$scope.stdoutFullScreen = false;

View File

@ -145,26 +145,14 @@
</div>
<!-- EXTRA VARIABLES DETAIL -->
<div class="WorkflowResults-resultRow
WorkflowResults-resultRow--variables"
ng-show="variables">
<label class="WorkflowResults-resultRowLabel
WorkflowResults-resultRowLabel--fullWidth">
Extra Variables
<i class="WorkflowResults-extraVarsHelp fa fa-question-circle"
aw-tool-tip="{{'Read only view of extra variables added to the workflow.'|translate}}"
data-placement="top">
</i>
</label>
<textarea
rows="6"
ng-model="variables"
name="variables"
class="form-control Form-textArea Form-textAreaLabel Form-formGroup--fullWidth"
id="pre-formatted-variables"
disabled="disabled">
</textarea>
</div>
<at-code-mirror
ng-if="variables"
variables="{{ variables }}"
tooltip="{{ varsTooltip }}"
label="{{ varsLabel }}"
label-class="WorkflowResults-extraVarsLabel"
disabled="disabled">
</at-code-mirror>
<!-- LABELS DETAIL -->
<div class="WorkflowResults-resultRow"