Update I18N strings after I18N QE

Signed-off-by: Takao Fujiwara <takao.fujiwara1@gmail.com>
This commit is contained in:
Takao Fujiwara
2017-01-30 17:51:15 +09:00
parent 131a0edfb4
commit 06883e6fda
46 changed files with 2355 additions and 1284 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -13,6 +13,7 @@ from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.fields import GenericForeignKey
from django.utils.translation import ugettext_lazy as _
# AWX # AWX
@@ -33,29 +34,29 @@ ROLE_SINGLETON_SYSTEM_ADMINISTRATOR='system_administrator'
ROLE_SINGLETON_SYSTEM_AUDITOR='system_auditor' ROLE_SINGLETON_SYSTEM_AUDITOR='system_auditor'
role_names = { role_names = {
'system_administrator' : 'System Administrator', 'system_administrator' : _('System Administrator'),
'system_auditor' : 'System Auditor', 'system_auditor' : _('System Auditor'),
'adhoc_role' : 'Ad Hoc', 'adhoc_role' : _('Ad Hoc'),
'admin_role' : 'Admin', 'admin_role' : _('Admin'),
'auditor_role' : 'Auditor', 'auditor_role' : _('Auditor'),
'execute_role' : 'Execute', 'execute_role' : _('Execute'),
'member_role' : 'Member', 'member_role' : _('Member'),
'read_role' : 'Read', 'read_role' : _('Read'),
'update_role' : 'Update', 'update_role' : _('Update'),
'use_role' : 'Use', 'use_role' : _('Use'),
} }
role_descriptions = { role_descriptions = {
'system_administrator' : 'Can manage all aspects of the system', 'system_administrator' : _('Can manage all aspects of the system'),
'system_auditor' : 'Can view all settings on the system', 'system_auditor' : _('Can view all settings on the system'),
'adhoc_role' : 'May run ad hoc commands on an inventory', 'adhoc_role' : _('May run ad hoc commands on an inventory'),
'admin_role' : 'Can manage all aspects of the %s', 'admin_role' : _('Can manage all aspects of the %s'),
'auditor_role' : 'Can view all settings for the %s', 'auditor_role' : _('Can view all settings for the %s'),
'execute_role' : 'May run the %s', 'execute_role' : _('May run the %s'),
'member_role' : 'User is a member of the %s', 'member_role' : _('User is a member of the %s'),
'read_role' : 'May view settings for the %s', 'read_role' : _('May view settings for the %s'),
'update_role' : 'May update project or inventory or group using the configured source update system', 'update_role' : _('May update project or inventory or group using the configured source update system'),
'use_role' : 'Can use the %s in a job template', 'use_role' : _('Can use the %s in a job template'),
} }

View File

@@ -23,10 +23,10 @@
<span class="AddPermissions-directionNumber"> <span class="AddPermissions-directionNumber">
1 1
</span> </span>
<div ng-hide='withoutTeamPermissions'> <div ng-hide='withoutTeamPermissions' translate>
Please select Users / Teams from the lists below. Please select Users / Teams from the lists below.
</div> </div>
<div ng-show='withoutTeamPermissions'> <div ng-show='withoutTeamPermissions' translate>
Please select Users from the list below. Please select Users from the list below.
</div> </div>
</div> </div>
@@ -34,12 +34,12 @@
<div class="Form-tabHolder" ng-hide='withoutTeamPermissions'> <div class="Form-tabHolder" ng-hide='withoutTeamPermissions'>
<div id="users_tab" class="Form-tab" <div id="users_tab" class="Form-tab"
ng-click="toggleFormTabs('users')" ng-click="toggleFormTabs('users')"
ng-class="{'is-selected': usersSelected }"> ng-class="{'is-selected': usersSelected }" translate>
Users Users
</div> </div>
<div id="teams_tab" class="Form-tab" <div id="teams_tab" class="Form-tab"
ng-click="toggleFormTabs('teams')" ng-click="toggleFormTabs('teams')"
ng-class="{'is-selected': teamsSelected }"> ng-class="{'is-selected': teamsSelected }" translate>
Teams Teams
</div> </div>
</div> </div>
@@ -59,7 +59,7 @@
<span class="AddPermissions-directionNumber"> <span class="AddPermissions-directionNumber">
2 2
</span> </span>
Please assign roles to the selected users/teams <translate>Please assign roles to the selected users/teams</translate>
<div class="AddPermissions-keyToggle btn" <div class="AddPermissions-keyToggle btn"
ng-class="{'is-active': showKeyPane}" ng-class="{'is-active': showKeyPane}"
ng-click="toggleKeyPane()"> ng-click="toggleKeyPane()">

View File

@@ -26,7 +26,7 @@
<span class="AddPermissions-directionNumber"> <span class="AddPermissions-directionNumber">
1 1
</span> </span>
<div> <div translate>
Please select resources from the lists below. Please select resources from the lists below.
</div> </div>
</div> </div>
@@ -34,30 +34,30 @@
<div class="Form-tabHolder"> <div class="Form-tabHolder">
<div class="Form-tab" <div class="Form-tab"
ng-click="selectTab('job_templates')" ng-click="selectTab('job_templates')"
ng-class="{'is-selected': tab.job_templates }"> ng-class="{'is-selected': tab.job_templates }" translate>
Job Templates Job Templates
</div> </div>
<div class="Form-tab" <div class="Form-tab"
ng-click="selectTab('workflow_templates')" ng-click="selectTab('workflow_templates')"
ng-class="{'is-selected': tab.workflow_templates}" ng-class="{'is-selected': tab.workflow_templates}"
> translate>
Workflow Templates Workflow Templates
</div> </div>
<div class="Form-tab" <div class="Form-tab"
ng-click="selectTab('projects')" ng-click="selectTab('projects')"
ng-class="{'is-selected': tab.projects }"> ng-class="{'is-selected': tab.projects }" translate>
Projects Projects
</div> </div>
<div class="Form-tab" <div class="Form-tab"
ng-click="selectTab('inventories')" ng-click="selectTab('inventories')"
ng-class="{'is-selected': tab.inventories}" ng-class="{'is-selected': tab.inventories}"
> translate>
Inventories Inventories
</div> </div>
<div class="Form-tab" <div class="Form-tab"
ng-click="selectTab('credentials')" ng-click="selectTab('credentials')"
ng-class="{'is-selected': tab.credentials}" ng-class="{'is-selected': tab.credentials}"
> translate>
Credentials Credentials
</div> </div>
</div> </div>
@@ -86,10 +86,10 @@
<span class="AddPermissions-directionNumber"> <span class="AddPermissions-directionNumber">
2 2
</span> </span>
Please assign roles to the selected resources <translate>Please assign roles to the selected resources</translate>
<div class="AddPermissions-keyToggle btn" <div class="AddPermissions-keyToggle btn"
ng-class="{'is-active': showKeyPane}" ng-class="{'is-active': showKeyPane}"
ng-click="toggleKeyPane()"> ng-click="toggleKeyPane()" translate>
Key Key
</div> </div>
</div> </div>
@@ -97,34 +97,34 @@
<div class="Form-tab" <div class="Form-tab"
ng-click="selectTab('job_templates')" ng-click="selectTab('job_templates')"
ng-class="{'is-selected': tab.job_templates }" ng-class="{'is-selected': tab.job_templates }"
ng-show="showSection2Tab('job_templates')"> ng-show="showSection2Tab('job_templates')" translate>
Job Templates Job Templates
</div> </div>
<div class="Form-tab" <div class="Form-tab"
ng-click="selectTab('workflow_templates')" ng-click="selectTab('workflow_templates')"
ng-class="{'is-selected': tab.workflow_templates }" ng-class="{'is-selected': tab.workflow_templates }"
ng-show="showSection2Tab('workflow_templates')"> ng-show="showSection2Tab('workflow_templates')" translate>
Workflow Templates Workflow Templates
</div> </div>
<div class="Form-tab" <div class="Form-tab"
ng-click="selectTab('projects')" ng-click="selectTab('projects')"
ng-class="{'is-selected': tab.projects}" ng-class="{'is-selected': tab.projects}"
ng-show="showSection2Tab('projects')" ng-show="showSection2Tab('projects')"
> translate>
Projects Projects
</div> </div>
<div class="Form-tab" <div class="Form-tab"
ng-click="selectTab('inventories')" ng-click="selectTab('inventories')"
ng-class="{'is-selected': tab.inventories}" ng-class="{'is-selected': tab.inventories}"
ng-show="showSection2Tab('inventories')" ng-show="showSection2Tab('inventories')"
> translate>
Inventories Inventories
</div> </div>
<div class="Form-tab" <div class="Form-tab"
ng-click="selectTab('credentials')" ng-click="selectTab('credentials')"
ng-class="{'is-selected': tab.credentials}" ng-class="{'is-selected': tab.credentials}"
ng-show="showSection2Tab('credentials')" ng-show="showSection2Tab('credentials')"
> translate>
Credentials Credentials
</div> </div>
</div> </div>
@@ -170,13 +170,13 @@
<div class="buttons Form-buttons AddPermissions-buttons"> <div class="buttons Form-buttons AddPermissions-buttons">
<button type="button" <button type="button"
class="btn btn-sm Form-cancelButton" class="btn btn-sm Form-cancelButton"
ng-click="closeModal()"> ng-click="closeModal()" translate>
Cancel Cancel
</button> </button>
<button type="button" <button type="button"
class="btn btn-sm Form-saveButton" class="btn btn-sm Form-saveButton"
ng-click="saveForm()" ng-click="saveForm()"
ng-disabled="!saveEnabled()"> ng-disabled="!saveEnabled()" translate>
Save Save
</button> </button>
</div> </div>

View File

@@ -5,7 +5,7 @@
*************************************************/ *************************************************/
export default function() { export default ['i18n', function(i18n) {
return { return {
searchSize: 'col-lg-12 col-md-12 col-sm-12 col-xs-12', searchSize: 'col-lg-12 col-md-12 col-sm-12 col-xs-12',
name: 'teams', name: 'teams',
@@ -15,19 +15,20 @@
multiSelectExtended: true, multiSelectExtended: true,
index: false, index: false,
hover: true, hover: true,
emptyListText : 'No Teams exist', emptyListText : i18n._('No Teams exist'),
fields: { fields: {
name: { name: {
key: true, key: true,
label: 'name' label: i18n._('name')
}, },
organization: { organization: {
label: 'organization', label: i18n._('organization'),
ngBind: 'team.summary_fields.organization.name', ngBind: 'team.summary_fields.organization.name',
sourceModel: 'organization', sourceModel: 'organization',
sourceField: 'name' sourceField: 'name',
searchable: true
} }
} }
}; };
} }];

View File

@@ -5,7 +5,7 @@
*************************************************/ *************************************************/
export default function() { export default ['i18n', function(i18n) {
return { return {
name: 'users', name: 'users',
iterator: 'user', iterator: 'user',
@@ -21,22 +21,22 @@
multiSelectExtended: true, multiSelectExtended: true,
index: false, index: false,
hover: true, hover: true,
emptyListText : 'No Users exist', emptyListText : i18n._('No Users exist'),
fields: { fields: {
first_name: { first_name: {
label: 'First Name', label: i18n._('First Name'),
columnClass: 'col-md-3 col-sm-3 hidden-xs' columnClass: 'col-md-3 col-sm-3 hidden-xs'
}, },
last_name: { last_name: {
label: 'Last Name', label: i18n._('Last Name'),
columnClass: 'col-md-3 col-sm-3 hidden-xs' columnClass: 'col-md-3 col-sm-3 hidden-xs'
}, },
username: { username: {
key: true, key: true,
label: 'Username', label: i18n._('Username'),
columnClass: 'col-md-5 col-sm-5 col-xs-11' columnClass: 'col-md-5 col-sm-5 col-xs-11'
}, },
}, },
}; };
} }];

View File

