Add support for max hosts on org

This commit is contained in:
mabashian
2019-02-21 16:42:46 -05:00
committed by Jeff Bradberry
parent 046385d72e
commit ce5a85a53b
8 changed files with 45 additions and 13 deletions

View File

@@ -236,6 +236,17 @@ function getLicenseErrorDetails () {
return { label, value };
}
function getHostLimitErrorDetails () {
if (!resource.model.has('org_host_limit_error')) {
return null;
}
const label = strings.get('labels.HOST_LIMIT_ERROR');
const value = resource.model.get('org_host_limit_error');
return { label, value };
}
function getLaunchedByDetails () {
const createdBy = resource.model.get('summary_fields.created_by');
const jobTemplate = resource.model.get('summary_fields.job_template');
@@ -804,6 +815,7 @@ function JobDetailsController (
vm.overwrite = getOverwriteDetails();
vm.overwriteVars = getOverwriteVarsDetails();
vm.licenseError = getLicenseErrorDetails();
vm.hostLimitError = getHostLimitErrorDetails();
// Relaunch and Delete Components
vm.job = angular.copy(_.get(resource.model, 'model.GET', {}));

View File

@@ -81,6 +81,14 @@
</div>
</div>
<!-- HOST LIMIT ERROR DETAIL -->
<div class="JobResults-resultRow" ng-show="vm.hostLimitError">
<label class="JobResults-resultRowLabel">{{ vm.hostLimitError.label }}</label>
<div class="JobResults-resultRowText">
{{ vm.hostLimitError.value }}
</div>
</div>
<!-- START TIME DETAIL -->
<div class="JobResults-resultRow" ng-if="vm.started">
<label class="JobResults-resultRowLabel">{{ vm.started.label }}</label>

View File

@@ -57,6 +57,7 @@ function OutputStrings (BaseString) {
EXTRA_VARS: t.s('Extra Variables'),
FINISHED: t.s('Finished'),
FORKS: t.s('Forks'),
HOST_LIMIT_ERROR: t.s('Host Limit Error'),
INSTANCE_GROUP: t.s('Instance Group'),
INVENTORY: t.s('Inventory'),
INVENTORY_SCM: t.s('Source Project'),