mirror of
https://github.com/ansible/awx.git
synced 2026-03-21 02:47:35 -02:30
Merge pull request #3089 from marshmalien/2330-execution-node
Add execution node field to job details panel Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
@@ -481,6 +481,19 @@ function getLimitDetails () {
|
|||||||
return { label, value };
|
return { label, value };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getExecutionNodeDetails (node) {
|
||||||
|
const executionNode = node || resource.model.get('execution_node');
|
||||||
|
|
||||||
|
if (!executionNode) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
const label = strings.get('labels.EXECUTION_NODE');
|
||||||
|
const value = $filter('sanitize')(executionNode);
|
||||||
|
|
||||||
|
return { label, value };
|
||||||
|
}
|
||||||
|
|
||||||
function getInstanceGroupDetails () {
|
function getInstanceGroupDetails () {
|
||||||
const instanceGroup = resource.model.get('summary_fields.instance_group');
|
const instanceGroup = resource.model.get('summary_fields.instance_group');
|
||||||
|
|
||||||
@@ -761,6 +774,7 @@ function JobDetailsController (
|
|||||||
vm.credentials = getCredentialDetails();
|
vm.credentials = getCredentialDetails();
|
||||||
vm.forks = getForkDetails();
|
vm.forks = getForkDetails();
|
||||||
vm.limit = getLimitDetails();
|
vm.limit = getLimitDetails();
|
||||||
|
vm.executionNode = getExecutionNodeDetails();
|
||||||
vm.instanceGroup = getInstanceGroupDetails();
|
vm.instanceGroup = getInstanceGroupDetails();
|
||||||
vm.jobTags = getJobTagDetails();
|
vm.jobTags = getJobTagDetails();
|
||||||
vm.skipTags = getSkipTagDetails();
|
vm.skipTags = getSkipTagDetails();
|
||||||
@@ -782,12 +796,21 @@ function JobDetailsController (
|
|||||||
vm.toggleLabels = toggleLabels;
|
vm.toggleLabels = toggleLabels;
|
||||||
vm.showLabels = showLabels;
|
vm.showLabels = showLabels;
|
||||||
|
|
||||||
unsubscribe = subscribe(({ status, started, finished, scm, inventoryScm, environment }) => {
|
unsubscribe = subscribe(({
|
||||||
|
status,
|
||||||
|
started,
|
||||||
|
finished,
|
||||||
|
scm,
|
||||||
|
inventoryScm,
|
||||||
|
environment,
|
||||||
|
executionNode
|
||||||
|
}) => {
|
||||||
vm.started = getStartDetails(started);
|
vm.started = getStartDetails(started);
|
||||||
vm.finished = getFinishDetails(finished);
|
vm.finished = getFinishDetails(finished);
|
||||||
vm.projectUpdate = getProjectUpdateDetails(scm.id);
|
vm.projectUpdate = getProjectUpdateDetails(scm.id);
|
||||||
vm.projectStatus = getProjectStatusDetails(scm.status);
|
vm.projectStatus = getProjectStatusDetails(scm.status);
|
||||||
vm.environment = getEnvironmentDetails(environment);
|
vm.environment = getEnvironmentDetails(environment);
|
||||||
|
vm.executionNode = getExecutionNodeDetails(executionNode);
|
||||||
vm.inventoryScm = getInventoryScmDetails(inventoryScm.id, inventoryScm.status);
|
vm.inventoryScm = getInventoryScmDetails(inventoryScm.id, inventoryScm.status);
|
||||||
vm.status = getStatusDetails(status);
|
vm.status = getStatusDetails(status);
|
||||||
vm.job.status = status;
|
vm.job.status = status;
|
||||||
|
|||||||
@@ -295,6 +295,12 @@
|
|||||||
<div class="JobResults-resultRowText">{{ vm.environment.value }}</div>
|
<div class="JobResults-resultRowText">{{ vm.environment.value }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- EXECUTION Node DETAIL -->
|
||||||
|
<div class="JobResults-resultRow" ng-if="vm.executionNode">
|
||||||
|
<label class="JobResults-resultRowLabel">{{ vm.executionNode.label }}</label>
|
||||||
|
<div class="JobResults-resultRowText">{{ vm.executionNode.value }}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- IG DETAIL -->
|
<!-- IG DETAIL -->
|
||||||
<div class="JobResults-resultRow" ng-if="vm.instanceGroup">
|
<div class="JobResults-resultRow" ng-if="vm.instanceGroup">
|
||||||
<label class="JobResults-resultRowLabel">{{ vm.instanceGroup.label }}</label>
|
<label class="JobResults-resultRowLabel">{{ vm.instanceGroup.label }}</label>
|
||||||
@@ -320,7 +326,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- EXTRA VARIABLES DETAIL -->
|
<!-- EXTRA VARIABLES DETAIL -->
|
||||||
<at-code-mirror
|
<at-code-mirror
|
||||||
class="JobResults-resultRow"
|
class="JobResults-resultRow"
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ function OutputStrings (BaseString) {
|
|||||||
ns.labels = {
|
ns.labels = {
|
||||||
CREDENTIAL: t.s('Credential'),
|
CREDENTIAL: t.s('Credential'),
|
||||||
ENVIRONMENT: t.s('Environment'),
|
ENVIRONMENT: t.s('Environment'),
|
||||||
|
EXECUTION_NODE: t.s('Execution Node'),
|
||||||
EXTRA_VARS: t.s('Extra Variables'),
|
EXTRA_VARS: t.s('Extra Variables'),
|
||||||
FINISHED: t.s('Finished'),
|
FINISHED: t.s('Finished'),
|
||||||
FORKS: t.s('Forks'),
|
FORKS: t.s('Forks'),
|
||||||
|
|||||||
@@ -279,6 +279,12 @@ function JobStatusService (moment, message) {
|
|||||||
this.state.environment = env;
|
this.state.environment = env;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.setExecutionNode = node => {
|
||||||
|
if (!node) return;
|
||||||
|
|
||||||
|
this.state.executionNode = node;
|
||||||
|
};
|
||||||
|
|
||||||
this.setStatsEvent = data => {
|
this.setStatsEvent = data => {
|
||||||
if (!data) return;
|
if (!data) return;
|
||||||
|
|
||||||
@@ -321,6 +327,7 @@ function JobStatusService (moment, message) {
|
|||||||
this.setStarted(model.get('started'));
|
this.setStarted(model.get('started'));
|
||||||
this.setJobStatus(model.get('status'));
|
this.setJobStatus(model.get('status'));
|
||||||
this.setEnvironment(model.get('custom_virtualenv'));
|
this.setEnvironment(model.get('custom_virtualenv'));
|
||||||
|
this.setExecutionNode(model.get('execution_node'));
|
||||||
|
|
||||||
this.initHostStatusCounts({ model });
|
this.initHostStatusCounts({ model });
|
||||||
this.initPlaybookCounts({ model });
|
this.initPlaybookCounts({ model });
|
||||||
|
|||||||
Reference in New Issue
Block a user