@@ -8,7 +8,8 @@
export default export default
[ [
'CreateSelect2', 'CreateSelect2',
function(CreateSelect2) { 'i18n',
function(CreateSelect2, i18n) {
return { return {
restrict: 'E', restrict: 'E',
scope: { scope: {
@@ -21,7 +22,7 @@ export default
CreateSelect2({ CreateSelect2({
element: '.roleSelect2', element: '.roleSelect2',
multiple: true, multiple: true,
placeholder: 'Select roles' placeholder: i18n._('Select roles')
}); });
} }
}; };

View File

@@ -9,15 +9,15 @@
</div> </div>
<div class="Modal-body" id="detail-body"> <div class="Modal-body" id="detail-body">
<div ng-show="user" class="StreamDetail-inlineRow"> <div ng-show="user" class="StreamDetail-inlineRow">
<div class="StreamDetail-rowTitle StreamDetail-inlineRowTitle">INITIATED BY</div> <div class="StreamDetail-rowTitle StreamDetail-inlineRowTitle" translate>INITIATED BY</div>
<div class="StreamDetail-inlineRowData" ng-bind="user"></div> <div class="StreamDetail-inlineRowData" ng-bind="user"></div>
</div> </div>
<div ng-show="operation" class="StreamDetail-inlineRow"> <div ng-show="operation" class="StreamDetail-inlineRow">
<div class="StreamDetail-rowTitle StreamDetail-inlineRowTitle">ACTION</div> <div class="StreamDetail-rowTitle StreamDetail-inlineRowTitle" translate>ACTION</div>
<div class="StreamDetail-inlineRowData StreamDetail-actions" ng-bind-html="operation"></div> <div class="StreamDetail-inlineRowData StreamDetail-actions" ng-bind-html="operation"></div>
</div> </div>
<div ng-show="changes"> <div ng-show="changes">
<div class="StreamDetail-rowTitle StreamDetail-changesRowTitle">CHANGES</div> <div class="StreamDetail-rowTitle StreamDetail-changesRowTitle" translate>CHANGES</div>
<pre class="StreamDetail-changes">{{ changes | json : spacing}}</pre> <pre class="StreamDetail-changes">{{ changes | json : spacing}}</pre>
</div> </div>
</div> </div>

View File

@@ -4,7 +4,7 @@
* All Rights Reserved * All Rights Reserved
*************************************************/ *************************************************/
export default ['templateUrl', function(templateUrl) { export default ['templateUrl', 'i18n', function(templateUrl, i18n) {
return { return {
restrict: 'E', restrict: 'E',
scope: true, scope: true,
@@ -15,18 +15,18 @@ export default ['templateUrl', function(templateUrl) {
$scope.streamTarget = ($state.params && $state.params.target) ? $state.params.target : 'dashboard'; $scope.streamTarget = ($state.params && $state.params.target) ? $state.params.target : 'dashboard';
$scope.options = [ $scope.options = [
{label: 'All Activity', value: 'dashboard'}, {label: i18n._('All Activity'), value: 'dashboard'},
{label: 'Credentials', value: 'credential'}, {label: i18n._('Credentials'), value: 'credential'},
{label: 'Hosts', value: 'host'}, {label: i18n._('Hosts'), value: 'host'},
{label: 'Inventories', value: 'inventory'}, {label: i18n._('Inventories'), value: 'inventory'},
{label: 'Inventory Scripts', value: 'inventory_script'}, {label: i18n._('Inventory Scripts'), value: 'inventory_script'},
{label: 'Jobs', value: 'job'}, {label: i18n._('Jobs'), value: 'job'},
{label: 'Organizations', value: 'organization'}, {label: i18n._('Organizations'), value: 'organization'},
{label: 'Projects', value: 'project'}, {label: i18n._('Projects'), value: 'project'},
{label: 'Schedules', value: 'schedule'}, {label: i18n._('Schedules'), value: 'schedule'},
{label: 'Teams', value: 'team'}, {label: i18n._('Teams'), value: 'team'},
{label: 'Templates', value: 'template'}, {label: i18n._('Templates'), value: 'template'},
{label: 'Users', value: 'user'} {label: i18n._('Users'), value: 'user'}
]; ];
CreateSelect2({ CreateSelect2({

View File

@@ -99,6 +99,8 @@ var tower = angular.module('Tower', [
require('angular-tz-extensions'), require('angular-tz-extensions'),
require('lr-infinite-scroll'), require('lr-infinite-scroll'),
require('ng-toast'), require('ng-toast'),
'gettext',
'I18N',
uiRouter, uiRouter,
'ui.router.state.events', 'ui.router.state.events',
@@ -201,8 +203,6 @@ var tower = angular.module('Tower', [
scheduler.name, scheduler.name,
'ApiModelHelper', 'ApiModelHelper',
'ActivityStreamHelper', 'ActivityStreamHelper',
'gettext',
'I18N',
'WorkflowFormDefinition', 'WorkflowFormDefinition',
'InventorySourcesListDefinition', 'InventorySourcesListDefinition',
'WorkflowMakerFormDefinition' 'WorkflowMakerFormDefinition'
@@ -290,6 +290,9 @@ var tower = angular.module('Tower', [
"jobs": ["status_changed"] "jobs": ["status_changed"]
} }
} }
},
ncyBreadcrumb: {
label: N_('PROJECTS')
} }
}) })
}); });
@@ -371,12 +374,12 @@ var tower = angular.module('Tower', [
'CheckLicense', '$location', 'Authorization', 'LoadBasePaths', 'Timer', 'CheckLicense', '$location', 'Authorization', 'LoadBasePaths', 'Timer',
'ClearScope', 'LoadConfig', 'Store', 'pendoService', 'Prompt', 'Rest', 'ClearScope', 'LoadConfig', 'Store', 'pendoService', 'Prompt', 'Rest',
'Wait', 'ProcessErrors', '$state', 'GetBasePath', 'ConfigService', 'Wait', 'ProcessErrors', '$state', 'GetBasePath', 'ConfigService',
'FeaturesService', '$filter', 'SocketService', 'I18NInit', 'FeaturesService', '$filter', 'SocketService',
function($stateExtender, $q, $compile, $cookieStore, $rootScope, $log, $stateParams, function($stateExtender, $q, $compile, $cookieStore, $rootScope, $log, $stateParams,
CheckLicense, $location, Authorization, LoadBasePaths, Timer, CheckLicense, $location, Authorization, LoadBasePaths, Timer,
ClearScope, LoadConfig, Store, pendoService, Prompt, Rest, Wait, ClearScope, LoadConfig, Store, pendoService, Prompt, Rest, Wait,
ProcessErrors, $state, GetBasePath, ConfigService, FeaturesService, ProcessErrors, $state, GetBasePath, ConfigService, FeaturesService,
$filter, SocketService, I18NInit) { $filter, SocketService) {
$rootScope.$state = $state; $rootScope.$state = $state;
$rootScope.$state.matches = function(stateName) { $rootScope.$state.matches = function(stateName) {
@@ -388,7 +391,6 @@ var tower = angular.module('Tower', [
$log.debug(`$state.defaultErrorHandler: ${error}`); $log.debug(`$state.defaultErrorHandler: ${error}`);
}); });
I18NInit();
$stateExtender.addState({ $stateExtender.addState({
name: 'dashboard', name: 'dashboard',
url: '/home', url: '/home',

View File

@@ -1,6 +1,6 @@
<div class="tab-pane Configuration-container" id="configuration_edit"> <div class="tab-pane Configuration-container" id="configuration_edit">
<div class="Form-nav--dropdownContainer"> <div class="Form-nav--dropdownContainer">
<div class="Form-nav--dropdownLabel">Sub Category</div> <div class="Form-nav--dropdownLabel" translate>Sub Category</div>
<div class="Form-nav--dropdown"> <div class="Form-nav--dropdown">
<select <select
id="configure-dropdown-nav" id="configure-dropdown-nav"

View File

@@ -7,15 +7,15 @@
<div class="tab-pane" id="configuration-panel"> <div class="tab-pane" id="configuration-panel">
<div ng-cloak id="htmlTemplate" class="Panel"> <div ng-cloak id="htmlTemplate" class="Panel">
<div class="Form-header"> <div class="Form-header">
<div class="Form-title">Configure Tower</div> <div class="Form-title" translate>Configure Tower</div>
</div> </div>
<div class="row Form-tabRow"> <div class="row Form-tabRow">
<div class="col-lg-12"> <div class="col-lg-12">
<div class="Form-tabHolder"> <div class="Form-tabHolder">
<div class="Form-tab" ng-click="vm.activeTabCheck('auth')" ng-class="{'is-selected': vm.activeTab === 'auth' }">Authentication</div> <div class="Form-tab" ng-click="vm.activeTabCheck('auth')" ng-class="{'is-selected': vm.activeTab === 'auth' }" translate>Authentication</div>
<div class="Form-tab" ng-click="vm.activeTabCheck('jobs')" ng-class="{'is-selected': vm.activeTab === 'jobs' }">Jobs</div> <div class="Form-tab" ng-click="vm.activeTabCheck('jobs')" ng-class="{'is-selected': vm.activeTab === 'jobs' }" translate>Jobs</div>
<div class="Form-tab" ng-click="vm.activeTabCheck('system')" ng-class="{'is-selected': vm.activeTab === 'system' }">System</div> <div class="Form-tab" ng-click="vm.activeTabCheck('system')" ng-class="{'is-selected': vm.activeTab === 'system' }" translate>System</div>
<div class="Form-tab" ng-click="vm.activeTabCheck('ui')" ng-class="{'is-selected': vm.activeTab === 'ui' }">User Interface</div> <div class="Form-tab" ng-click="vm.activeTabCheck('ui')" ng-class="{'is-selected': vm.activeTab === 'ui' }" translate>User Interface</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -13,7 +13,8 @@
export function CredentialsList($scope, $rootScope, $location, $log, export function CredentialsList($scope, $rootScope, $location, $log,
$stateParams, Rest, Alert, CredentialList, Prompt, ClearScope, $stateParams, Rest, Alert, CredentialList, Prompt, ClearScope,
ProcessErrors, GetBasePath, Wait, $state, $filter, rbacUiControlService, Dataset) { ProcessErrors, GetBasePath, Wait, $state, $filter, rbacUiControlService, Dataset,
i18n) {
ClearScope(); ClearScope();
@@ -97,24 +98,24 @@ export function CredentialsList($scope, $rootScope, $location, $log,
}; };
Prompt({ Prompt({
hdr: 'Delete', hdr: i18n._('Delete'),
body: '<div class="Prompt-bodyQuery">Are you sure you want to delete the credential below?</div><div class="Prompt-bodyTarget">' + $filter('sanitize')(name) + '</div>', body: '<div class="Prompt-bodyQuery">' + i18n._('Are you sure you want to delete the credential below?') + '</div><div class="Prompt-bodyTarget">' + $filter('sanitize')(name) + '</div>',
action: action, action: action,
actionText: 'DELETE' actionText: i18n._('DELETE')
}); });
}; };
} }
CredentialsList.$inject = ['$scope', '$rootScope', '$location', '$log', CredentialsList.$inject = ['$scope', '$rootScope', '$location', '$log',
'$stateParams', 'Rest', 'Alert', 'CredentialList', 'Prompt', 'ClearScope', '$stateParams', 'Rest', 'Alert', 'CredentialList', 'Prompt', 'ClearScope',
'ProcessErrors', 'GetBasePath', 'Wait', '$state', '$filter', 'rbacUiControlService', 'Dataset' 'ProcessErrors', 'GetBasePath', 'Wait', '$state', '$filter', 'rbacUiControlService', 'Dataset', 'i18n'
]; ];
export function CredentialsAdd($scope, $rootScope, $compile, $location, $log, export function CredentialsAdd($scope, $rootScope, $compile, $location, $log,
$stateParams, CredentialForm, GenerateForm, Rest, Alert, ProcessErrors, $stateParams, CredentialForm, GenerateForm, Rest, Alert, ProcessErrors,
ClearScope, GetBasePath, GetChoices, Empty, KindChange, BecomeMethodChange, ClearScope, GetBasePath, GetChoices, Empty, KindChange, BecomeMethodChange,
OwnerChange, FormSave, $state, CreateSelect2) { OwnerChange, FormSave, $state, CreateSelect2, i18n) {
ClearScope(); ClearScope();
// Inject dynamic view // Inject dynamic view
@@ -154,7 +155,7 @@ export function CredentialsAdd($scope, $rootScope, $compile, $location, $log,
GenerateForm.applyDefaults(form, $scope); GenerateForm.applyDefaults(form, $scope);
$scope.keyEntered = false; $scope.keyEntered = false;
$scope.permissionsTooltip = 'Please save before assigning permissions'; $scope.permissionsTooltip = i18n._('Please save before assigning permissions');
// determine if the currently logged-in user may share this credential // determine if the currently logged-in user may share this credential
// previous commentary said: "$rootScope.current_user isn't available because a call to the config endpoint hasn't finished resolving yet" // previous commentary said: "$rootScope.current_user isn't available because a call to the config endpoint hasn't finished resolving yet"
@@ -281,7 +282,7 @@ export function CredentialsAdd($scope, $rootScope, $compile, $location, $log,
CredentialsAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', CredentialsAdd.$inject = ['$scope', '$rootScope', '$compile', '$location',
'$log', '$stateParams', 'CredentialForm', 'GenerateForm', 'Rest', 'Alert', '$log', '$stateParams', 'CredentialForm', 'GenerateForm', 'Rest', 'Alert',
'ProcessErrors', 'ClearScope', 'GetBasePath', 'GetChoices', 'Empty', 'KindChange', 'BecomeMethodChange', 'ProcessErrors', 'ClearScope', 'GetBasePath', 'GetChoices', 'Empty', 'KindChange', 'BecomeMethodChange',
'OwnerChange', 'FormSave', '$state', 'CreateSelect2' 'OwnerChange', 'FormSave', '$state', 'CreateSelect2', 'i18n'
]; ];
export function CredentialsEdit($scope, $rootScope, $compile, $location, $log, export function CredentialsEdit($scope, $rootScope, $compile, $location, $log,
@@ -571,10 +572,10 @@ export function CredentialsEdit($scope, $rootScope, $compile, $location, $log,
}; };
Prompt({ Prompt({
hdr: 'Delete', hdr: i18n._('Delete'),
body: '<div class="Prompt-bodyQuery">Are you sure you want to remove the ' + title + ' below from ' + $scope.name + '?</div><div class="Prompt-bodyTarget">' + name + '</div>', body: '<div class="Prompt-bodyQuery">' + i18n.sprintf(i18n._('Are you sure you want to remove the %s below from %s?'), title, $scope.name) + '</div><div class="Prompt-bodyTarget">' + name + '</div>',
action: action, action: action,
actionText: 'DELETE' actionText: i18n._('DELETE')
}); });
}; };

View File

@@ -53,7 +53,8 @@
</h3> </h3>
</div> </div>
<div class="DashboardList-container"> <div class="DashboardList-container">
<p class="DashboardList-noJobs">No job templates were recently used.<br /> <p class="DashboardList-noJobs"><translate>No job templates were recently used.</translate><br />
You can create a job template <a href="#/templates/add_job_template">here</a>.</p> <!-- TODO: Seems $sce.trustAsHtml() does not work here. -->
<translate>You can create a job template <a href="#/templates/add_job_template">here</a>.</translate></p>
</div> </div>
</div> </div>

View File

@@ -18,10 +18,11 @@
export default export default
angular.module('ActivityDetailDefinition', []) angular.module('ActivityDetailDefinition', [])
.value('ActivityDetailForm', { .factory('ActivityDetailForm', ['i18n', function(i18n) {
return {
name: 'activity', name: 'activity',
editTitle: 'Activity Detail', editTitle: i18n._('Activity Detail'),
well: false, well: false,
'class': 'horizontal-narrow', 'class': 'horizontal-narrow',
formFieldSize: 'col-lg-10', formFieldSize: 'col-lg-10',
@@ -29,17 +30,17 @@ export default
fields: { fields: {
user: { user: {
label: "Initiated by", label: i18n._("Initiated by"),
type: 'text', type: 'text',
readonly: true readonly: true
}, },
operation: { operation: {
label: 'Action', label: i18n._('Action'),
type: 'text', type: 'text',
readonly: true readonly: true
}, },
changes: { changes: {
label: 'Changes', label: i18n._('Changes'),
type: 'textarea', type: 'textarea',
class: 'Form-textAreaLabel', class: 'Form-textAreaLabel',
ngHide: "!changes || changes =='' || changes == 'null'", ngHide: "!changes || changes =='' || changes == 'null'",
@@ -47,4 +48,4 @@ export default
} }
} }
}); //Form };}]); //Form

View File

@@ -12,73 +12,74 @@
export default export default
angular.module('EventsViewerFormDefinition', []) angular.module('EventsViewerFormDefinition', [])
.value('EventsViewerForm', { .factory('EventsViewerForm', ['i18n', function(i18n) {
return {
fields: { fields: {
host_name: { host_name: {
label: 'Host', label: i18n._('Host'),
section: 'Event' section: i18n._('Event')
}, },
status: { status: {
label: 'Status', labellabel: i18n._('Status'),
section: 'Event' section: i18n._('Event')
}, },
id: { id: {
label: 'ID', labellabel: i18n._('ID'),
section: 'Event' section: i18n._('Event')
}, },
created: { created: {
label: 'Created On', labellabel: i18n._('Created On'),
section: 'Event' section: i18n._('Event')
}, },
role: { role: {
label: 'Role', labellabel: i18n._('Role'),
section: 'Event' section: i18n._('Event')
}, },
play: { play: {
label: 'Play', labellabel: i18n._('Play'),
type: 'text', type: 'text',
section: 'Event' section: i18n._('Event')
}, },
task: { task: {
label: 'Task', labellabel: i18n._('Task'),
section: 'Event' section: i18n._('Event')
}, },
item: { item: {
label: 'Item', labellabel: i18n._('Item'),
section: 'Event' section: i18n._('Event')
}, },
module_name: { module_name: {
label: 'Module', labellabel: i18n._('Module'),
section: 'Event' section: i18n._('Event')
}, },
module_args: { module_args: {
label: 'Arguments', labellabel: i18n._('Arguments'),
section: 'Event' section: i18n._('Event')
}, },
rc: { rc: {
label: 'Return Code', labellabel: i18n._('Return Code'),
section: 'Results' section: i18n._('Results')
}, },
msg: { msg: {
label: 'Message', labellabel: i18n._('Message'),
section: 'Results' section: i18n._('Results')
}, },
results: { results: {
label: 'Results', labellabel: i18n._('Results'),
section: 'Results' section: i18n._('Results')
}, },
start: { start: {
label: 'Start', labellabel: i18n._('Start'),
section: 'Timing' section: i18n._('Timing')
}, },
end: { end: {
label: 'End', labellabel: i18n._('End'),
section: 'Timing' section: i18n._('Timing')
}, },
delta: { delta: {
label: 'Elapsed', labellabel: i18n._('Elapsed'),
section: 'Timing' section: i18n._('Timing')
} }
} }
}); };}]);

View File

@@ -92,7 +92,7 @@ angular.module('InventoryFormDefinition', [])
dataPlacement: 'top', dataPlacement: 'top',
basePath: 'api/v1/inventories/{{$stateParams.inventory_id}}/access_list/', basePath: 'api/v1/inventories/{{$stateParams.inventory_id}}/access_list/',
type: 'collection', type: 'collection',
title: 'Permissions', title: i18n._('Permissions'),
iterator: 'permission', iterator: 'permission',
index: false, index: false,
open: false, open: false,

View File

@@ -12,49 +12,50 @@
export default export default
angular.module('LogViewerStatusDefinition', []) angular.module('LogViewerStatusDefinition', [])
.value('LogViewerStatusForm', { .factory('LogViewerStatusForm', ['i18n', function(i18n) {
return {
name: 'status', name: 'status',
well: false, well: false,
fields: { fields: {
"name": { "name": {
label: "Name", label: i18n._("Name"),
type: "text", type: "text",
readonly: true, readonly: true,
}, },
"status": { "status": {
label: "Status", label: i18n._("Status"),
type: "text", type: "text",
readonly: true readonly: true
}, },
"license_error": { "license_error": {
label: "License Error", label: i18n._("License Error"),
type: "text", type: "text",
readonly: true readonly: true
}, },
"started": { "started": {
label: "Started", label: i18n._("Started"),
type: "date", type: "date",
"filter": "longDate", "filter": "longDate",
readonly: true readonly: true
}, },
"finished": { "finished": {
label: "Finished", label: i18n._("Finished"),
type: "date", type: "date",
"filter": "longDate", "filter": "longDate",
readonly: true readonly: true
}, },
"elapsed": { "elapsed": {
label: "Elapsed", label: i18n._("Elapsed"),
type: "text", type: "text",
readonly: true readonly: true
}, },
"launch_type": { "launch_type": {
label: "Launch Type", label: i18n._("Launch Type"),
type: "text", type: "text",
readonly: true readonly: true
} }
} }
}); };}]);

View File

@@ -132,18 +132,18 @@ export default
fields: { fields: {
username: { username: {
key: true, key: true,
label: 'User', label: i18n._('User'),
linkBase: 'users', linkBase: 'users',
class: 'col-lg-3 col-md-3 col-sm-3 col-xs-4' class: 'col-lg-3 col-md-3 col-sm-3 col-xs-4'
}, },
role: { role: {
label: 'Role', label: i18n._('Role'),
type: 'role', type: 'role',
noSort: true, noSort: true,
class: 'col-lg-4 col-md-4 col-sm-4 col-xs-4', class: 'col-lg-4 col-md-4 col-sm-4 col-xs-4',
}, },
team_roles: { team_roles: {
label: 'Team Roles', label: i18n._('Team Roles'),
type: 'team_roles', type: 'team_roles',
noSort: true, noSort: true,
class: 'col-lg-5 col-md-5 col-sm-5 col-xs-4', class: 'col-lg-5 col-md-5 col-sm-5 col-xs-4',

View File

@@ -126,9 +126,9 @@ export default
}]) }])
.factory('DeleteJob', ['$state', 'Find', 'GetBasePath', 'Rest', 'Wait', .factory('DeleteJob', ['$state', 'Find', 'GetBasePath', 'Rest', 'Wait',
'ProcessErrors', 'Prompt', 'Alert', '$filter', 'ProcessErrors', 'Prompt', 'Alert', '$filter', 'i18n',
function($state, Find, GetBasePath, Rest, Wait, ProcessErrors, Prompt, Alert, function($state, Find, GetBasePath, Rest, Wait, ProcessErrors, Prompt, Alert,
$filter){ $filter, i18n){
return function(params) { return function(params) {
var scope = params.scope, var scope = params.scope,
id = params.id, id = params.id,
@@ -158,11 +158,11 @@ export default
if (job.status === 'pending' || job.status === 'running' || job.status === 'waiting') { if (job.status === 'pending' || job.status === 'running' || job.status === 'waiting') {
url = job.related.cancel; url = job.related.cancel;
action_label = 'cancel'; action_label = 'cancel';
hdr = 'Cancel'; hdr = i18n._('Cancel');
} else { } else {
url = job.url; url = job.url;
action_label = 'delete'; action_label = 'delete';
hdr = 'Delete'; hdr = i18n._('Delete');
} }
action = function () { action = function () {
@@ -227,8 +227,8 @@ export default
scope.removeCancelJob(); scope.removeCancelJob();
} }
scope.removeCancelJob = scope.$on('CancelJob', function() { scope.removeCancelJob = scope.$on('CancelJob', function() {
var cancelBody = "<div class=\"Prompt-bodyQuery\">Submit the request to cancel?</div>"; var cancelBody = "<div class=\"Prompt-bodyQuery\">" + i18n._("Submit the request to cancel?") + "</div>";
var deleteBody = "<div class=\"Prompt-bodyQuery\">Are you sure you want to delete the job below?</div><div class=\"Prompt-bodyTarget\">#" + id + " " + $filter('sanitize')(job.name) + "</div>"; var deleteBody = "<div class=\"Prompt-bodyQuery\">" + i18n._("Are you sure you want to delete the job below?") + "</div><div class=\"Prompt-bodyTarget\">#" + id + " " + $filter('sanitize')(job.name) + "</div>";
Prompt({ Prompt({
hdr: hdr, hdr: hdr,
body: (action_label === 'cancel' || job.status === 'new') ? cancelBody : deleteBody, body: (action_label === 'cancel' || job.status === 'new') ? cancelBody : deleteBody,

View File

@@ -48,35 +48,35 @@ export default
}; };
}]) }])
.factory('GetProjectToolTip', [ function() { .factory('GetProjectToolTip', ['i18n', function(i18n) {
return function(status) { return function(status) {
var result = ''; var result = '';
switch (status) { switch (status) {
case 'n/a': case 'n/a':
case 'ok': case 'ok':
case 'never updated': case 'never updated':
result = 'No SCM updates have run for this project'; result = i18n._('No SCM updates have run for this project');
break; break;
case 'pending': case 'pending':
case 'waiting': case 'waiting':
case 'new': case 'new':
result = 'Queued. Click for details'; result = i18n._('Queued. Click for details');
break; break;
case 'updating': case 'updating':
case 'running': case 'running':
result = 'Running! Click for details'; result = i18n._('Running! Click for details');
break; break;
case 'successful': case 'successful':
result = 'Success! Click for details'; result = i18n._('Success! Click for details');
break; break;
case 'failed': case 'failed':
result = 'Failed. Click for details'; result = i18n._('Failed. Click for details');
break; break;
case 'missing': case 'missing':
result = 'Missing. Click for details'; result = i18n._('Missing. Click for details');
break; break;
case 'canceled': case 'canceled':
result = 'Canceled. Click for details'; result = i18n._('Canceled. Click for details');
break; break;
} }
return result; return result;

View File

@@ -287,6 +287,9 @@ angular.module('inventory', [
stateTree = { stateTree = {
name: 'inventories', name: 'inventories',
url: '/inventories', url: '/inventories',
ncyBreadcrumb: {
label: N_("INVENTORIES")
},
lazyLoad: () => generateStateTree() lazyLoad: () => generateStateTree()
}; };

View File

@@ -8,10 +8,10 @@
<div class="JobDetail-panelHeader"> <div class="JobDetail-panelHeader">
<div class="JobDetail-expandContainer"> <div class="JobDetail-expandContainer">
<a class="JobDetail-panelHeaderText" ng-show="lessStatus" href="" ng-click="toggleLessStatus()"> <a class="JobDetail-panelHeaderText" ng-show="lessStatus" href="" ng-click="toggleLessStatus()">
RESULTS<i class="JobDetail-expandArrow fa fa-caret-right"></i> <translate>RESULTS</translate><i class="JobDetail-expandArrow fa fa-caret-right"></i>
</a> </a>
<a class="JobDetail-panelHeaderText" ng-show="!lessStatus" href="" ng-click="toggleLessStatus()"> <a class="JobDetail-panelHeaderText" ng-show="!lessStatus" href="" ng-click="toggleLessStatus()">
RESULTS<i class="JobDetail-expandArrow fa fa-caret-down"></i> <translate>RESULTS</translate><i class="JobDetail-expandArrow fa fa-caret-down"></i>
</a> </a>
</div> </div>
<div class="JobDetail-actions"> <div class="JobDetail-actions">
@@ -23,12 +23,12 @@
<div class="form-horizontal JobDetail-resultsDetails" role="form" id="job-status-form"> <div class="form-horizontal JobDetail-resultsDetails" role="form" id="job-status-form">
<div class="form-group JobDetail-resultRow toggle-show"> <div class="form-group JobDetail-resultRow toggle-show">
<label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label">Status</label> <label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label" translate>Status</label>
<div class="JobDetail-resultRowText"><i class="JobDetail-statusIcon--results fa icon-job-{{ job_status.status }}"></i> {{ job_status.status_label }}</div> <div class="JobDetail-resultRowText"><i class="JobDetail-statusIcon--results fa icon-job-{{ job_status.status }}"></i> {{ job_status.status_label }}</div>
</div> </div>
<div class="form-group JobDetail-resultRow toggle-show" ng-show="job_status.explanation"> <div class="form-group JobDetail-resultRow toggle-show" ng-show="job_status.explanation">
<label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 col-xs-12">Explanation</label> <label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 col-xs-12" translate>Explanation</label>
<div class="JobDetail-resultRowText col-lg-10 col-md-10 col-sm-10 col-xs-9 job_status_explanation" <div class="JobDetail-resultRowText col-lg-10 col-md-10 col-sm-10 col-xs-9 job_status_explanation"
ng-show="!previousTaskFailed" ng-bind-html="job_status.explanation"></div> ng-show="!previousTaskFailed" ng-bind-html="job_status.explanation"></div>
<div class="JobDetail-resultRowText col-lg-10 col-md-10 col-sm-10 col-xs-9 job_status_explanation" <div class="JobDetail-resultRowText col-lg-10 col-md-10 col-sm-10 col-xs-9 job_status_explanation"
@@ -49,118 +49,118 @@
</div> </div>
<div class="form-group JobDetail-resultRow toggle-show" ng-show="job_status.traceback"> <div class="form-group JobDetail-resultRow toggle-show" ng-show="job_status.traceback">
<label class="JobDetail-resultRowLabel col-lg-2 col-md-12 col-sm-12 col-xs-12">Results Traceback</label> <label class="JobDetail-resultRowLabel col-lg-2 col-md-12 col-sm-12 col-xs-12" translate>Results Traceback</label>
<div class="JobDetail-resultRowText col-lg-10 col-md-12 col-sm-12 col-xs-12 job_status_traceback" ng-bind-html="job_status.traceback"></div> <div class="JobDetail-resultRowText col-lg-10 col-md-12 col-sm-12 col-xs-12 job_status_traceback" ng-bind-html="job_status.traceback"></div>
</div> </div>
<div class="form-group JobDetail-resultRow toggle-show" ng-show="job_template_name"> <div class="form-group JobDetail-resultRow toggle-show" ng-show="job_template_name">
<label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label">Template</label> <label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label" translate>Template</label>
<div class="JobDetail-resultRowText"> <div class="JobDetail-resultRowText">
<a href="{{ job_template_url }}" aw-tool-tip="Edit the job template" data-placement="top">{{ job_template_name }}</a> <a href="{{ job_template_url }}" aw-tool-tip="Edit the job template" data-placement="top">{{ job_template_name }}</a>
</div> </div>
</div> </div>
<div class="form-group JobDetail-resultRow toggle-show" ng-show="job_status.started"> <div class="form-group JobDetail-resultRow toggle-show" ng-show="job_status.started">
<label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label">Started</label> <label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label" translate>Started</label>
<div class="JobDetail-resultRowText">{{ job_status.started | longDate }}</div> <div class="JobDetail-resultRowText">{{ job_status.started | longDate }}</div>
</div> </div>
<div class="form-group JobDetail-resultRow toggle-show" ng-show="job_type"> <div class="form-group JobDetail-resultRow toggle-show" ng-show="job_type">
<label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label">Job Type</label> <label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label" translate>Job Type</label>
<div class="JobDetail-resultRowText">{{ job_type }}</div> <div class="JobDetail-resultRowText">{{ job_type }}</div>
</div> </div>
<div class="form-group JobDetail-resultRow toggle-show" ng-show="job_status.started"> <div class="form-group JobDetail-resultRow toggle-show" ng-show="job_status.started">
<label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label">Finished</label> <label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label" translate>Finished</label>
<div class="JobDetail-resultRowText">{{ job_status.finished | longDate }}</div> <div class="JobDetail-resultRowText">{{ job_status.finished | longDate }}</div>
</div> </div>
<div class="form-group JobDetail-resultRow toggle-show" ng-show="created_by"> <div class="form-group JobDetail-resultRow toggle-show" ng-show="created_by">
<label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label">Launched By</label> <label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label" translate>Launched By</label>
<div class="JobDetail-resultRowText"> <div class="JobDetail-resultRowText">
<a href="{{ users_url }}" aw-tool-tip="Edit the User" data-placement="top">{{ created_by }}</a> <a href="{{ users_url }}" aw-tool-tip="Edit the User" data-placement="top">{{ created_by }}</a>
</div> </div>
</div> </div>
<div class="form-group JobDetail-resultRow toggle-show" ng-show="job_status.started"> <div class="form-group JobDetail-resultRow toggle-show" ng-show="job_status.started">
<label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label">Elapsed</label> <label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label" translate>Elapsed</label>
<div class="JobDetail-resultRowText">{{ job_status.elapsed }}</div> <div class="JobDetail-resultRowText">{{ job_status.elapsed }}</div>
</div> </div>
<div class="form-group JobDetail-resultRow toggle-show" ng-show="scheduled_by"> <div class="form-group JobDetail-resultRow toggle-show" ng-show="scheduled_by">
<label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label">Launched By</label> <label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label" translate>Launched By</label>
<div class="JobDetail-resultRowText"> <div class="JobDetail-resultRowText">
<a href aw-tool-tip="Edit the Schedule" data-placement="top" ng-click="editSchedule()">{{scheduled_by}}</a> <a href aw-tool-tip="Edit the Schedule" data-placement="top" ng-click="editSchedule()">{{scheduled_by}}</a>
</div> </div>
</div> </div>
<div class="form-group JobDetail-resultRow toggle-show" ng-show="inventory_name"> <div class="form-group JobDetail-resultRow toggle-show" ng-show="inventory_name">
<label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label">Inventory</label> <label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label" translate>Inventory</label>
<div class="JobDetail-resultRowText"> <div class="JobDetail-resultRowText">
<a href="{{ inventory_url }}" aw-tool-tip="Edit the inventory" data-placement="top">{{ inventory_name }}</a> <a href="{{ inventory_url }}" aw-tool-tip="Edit the inventory" data-placement="top">{{ inventory_name }}</a>
</div> </div>
</div> </div>
<div class="form-group JobDetail-resultRow toggle-show" ng-show="project_name"> <div class="form-group JobDetail-resultRow toggle-show" ng-show="project_name">
<label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label">Project</label> <label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label" translate>Project</label>
<div class="JobDetail-resultRowText"> <div class="JobDetail-resultRowText">
<a href="{{ project_url }}" aw-tool-tip="Edit the project" data-placement="top">{{ project_name }}</a> <a href="{{ project_url }}" aw-tool-tip="Edit the project" data-placement="top">{{ project_name }}</a>
</div> </div>
</div> </div>
<div class="form-group JobDetail-resultRow toggle-show" ng-show="job.playbook"> <div class="form-group JobDetail-resultRow toggle-show" ng-show="job.playbook">
<label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label">Playbook</label> <label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label" translate>Playbook</label>
<div class="JobDetail-resultRowText">{{ job.playbook }}</div> <div class="JobDetail-resultRowText">{{ job.playbook }}</div>
</div> </div>
<div class="form-group JobDetail-resultRow toggle-show" ng-show="credential_name"> <div class="form-group JobDetail-resultRow toggle-show" ng-show="credential_name">
<label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label">Machine Credential</label> <label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label" translate>Machine Credential</label>
<div class="JobDetail-resultRowText JobDetail-resultRowText"> <div class="JobDetail-resultRowText JobDetail-resultRowText">
<a href="{{ credential_url }}" aw-tool-tip="Edit the credential" data-placement="top">{{ credential_name }}</a> <a href="{{ credential_url }}" aw-tool-tip="Edit the credential" data-placement="top">{{ credential_name }}</a>
</div> </div>
</div> </div>
<div class="form-group JobDetail-resultRow toggle-show" ng-show="cloud_credential_name"> <div class="form-group JobDetail-resultRow toggle-show" ng-show="cloud_credential_name">
<label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label">Cloud Credential</label> <label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label" translate>Cloud Credential</label>
<div class="JobDetail-resultRowText"> <div class="JobDetail-resultRowText">
<a href="{{ cloud_credential_url }}" aw-tool-tip="Edit the credential" data-placement="top">{{ cloud_credential_name }}</a> <a href="{{ cloud_credential_url }}" aw-tool-tip="Edit the credential" data-placement="top">{{ cloud_credential_name }}</a>
</div> </div>
</div> </div>
<div class="form-group JobDetail-resultRow toggle-show" ng-show="network_credential_name"> <div class="form-group JobDetail-resultRow toggle-show" ng-show="network_credential_name">
<label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label">Network Credential</label> <label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label" translate>Network Credential</label>
<div class="JobDetail-resultRowText"> <div class="JobDetail-resultRowText">
<a href="{{ network_credential_url }}" aw-tool-tip="Edit the credential" data-placement="top">{{ network_credential_name }}</a> <a href="{{ network_credential_url }}" aw-tool-tip="Edit the credential" data-placement="top">{{ network_credential_name }}</a>
</div> </div>
</div> </div>
<div class="form-group JobDetail-resultRow toggle-show" ng-show="job.forks"> <div class="form-group JobDetail-resultRow toggle-show" ng-show="job.forks">
<label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label">Forks</label> <label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label" translate>Forks</label>
<div class="JobDetail-resultRowText">{{ job.forks }}</div> <div class="JobDetail-resultRowText">{{ job.forks }}</div>
</div> </div>
<div class="form-group JobDetail-resultRow toggle-show" ng-show="job.limit"> <div class="form-group JobDetail-resultRow toggle-show" ng-show="job.limit">
<label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label">Limit</label> <label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label" translate>Limit</label>
<div class="JobDetail-resultRowText">{{ job.limit }}</div> <div class="JobDetail-resultRowText">{{ job.limit }}</div>
</div> </div>
<div class="form-group JobDetail-resultRow toggle-show" ng-show="verbosity"> <div class="form-group JobDetail-resultRow toggle-show" ng-show="verbosity">
<label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label">Verbosity</label> <label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label" translate>Verbosity</label>
<div class="JobDetail-resultRowText">{{ verbosity }}</div> <div class="JobDetail-resultRowText">{{ verbosity }}</div>
</div> </div>
<div class="form-group JobDetail-resultRow toggle-show" ng-show="job.job_tags"> <div class="form-group JobDetail-resultRow toggle-show" ng-show="job.job_tags">
<label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label">Job Tags</label> <label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label" translate>Job Tags</label>
<div class="JobDetail-resultRowText">{{ job.job_tags }}</div> <div class="JobDetail-resultRowText">{{ job.job_tags }}</div>
</div> </div>
<div class="form-group JobDetail-resultRow toggle-show" ng-show="job.skip_tags"> <div class="form-group JobDetail-resultRow toggle-show" ng-show="job.skip_tags">
<label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label">Skip Tags</label> <label class="JobDetail-resultRowLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label" translate>Skip Tags</label>
<div class="JobDetail-resultRowText">{{ job.skip_tags }}</div> <div class="JobDetail-resultRowText">{{ job.skip_tags }}</div>
</div> </div>
<div class="form-group JobDetail-resultRow JobDetail-resultRow--variables toggle-show" ng-show="variables"> <div class="form-group JobDetail-resultRow JobDetail-resultRow--variables toggle-show" ng-show="variables">
<label class="JobDetail-resultRowLabel JobDetail-extraVarsLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label">Extra Variables</label> <label class="JobDetail-resultRowLabel JobDetail-extraVarsLabel col-lg-2 col-md-2 col-sm-2 col-xs-3 control-label" translate>Extra Variables</label>
<textarea rows="6" ng-model="variables" name="variables" class="JobDetail-extraVars" id="pre-formatted-variables"></textarea> <textarea rows="6" ng-model="variables" name="variables" class="JobDetail-extraVars" id="pre-formatted-variables"></textarea>
</div> </div>
@@ -173,10 +173,10 @@
<div class="JobDetail-panelHeader"> <div class="JobDetail-panelHeader">
<div class="JobDetail-expandContainer"> <div class="JobDetail-expandContainer">
<a class="JobDetail-panelHeaderText" ng-show="lessDetail" href="" ng-click="toggleLessDetail()"> <a class="JobDetail-panelHeaderText" ng-show="lessDetail" href="" ng-click="toggleLessDetail()">
DETAILS<i class="JobDetail-expandArrow fa fa-caret-right"></i> <translate>DETAILS</translate><i class="JobDetail-expandArrow fa fa-caret-right"></i>
</a> </a>
<a class="JobDetail-panelHeaderText" ng-show="!lessDetail" href="" ng-click="toggleLessDetail()"> <a class="JobDetail-panelHeaderText" ng-show="!lessDetail" href="" ng-click="toggleLessDetail()">
DETAILS<i class="JobDetail-expandArrow fa fa-caret-down"></i> <translate>DETAILS</translate><i class="JobDetail-expandArrow fa fa-caret-down"></i>
</a> </a>
</div> </div>
</div> </div>
@@ -194,8 +194,8 @@
</div> </div>
<div class="JobDetail-tableToggleContainer form-group"> <div class="JobDetail-tableToggleContainer form-group">
<div class="btn-group" aw-toggle-button data-after-toggle="filterPlayStatus"> <div class="btn-group" aw-toggle-button data-after-toggle="filterPlayStatus">
<button class="JobDetail-tableToggle btn btn-xs btn-primary active">All</button> <button class="JobDetail-tableToggle btn btn-xs btn-primary active" translate>All</button>
<button class="JobDetail-tableToggle btn btn-xs btn-default">Failed</button> <button class="JobDetail-tableToggle btn btn-xs btn-default" translate>Failed</button>
</div> </div>
</div> </div>
</div> </div>
@@ -205,9 +205,9 @@
<table class="table table-condensed"> <table class="table table-condensed">
<thead> <thead>
<tr> <tr>
<th class="List-tableHeader col-lg-7 col-md-6 col-sm-6 col-xs-4">Plays</th> <th class="List-tableHeader col-lg-7 col-md-6 col-sm-6 col-xs-4" translate>Plays</th>
<th class="List-tableHeader col-lg-2 col-md-2 col-sm-2 col-xs-3">Started</th> <th class="List-tableHeader col-lg-2 col-md-2 col-sm-2 col-xs-3" translate>Started</th>
<th class="List-tableHeader JobDetail-tableHeader col-lg-2 col-md-2 col-sm-2 col-xs-3">Elapsed</th> <th class="List-tableHeader JobDetail-tableHeader col-lg-2 col-md-2 col-sm-2 col-xs-3" translate>Elapsed</th>
</tr> </tr>
</thead> </thead>
</table> </table>
@@ -242,7 +242,7 @@
<!-- end of plays section of details--> <!-- end of plays section of details-->
<div id="task-section" class="section JobDetail-tasks" > <div id="task-section" class="section JobDetail-tasks" >
<div class="JobDetail-instructions"><span class="badge">2</span> Please select a task below to view its associated hosts</div> <div class="JobDetail-instructions"><span class="badge">2</span> <translate>Please select a task below to view its associated hosts</translate></div>
<div class="JobDetail-searchHeaderRow"> <div class="JobDetail-searchHeaderRow">
<div class="JobDetail-searchContainer form-group"> <div class="JobDetail-searchContainer form-group">
<div class="search-name"> <div class="search-name">
@@ -253,8 +253,8 @@
</div> </div>
<div class="JobDetail-tableToggleContainer form-group"> <div class="JobDetail-tableToggleContainer form-group">
<div class="btn-group" aw-toggle-button data-after-toggle="filterTaskStatus"> <div class="btn-group" aw-toggle-button data-after-toggle="filterTaskStatus">
<button class="JobDetail-tableToggle btn btn-xs btn-primary active">All</button> <button class="JobDetail-tableToggle btn btn-xs btn-primary active" translate>All</button>
<button class="JobDetail-tableToggle btn btn-xs btn-default">Failed</button> <button class="JobDetail-tableToggle btn btn-xs btn-default" translate>Failed</button>
</div> </div>
</div> </div>
</div> </div>
@@ -263,10 +263,10 @@
<table id="tasks-table-header" class="table table-condensed" ng-show="taskList.length !== 0"> <table id="tasks-table-header" class="table table-condensed" ng-show="taskList.length !== 0">
<thead> <thead>
<tr> <tr>
<th class="List-tableHeader col-lg-3 col-md-3 col-sm-6 col-xs-4">Tasks</th> <th class="List-tableHeader col-lg-3 col-md-3 col-sm-6 col-xs-4" translate>Tasks</th>
<th class="List-tableHeader col-lg-2 col-md-2 col-sm-2 col-xs-3">Started</th> <th class="List-tableHeader col-lg-2 col-md-2 col-sm-2 col-xs-3" translate>Started</th>
<th class="List-tableHeader col-lg-2 col-md-2 col-sm-2 col-xs-3">Elapsed</th> <th class="List-tableHeader col-lg-2 col-md-2 col-sm-2 col-xs-3" translate>Elapsed</th>
<th class="List-tableHeader JobDetail-tableHeader col-lg-4 col-md-3 hidden-xs hidden-sm">Host Status</th> <th class="List-tableHeader JobDetail-tableHeader col-lg-4 col-md-3 hidden-xs hidden-sm" translate>Host Status</th>
</tr> </tr>
</thead> </thead>
</table> </table>
@@ -304,19 +304,19 @@
<span class="badge missing-hosts">{{ task.missingCount }}</span> <span class="badge missing-hosts">{{ task.missingCount }}</span>
</a> </a>
<div class="no-matching-hosts inner-bar" id="{{ task.id }}-{{ task.play_id }}-no-matching-hosts-bar" aw-tool-tip="No matching hosts were found." data-placement="top" style="width: 100%;" ng-show="task.status === 'no-matching-hosts'"> <div class="no-matching-hosts inner-bar" id="{{ task.id }}-{{ task.play_id }}-no-matching-hosts-bar" aw-tool-tip="No matching hosts were found." data-placement="top" style="width: 100%;" ng-show="task.status === 'no-matching-hosts'">
No matching hosts. <translate>No matching hosts.</translate>
</div> </div>
</div> </div>
</td> </td>
</tr> </tr>
<tr ng-show="taskList.length === 0 && waiting"> <tr ng-show="taskList.length === 0 && waiting">
<td colspan="5" class="col-lg-12 loading-info">Waiting...</td> <td colspan="5" class="col-lg-12 loading-info" translate>Waiting...</td>
</tr> </tr>
<tr ng-show="taskList.length === 0 && tasksLoading && !waiting"> <tr ng-show="taskList.length === 0 && tasksLoading && !waiting">
<td colspan="5" class="col-lg-12 loading-info">Loading...</td> <td colspan="5" class="col-lg-12 loading-info" translate>Loading...</td>
</tr> </tr>
<tr ng-show="taskList.length === 0 && !tasksLoading && !waiting"> <tr ng-show="taskList.length === 0 && !tasksLoading && !waiting">
<td colspan="5" class="col-lg-12 loading-info">No matching tasks</td> <td colspan="5" class="col-lg-12 loading-info" translate>No matching tasks</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -337,8 +337,8 @@
</div> </div>
<div class="JobDetail-tableToggleContainer form-group"> <div class="JobDetail-tableToggleContainer form-group">
<div class="btn-group" aw-toggle-button data-after-toggle="filterHostStatus"> <div class="btn-group" aw-toggle-button data-after-toggle="filterHostStatus">
<button class="JobDetail-tableToggle btn btn-xs btn-primary active">All</button> <button class="JobDetail-tableToggle btn btn-xs btn-primary active" translate>All</button>
<button class="JobDetail-tableToggle btn btn-xs btn-default">Failed</button> <button class="JobDetail-tableToggle btn btn-xs btn-default" translate>Failed</button>
</div> </div>
</div> </div>
</div> </div>
@@ -346,9 +346,9 @@
<table class="table table-condensed" ng-show="results.length !== 0"> <table class="table table-condensed" ng-show="results.length !== 0">
<thead> <thead>
<tr> <tr>
<th class="List-tableHeader col-lg-4 col-md-3 col-sm-3 col-xs-3">Hosts</th> <th class="List-tableHeader col-lg-4 col-md-3 col-sm-3 col-xs-3" translate>Hosts</th>
<th class="List-tableHeader col-lg-3 col-md-4 col-sm-3 col-xs-3">Item</th> <th class="List-tableHeader col-lg-3 col-md-4 col-sm-3 col-xs-3" translate>Item</th>
<th class="List-tableHeader JobDetail-tableHeader col-lg-3 col-md-4 col-sm-3 col-xs-3">Message</th> <th class="List-tableHeader JobDetail-tableHeader col-lg-3 col-md-4 col-sm-3 col-xs-3" translate>Message</th>
</tr> </tr>
</thead> </thead>
</table> </table>
@@ -365,13 +365,13 @@
<td class="List-tableCell col-lg-3 col-md-4 col-sm-3 col-xs-3">{{ result.msg }}</td> <td class="List-tableCell col-lg-3 col-md-4 col-sm-3 col-xs-3">{{ result.msg }}</td>
</tr> </tr>
<tr ng-show="results.length === 0 && waiting"> <tr ng-show="results.length === 0 && waiting">
<td colspan="5" class="col-lg-12 loading-info">Waiting...</td> <td colspan="5" class="col-lg-12 loading-info" translate>Waiting...</td>
</tr> </tr>
<tr ng-show="results.length === 0 && hostResultsLoading && !waiting"> <tr ng-show="results.length === 0 && hostResultsLoading && !waiting">
<td colspan="5" class="col-lg-12 loading-info">Loading...</td> <td colspan="5" class="col-lg-12 loading-info" translate>Loading...</td>
</tr> </tr>
<tr ng-show="results.length === 0 && !hostResultsLoading && !waiting"> <tr ng-show="results.length === 0 && !hostResultsLoading && !waiting">
<td colspan="5" class="col-lg-12 loading-info">No matching host events</td> <td colspan="5" class="col-lg-12 loading-info" translate>No matching host events</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -388,10 +388,10 @@
<div class="JobDetail-panelHeader"> <div class="JobDetail-panelHeader">
<div class="JobDetail-expandContainer"> <div class="JobDetail-expandContainer">
<a class="JobDetail-panelHeaderText" ng-show="lessEvents" ui-sref="jobDetail.host-summary" ng-click="toggleLessEvents()"> <a class="JobDetail-panelHeaderText" ng-show="lessEvents" ui-sref="jobDetail.host-summary" ng-click="toggleLessEvents()">
EVENT SUMMARY<i class="JobDetail-expandArrow fa fa-caret-right"></i> <translate>EVENT SUMMARY</translate><i class="JobDetail-expandArrow fa fa-caret-right"></i>
</a> </a>
<a class="JobDetail-panelHeaderText" ng-show="!lessEvents" ui-sref="jobDetail" ng-click="toggleLessEvents()"> <a class="JobDetail-panelHeaderText" ng-show="!lessEvents" ui-sref="jobDetail" ng-click="toggleLessEvents()">
EVENT SUMMARY<i class="JobDetail-expandArrow fa fa-caret-down"></i> <translate>EVENT SUMMARY</translate><i class="JobDetail-expandArrow fa fa-caret-down"></i>
</a> </a>
</div> </div>
</div> </div>
@@ -411,13 +411,13 @@
<div class="JobDetail-rightSide"> <div class="JobDetail-rightSide">
<div class="JobDetail-stdoutPanel Panel"> <div class="JobDetail-stdoutPanel Panel">
<div class="StandardOut-panelHeader"> <div class="StandardOut-panelHeader">
<div class="StandardOut-panelHeaderText">STANDARD OUT</div> <div class="StandardOut-panelHeaderText" translate>STANDARD OUT</div>
<div class="StandardOut-panelHeaderActions"> <div class="StandardOut-panelHeaderActions">
<button class="StandardOut-actionButton" aw-tool-tip="Toggle Output" data-placement="top" ng-class="{'StandardOut-actionButton--active': stdoutFullScreen}" ng-click="toggleStdoutFullscreen()"> <button class="StandardOut-actionButton" aw-tool-tip="{{'Toggle Output'|translate}}" data-placement="top" ng-class="{'StandardOut-actionButton--active': stdoutFullScreen}" ng-click="toggleStdoutFullscreen()">
<i class="fa fa-arrows-alt"></i> <i class="fa fa-arrows-alt"></i>
</button> </button>
<a ng-show="job_status.status === 'failed' || job_status.status === 'successful' || job_status.status === 'canceled'" href="/api/v1/jobs/{{ job.id }}/stdout?format=txt_download&token={{ token }}"> <a ng-show="job_status.status === 'failed' || job_status.status === 'successful' || job_status.status === 'canceled'" href="/api/v1/jobs/{{ job.id }}/stdout?format=txt_download&token={{ token }}">
<button class="StandardOut-actionButton" aw-tool-tip="Download Output" data-placement="top"> <button class="StandardOut-actionButton" aw-tool-tip="{{'Download Output'|translate}}" data-placement="top">
<i class="fa fa-download"></i> <i class="fa fa-download"></i>
</button> </button>
</a> </a>

View File

@@ -1,6 +1,6 @@
export default export default
function LaunchJob(Rest, Wait, ProcessErrors, ToJSON, Empty, GetBasePath, $state, $location, $rootScope) { function LaunchJob(Rest, Wait, ProcessErrors, ToJSON, Empty, GetBasePath, $state, $location, $rootScope, i18n) {
// This factory gathers up all the job launch data and POST's it. // This factory gathers up all the job launch data and POST's it.
@@ -163,8 +163,10 @@ export default
} }
}) })
.error(function(data, status) { .error(function(data, status) {
ProcessErrors(scope, data, status, null, { hdr: 'Error!', let template_id = scope.job_template_id;
msg: 'Failed updating job ' + scope.job_template_id + ' with variables. POST returned: ' + status }); template_id = (template_id === undefined) ? "undefined" : i18n.sprintf("%d", template_id);
ProcessErrors(scope, data, status, null, { hdr: i18n._('Error!'),
msg: i18n.sprintf(i18n._('Failed updating job %s with variables. POST returned: %d'), template_id, status) });
}); });
}; };
@@ -182,8 +184,8 @@ export default
buildData(); buildData();
}) })
.error(function (data, status) { .error(function (data, status) {
ProcessErrors(scope, data, status, { hdr: 'Error!', ProcessErrors(scope, data, status, { hdr: i18n._('Error!'),
msg: 'Failed to retrieve job template extra variables.' }); msg: i18n._('Failed to retrieve job template extra variables.') });
}); });
}; };
@@ -209,5 +211,6 @@ LaunchJob.$inject =
'GetBasePath', 'GetBasePath',
'$state', '$state',
'$location', '$location',
'$rootScope' '$rootScope',
'i18n'
]; ];

View File

@@ -13,7 +13,7 @@ export default
name: 'jobs', name: 'jobs',
basePath: 'unified_jobs', basePath: 'unified_jobs',
iterator: 'job', iterator: 'job',
editTitle: 'All Jobs', editTitle: i18n._('All Jobs'),
index: false, index: false,
hover: true, hover: true,
well: false, well: false,
@@ -42,13 +42,13 @@ export default
noLink: true noLink: true
}, },
name: { name: {
label: 'Name', label: i18n._('Name'),
columnClass: 'col-lg-2 col-md-3 col-sm-4 col-xs-6', columnClass: 'col-lg-2 col-md-3 col-sm-4 col-xs-6',
ngClick: "viewJobDetails(job)", ngClick: "viewJobDetails(job)",
badgePlacement: 'right', badgePlacement: 'right',
badgeCustom: true, badgeCustom: true,
badgeIcon: `<a href="{{ job.workflow_result_link }}" badgeIcon: `<a href="{{ job.workflow_result_link }}"
aw-tool-tip="View workflow results" aw-tool-tip=i18n._("View workflow results")
data-placement="top" data-placement="top"
data-original-title="" title=""> data-original-title="" title="">
<i class="WorkflowBadge" <i class="WorkflowBadge"
@@ -58,14 +58,14 @@ export default
</a>` </a>`
}, },
type: { type: {
label: 'Type', label: i18n._('Type'),
ngBind: 'job.type_label', ngBind: 'job.type_label',
link: false, link: false,
columnClass: "col-lg-2 hidden-md hidden-sm hidden-xs", columnClass: "col-lg-2 hidden-md hidden-sm hidden-xs",
columnShow: "showJobType", columnShow: "showJobType",
}, },
finished: { finished: {
label: 'Finished', label: i18n._('Finished'),
noLink: true, noLink: true,
filter: "longDate", filter: "longDate",
columnClass: "col-lg-2 col-md-3 col-sm-3 hidden-xs", columnClass: "col-lg-2 col-md-3 col-sm-3 hidden-xs",
@@ -73,7 +73,7 @@ export default
desc: true desc: true
}, },
labels: { labels: {
label: 'Labels', label: i18n._('Labels'),
type: 'labels', type: 'labels',
nosort: true, nosort: true,
showDelete: false, showDelete: false,
@@ -91,28 +91,28 @@ export default
"view": { "view": {
mode: "all", mode: "all",
ngClick: "viewJobDetails(job)", ngClick: "viewJobDetails(job)",
awToolTip: "View the job", awToolTip: i18n._("View the job"),
dataPlacement: "top" dataPlacement: "top"
}, },
submit: { submit: {
icon: 'icon-rocket', icon: 'icon-rocket',
mode: 'all', mode: 'all',
ngClick: 'relaunchJob($event, job.id)', ngClick: 'relaunchJob($event, job.id)',
awToolTip: 'Relaunch using the same parameters', awToolTip: i18n._('Relaunch using the same parameters'),
dataPlacement: 'top', dataPlacement: 'top',
ngShow: "!(job.type == 'system_job') && job.summary_fields.user_capabilities.start" ngShow: "!(job.type == 'system_job') && job.summary_fields.user_capabilities.start"
}, },
cancel: { cancel: {
mode: 'all', mode: 'all',
ngClick: 'deleteJob(job.id)', ngClick: 'deleteJob(job.id)',
awToolTip: 'Cancel the job', awToolTip: i18n._('Cancel the job'),
dataPlacement: 'top', dataPlacement: 'top',
ngShow: "(job.status === 'running'|| job.status === 'waiting' || job.status === 'pending') && job.summary_fields.user_capabilities.start" ngShow: "(job.status === 'running'|| job.status === 'waiting' || job.status === 'pending') && job.summary_fields.user_capabilities.start"
}, },
"delete": { "delete": {
mode: 'all', mode: 'all',
ngClick: 'deleteJob(job.id)', ngClick: 'deleteJob(job.id)',
awToolTip: 'Delete the job', awToolTip: i18n._('Delete the job'),
dataPlacement: 'top', dataPlacement: 'top',
ngShow: "(job.status !== 'running' && job.status !== 'waiting' && job.status !== 'pending') && job.summary_fields.user_capabilities.delete" ngShow: "(job.status !== 'running' && job.status !== 'waiting' && job.status !== 'pending') && job.summary_fields.user_capabilities.delete"
} }

View File

@@ -7,11 +7,12 @@
export default export default
angular.module('JobEventsListDefinition', []) angular.module('JobEventsListDefinition', [])
.value('JobEventList', { .factory('JobEventList', ['i18n', function(i18n) {
return {
name: 'jobevents', name: 'jobevents',
iterator: 'jobevent', iterator: 'jobevent',
editTitle: 'Job Events', editTitle: i18n._('Job Events'),
index: false, index: false,
hover: true, hover: true,
"class": "condensed", "class": "condensed",
@@ -27,27 +28,27 @@ export default
//}, //},
events: { events: {
href: '/#/job_events/{{ job_id }}', href: '/#/job_events/{{ job_id }}',
label: 'Events', label: i18n._('Events'),
active: true, active: true,
icon: 'icon-list-ul' icon: 'icon-list-ul'
}, },
hosts: { hosts: {
href: '/#/job_host_summaries/{{ job_id }}', href: '/#/job_host_summaries/{{ job_id }}',
label: 'Host Summary', label: i18n._('Host Summary'),
icon: 'icon-laptop' icon: 'icon-laptop'
} }
}, },
fields: { fields: {
created: { created: {
label: 'Created On', label: i18n._('Created On'),
columnClass: 'col-lg-1 col-md-1 hidden-sm hidden-xs', columnClass: 'col-lg-1 col-md-1 hidden-sm hidden-xs',
key: true, key: true,
nosort: true, nosort: true,
noLink: true noLink: true
}, },
status: { status: {
label: 'Status', label: i18n._('Status'),
showValue: false, showValue: false,
columnClass: 'col-sm-1 col-xs-2 text-center', columnClass: 'col-sm-1 col-xs-2 text-center',
nosort: true, nosort: true,
@@ -61,7 +62,7 @@ export default
badgeNgClick: 'viewJobEvent(jobevent.id)' badgeNgClick: 'viewJobEvent(jobevent.id)'
}, },
event_display: { event_display: {
label: 'Event', label: i18n._('Event'),
hasChildren: true, hasChildren: true,
ngClick: 'toggleChildren(jobevent.id, jobevent.related.children)', ngClick: 'toggleChildren(jobevent.id, jobevent.related.children)',
nosort: true, nosort: true,
@@ -69,7 +70,7 @@ export default
appendHTML: 'jobevent.event_detail' appendHTML: 'jobevent.event_detail'
}, },
host: { host: {
label: 'Host', label: i18n._('Host'),
ngBind: 'jobevent.summary_fields.host.name', ngBind: 'jobevent.summary_fields.host.name',
ngHref: '{{ jobevent.hostLink }}', ngHref: '{{ jobevent.hostLink }}',
nosort: true, nosort: true,
@@ -85,7 +86,7 @@ export default
awToolTip: 'Refresh the page', awToolTip: 'Refresh the page',
ngClick: 'refresh()', ngClick: 'refresh()',
actionClass: 'btn List-buttonDefault', actionClass: 'btn List-buttonDefault',
buttonContent: 'REFRESH' buttonContent: i18n._('REFRESH')
} }
}, },
@@ -94,10 +95,10 @@ export default
columnClass: 'col-sm-1 col-xs-2', columnClass: 'col-sm-1 col-xs-2',
view: { view: {
label: 'View', label: i18n._('View'),
ngClick: 'viewJobEvent(jobevent.id)', ngClick: 'viewJobEvent(jobevent.id)',
awToolTip: 'View event details', awToolTip: i18n._('View event details'),
dataPlacement: 'top' dataPlacement: 'top'
} }
} }
}); };}]);

View File

@@ -14,7 +14,7 @@ export default
iterator: 'activity', iterator: 'activity',
basePath: 'activity_stream', basePath: 'activity_stream',
editTitle: i18n._('Activity Stream'), editTitle: i18n._('Activity Stream'),
listTitle: '<span translate>Activity Stream</span><span ng-show="streamSubTitle"><div class="List-titleLockup"></div>{{streamSubTitle}}<span>', listTitle: i18n._('Activity Stream') + '<span ng-show="streamSubTitle"><div class="List-titleLockup"></div>{{streamSubTitle}}<span>',
listTitleBadge: false, listTitleBadge: false,
emptyListText: i18n._('There are no events to display at this time'), emptyListText: i18n._('There are no events to display at this time'),
selectInstructions: '', selectInstructions: '',
@@ -54,7 +54,7 @@ export default
awToolTip: i18n._("Refresh the page"), awToolTip: i18n._("Refresh the page"),
ngClick: "refreshStream()", ngClick: "refreshStream()",
actionClass: 'btn List-buttonDefault ActivityStream-refreshButton', actionClass: 'btn List-buttonDefault ActivityStream-refreshButton',
buttonContent: 'REFRESH' buttonContent: i18n._('REFRESH')
} }
}, },

View File

@@ -23,9 +23,9 @@
*/ */
export default export default
['$rootScope', '$cookieStore', 'CreateDialog', 'Authorization', ['$rootScope', '$cookieStore', 'CreateDialog', 'Authorization',
'Store', '$interval', '$state', '$q', 'Store', '$interval', '$state', '$q', 'i18n',
function ($rootScope, $cookieStore, CreateDialog, Authorization, function ($rootScope, $cookieStore, CreateDialog, Authorization,
Store, $interval, $state, $q) { Store, $interval, $state, $q, i18n) {
return { return {
sessionTime: null, sessionTime: null,
@@ -154,7 +154,7 @@ export default
}); });
CreateDialog({ CreateDialog({
id: 'idle-modal' , id: 'idle-modal' ,
title: "Idle Session", title: i18n._("Idle Session"),
scope: $rootScope, scope: $rootScope,
buttons: buttons, buttons: buttons,
width: 470, width: 470,

View File

@@ -10,11 +10,11 @@ export default
[ 'Wait', '$compile', 'CreateDialog', 'GetBasePath' , [ 'Wait', '$compile', 'CreateDialog', 'GetBasePath' ,
'SchedulesList', 'Rest' , 'SchedulesList', 'Rest' ,
'ProcessErrors', 'managementJobsListObject', '$rootScope', '$state', 'ProcessErrors', 'managementJobsListObject', '$rootScope', '$state',
'$scope', 'CreateSelect2', '$scope', 'CreateSelect2', 'i18n',
function( Wait, $compile, CreateDialog, GetBasePath, function( Wait, $compile, CreateDialog, GetBasePath,
SchedulesList, Rest, ProcessErrors, SchedulesList, Rest, ProcessErrors,
managementJobsListObject, $rootScope, $state, $scope, managementJobsListObject, $rootScope, $state, $scope,
CreateSelect2) { CreateSelect2, i18n) {
var defaultUrl = GetBasePath('system_job_templates') + "?order_by=name"; var defaultUrl = GetBasePath('system_job_templates') + "?order_by=name";
@@ -26,8 +26,8 @@ export default
Wait('stop'); Wait('stop');
}) })
.error(function(data, status){ .error(function(data, status){
ProcessErrors($scope, data, status, null, {hdr: 'Error!', ProcessErrors($scope, data, status, null, {hdr: i18n._('Error!'),
msg: 'Call to '+ defaultUrl + ' failed. Return status: '+ status}); msg: i18n.sprintf(i18n._('Call to %s failed. Return status: %d'), (defaultUrl === undefined) ? "undefined" : defaultUrl, status )});
}); });
}; };
getManagementJobs(); getManagementJobs();
@@ -145,8 +145,10 @@ export default
$state.go('managementJobStdout', {id: data.system_job}, {reload:true}); $state.go('managementJobStdout', {id: data.system_job}, {reload:true});
}) })
.error(function(data, status) { .error(function(data, status) {
ProcessErrors(scope, data, status, null, { hdr: 'Error!', let template_id = scope.job_template_id;
msg: 'Failed updating job ' + scope.job_template_id + ' with variables. POST returned: ' + status }); template_id = (template_id === undefined) ? "undefined" : i18n.sprintf("%d", template_id);
ProcessErrors(scope, data, status, null, { hdr: i18n._('Error!'),
msg: i18n.sprintf(i18n._('Failed updating job %s with variables. POST returned: %d'), template_id, status) });
}); });
}, },
"class": "btn btn-primary", "class": "btn btn-primary",
@@ -233,8 +235,10 @@ export default
$state.go('managementJobStdout', {id: data.system_job}, {reload:true}); $state.go('managementJobStdout', {id: data.system_job}, {reload:true});
}) })
.error(function(data, status) { .error(function(data, status) {
ProcessErrors(scope, data, status, null, { hdr: 'Error!', let template_id = scope.job_template_id;
msg: 'Failed updating job ' + scope.job_template_id + ' with variables. POST returned: ' + status }); template_id = (template_id === undefined) ? "undefined" : i18n.sprintf("%d", template_id);
ProcessErrors(scope, data, status, null, { hdr: i18n._('Error!'),
msg: i18n.sprintf(i18n._('Failed updating job %s with variables. POST returned: %d'), template_id, status) });
}); });
}, },
"class": "btn btn-primary", "class": "btn btn-primary",

View File

@@ -85,7 +85,7 @@ angular.module('notifications', [
}, },
ncyBreadcrumb: { ncyBreadcrumb: {
parent: 'setup', parent: 'setup',
name: N_('NOTIFICATIONS') label: N_('NOTIFICATIONS')
} }
}) })
}); });

