mirror of
https://github.com/ansible/awx.git
synced 2026-07-11 08:18:07 -02:30
assorted UI work to support the new branch field
update project to have allow branch override checkbox add new text input for branch field adjust show/hide for branch and playbook jt fields make playbook field allowed to add a new option not in the dropdown update job results ui to show branch update prompting to support new branch field
This commit is contained in:
committed by
AlanCoding
parent
ac86dc4fb9
commit
76dcd57ac6
@@ -343,6 +343,17 @@ function getProjectUpdateDetails (updateId) {
|
||||
return { link, tooltip };
|
||||
}
|
||||
|
||||
function getSCMBranchDetails (scmBranch) {
|
||||
const label = strings.get('labels.SCM_BRANCH');
|
||||
const value = scmBranch || resource.model.get('scm_branch');
|
||||
|
||||
if (!value) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return { label, value };
|
||||
}
|
||||
|
||||
function getInventoryScmDetails (updateId, updateStatus) {
|
||||
const projectId = resource.model.get('summary_fields.source_project.id');
|
||||
const projectName = resource.model.get('summary_fields.source_project.name');
|
||||
@@ -800,6 +811,7 @@ function JobDetailsController (
|
||||
vm.project = getProjectDetails();
|
||||
vm.projectUpdate = getProjectUpdateDetails();
|
||||
vm.projectStatus = getProjectStatusDetails();
|
||||
vm.scmBranch = getSCMBranchDetails();
|
||||
vm.scmRevision = getSCMRevisionDetails();
|
||||
vm.inventoryScm = getInventoryScmDetails();
|
||||
vm.playbook = getPlaybookDetails();
|
||||
@@ -840,6 +852,7 @@ function JobDetailsController (
|
||||
started,
|
||||
finished,
|
||||
scm,
|
||||
scmBranch,
|
||||
inventoryScm,
|
||||
scmRevision,
|
||||
instanceGroup,
|
||||
@@ -851,6 +864,7 @@ function JobDetailsController (
|
||||
vm.finished = getFinishDetails(finished);
|
||||
vm.projectUpdate = getProjectUpdateDetails(scm.id);
|
||||
vm.projectStatus = getProjectStatusDetails(scm.status);
|
||||
vm.scmBranch = getSCMBranchDetails(scmBranch);
|
||||
vm.environment = getEnvironmentDetails(environment);
|
||||
vm.artifacts = getArtifactsDetails(artifacts);
|
||||
vm.executionNode = getExecutionNodeDetails(executionNode);
|
||||
|
||||
@@ -218,6 +218,12 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- BRANCH DETAIL -->
|
||||
<div class="JobResults-resultRow" ng-if="vm.scmBranch">
|
||||
<label class="JobResults-resultRowLabel">{{ vm.scmBranch.label }}</label>
|
||||
<div class="JobResults-resultRowText">{{ vm.scmBranch.value }}</div>
|
||||
</div>
|
||||
|
||||
<!-- INVENTORY SCM DETAIL -->
|
||||
<div class="JobResults-resultRow" ng-if="!vm.project && vm.inventoryScm">
|
||||
<label class="JobResults-resultRowLabel">{{ vm.inventoryScm.label }}</label>
|
||||
|
||||
@@ -78,6 +78,7 @@ function OutputStrings (BaseString) {
|
||||
OVERWRITE_VARS: t.s('Overwrite Vars'),
|
||||
PLAYBOOK: t.s('Playbook'),
|
||||
PROJECT: t.s('Project'),
|
||||
SCM_BRANCH: t.s('Branch'),
|
||||
RESULT_TRACEBACK: t.s('Error Details'),
|
||||
SCM_REVISION: t.s('Revision'),
|
||||
SKIP_TAGS: t.s('Skip Tags'),
|
||||
|
||||
@@ -45,6 +45,7 @@ function JobStatusService (moment, message) {
|
||||
id: model.get('summary_fields.project_update.id'),
|
||||
status: model.get('summary_fields.project_update.status')
|
||||
},
|
||||
scmBranch: model.get('scm_branch'),
|
||||
inventoryScm: {
|
||||
id: model.get('source_project_update'),
|
||||
status: model.get('summary_fields.inventory_source.status')
|
||||
|
||||
Reference in New Issue
Block a user