mirror of
https://github.com/ansible/awx.git
synced 2026-02-17 03:00:04 -03:30
Fixed up launched by when jt/wfjt is launched via schedule
This commit is contained in:
@@ -50,15 +50,26 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy
|
|||||||
|
|
||||||
var getTowerLinks = function() {
|
var getTowerLinks = function() {
|
||||||
var getTowerLink = function(key) {
|
var getTowerLink = function(key) {
|
||||||
if ($scope.job.related[key]) {
|
if(key === 'schedule') {
|
||||||
return '/#/' + $scope.job.related[key]
|
if($scope.job.related.schedule) {
|
||||||
.split('api/v1/')[1];
|
return '/#/templates/job_template/' + $scope.job.job_template + '/schedules' + $scope.job.related.schedule.split('api/v1/schedules')[1];
|
||||||
} else {
|
}
|
||||||
return null;
|
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.created_by_link = getTowerLink('created_by');
|
||||||
|
$scope.scheduled_by_link = getTowerLink('schedule');
|
||||||
$scope.inventory_link = getTowerLink('inventory');
|
$scope.inventory_link = getTowerLink('inventory');
|
||||||
$scope.project_link = getTowerLink('project');
|
$scope.project_link = getTowerLink('project');
|
||||||
$scope.machine_credential_link = getTowerLink('credential');
|
$scope.machine_credential_link = getTowerLink('credential');
|
||||||
@@ -316,7 +327,7 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy
|
|||||||
.stdout)($scope.events[mungedEvent
|
.stdout)($scope.events[mungedEvent
|
||||||
.counter]));
|
.counter]));
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!$scope.events[mungedEvent.counter]) {
|
if (!$scope.events[mungedEvent.counter]) {
|
||||||
// line hasn't been put in the pane yet
|
// line hasn't been put in the pane yet
|
||||||
|
|
||||||
|
|||||||
@@ -26,17 +26,27 @@ export default ['workflowData',
|
|||||||
|
|
||||||
var getTowerLinks = function() {
|
var getTowerLinks = function() {
|
||||||
var getTowerLink = function(key) {
|
var getTowerLink = function(key) {
|
||||||
if ($scope.workflow.related[key]) {
|
if(key === 'schedule') {
|
||||||
return '/#/' + $scope.workflow.related[key]
|
if($scope.workflow.related.schedule) {
|
||||||
.split('api/v1/')[1];
|
return '/#/templates/workflow_job_template/' + $scope.workflow.workflow_job_template + '/schedules' + $scope.workflow.related.schedule.split('api/v1/schedules')[1];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
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.workflow_template_link = '/#/templates/workflow_job_template/'+$scope.workflow.workflow_job_template;
|
||||||
$scope.created_by_link = getTowerLink('created_by');
|
$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.cloud_credential_link = getTowerLink('cloud_credential');
|
||||||
$scope.network_credential_link = getTowerLink('network_credential');
|
$scope.network_credential_link = getTowerLink('network_credential');
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -113,6 +113,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</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 -->
|
<!-- EXTRA VARIABLES DETAIL -->
|
||||||
<div class="WorkflowResults-resultRow
|
<div class="WorkflowResults-resultRow
|
||||||
|
|||||||
Reference in New Issue
Block a user