View File

@@ -7,10 +7,12 @@
export default ['$rootScope', '$scope', 'Wait', 'generateList', 'NotificationTemplatesList', export default ['$rootScope', '$scope', 'Wait', 'generateList', 'NotificationTemplatesList',
'GetBasePath', 'Rest', 'ProcessErrors', 'Prompt', '$state', 'GetChoices', 'GetBasePath', 'Rest', 'ProcessErrors', 'Prompt', '$state', 'GetChoices',
'Empty', 'Find', 'ngToast', '$compile', '$filter', 'Dataset', 'rbacUiControlService', 'Empty', 'Find', 'ngToast', '$compile', '$filter', 'Dataset', 'rbacUiControlService',
'i18n',
function( function(
$rootScope, $scope, Wait, GenerateList, NotificationTemplatesList, $rootScope, $scope, Wait, GenerateList, NotificationTemplatesList,
GetBasePath, Rest, ProcessErrors, Prompt, $state, GetChoices, GetBasePath, Rest, ProcessErrors, Prompt, $state, GetChoices,
Empty, Find, ngToast, $compile, $filter, Dataset, rbacUiControlService) { Empty, Find, ngToast, $compile, $filter, Dataset, rbacUiControlService,
i18n) {
var defaultUrl = GetBasePath('notification_templates'), var defaultUrl = GetBasePath('notification_templates'),
list = NotificationTemplatesList; list = NotificationTemplatesList;
@@ -68,8 +70,8 @@
html = "<table class=\"table table-condensed flyout\" style=\"width: 100%\">\n"; html = "<table class=\"table table-condensed flyout\" style=\"width: 100%\">\n";
html += "<thead>\n"; html += "<thead>\n";
html += "<tr>"; html += "<tr>";
html += "<th>Status</th>"; html += "<th>" + i18n._("Status") + "</th>";
html += "<th>Time</th>"; html += "<th>" + i18n._("Time") + "</th>";
html += "</tr>\n"; html += "</tr>\n";
html += "</thead>\n"; html += "</thead>\n";
html += "<tbody>\n"; html += "<tbody>\n";
@@ -83,7 +85,7 @@
html += "</tbody>\n"; html += "</tbody>\n";
html += "</table>\n"; html += "</table>\n";
} else { } else {
html = "<p>No recent notifications.</p>\n"; html = "<p>" + i18n._("No recent notifications.") + "</p>\n";
} }
notification_template.template_status_html = html; notification_template.template_status_html = html;
} }
@@ -110,7 +112,7 @@
}) })
.catch(function() { .catch(function() {
ngToast.danger({ ngToast.danger({
content: `<i class="fa fa-check-circle Toast-successIcon"></i> <b>${name}:</b> Notification Failed.`, content: `<i class="fa fa-check-circle Toast-successIcon"></i> <b>${name}:</b> ` + i18n._('Notification Failed.'),
}); });
}); });
@@ -179,12 +181,12 @@
}); });
}); });
}; };
var bodyHtml = '<div class="Prompt-bodyQuery">Are you sure you want to delete the notification template below?</div><div class="Prompt-bodyTarget">' + $filter('sanitize')(name) + '</div>'; var bodyHtml = '<div class="Prompt-bodyQuery">' + i18n._('Are you sure you want to delete the notification template below?') + '</div><div class="Prompt-bodyTarget">' + $filter('sanitize')(name) + '</div>';
Prompt({ Prompt({
hdr: 'Delete', hdr: i18n._('Delete'),
body: bodyHtml, body: bodyHtml,
action: action, action: action,
actionText: 'DELETE' actionText: i18n._('DELETE')
}); });
}; };
} }

