mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 02:50:02 -03:30
Fixed up launched by when jt/wfjt is launched via schedule
This commit is contained in:
parent
7a9c4c00a2
commit
81f5a0fea5
@ -50,15 +50,26 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy
|
||||
|
||||
var getTowerLinks = function() {
|
||||
var getTowerLink = function(key) {
|
||||
if ($scope.job.related[key]) {
|
||||
return '/#/' + $scope.job.related[key]
|
||||
.split('api/v1/')[1];
|
||||
} else {
|
||||
return null;
|
||||
if(key === 'schedule') {
|
||||
if($scope.job.related.schedule) {
|
||||
return '/#/templates/job_template/' + $scope.job.job_template + '/schedules' + $scope.job.related.schedule.split('api/v1/schedules')[1];
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($scope.job.related[key]) {
|
||||
return '/#/' + $scope.job.related[key]
|
||||
.split('api/v1/')[1];
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
$scope.created_by_link = getTowerLink('created_by');
|
||||
$scope.scheduled_by_link = getTowerLink('schedule');
|
||||
$scope.inventory_link = getTowerLink('inventory');
|
||||
$scope.project_link = getTowerLink('project');
|
||||
$scope.machine_credential_link = getTowerLink('credential');
|
||||
@ -316,7 +327,7 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy
|
||||
.stdout)($scope.events[mungedEvent
|
||||
.counter]));
|
||||
};
|
||||
|
||||
|
||||
if (!$scope.events[mungedEvent.counter]) {
|
||||
// line hasn't been put in the pane yet
|
||||
|
||||
|
||||
@ -26,17 +26,27 @@ export default ['workflowData',
|
||||
|
||||
var getTowerLinks = function() {
|
||||
var getTowerLink = function(key) {
|
||||
if ($scope.workflow.related[key]) {
|
||||
return '/#/' + $scope.workflow.related[key]
|
||||
.split('api/v1/')[1];
|
||||
if(key === 'schedule') {
|
||||
if($scope.workflow.related.schedule) {
|
||||
return '/#/templates/workflow_job_template/' + $scope.workflow.workflow_job_template + '/schedules' + $scope.workflow.related.schedule.split('api/v1/schedules')[1];
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
if ($scope.workflow.related[key]) {
|
||||
return '/#/' + $scope.workflow.related[key]
|
||||
.split('api/v1/')[1];
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
$scope.workflow_template_link = '/#/templates/workflow_job_template/'+$scope.workflow.workflow_job_template;
|
||||
$scope.created_by_link = getTowerLink('created_by');
|
||||
$scope.scheduled_by_link = getTowerLink('schedule');console.log($scope.scheduled_by_link);
|
||||
$scope.cloud_credential_link = getTowerLink('cloud_credential');
|
||||
$scope.network_credential_link = getTowerLink('network_credential');
|
||||
};
|
||||
|
||||
@ -113,6 +113,21 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- SCHEDULED BY DETAIL -->
|
||||
<div class="WorkflowResults-resultRow toggle-show"
|
||||
ng-show="workflow.summary_fields.schedule.name">
|
||||
<label
|
||||
class="WorkflowResults-resultRowLabel">
|
||||
Launched By
|
||||
</label>
|
||||
<div class="WorkflowResults-resultRowText">
|
||||
<a href="{{ scheduled_by_link }}"
|
||||
aw-tool-tip="Edit the Schedule"
|
||||
data-placement="top">
|
||||
{{ workflow.summary_fields.schedule.name }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- EXTRA VARIABLES DETAIL -->
|
||||
<div class="WorkflowResults-resultRow
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user