View File

@@ -16,6 +16,9 @@ export default ['i18n', function(i18n) {
addTitle: i18n._('New Notification Template'), addTitle: i18n._('New Notification Template'),
editTitle: '{{ name }}', editTitle: '{{ name }}',
name: 'notification_template', name: 'notification_template',
// I18N for "CREATE NOTIFICATION_TEMPLATE"
// on /#/notification_templates/add
breadcrumbName: i18n._('NOTIFICATION TEMPLATE'),
stateTree: 'notifications', stateTree: 'notifications',
basePath: 'notification_templates', basePath: 'notification_templates',
showActions: true, showActions: true,
@@ -389,19 +392,19 @@ export default ['i18n', function(i18n) {
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)' ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
}, },
email_options: { email_options: {
label: 'Options', label: i18n._('Options'),
type: 'radio_group', type: 'radio_group',
subForm: 'typeSubForm', subForm: 'typeSubForm',
ngShow: "notification_type.value == 'email'", ngShow: "notification_type.value == 'email'",
ngChange: "emailOptionsChange()", ngChange: "emailOptionsChange()",
options: [{ options: [{
value: 'use_tls', value: 'use_tls',
label: 'Use TLS', label: i18n._('Use TLS'),
ngShow: "notification_type.value == 'email' ", ngShow: "notification_type.value == 'email' ",
labelClass: 'NotificationsForm-radioButtons' labelClass: 'NotificationsForm-radioButtons'
}, { }, {
value: 'use_ssl', value: 'use_ssl',
label: 'Use SSL', label: i18n._('Use SSL'),
ngShow: "notification_type.value == 'email'", ngShow: "notification_type.value == 'email'",
labelClass: 'NotificationsForm-radioButtons' labelClass: 'NotificationsForm-radioButtons'
}] }]

View File

@@ -23,7 +23,7 @@ export default ['i18n', function(i18n){
nosort: true, nosort: true,
icon: 'icon-job-{{ notification_template.status }}', icon: 'icon-job-{{ notification_template.status }}',
awPopOver: '{{ notification_template.template_status_html }}', awPopOver: '{{ notification_template.template_status_html }}',
dataTitle: "Recent Notifications", dataTitle: i18n._("Recent Notifications"),
dataPlacement: 'right', dataPlacement: 'right',
columnClass: 'col-lg-1 col-md-1 col-sm-2 col-xs-2 List-staticColumn--smallStatus' columnClass: 'col-lg-1 col-md-1 col-sm-2 col-xs-2 List-staticColumn--smallStatus'
}, },

View File

@@ -7,10 +7,10 @@
export default ['$stateParams', '$scope', '$rootScope', '$location', export default ['$stateParams', '$scope', '$rootScope', '$location',
'$log', '$compile', 'Rest', 'OrganizationList', 'Alert', 'Prompt', 'ClearScope', '$log', '$compile', 'Rest', 'OrganizationList', 'Alert', 'Prompt', 'ClearScope',
'ProcessErrors', 'GetBasePath', 'Wait', '$state', 'rbacUiControlService', '$filter', 'Dataset', 'ProcessErrors', 'GetBasePath', 'Wait', '$state', 'rbacUiControlService', '$filter', 'Dataset', 'i18n',
function($stateParams, $scope, $rootScope, $location, function($stateParams, $scope, $rootScope, $location,
$log, $compile, Rest, OrganizationList, Alert, Prompt, ClearScope, $log, $compile, Rest, OrganizationList, Alert, Prompt, ClearScope,
ProcessErrors, GetBasePath, Wait, $state, rbacUiControlService, $filter, Dataset) { ProcessErrors, GetBasePath, Wait, $state, rbacUiControlService, $filter, Dataset, i18n) {
ClearScope(); ClearScope();
@@ -162,10 +162,10 @@ export default ['$stateParams', '$scope', '$rootScope', '$location',
}; };
Prompt({ Prompt({
hdr: 'Delete', hdr: i18n._('Delete'),
body: '<div class="Prompt-bodyQuery">Are you sure you want to delete the organization below?</div><div class="Prompt-bodyTarget">' + $filter('sanitize')(name) + '</div>', body: '<div class="Prompt-bodyQuery">' + i18n._('Are you sure you want to delete the organization below?') + '</div><div class="Prompt-bodyTarget">' + $filter('sanitize')(name) + '</div>',
action: action, action: action,
actionText: 'DELETE' actionText: i18n._('DELETE')
}); });
}; };
} }

View File

@@ -1,12 +1,12 @@
<div id="logviewer-modal-dialog" style="display: none;"> <div id="logviewer-modal-dialog" style="display: none;">
<ul id="logview-tabs" class="nav nav-tabs"> <ul id="logview-tabs" class="nav nav-tabs">
<li class="active"><a href="#status" id="status-link" data-toggle="tab" ng-click="toggleTab($event, 'status-link', 'logview-tabs')">Status</a></li> <li class="active"><a href="#status" id="status-link" data-toggle="tab" ng-click="toggleTab($event, 'status-link', 'logview-tabs')" translate>Status</a></li>
<li><a href="#stdout" id="stdout-link" data-toggle="tab" ng-click="toggleTab($event, 'stdout-link', 'logview-tabs')">Standard Out</a></li> <li><a href="#stdout" id="stdout-link" data-toggle="tab" ng-click="toggleTab($event, 'stdout-link', 'logview-tabs')" translate>Standard Out</a></li>
<li><a href="#traceback" id="traceback-link" data-toggle="tab" ng-click="toggleTab($event, 'traceback-link', 'logview-tabs')">Traceback</a></li> <li><a href="#traceback" id="traceback-link" data-toggle="tab" ng-click="toggleTab($event, 'traceback-link', 'logview-tabs')" translate>Traceback</a></li>
<li><a href="#options" id="options-link" data-toggle="tab" ng-click="toggleTab($event, 'options-link', 'logview-tabs')">Options</a></li> <li><a href="#options" id="options-link" data-toggle="tab" ng-click="toggleTab($event, 'options-link', 'logview-tabs')" translate>Options</a></li>
<li><a href="#variables" id="variables-link" data-toggle="tab" ng-click="toggleTab($event, 'variable-link', 'logview-tabs')">Extra Variables</a></li> <li><a href="#variables" id="variables-link" data-toggle="tab" ng-click="toggleTab($event, 'variable-link', 'logview-tabs')" translate>Extra Variables</a></li>
<li><a href="#source-variables" id="source-variables-link" data-toggle="tab" ng-click="toggleTab($event, 'source-variable-link', 'logview-tabs')">Source Vars</a></li> <li><a href="#source-variables" id="source-variables-link" data-toggle="tab" ng-click="toggleTab($event, 'source-variable-link', 'logview-tabs')" translate>Source Vars</a></li>
</ul> </ul>
<div class="tab-content"> <div class="tab-content">
<div class="tab-pane active" id="status"> <div class="tab-pane active" id="status">

View File

@@ -4,6 +4,9 @@ import icon from '../shared/icon/main';
export default export default
angular.module('setupMenu', angular.module('setupMenu',
[ icon.name]) [ icon.name])
.run(['$stateExtender', function($stateExtender) { .run(['$stateExtender', 'I18NInit',
function($stateExtender, I18NInit) {
I18NInit();
$stateExtender.addState(route); $stateExtender.addState(route);
}]); }]);

View File

@@ -50,8 +50,8 @@
</p> </p>
</a> </a>
<a ui-sref="configuration" class="SetupItem" ng-if="user_is_superuser || user_is_system_auditor"> <a ui-sref="configuration" class="SetupItem" ng-if="user_is_superuser || user_is_system_auditor">
<h4 class="SetupItem-title">Configure Tower</h4> <h4 class="SetupItem-title" translate>Configure Tower</h4>
<p class="SetupItem-description"> <p class="SetupItem-description" translate>
Edit Tower's configuration. Edit Tower's configuration.
</p> </p>
</a> </a>

View File

@@ -678,7 +678,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
if(field.reset && !field.disabled) { if(field.reset && !field.disabled) {
var resetValue = "'" + field.reset+ "'"; var resetValue = "'" + field.reset+ "'";
html+= `<a class="Form-resetValue" ng-click="resetValue(${resetValue})">Reset</a>`; html+= `<a class="Form-resetValue" ng-click="resetValue(${resetValue})">` + i18n._("Reset") + `</a>`;
} }
html += "\n\t</label>\n"; html += "\n\t</label>\n";
@@ -1870,9 +1870,9 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
<div <div
class="row" class="row"
ng-show="${itm}.length === 0 && !(searchTags | isEmpty)"> ng-show="${itm}.length === 0 && !(searchTags | isEmpty)">
<div class="col-lg-12 List-searchNoResults"> <div class="col-lg-12 List-searchNoResults">`;
No records matched your search. html += i18n._('No records matched your search.');
</div> html += `</div>
</div> </div>
`; `;

View File

@@ -9,9 +9,7 @@
* generateLookupNodes - Attaches to a form node. Builds an abstract '*.lookup' node with field-specific 'lookup.*' children e.g. {name: 'projects.add.lookup.organizations', ...} * generateLookupNodes - Attaches to a form node. Builds an abstract '*.lookup' node with field-specific 'lookup.*' children e.g. {name: 'projects.add.lookup.organizations', ...}
*/ */
import { N_ } from '../i18n'; export default ['$injector', '$stateExtender', '$log', 'i18n', function($injector, $stateExtender, $log, i18n) {
export default ['$injector', '$stateExtender', '$log', function($injector, $stateExtender, $log) {
return { return {
/** /**
* @ngdoc method * @ngdoc method
@@ -152,7 +150,7 @@ export default ['$injector', '$stateExtender', '$log', function($injector, $stat
url: url, url: url,
ncyBreadcrumb: { ncyBreadcrumb: {
[params.parent ? 'parent' : null]: `${params.parent}`, [params.parent ? 'parent' : null]: `${params.parent}`,
label: N_('CREATE') + ` ${form.breadcrumbName || form.name}` label: i18n.sprintf(i18n._("CREATE %s"), i18n._(`${form.breadcrumbName || form.name}`))
}, },
views: { views: {
'form': { 'form': {
@@ -276,7 +274,7 @@ export default ['$injector', '$stateExtender', '$log', function($injector, $stat
}, },
views: { views: {
[`modal@${formStateDefinition.name}`]: { [`modal@${formStateDefinition.name}`]: {
template: `<add-rbac-user-team resolve="$resolve" title="Add Permissions"></add-rbac-user-team>` template: `<add-rbac-user-team resolve="$resolve" title="` + i18n._('Add Permissions') + `"></add-rbac-user-team>`
} }
}, },
resolve: { resolve: {
@@ -341,7 +339,7 @@ export default ['$injector', '$stateExtender', '$log', function($injector, $stat
}, },
views: { views: {
[`modal@${formStateDefinition.name}`]: { [`modal@${formStateDefinition.name}`]: {
template: `<add-rbac-resource users-dataset="$resolve.usersDataset" teams-dataset="$resolve.teamsDataset" selected="allSelected" resource-data="$resolve.resourceData" title="Add Users / Teams"></add-rbac-resource>` template: `<add-rbac-resource users-dataset="$resolve.usersDataset" teams-dataset="$resolve.teamsDataset" selected="allSelected" resource-data="$resolve.resourceData" title="` + i18n._('Add Users') + ' / ' + i18n._('Teams') + `"></add-rbac-resource>`
} }
}, },
resolve: { resolve: {
@@ -510,7 +508,7 @@ export default ['$injector', '$stateExtender', '$log', function($injector, $stat
}, },
views: { views: {
[`modal@${formStateDefinition.name}`]: { [`modal@${formStateDefinition.name}`]: {
template: `<add-rbac-resource users-dataset="$resolve.usersDataset" selected="allSelected" resource-data="$resolve.resourceData" without-team-permissions="true" title="Add Users"></add-rbac-resource>` template: `<add-rbac-resource users-dataset="$resolve.usersDataset" selected="allSelected" resource-data="$resolve.resourceData" without-team-permissions="true" title="` + i18n._('Add Users') + `"></add-rbac-resource>`
} }
}, },
resolve: { resolve: {

View File

@@ -4,7 +4,7 @@
<div class="StandardOut-leftPanel" ng-show="!stdoutFullScreen"> <div class="StandardOut-leftPanel" ng-show="!stdoutFullScreen">
<div class="Panel"> <div class="Panel">
<div class="StandardOut-panelHeader"> <div class="StandardOut-panelHeader">
<div class="StandardOut-panelHeaderText"> <div class="StandardOut-panelHeaderText" translate>
RESULTS RESULTS
</div> </div>
<div class="StandardOut-actions"> <div class="StandardOut-actions">
@@ -16,12 +16,12 @@
<div class="StandardOut-details"> <div class="StandardOut-details">
<div class="StandardOut-detailsRow" ng-show="job.module_name"> <div class="StandardOut-detailsRow" ng-show="job.module_name">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">Name</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>Name</div>
<div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">{{ job.module_name }}</div> <div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">{{ job.module_name }}</div>
</div> </div>
<div class="StandardOut-detailsRow"> <div class="StandardOut-detailsRow">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">STATUS</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>STATUS</div>
<div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8"> <div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">
<i class="fa icon-job-{{ job.status }}"></i> <i class="fa icon-job-{{ job.status }}"></i>
<span class="StandardOut-statusText StandardOut--capitalize">{{ job.status }}</span> <span class="StandardOut-statusText StandardOut--capitalize">{{ job.status }}</span>
@@ -29,54 +29,54 @@
</div> </div>
<div class="StandardOut-detailsRow" ng-show="job.started"> <div class="StandardOut-detailsRow" ng-show="job.started">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">STARTED</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>STARTED</div>
<div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8"> <div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">
{{ job.started | longDate }} {{ job.started | longDate }}
</div> </div>
</div> </div>
<div class="StandardOut-detailsRow" ng-show="job.finished"> <div class="StandardOut-detailsRow" ng-show="job.finished">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">FINISHED</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>FINISHED</div>
<div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8"> <div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">
{{ job.finished | longDate }} {{ job.finished | longDate }}
</div> </div>
</div> </div>
<div class="StandardOut-detailsRow" ng-show="job.finished"> <div class="StandardOut-detailsRow" ng-show="job.finished">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">ELAPSED</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>ELAPSED</div>
<div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8"> <div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">
{{ job.elapsed }} seconds {{ job.elapsed }} seconds
</div> </div>
</div> </div>
<div class="StandardOut-detailsRow" ng-show="job.module_args"> <div class="StandardOut-detailsRow" ng-show="job.module_args">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">Module Args</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>Module Args</div>
<div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">{{ job.module_args }}</div> <div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">{{ job.module_args }}</div>
</div> </div>
<div class="StandardOut-detailsRow"> <div class="StandardOut-detailsRow">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">Inventory</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>Inventory</div>
<div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8"> <div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">
<a href="{{ inventory_url }}" <a href="{{ inventory_url }}"
aw-tool-tip="The inventory this command ran on." aw-tool-tip="{{'The inventory this command ran on.'|translate}}"
data-placement="top">{{ inventory_name }}</a> data-placement="top">{{ inventory_name }}</a>
</div> </div>
</div> </div>
<div class="StandardOut-detailsRow" ng-show="credential_name"> <div class="StandardOut-detailsRow" ng-show="credential_name">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">Credential</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>Credential</div>
<div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8"> <div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">
<a href="{{ credential_url }}" <a href="{{ credential_url }}"
aw-tool-tip="The credential used to run this command." aw-tool-tip="{{'The credential used to run this command.'|translate}}"
data-placement="top">{{ credential_name }}</a> data-placement="top">{{ credential_name }}</a>
</div> </div>
</div> </div>
<div class="StandardOut-detailsRow" ng-show="created_by"> <div class="StandardOut-detailsRow" ng-show="created_by">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">Launched By</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>Launched By</div>
<div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8"> <div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">
<a href="/#/users/{{ created_by.id }}" <a href="/#/users/{{ created_by.id }}"
aw-tool-tip="The user who ran this command." aw-tool-tip="{{'The user who ran this command.'|translate}}"
data-placement="top">{{ created_by.username }}</a> data-placement="top">{{ created_by.username }}</a>
</div> </div>
</div> </div>
@@ -84,19 +84,19 @@
<!-- since zero is a falsy value, you need ng-show such that <!-- since zero is a falsy value, you need ng-show such that
the number is >= 0 --> the number is >= 0 -->
<div class="StandardOut-detailsRow" ng-show="forks >= 0"> <div class="StandardOut-detailsRow" ng-show="forks >= 0">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">Forks</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>Forks</div>
<div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">{{ forks }}</div> <div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">{{ forks }}</div>
</div> </div>
<div class="StandardOut-detailsRow" ng-show="limit"> <div class="StandardOut-detailsRow" ng-show="limit">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">Limit</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>Limit</div>
<div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">{{ limit }}</div> <div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">{{ limit }}</div>
</div> </div>
<!-- since zero is a falsy value, you need ng-show such that <!-- since zero is a falsy value, you need ng-show such that
the number is >= 0 --> the number is >= 0 -->
<div class="StandardOut-detailsRow" ng-show="verbosity >= 0"> <div class="StandardOut-detailsRow" ng-show="verbosity >= 0">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">Verbosity</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>Verbosity</div>
<div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">{{ verbosity }}</div> <div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">{{ verbosity }}</div>
</div> </div>
</div> </div>
@@ -105,13 +105,13 @@
<div class="StandardOut-rightPanel"> <div class="StandardOut-rightPanel">
<div class="Panel"> <div class="Panel">
<div class="StandardOut-panelHeader"> <div class="StandardOut-panelHeader">
<div class="StandardOut-panelHeaderText">STANDARD OUT</div> <div class="StandardOut-panelHeaderText" translate>STANDARD OUT</div>
<div class="StandardOut-panelHeaderActions"> <div class="StandardOut-panelHeaderActions">
<button class="StandardOut-actionButton" aw-tool-tip="{{ toggleStdoutFullscreenTooltip }}" data-tip-watch="toggleStdoutFullscreenTooltip" data-placement="top" ng-class="{'StandardOut-actionButton--active': stdoutFullScreen}" ng-click="toggleStdoutFullscreen()"> <button class="StandardOut-actionButton" aw-tool-tip="{{ toggleStdoutFullscreenTooltip }}" data-tip-watch="toggleStdoutFullscreenTooltip" data-placement="top" ng-class="{'StandardOut-actionButton--active': stdoutFullScreen}" ng-click="toggleStdoutFullscreen()">
<i class="fa fa-arrows-alt"></i> <i class="fa fa-arrows-alt"></i>
</button> </button>
<a href="/api/v1/ad_hoc_commands/{{ job.id }}/stdout?format=txt_download"> <a href="/api/v1/ad_hoc_commands/{{ job.id }}/stdout?format=txt_download">
<button class="StandardOut-actionButton" aw-tool-tip="Download Output" data-placement="top"> <button class="StandardOut-actionButton" aw-tool-tip="{{'Download Output'|translate}}" data-placement="top">
<i class="fa fa-download"></i> <i class="fa fa-download"></i>
</button> </button>
</a> </a>

View File

@@ -4,7 +4,7 @@
<div class="StandardOut-leftPanel" ng-show="!stdoutFullScreen"> <div class="StandardOut-leftPanel" ng-show="!stdoutFullScreen">
<div class="Panel"> <div class="Panel">
<div class="StandardOut-panelHeader"> <div class="StandardOut-panelHeader">
<div class="StandardOut-panelHeaderText"> <div class="StandardOut-panelHeaderText" translate>
RESULTS RESULTS
</div> </div>
<div class="StandardOut-actions"> <div class="StandardOut-actions">
@@ -16,13 +16,13 @@
<div class="StandardOut-details"> <div class="StandardOut-details">
<div class="StandardOut-detailsRow" ng-show="inventory_source_name"> <div class="StandardOut-detailsRow" ng-show="inventory_source_name">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">NAME</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>NAME</div>
<div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8"> <div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">
<a href="{{inv_manage_group_link}}"> <a href="{{inv_manage_group_link}}">
{{ inventory_source_name }} {{ inventory_source_name }}
</a> </a>
<a href="{{ workflow_result_link }}" <a href="{{ workflow_result_link }}"
aw-tool-tip="View workflow results" aw-tool-tip="{{'View workflow results'|translate}}"
data-placement="top" data-placement="top"
data-original-title="" title=""> data-original-title="" title="">
<i class="WorkflowBadge" <i class="WorkflowBadge"
@@ -34,7 +34,7 @@
</div> </div>
<div class="StandardOut-detailsRow"> <div class="StandardOut-detailsRow">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">STATUS</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>STATUS</div>
<div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8"> <div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">
<i class="fa icon-job-{{ job.status }}"></i> <i class="fa icon-job-{{ job.status }}"></i>
<span class="StandardOut-statusText StandardOut--capitalize">{{ job.status }}</span> <span class="StandardOut-statusText StandardOut--capitalize">{{ job.status }}</span>
@@ -42,42 +42,42 @@
</div> </div>
<div class="StandardOut-detailsRow" ng-show="{{job.license_error !== null}}"> <div class="StandardOut-detailsRow" ng-show="{{job.license_error !== null}}">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">LICENSE ERROR</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>LICENSE ERROR</div>
<div class="StandardOut-detailsContent StandardOut--capitalize"> <div class="StandardOut-detailsContent StandardOut--capitalize">
{{ job.license_error }} {{ job.license_error }}
</div> </div>
</div> </div>
<div class="StandardOut-detailsRow" ng-show="job.started"> <div class="StandardOut-detailsRow" ng-show="job.started">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">STARTED</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>STARTED</div>
<div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8"> <div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">
{{ job.started | longDate }} {{ job.started | longDate }}
</div> </div>
</div> </div>
<div class="StandardOut-detailsRow" ng-show="job.finished"> <div class="StandardOut-detailsRow" ng-show="job.finished">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">FINISHED</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>FINISHED</div>
<div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8"> <div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">
{{ job.finished | longDate }} {{ job.finished | longDate }}
</div> </div>
</div> </div>
<div class="StandardOut-detailsRow" ng-show="job.finished"> <div class="StandardOut-detailsRow" ng-show="job.finished">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">ELAPSED</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>ELAPSED</div>
<div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8"> <div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">
{{ job.elapsed }} seconds {{ job.elapsed }} seconds
</div> </div>
</div> </div>
<div class="StandardOut-detailsRow" ng-show="job.launch_type"> <div class="StandardOut-detailsRow" ng-show="job.launch_type">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">LAUNCH TYPE</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>LAUNCH TYPE</div>
<div class="StandardOut-detailsContent StandardOut--capitalize"> <div class="StandardOut-detailsContent StandardOut--capitalize">
{{ job.launch_type }} {{ job.launch_type }}
</div> </div>
</div> </div>
<div class="StandardOut-detailsRow" ng-show="credential_name"> <div class="StandardOut-detailsRow" ng-show="credential_name">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">CREDENTIAL</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>CREDENTIAL</div>
<div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8"> <div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">
<a ui-sref="credentials.edit({credential_id: credential})"> <a ui-sref="credentials.edit({credential_id: credential})">
{{ credential_name }} {{ credential_name }}
@@ -86,7 +86,7 @@
</div> </div>
<div class="StandardOut-detailsRow" ng-show="inventory_source_name"> <div class="StandardOut-detailsRow" ng-show="inventory_source_name">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">GROUP</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>GROUP</div>
<div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8"> <div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">
<a href="{{inv_manage_group_link}}"> <a href="{{inv_manage_group_link}}">
{{ inventory_source_name }} {{ inventory_source_name }}
@@ -95,28 +95,28 @@
</div> </div>
<div class="StandardOut-detailsRow" ng-show="source"> <div class="StandardOut-detailsRow" ng-show="source">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">SOURCE</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>SOURCE</div>
<div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8"> <div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">
{{ source }} {{ source }}
</div> </div>
</div> </div>
<div class="StandardOut-detailsRow" ng-show="source_regions"> <div class="StandardOut-detailsRow" ng-show="source_regions">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">REGIONS</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>REGIONS</div>
<div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8"> <div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">
{{ source_regions }} {{ source_regions }}
</div> </div>
</div> </div>
<div class="StandardOut-detailsRow" ng-show="{{ job.overwrite !== null }}"> <div class="StandardOut-detailsRow" ng-show="{{ job.overwrite !== null }}">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">OVERWRITE</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>OVERWRITE</div>
<div class="StandardOut-detailsContent StandardOut--capitalize"> <div class="StandardOut-detailsContent StandardOut--capitalize">
{{ job.overwrite }} {{ job.overwrite }}
</div> </div>
</div> </div>
<div class="StandardOut-detailsRow" ng-show="{{ job.overwrite_vars !== null }}"> <div class="StandardOut-detailsRow" ng-show="{{ job.overwrite_vars !== null }}">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">OVERWRITE VARS</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>OVERWRITE VARS</div>
<div class="StandardOut-detailsContent StandardOut--capitalize"> <div class="StandardOut-detailsContent StandardOut--capitalize">
{{ job.overwrite_vars }} {{ job.overwrite_vars }}
</div> </div>
@@ -128,13 +128,13 @@
<div class="StandardOut-rightPanel"> <div class="StandardOut-rightPanel">
<div class="Panel"> <div class="Panel">
<div class="StandardOut-panelHeader"> <div class="StandardOut-panelHeader">
<div class="StandardOut-panelHeaderText">STANDARD OUT</div> <div class="StandardOut-panelHeaderText" translate>STANDARD OUT</div>
<div class="StandardOut-panelHeaderActions"> <div class="StandardOut-panelHeaderActions">
<button class="StandardOut-actionButton" aw-tool-tip="{{ toggleStdoutFullscreenTooltip }}" data-tip-watch="toggleStdoutFullscreenTooltip" data-placement="top" ng-class="{'StandardOut-actionButton--active': stdoutFullScreen}"ng-click="toggleStdoutFullscreen()"> <button class="StandardOut-actionButton" aw-tool-tip="{{ toggleStdoutFullscreenTooltip }}" data-tip-watch="toggleStdoutFullscreenTooltip" data-placement="top" ng-class="{'StandardOut-actionButton--active': stdoutFullScreen}"ng-click="toggleStdoutFullscreen()">
<i class="fa fa-arrows-alt"></i> <i class="fa fa-arrows-alt"></i>
</button> </button>
<a href="/api/v1/inventory_updates/{{ job.id }}/stdout?format=txt_download"> <a href="/api/v1/inventory_updates/{{ job.id }}/stdout?format=txt_download">
<button class="StandardOut-actionButton" aw-tool-tip="Download Output" data-placement="top"> <button class="StandardOut-actionButton" aw-tool-tip="{{'Download Output'|translate}}" data-placement="top">
<i class="fa fa-download"></i> <i class="fa fa-download"></i>
</button> </button>
</a> </a>

View File

@@ -4,25 +4,25 @@
<div class="StandardOut-leftPanel" ng-show="!stdoutFullScreen"> <div class="StandardOut-leftPanel" ng-show="!stdoutFullScreen">
<div class="Panel"> <div class="Panel">
<div class="StandardOut-panelHeader"> <div class="StandardOut-panelHeader">
<div class="StandardOut-panelHeaderText"> <div class="StandardOut-panelHeaderText" translate>
RESULTS RESULTS
</div> </div>
<div class="StandardOut-actions"> <div class="StandardOut-actions">
<button id="relaunch-job-button" class="List-actionButton JobDetail-launchButton" data-placement="top" mode="all" ng-click="relaunchJob()" aw-tool-tip="Relaunch using the same parameters" data-original-title="" title=""><i class="icon-launch"></i> </button> <button id="relaunch-job-button" class="List-actionButton JobDetail-launchButton" data-placement="top" mode="all" ng-click="relaunchJob()" aw-tool-tip="{{'Relaunch using the same parameters'|translate}}" data-original-title="" title=""><i class="icon-launch"></i> </button>
<button id="cancel-job-button" class="List-actionButton List-actionButton--delete JobDetail-launchButton" data-placement="top" ng-click="deleteJob()" ng-show="job.status == 'running' || job.status=='pending' " aw-tool-tip="Cancel" data-original-title="" title=""><i class="fa fa-minus-circle"></i> </button> <button id="cancel-job-button" class="List-actionButton List-actionButton--delete JobDetail-launchButton" data-placement="top" ng-click="deleteJob()" ng-show="job.status == 'running' || job.status=='pending' " aw-tool-tip="{{'Cancel'|translate}}" data-original-title="" title=""><i class="fa fa-minus-circle"></i> </button>
<button id="delete-job-button" class="List-actionButton List-actionButton--delete JobDetail-launchButton" data-placement="top" ng-click="deleteJob()" ng-hide="job.status == 'running' || job.status == 'pending' " aw-tool-tip="Delete" data-original-title="" title=""><i class="fa fa-trash-o"></i> </button> <button id="delete-job-button" class="List-actionButton List-actionButton--delete JobDetail-launchButton" data-placement="top" ng-click="deleteJob()" ng-hide="job.status == 'running' || job.status == 'pending' " aw-tool-tip="{{'Delete'|translate}}" data-original-title="" title=""><i class="fa fa-trash-o"></i> </button>
</div> </div>
</div> </div>
<div class="StandardOut-details"> <div class="StandardOut-details">
<div class="StandardOut-detailsRow" ng-show="project_name"> <div class="StandardOut-detailsRow" ng-show="project_name">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">NAME</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>NAME</div>
<div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8"> <div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">
<a ui-sref="projects.edit({id: job.project})"> <a ui-sref="projects.edit({id: job.project})">
{{ project_name }} {{ project_name }}
</a> </a>
<a href="{{ workflow_result_link }}" <a href="{{ workflow_result_link }}"
aw-tool-tip="View workflow results" aw-tool-tip="{{'View workflow results'|translate}}"
data-placement="top" data-placement="top"
data-original-title="" title=""> data-original-title="" title="">
<i class="WorkflowBadge" <i class="WorkflowBadge"
@@ -34,7 +34,7 @@
</div> </div>
<div class="StandardOut-detailsRow"> <div class="StandardOut-detailsRow">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">STATUS</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>STATUS</div>
<div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8"> <div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">
<i class="fa icon-job-{{ job.status }}"></i> <i class="fa icon-job-{{ job.status }}"></i>
<span class="StandardOut-statusText StandardOut--capitalize">{{ job.status }}</span> <span class="StandardOut-statusText StandardOut--capitalize">{{ job.status }}</span>
@@ -42,35 +42,35 @@
</div> </div>
<div class="StandardOut-detailsRow" ng-show="job.started"> <div class="StandardOut-detailsRow" ng-show="job.started">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">STARTED</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>STARTED</div>
<div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8"> <div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">
{{ job.started | longDate }} {{ job.started | longDate }}
</div> </div>
</div> </div>
<div class="StandardOut-detailsRow" ng-show="job.finished"> <div class="StandardOut-detailsRow" ng-show="job.finished">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">FINISHED</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>FINISHED</div>
<div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8"> <div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">
{{ job.finished | longDate }} {{ job.finished | longDate }}
</div> </div>
</div> </div>
<div class="StandardOut-detailsRow" ng-show="job.finished"> <div class="StandardOut-detailsRow" ng-show="job.finished">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">ELAPSED</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>ELAPSED</div>
<div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8"> <div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">
{{ job.elapsed }} seconds {{ job.elapsed }} seconds
</div> </div>
</div> </div>
<div class="StandardOut-detailsRow" ng-show="job.launch_type"> <div class="StandardOut-detailsRow" ng-show="job.launch_type">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">LAUNCH TYPE</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>LAUNCH TYPE</div>
<div class="StandardOut-detailsContent StandardOut--capitalize"> <div class="StandardOut-detailsContent StandardOut--capitalize">
{{ job.launch_type }} {{ job.launch_type }}
</div> </div>
</div> </div>
<div class="StandardOut-detailsRow" ng-show="project_name"> <div class="StandardOut-detailsRow" ng-show="project_name">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">PROJECT</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>PROJECT</div>
<div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8"> <div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">
<a ui-sref="projects.edit({id: job.project})"> <a ui-sref="projects.edit({id: job.project})">
{{ project_name }} {{ project_name }}
@@ -79,7 +79,7 @@
</div> </div>
<div class="StandardOut-detailsRow" ng-show="credential_name"> <div class="StandardOut-detailsRow" ng-show="credential_name">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">CREDENTIAL</div> <div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>CREDENTIAL</div>
<div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8"> <div class="StandardOut-detailsContent col-lg-9 col-md-9 col-sm-9 col-xs-8">
<a ui-sref="credentials.edit({credential_id: credential})"> <a ui-sref="credentials.edit({credential_id: credential})">
{{ credential_name }} {{ credential_name }}
@@ -93,13 +93,13 @@
<div class="StandardOut-rightPanel"> <div class="StandardOut-rightPanel">
<div class="Panel"> <div class="Panel">
<div class="StandardOut-panelHeader"> <div class="StandardOut-panelHeader">
<div class="StandardOut-panelHeaderText">STANDARD OUT</div> <div class="StandardOut-panelHeaderText" translate>STANDARD OUT</div>
<div class="StandardOut-panelHeaderActions"> <div class="StandardOut-panelHeaderActions">
<button class="StandardOut-actionButton" aw-tool-tip="{{ toggleStdoutFullscreenTooltip }}" data-tip-watch="toggleStdoutFullscreenTooltip" data-placement="top" ng-class="{'StandardOut-actionButton--active': stdoutFullScreen}"ng-click="toggleStdoutFullscreen()"> <button class="StandardOut-actionButton" aw-tool-tip="{{ toggleStdoutFullscreenTooltip }}" data-tip-watch="toggleStdoutFullscreenTooltip" data-placement="top" ng-class="{'StandardOut-actionButton--active': stdoutFullScreen}"ng-click="toggleStdoutFullscreen()">
<i class="fa fa-arrows-alt"></i> <i class="fa fa-arrows-alt"></i>
</button> </button>
<a href="/api/v1/project_updates/{{ job.id }}/stdout?format=txt_download"> <a href="/api/v1/project_updates/{{ job.id }}/stdout?format=txt_download">
<button class="StandardOut-actionButton" aw-tool-tip="Download Output" data-placement="top"> <button class="StandardOut-actionButton" aw-tool-tip="{{'Download Output'|translate}}" data-placement="top">
<i class="fa fa-download"></i> <i class="fa fa-download"></i>
</button> </button>
</a> </a>

View File

@@ -9,13 +9,13 @@
'$stateParams', 'JobTemplateForm', 'GenerateForm', 'Rest', 'Alert', '$stateParams', 'JobTemplateForm', 'GenerateForm', 'Rest', 'Alert',
'ProcessErrors', 'ClearScope', 'GetBasePath', 'md5Setup', 'ParseTypeChange', 'Wait', 'ProcessErrors', 'ClearScope', 'GetBasePath', 'md5Setup', 'ParseTypeChange', 'Wait',
'Empty', 'ToJSON', 'CallbackHelpInit', 'Prompt', 'GetChoices', '$state', 'Empty', 'ToJSON', 'CallbackHelpInit', 'Prompt', 'GetChoices', '$state',
'CreateSelect2', '$q', 'CreateSelect2', '$q', 'i18n',
function( function(
$filter, $scope, $rootScope, $compile, $filter, $scope, $rootScope, $compile,
$location, $log, $stateParams, JobTemplateForm, GenerateForm, Rest, Alert, $location, $log, $stateParams, JobTemplateForm, GenerateForm, Rest, Alert,
ProcessErrors, ClearScope, GetBasePath, md5Setup, ParseTypeChange, Wait, ProcessErrors, ClearScope, GetBasePath, md5Setup, ParseTypeChange, Wait,
Empty, ToJSON, CallbackHelpInit, Prompt, GetChoices, Empty, ToJSON, CallbackHelpInit, Prompt, GetChoices,
$state, CreateSelect2, $q $state, CreateSelect2, $q, i18n
) { ) {
Rest.setUrl(GetBasePath('job_templates')); Rest.setUrl(GetBasePath('job_templates'));
@@ -23,7 +23,7 @@
.success(function(data) { .success(function(data) {
if (!data.actions.POST) { if (!data.actions.POST) {
$state.go("^"); $state.go("^");
Alert('Permission Error', 'You do not have permission to add a job template.', 'alert-info'); Alert(i18n._('Permission Error'), i18n._('You do not have permission to add a job template.'), 'alert-info');
} }
}); });

View File

@@ -92,8 +92,8 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti
} }
]) ])
.factory('BuildDescription', ['BuildAnchor', '$log', .factory('BuildDescription', ['BuildAnchor', '$log', 'i18n',
function (BuildAnchor, $log) { function (BuildAnchor, $log, i18n) {
return function (activity) { return function (activity) {
var pastTense = function(operation){ var pastTense = function(operation){
@@ -212,7 +212,7 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti
} }
catch(err){ catch(err){
$log.debug(err); $log.debug(err);
activity.description = 'Event summary not available'; activity.description = i18n._('Event summary not available');
} }
}; };
} }
@@ -258,10 +258,10 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti
.factory('Stream', ['$rootScope', '$location', '$state', 'Rest', 'GetBasePath', .factory('Stream', ['$rootScope', '$location', '$state', 'Rest', 'GetBasePath',
'ProcessErrors', 'Wait', 'StreamList', 'generateList', 'FormatDate', 'BuildDescription', 'ProcessErrors', 'Wait', 'StreamList', 'generateList', 'FormatDate', 'BuildDescription',
'ShowDetail', 'ShowDetail', 'i18n',
function ($rootScope, $location, $state, Rest, GetBasePath, ProcessErrors, function ($rootScope, $location, $state, Rest, GetBasePath, ProcessErrors,
Wait, StreamList, GenerateList, FormatDate, Wait, StreamList, GenerateList, FormatDate,
BuildDescription, ShowDetail) { BuildDescription, ShowDetail, i18n) {
return function (params) { return function (params) {
var list = _.cloneDeep(StreamList), var list = _.cloneDeep(StreamList),
@@ -297,7 +297,7 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti
if ($state.params.target === 'credential') { if ($state.params.target === 'credential') {
list.fields.customSearchField = { list.fields.customSearchField = {
label: 'Credential', label: i18n._('Credential'),
searchType: 'text', searchType: 'text',
searchOnly: 'true', searchOnly: 'true',
sourceModel: 'credential', sourceModel: 'credential',
@@ -305,7 +305,7 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti
}; };
} else if ($state.params.target === 'host') { } else if ($state.params.target === 'host') {
list.fields.customSearchField = { list.fields.customSearchField = {
label: 'Host', label: i18n._('Host'),
searchType: 'text', searchType: 'text',
searchOnly: 'true', searchOnly: 'true',
sourceModel: 'host', sourceModel: 'host',
@@ -313,7 +313,7 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti
}; };
} else if ($state.params.target === 'inventory') { } else if ($state.params.target === 'inventory') {
list.fields.customSearchField = { list.fields.customSearchField = {
label: 'Inventory', label: i18n._('Inventory'),
searchType: 'text', searchType: 'text',
searchOnly: 'true', searchOnly: 'true',
sourceModel: 'inventory', sourceModel: 'inventory',
@@ -321,7 +321,7 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti
}; };
} else if ($state.params.target === 'inventory_script') { } else if ($state.params.target === 'inventory_script') {
list.fields.customSearchField = { list.fields.customSearchField = {
label: 'Inventory Script', label: i18n._('Inventory Script'),
searchType: 'text', searchType: 'text',
searchOnly: 'true', searchOnly: 'true',
sourceModel: 'custom_inventory_script', sourceModel: 'custom_inventory_script',
@@ -329,7 +329,7 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti
}; };
} else if ($state.params.target === 'job_template') { } else if ($state.params.target === 'job_template') {
list.fields.customSearchField = { list.fields.customSearchField = {
label: 'Job Template', label: i18n._('Job Template'),
searchType: 'text', searchType: 'text',
searchOnly: 'true', searchOnly: 'true',
sourceModel: 'job_template', sourceModel: 'job_template',
@@ -337,7 +337,7 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti
}; };
} else if ($state.params.target === 'job') { } else if ($state.params.target === 'job') {
list.fields.customSearchField = { list.fields.customSearchField = {
label: 'Job', label: i18n._('Job'),
searchType: 'text', searchType: 'text',
searchOnly: 'true', searchOnly: 'true',
sourceModel: 'job', sourceModel: 'job',
@@ -345,7 +345,7 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti
}; };
} else if ($state.params.target === 'organization') { } else if ($state.params.target === 'organization') {
list.fields.customSearchField = { list.fields.customSearchField = {
label: 'Organization', label: i18n._('Organization'),
searchType: 'text', searchType: 'text',
searchOnly: 'true', searchOnly: 'true',
sourceModel: 'organization', sourceModel: 'organization',
@@ -353,7 +353,7 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti
}; };
} else if ($state.params.target === 'project') { } else if ($state.params.target === 'project') {
list.fields.customSearchField = { list.fields.customSearchField = {
label: 'Project', label: i18n._('Project'),
searchType: 'text', searchType: 'text',
searchOnly: 'true', searchOnly: 'true',
sourceModel: 'project', sourceModel: 'project',
@@ -361,7 +361,7 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti
}; };
} else if ($state.params.target === 'schedule') { } else if ($state.params.target === 'schedule') {
list.fields.customSearchField = { list.fields.customSearchField = {
label: 'Schedule', label: i18n._('Schedule'),
searchType: 'text', searchType: 'text',
searchOnly: 'true', searchOnly: 'true',
sourceModel: 'schedule', sourceModel: 'schedule',
@@ -369,7 +369,7 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti
}; };
} else if ($state.params.target === 'team') { } else if ($state.params.target === 'team') {
list.fields.customSearchField = { list.fields.customSearchField = {
label: 'Team', label: i18n._('Team'),
searchType: 'text', searchType: 'text',
searchOnly: 'true', searchOnly: 'true',
sourceModel: 'team', sourceModel: 'team',
@@ -377,7 +377,7 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti
}; };
} else if ($state.params.target === 'user') { } else if ($state.params.target === 'user') {
list.fields.customSearchField = { list.fields.customSearchField = {
label: 'User', label: i18n._('User'),
searchType: 'text', searchType: 'text',
searchOnly: 'true', searchOnly: 'true',
sourceModel: 'user', sourceModel: 'user',

View File

@@ -26,7 +26,7 @@
data-placement="top" data-placement="top"
mode="all" mode="all"
ng-click="relaunchJob()" ng-click="relaunchJob()"
aw-tool-tip="Relaunch using the same parameters" aw-tool-tip="{{'Relaunch using the same parameters'|translate}}"
data-original-title="" data-original-title=""
title=""> title="">
<i class="icon-launch"></i> <i class="icon-launch"></i>
@@ -39,7 +39,7 @@
ng-click="deleteJob()" ng-click="deleteJob()"
ng-show="workflow_status.status == 'running' || ng-show="workflow_status.status == 'running' ||
job_status.status=='pending' " job_status.status=='pending' "
aw-tool-tip="Cancel" aw-tool-tip="{{'Cancel'|translate}}"
data-original-title="" title=""> data-original-title="" title="">
<i class="fa fa-minus-circle"></i> <i class="fa fa-minus-circle"></i>
</button> </button>
@@ -51,7 +51,7 @@
ng-click="deleteJob()" ng-click="deleteJob()"
ng-hide="job_status.status == 'running' || ng-hide="job_status.status == 'running' ||
job_status.status == 'pending' " job_status.status == 'pending' "
aw-tool-tip="Delete" aw-tool-tip="{{'Delete'|translate}}"
data-original-title="" data-original-title=""
title=""> title="">
<i class="fa fa-trash-o"></i> <i class="fa fa-trash-o"></i>
@@ -106,7 +106,7 @@
</label> </label>
<div class="WorkflowResults-resultRowText"> <div class="WorkflowResults-resultRowText">
<a href="{{ created_by_link }}" <a href="{{ created_by_link }}"
aw-tool-tip="Edit the User" aw-tool-tip="{{'Edit the User'|translate}}"
data-placement="top"> data-placement="top">
{{ workflow.summary_fields.created_by.username }} {{ workflow.summary_fields.created_by.username }}
</a> </a>
@@ -122,7 +122,7 @@
WorkflowResults-resultRowLabel--fullWidth"> WorkflowResults-resultRowLabel--fullWidth">
Extra Variables Extra Variables
<i class="WorkflowResults-extraVarsHelp fa fa-question-circle" <i class="WorkflowResults-extraVarsHelp fa fa-question-circle"
aw-tool-tip="Read only view of extra variables added to the workflow." aw-tool-tip="{{'Read only view of extra variables added to the workflow.'|translate}}"
data-placement="top"> data-placement="top">
</i> </i>
</label> </label>

File diff suppressed because it is too large Load Diff