From d2a914a04069056727b7791f26034d95e8e9d646 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Thu, 13 Jul 2017 15:34:44 -0700 Subject: [PATCH] removing some old portal mode code that's unused while auditing Tower strings --- awx/ui/client/assets/default.strings.json | 2 +- awx/ui/client/legacy-styles/main-layout.less | 6 --- awx/ui/client/lib/services/app.strings.js | 9 +++++ awx/ui/client/src/about/about.controller.js | 5 +-- awx/ui/client/src/about/about.partial.html | 2 +- awx/ui/client/src/app.js | 18 ++------- .../configuration/configuration.partial.html | 2 +- awx/ui/client/src/debug.js | 3 +- .../inventories/adhoc/adhoc.form.js | 2 +- .../sources/add/sources-add.controller.js | 8 ++-- .../sources/edit/sources-edit.controller.js | 8 ++-- .../src/job-results/job-results.controller.js | 38 +++++++++---------- .../launchjob.factory.js | 2 +- .../client/src/license/license.controller.js | 2 +- .../authenticationServices/pendo.service.js | 2 +- .../login/loginModal/loginModal.controller.js | 8 ++-- .../login/loginModal/loginModal.partial.html | 2 +- .../management-jobs/card/card.controller.js | 1 - awx/ui/client/src/projects/projects.form.js | 4 +- .../src/setup-menu/setup-menu.partial.html | 12 +++--- .../shared/load-config/load-config.factory.js | 2 +- .../src/shared/socket/socket.service.js | 4 +- .../factories/callback-help-init.factory.js | 8 ++-- .../job_templates/job-template.form.js | 4 +- .../workflow-maker/workflow-maker.form.js | 4 +- .../workflow-results.controller.js | 28 +++++++------- 26 files changed, 88 insertions(+), 98 deletions(-) create mode 100644 awx/ui/client/lib/services/app.strings.js diff --git a/awx/ui/client/assets/default.strings.json b/awx/ui/client/assets/default.strings.json index 93d37fca2b..a5ef8a6cfa 100644 --- a/awx/ui/client/assets/default.strings.json +++ b/awx/ui/client/assets/default.strings.json @@ -1,3 +1,3 @@ { - "BRAND_NAME": "Tower" + "BRAND_NAME": "AWX" } diff --git a/awx/ui/client/legacy-styles/main-layout.less b/awx/ui/client/legacy-styles/main-layout.less index cb6884b798..038b9b329b 100644 --- a/awx/ui/client/legacy-styles/main-layout.less +++ b/awx/ui/client/legacy-styles/main-layout.less @@ -45,12 +45,6 @@ body { .collapsed-option { display: none; } - .navbar-brand { - padding-top: 3px; - padding-bottom: 3px; - padding-right: 0; - padding-left: 0; - } .nav > li > a { padding-top: 11px; padding-bottom: 11px; diff --git a/awx/ui/client/lib/services/app.strings.js b/awx/ui/client/lib/services/app.strings.js new file mode 100644 index 0000000000..6be3ece3f1 --- /dev/null +++ b/awx/ui/client/lib/services/app.strings.js @@ -0,0 +1,9 @@ +// The purpose of this file is to instantiate the BaseStringService +// for app-wide usage. +function AppStrings (BaseString) { + BaseString.call(this, 'app'); +} + +AppStrings.$inject = ['BaseStringService']; + +export default AppStrings; diff --git a/awx/ui/client/src/about/about.controller.js b/awx/ui/client/src/about/about.controller.js index aea6c190e9..159f61458a 100644 --- a/awx/ui/client/src/about/about.controller.js +++ b/awx/ui/client/src/about/about.controller.js @@ -1,8 +1,7 @@ export default - ['$scope', '$state', 'ConfigService', 'AppStrings', - function($scope, $state, ConfigService, AppStrings){ + ['$scope', '$state', 'ConfigService', + function($scope, $state, ConfigService){ var init = function(){ - $scope.name = AppStrings.get('BRAND_NAME'); ConfigService.getConfig() .then(function(config){ $scope.version = config.version.split('-')[0]; diff --git a/awx/ui/client/src/about/about.partial.html b/awx/ui/client/src/about/about.partial.html index 22bd5ec49c..c03c062527 100644 --- a/awx/ui/client/src/about/about.partial.html +++ b/awx/ui/client/src/about/about.partial.html @@ -11,7 +11,7 @@
  _______________
-<  {{name}} {{version}}  >
+<  {{BRAND_NAME}} {{version}}  >
  ---------------
         \   ^__^
          \  (oo)\_______
diff --git a/awx/ui/client/src/app.js b/awx/ui/client/src/app.js
index 9762e4a922..dcc9500834 100644
--- a/awx/ui/client/src/app.js
+++ b/awx/ui/client/src/app.js
@@ -205,12 +205,12 @@ var tower = angular.module('Tower', [
         'CheckLicense', '$location', 'Authorization', 'LoadBasePaths', 'Timer',
         'LoadConfig', 'Store', 'pendoService', 'Prompt', 'Rest',
         'Wait', 'ProcessErrors', '$state', 'GetBasePath', 'ConfigService',
-        'FeaturesService', '$filter', 'SocketService',
+        'FeaturesService', '$filter', 'SocketService', 'AppStrings',
         function($stateExtender, $q, $compile, $cookies, $rootScope, $log, $stateParams,
             CheckLicense, $location, Authorization, LoadBasePaths, Timer,
             LoadConfig, Store, pendoService, Prompt, Rest, Wait,
             ProcessErrors, $state, GetBasePath, ConfigService, FeaturesService,
-            $filter, SocketService) {
+            $filter, SocketService, AppStrings) {
 
             $rootScope.$state = $state;
             $rootScope.$state.matches = function(stateName) {
@@ -231,6 +231,7 @@ var tower = angular.module('Tower', [
             };
 
             $rootScope.breadcrumb = {};
+            $rootScope.BRAND_NAME = AppStrings.get('BRAND_NAME');
 
             function activateTab() {
                 // Make the correct tab active
@@ -242,14 +243,6 @@ var tower = angular.module('Tower', [
                     //base.replace(/\_/g, ' ');
                     base = (base === 'job_events' || base === 'job_host_summaries') ? 'jobs' : base;
                 }
-                //make sure that the tower icon works when not in portal mode
-                $('.navbar-brand').attr('href', '/#/home');
-                $rootScope.portalMode = false;
-                if (base === 'portal') {
-                    $rootScope.portalMode = true;
-                    //in portal mode we don't want the tower icon to lead anywhere
-                    $('.navbar-brand').removeAttr('href');
-                }
 
                 $('#ansible-list-title').html('' + base.replace(/\_/, ' ') + '');
 
@@ -447,11 +440,6 @@ var tower = angular.module('Tower', [
                     $('#' + tabs + ' #' + tab).tab('show');
                 };
 
-                $rootScope.leavePortal = function() {
-                    $rootScope.portalMode = false;
-                    $location.path('/home/');
-                };
-
             }); // end of 'ConfigReady'
 
 
diff --git a/awx/ui/client/src/configuration/configuration.partial.html b/awx/ui/client/src/configuration/configuration.partial.html
index 67731f6699..3f61a44603 100644
--- a/awx/ui/client/src/configuration/configuration.partial.html
+++ b/awx/ui/client/src/configuration/configuration.partial.html
@@ -7,7 +7,7 @@
 
-
CONFIGURE TOWER
+
CONFIGURE {{BRAND_NAME}}
diff --git a/awx/ui/client/src/debug.js b/awx/ui/client/src/debug.js index 29cd88a8fc..4842112f71 100644 --- a/awx/ui/client/src/debug.js +++ b/awx/ui/client/src/debug.js @@ -22,7 +22,7 @@ * * ?aw.suspend=true * - * to the end of the URL. When you see the Tower logo loaded on an otherwise blank page, + * to the end of the URL. When you see the main logo loaded on an otherwise blank page, * open the Dev Tools console and execute the code: * * angular.resumeBootstrap() @@ -55,4 +55,3 @@ export function time(fn, label) { }; } /* jshint ignore:end */ - diff --git a/awx/ui/client/src/inventories-hosts/inventories/adhoc/adhoc.form.js b/awx/ui/client/src/inventories-hosts/inventories/adhoc/adhoc.form.js index cbf5f432b7..da010ed9fb 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/adhoc/adhoc.form.js +++ b/awx/ui/client/src/inventories-hosts/inventories/adhoc/adhoc.form.js @@ -26,7 +26,7 @@ export default ['i18n', function(i18n) { ' track by module.value', ngChange: 'moduleChange()', required: true, - awPopOver: i18n._('These are the modules that Tower supports running commands against.'), + awPopOver: i18n._('These are the modules that {{BRAND_NAME}} supports running commands against.'), dataTitle: i18n._('Module'), dataPlacement: 'right', dataContainer: 'body' diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/sources/add/sources-add.controller.js b/awx/ui/client/src/inventories-hosts/inventories/related/sources/add/sources-add.controller.js index d62933314b..7d85d08a9a 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/sources/add/sources-add.controller.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/sources/add/sources-add.controller.js @@ -9,10 +9,12 @@ export default ['$state', '$stateParams', '$scope', 'SourcesFormDefinition', 'GetChoices', 'GetBasePath', 'CreateSelect2', 'GetSourceTypeOptions', 'rbacUiControlService', 'ToJSON', 'SourcesService', 'Empty', 'Wait', 'Rest', 'Alert', 'ProcessErrors', 'inventorySourcesOptions', + '$rootScope', function($state, $stateParams, $scope, SourcesFormDefinition, ParseTypeChange, GenerateForm, inventoryData, GroupsService, GetChoices, GetBasePath, CreateSelect2, GetSourceTypeOptions, rbacUiControlService, - ToJSON, SourcesService, Empty, Wait, Rest, Alert, ProcessErrors, inventorySourcesOptions) { + ToJSON, SourcesService, Empty, Wait, Rest, Alert, ProcessErrors, + inventorySourcesOptions,$rootScope) { let form = SourcesFormDefinition; init(); @@ -152,7 +154,7 @@ export default ['$state', '$stateParams', '$scope', 'SourcesFormDefinition', if($scope && $scope.source && $scope.source === 'ec2' || $scope && $scope.source && $scope.source.value && $scope.source.value === 'ec2'){ $scope.group_by_choices = $scope.ec2_group_by; $scope.groupByPopOver = "

Select which groups to create automatically. " + - "Tower will create group names similar to the following examples based on the options selected:

    " + + $rootScope.BRAND_NAME + " will create group names similar to the following examples based on the options selected:

      " + "
    • Availability Zone: zones » us-east-1b
    • " + "
    • Image ID: images » ami-b007ab1e
    • " + "
    • Instance ID: instances » i-ca11ab1e
    • " + @@ -165,7 +167,7 @@ export default ['$state', '$stateParams', '$scope', 'SourcesFormDefinition', "
    • Tag None: tags » tag_none
    • " + "

    If blank, all groups above are created except Instance ID.

    "; $scope.instanceFilterPopOver = "

    Provide a comma-separated list of filter expressions. " + - "Hosts are imported to Tower when ANY of the filters match.

    " + + "Hosts are imported to " + $rootScope.BRAND_NAME + " when ANY of the filters match.

    " + "Limit to hosts having a tag:
    \n" + "
    tag-key=TowerManaged
    \n" + "Limit to hosts using either key pair:
    \n" + diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/sources/edit/sources-edit.controller.js b/awx/ui/client/src/inventories-hosts/inventories/related/sources/edit/sources-edit.controller.js index acef7d2c82..778368e88b 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/sources/edit/sources-edit.controller.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/sources/edit/sources-edit.controller.js @@ -8,12 +8,12 @@ export default ['$state', '$stateParams', '$scope', 'ParseVariableString', 'rbacUiControlService', 'ToJSON', 'ParseTypeChange', 'GroupsService', 'GetChoices', 'GetBasePath', 'CreateSelect2', 'GetSourceTypeOptions', 'inventorySourceData', 'SourcesService', 'inventoryData', 'inventorySourcesOptions', 'Empty', - 'Wait', 'Rest', 'Alert', + 'Wait', 'Rest', 'Alert', '$rootScope', function($state, $stateParams, $scope, ParseVariableString, rbacUiControlService, ToJSON,ParseTypeChange, GroupsService, GetChoices, GetBasePath, CreateSelect2, GetSourceTypeOptions, inventorySourceData, SourcesService, inventoryData, inventorySourcesOptions, Empty, - Wait, Rest, Alert) { + Wait, Rest, Alert, $rootScope) { function init() { $scope.projectBasePath = GetBasePath('projects') + '?not__status=never updated'; @@ -247,7 +247,7 @@ export default ['$state', '$stateParams', '$scope', 'ParseVariableString', let group_by = inventorySourceData.group_by.split(','); $scope.group_by = _.map(group_by, (item) => _.find($scope.ec2_group_by, { value: item })); $scope.groupByPopOver = "

    Select which groups to create automatically. " + - "Tower will create group names similar to the following examples based on the options selected:

      " + + $rootScope.BRAND_NAME + " will create group names similar to the following examples based on the options selected:

        " + "
      • Availability Zone: zones » us-east-1b
      • " + "
      • Image ID: images » ami-b007ab1e
      • " + "
      • Instance ID: instances » i-ca11ab1e
      • " + @@ -260,7 +260,7 @@ export default ['$state', '$stateParams', '$scope', 'ParseVariableString', "
      • Tag None: tags » tag_none
      • " + "

      If blank, all groups above are created except Instance ID.

      "; $scope.instanceFilterPopOver = "

      Provide a comma-separated list of filter expressions. " + - "Hosts are imported to Tower when ANY of the filters match.

      " + + "Hosts are imported to " + $rootScope.BRAND_NAME + " when ANY of the filters match.

      " + "Limit to hosts having a tag:
      \n" + "
      tag-key=TowerManaged
      \n" + "Limit to hosts using either key pair:
      \n" + diff --git a/awx/ui/client/src/job-results/job-results.controller.js b/awx/ui/client/src/job-results/job-results.controller.js index 8dabea8de6..176e302205 100644 --- a/awx/ui/client/src/job-results/job-results.controller.js +++ b/awx/ui/client/src/job-results/job-results.controller.js @@ -54,8 +54,8 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy $scope.jobExtraCredentials = jobExtraCredentials; - var getTowerLinks = function() { - var getTowerLink = function(key) { + var getLinks = function() { + var getLink = function(key) { if(key === 'schedule') { if($scope.job.related.schedule) { return '/#/templates/job_template/' + $scope.job.job_template + '/schedules' + $scope.job.related.schedule.split(/api\/v\d+\/schedules/)[1]; @@ -82,21 +82,21 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy } }; - $scope.created_by_link = getTowerLink('created_by'); - $scope.scheduled_by_link = getTowerLink('schedule'); - $scope.inventory_link = getTowerLink('inventory'); - $scope.project_link = getTowerLink('project'); - $scope.machine_credential_link = getTowerLink('credential'); - $scope.cloud_credential_link = getTowerLink('cloud_credential'); - $scope.network_credential_link = getTowerLink('network_credential'); - $scope.vault_credential_link = getTowerLink('vault_credential'); - $scope.schedule_link = getTowerLink('schedule'); + $scope.created_by_link = getLink('created_by'); + $scope.scheduled_by_link = getLink('schedule'); + $scope.inventory_link = getLink('inventory'); + $scope.project_link = getLink('project'); + $scope.machine_credential_link = getLink('credential'); + $scope.cloud_credential_link = getLink('cloud_credential'); + $scope.network_credential_link = getLink('network_credential'); + $scope.vault_credential_link = getLink('vault_credential'); + $scope.schedule_link = getLink('schedule'); }; // uses options to set scope variables to their readable string // value - var getTowerLabels = function() { - var getTowerLabel = function(key) { + var getLabels = function() { + var getLabel = function(key) { if ($scope.jobOptions && $scope.jobOptions[key]) { return $scope.jobOptions[key].choices .filter(val => val[0] === $scope.job[key]) @@ -106,8 +106,8 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy } }; - $scope.type_label = getTowerLabel('job_type'); - $scope.verbosity_label = getTowerLabel('verbosity'); + $scope.type_label = getLabel('job_type'); + $scope.verbosity_label = getLabel('verbosity'); }; var getTotalHostCount = function(count) { @@ -174,10 +174,10 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy $scope.job_status = jobData.status; } - // turn related api browser routes into tower routes - getTowerLinks(); + // turn related api browser routes into front end routes + getLinks(); - // the links below can't be set in getTowerLinks because the + // the links below can't be set in getLinks because the // links on the UI don't directly match the corresponding URL // on the API browser if(jobData.summary_fields && jobData.summary_fields.job_template && @@ -201,7 +201,7 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy } // use options labels to manipulate display of details - getTowerLabels(); + getLabels(); // set up a read only code mirror for extra vars $scope.variables = ParseVariableString($scope.job.extra_vars); diff --git a/awx/ui/client/src/job-submission/job-submission-factories/launchjob.factory.js b/awx/ui/client/src/job-submission/job-submission-factories/launchjob.factory.js index 5e6ff47483..c55f9976de 100644 --- a/awx/ui/client/src/job-submission/job-submission-factories/launchjob.factory.js +++ b/awx/ui/client/src/job-submission/job-submission-factories/launchjob.factory.js @@ -139,7 +139,7 @@ export default .success(function(data) { Wait('stop'); var job = data.job || data.system_job || data.project_update || data.inventory_update || data.ad_hoc_command; - if($rootScope.portalMode===false && Empty(data.system_job) || (base === 'home')){ + if(base !== 'portal' && Empty(data.system_job) || (base === 'home')){ // use $state.go with reload: true option to re-instantiate sockets in var goTojobResults = function(state) { diff --git a/awx/ui/client/src/license/license.controller.js b/awx/ui/client/src/license/license.controller.js index c49c4165e1..12f21baa72 100644 --- a/awx/ui/client/src/license/license.controller.js +++ b/awx/ui/client/src/license/license.controller.js @@ -37,7 +37,7 @@ export default var init = function(){ // license/license.partial.html compares fileName $scope.fileName = N_("No file selected."); - $scope.title = $rootScope.licenseMissing ? ("Tower " + i18n._("License")) : i18n._("License Management"); + $scope.title = $rootScope.licenseMissing ? ($rootScope.BRAND_NAME + i18n._(" License")) : i18n._("License Management"); $scope.license = config; $scope.license.version = config.version.split('-')[0]; $scope.time = {}; diff --git a/awx/ui/client/src/login/authenticationServices/pendo.service.js b/awx/ui/client/src/login/authenticationServices/pendo.service.js index ebcad0f03f..5d5b12d9e2 100644 --- a/awx/ui/client/src/login/authenticationServices/pendo.service.js +++ b/awx/ui/client/src/login/authenticationServices/pendo.service.js @@ -44,7 +44,7 @@ export default // Detailed mode // VisitorId: username+hash of license_key // AccountId: hash of license_key from license - // email: contact_email from license OR email from Tower account + // email: contact_email from license OR email from user account options.visitor.id = $rootScope.current_user.username + '@' + config.deployment_id; options.account.id = config.deployment_id; diff --git a/awx/ui/client/src/login/loginModal/loginModal.controller.js b/awx/ui/client/src/login/loginModal/loginModal.controller.js index e65728cb21..037a823a4e 100644 --- a/awx/ui/client/src/login/loginModal/loginModal.controller.js +++ b/awx/ui/client/src/login/loginModal/loginModal.controller.js @@ -10,7 +10,7 @@ * @description * Controller for handling /#/login and /#/logout routes. * - * Tower (app.js) verifies the user is authenticated and that the user session is not expired. If either condition is not true, + * (app.js) verifies the user is authenticated and that the user session is not expired. If either condition is not true, * the user is redirected to /#/login and the Authentication controller. * * Methods for checking the session state are found in [js/shared/AuthService.js](/static/docs/api/shared.function:AuthService), which is referenced here as Authorization. @@ -43,10 +43,10 @@ * - Start the expiration timer by calling the init() method of [js/shared/Timer.js](/static/docs/api/shared.function:Timer) * - Get user informaton by calling Authorization.getUser() - sends a GET request to /api/v2/me * - Store user information in the session cookie by calling Authorization.setUser(). - * - Get the Tower license by calling ConfigService.getConfig() - sends a GET request to /api/vi/config - * - Stores the license object in memory by calling CheckLicense.test(). This adds the Tower version and a tested flag to the license object. The tested flag is initially set to false. Additionally, the pendoService and FeaturesService are called to initiate the other startup services of Tower + * - Get the license by calling ConfigService.getConfig() - sends a GET request to /api/vi/config + * - Stores the license object in memory by calling CheckLicense.test(). This adds the version and a tested flag to the license object. The tested flag is initially set to false. Additionally, the pendoService and FeaturesService are called to initiate the other startup services of Tower * - * Note that there is a session timer kept on the server side as well as the client side. Each time an API request is made, Tower (in app.js) calls + * Note that there is a session timer kept on the server side as well as the client side. Each time an API request is made, app.js calls * Timer.isExpired(). This verifies the UI does not think the session is expired, and if not, moves the expiration time into the future. The number of * seconds between API calls before a session is considered expired is set in config.js as session_timeout. * diff --git a/awx/ui/client/src/login/loginModal/loginModal.partial.html b/awx/ui/client/src/login/loginModal/loginModal.partial.html index eb124adcf4..3b4240fdba 100644 --- a/awx/ui/client/src/login/loginModal/loginModal.partial.html +++ b/awx/ui/client/src/login/loginModal/loginModal.partial.html @@ -15,7 +15,7 @@
- Welcome to Ansible Tower!  Please sign in. + Welcome to Ansible {{BRAND_NAME}}!  Please sign in.
diff --git a/awx/ui/client/src/management-jobs/card/card.controller.js b/awx/ui/client/src/management-jobs/card/card.controller.js index 7010fca8f2..9d8347b452 100644 --- a/awx/ui/client/src/management-jobs/card/card.controller.js +++ b/awx/ui/client/src/management-jobs/card/card.controller.js @@ -4,7 +4,6 @@ * All Rights Reserved *************************************************/ -// import listGenerator from 'tower/shared/list-generator/main'; export default [ 'Wait', 'CreateDialog', 'GetBasePath' , diff --git a/awx/ui/client/src/projects/projects.form.js b/awx/ui/client/src/projects/projects.form.js index af5b6b47a9..3c81bc8b00 100644 --- a/awx/ui/client/src/projects/projects.form.js +++ b/awx/ui/client/src/projects/projects.form.js @@ -67,7 +67,7 @@ export default ['i18n', 'NotificationsList', function(i18n, NotificationsList) { alertTxt: '

WARNING: There are no available playbook directories in {{ base_dir }}. ' + 'Either that directory is empty, or all of the contents are already assigned to other projects. ' + 'Create a new directory there and make sure the playbook files can be read by the "awx" system user, ' + - 'or have Tower directly retrieve your playbooks from source control using the SCM Type option above.

', + 'or have {{BRAND_NAME}} directly retrieve your playbooks from source control using the SCM Type option above.

', closeable: false }, base_dir: { @@ -78,7 +78,7 @@ export default ['i18n', 'NotificationsList', function(i18n, NotificationsList) { ngShow: "scm_type.value == 'manual' " , awPopOver: '

' + i18n._('Base path used for locating playbooks. Directories found inside this path will be listed in the playbook directory drop-down. ' + 'Together the base path and selected playbook directory provide the full path used to locate playbooks.') + '

' + - '

' + i18n.sprintf(i18n._('Change %s under "Configure Tower" to change this location.'), 'PROJECTS_ROOT') + '

', + '

' + i18n.sprintf(i18n._('Change %s under "Configure {{BRAND_NAME}}" to change this location.'), 'PROJECTS_ROOT') + '

', dataTitle: i18n._('Project Base Path'), dataContainer: 'body', dataPlacement: 'right', diff --git a/awx/ui/client/src/setup-menu/setup-menu.partial.html b/awx/ui/client/src/setup-menu/setup-menu.partial.html index 65c2f5aad6..d33301698b 100644 --- a/awx/ui/client/src/setup-menu/setup-menu.partial.html +++ b/awx/ui/client/src/setup-menu/setup-menu.partial.html @@ -9,7 +9,7 @@

Users

- Allow others to sign into Tower and own the content they create. + Allow others to sign into {{BRAND_NAME}} and own the content they create.

@@ -59,19 +59,19 @@

Instance Groups

- View list and capacity of Tower instances. + View list and capacity of {{BRAND_NAME}} instances.

-

Configure Tower

+

Configure {{BRAND_NAME}}

- Edit Tower's configuration. + Edit {{BRAND_NAME}}'s configuration.

-

About Tower

+

About {{BRAND_NAME}}

- View information about this version of Ansible Tower. + View information about this version of Ansible {{BRAND_NAME}}.

diff --git a/awx/ui/client/src/shared/load-config/load-config.factory.js b/awx/ui/client/src/shared/load-config/load-config.factory.js index b21c9ef7cb..c7f6c170de 100644 --- a/awx/ui/client/src/shared/load-config/load-config.factory.js +++ b/awx/ui/client/src/shared/load-config/load-config.factory.js @@ -4,7 +4,7 @@ export default // These ettings used to be found in config.js, hardcoded now. var configSettings = { - //custom_logo: false, // load /var/lib/awx/public/static/assets/custom_console_logo.png as the login modal header. if false, will load the standard tower console logo + //custom_logo: false, // load /var/lib/awx/public/static/assets/custom_console_logo.png as the login modal header. if false, will load the standard console logo // custom_login_info: "example notice", // have a notice displayed in the login modal for users. note that, as a security measure, custom html is not supported and will be escaped. "tooltip_delay": { "show": 500, diff --git a/awx/ui/client/src/shared/socket/socket.service.js b/awx/ui/client/src/shared/socket/socket.service.js index b03d32cacf..bd166291b8 100644 --- a/awx/ui/client/src/shared/socket/socket.service.js +++ b/awx/ui/client/src/shared/socket/socket.service.js @@ -165,7 +165,7 @@ export default if(self.socket){ if (self.socket.readyState === 0 ) { $rootScope.socketStatus = 'connecting'; - $rootScope.socketTip = i18n._("Live events: attempting to connect to the Tower server."); + $rootScope.socketTip = i18n._(`Live events: attempting to connect to the ${$rootScope.BRAND_NAME} server.`); } else if (self.socket.readyState === 1){ $rootScope.socketStatus = 'ok'; @@ -173,7 +173,7 @@ export default } else if (self.socket.readyState === 2 || self.socket.readyState === 3 ){ $rootScope.socketStatus = 'error'; - $rootScope.socketTip = i18n._("Live events: error connecting to the Tower server."); + $rootScope.socketTip = i18n._(`Live events: error connecting to the ${$rootScope.BRAND_NAME} server.`); } return; } diff --git a/awx/ui/client/src/templates/job_templates/factories/callback-help-init.factory.js b/awx/ui/client/src/templates/job_templates/factories/callback-help-init.factory.js index a0549400cd..1b40390a3a 100644 --- a/awx/ui/client/src/templates/job_templates/factories/callback-help-init.factory.js +++ b/awx/ui/client/src/templates/job_templates/factories/callback-help-init.factory.js @@ -1,6 +1,6 @@ export default function CallbackHelpInit($q, $location, GetBasePath, Rest, JobTemplateForm, GenerateForm, $stateParams, ProcessErrors, - ParseVariableString, Empty, Wait, MultiCredentialService) { + ParseVariableString, Empty, Wait, MultiCredentialService, $rootScope) { return function(params) { var scope = params.scope, defaultUrl = GetBasePath('job_templates'), @@ -16,11 +16,11 @@ export default // The form uses awPopOverWatch directive to 'watch' scope.callback_help for changes. Each time the // popover is activated, a function checks the value of scope.callback_help before constructing the content. scope.setCallbackHelp = function() { - scope.callback_help = "

With a provisioning callback URL and a host config key a host can contact Tower and request a configuration update using this job " + + scope.callback_help = "

With a provisioning callback URL and a host config key a host can contact " + $rootScope.BRAND_NAME + " and request a configuration update using this job " + "template. The request from the host must be a POST. Here is an example using curl:

\n" + "
curl --data \"host_config_key=" + scope.example_config_key + "\" " +
                     scope.callback_server_path + GetBasePath('job_templates') + scope.example_template_id + "/callback/
\n" + - "

Note the requesting host must be defined in the inventory associated with the job template. If Tower fails to " + + "

Note the requesting host must be defined in the inventory associated with the job template. If " + $rootScope.BRAND_NAME + " fails to " + "locate the host, the request will be denied.

" + "

Successful requests create an entry on the Jobs page, where results and history can be viewed.

"; }; @@ -170,5 +170,5 @@ export default CallbackHelpInit.$inject = [ '$q', '$location', 'GetBasePath', 'Rest', 'JobTemplateForm', 'GenerateForm', '$stateParams', 'ProcessErrors', 'ParseVariableString', - 'Empty', 'Wait', 'MultiCredentialService' + 'Empty', 'Wait', 'MultiCredentialService', '$rootScope' ]; diff --git a/awx/ui/client/src/templates/job_templates/job-template.form.js b/awx/ui/client/src/templates/job_templates/job-template.form.js index 6e7ce22f2a..054bf98322 100644 --- a/awx/ui/client/src/templates/job_templates/job-template.form.js +++ b/awx/ui/client/src/templates/job_templates/job-template.form.js @@ -138,7 +138,7 @@ function(NotificationsList, CompletedJobsList, i18n) { credentials-to-post="credentialsToPost"> `, required: true, - awPopOver: "

" + i18n._("Select credentials that allow Tower to access the nodes this job will be ran against. You can only select one credential of each type.

You must select either a machine (SSH) credential or \"Prompt on launch\". \"Prompt on launch\" requires you to select a machine credential at run time.

If you select credentials AND check the \"Prompt on launch\" box, you make the selected credentials the defaults that can be updated at run time.") + "

", + awPopOver: "

" + i18n._("Select credentials that allow {{BRAND_NAME}} to access the nodes this job will be ran against. You can only select one credential of each type.

You must select either a machine (SSH) credential or \"Prompt on launch\". \"Prompt on launch\" requires you to select a machine credential at run time.

If you select credentials AND check the \"Prompt on launch\" box, you make the selected credentials the defaults that can be updated at run time.") + "

", dataTitle: i18n._('Credentials'), dataPlacement: 'right', dataContainer: "body", @@ -281,7 +281,7 @@ function(NotificationsList, CompletedJobsList, i18n) { type: 'checkbox', ngChange: "toggleCallback('host_config_key')", column: 2, - awPopOver: "

" + i18n._("Enables creation of a provisioning callback URL. Using the URL a host can contact Tower and request a configuration update " + + awPopOver: "

" + i18n._("Enables creation of a provisioning callback URL. Using the URL a host can contact {{BRAND_NAME}} and request a configuration update " + "using this job template.") + "

", dataPlacement: 'right', dataTitle: i18n._('Allow Provisioning Callbacks'), diff --git a/awx/ui/client/src/templates/workflows/workflow-maker/workflow-maker.form.js b/awx/ui/client/src/templates/workflows/workflow-maker/workflow-maker.form.js index 6e4074bb20..598f1678cd 100644 --- a/awx/ui/client/src/templates/workflows/workflow-maker/workflow-maker.form.js +++ b/awx/ui/client/src/templates/workflows/workflow-maker/workflow-maker.form.js @@ -10,7 +10,7 @@ * @description This form is for adding/editing a Job Template */ -export default ['NotificationsList', 'i18n', function(NotificationsList, i18n) { +export default ['NotificationsList', 'i18n', '$rootScope', function(NotificationsList, i18n, $rootScope) { return function() { var WorkflowMakerFormObject = { @@ -99,7 +99,7 @@ export default ['NotificationsList', 'i18n', function(NotificationsList, i18n) { i18n.sprintf(i18n._("Setting the type to %s will not execute the playbook. Instead, %s will check playbook " + " syntax, test environment setup and report problems."), "check", "ansible") + "

" + i18n.sprintf(i18n._("Setting the type to %s will execute the playbook and store any " + - " scanned facts for use with Tower's System Tracking feature."), "scan") + "

", + " scanned facts for use with " + $rootScope.BRAND_NAME + "'s System Tracking feature."), "scan") + "

", dataTitle: i18n._('Job Type'), dataPlacement: 'right', dataContainer: "body", diff --git a/awx/ui/client/src/workflow-results/workflow-results.controller.js b/awx/ui/client/src/workflow-results/workflow-results.controller.js index 38802ce315..13bcca8c0d 100644 --- a/awx/ui/client/src/workflow-results/workflow-results.controller.js +++ b/awx/ui/client/src/workflow-results/workflow-results.controller.js @@ -6,8 +6,8 @@ export default ['workflowData', 'workflowResultsService', 'workflowDataOptions', ParseVariableString, WorkflowService, count, $state, i18n, moment) { var runTimeElapsedTimer = null; - var getTowerLinks = function() { - var getTowerLink = function(key) { + var getLinks = function() { + var getLink = function(key) { if(key === 'schedule') { if($scope.workflow.related.schedule) { return '/#/templates/workflow_job_template/' + $scope.workflow.workflow_job_template + '/schedules' + $scope.workflow.related.schedule.split(/api\/v\d+\/schedules/)[1]; @@ -27,14 +27,14 @@ export default ['workflowData', 'workflowResultsService', 'workflowDataOptions', }; $scope.workflow_template_link = '/#/templates/workflow_job_template/'+$scope.workflow.workflow_job_template; - $scope.created_by_link = getTowerLink('created_by'); - $scope.scheduled_by_link = getTowerLink('schedule'); - $scope.cloud_credential_link = getTowerLink('cloud_credential'); - $scope.network_credential_link = getTowerLink('network_credential'); + $scope.created_by_link = getLink('created_by'); + $scope.scheduled_by_link = getLink('schedule'); + $scope.cloud_credential_link = getLink('cloud_credential'); + $scope.network_credential_link = getLink('network_credential'); }; - var getTowerLabels = function() { - var getTowerLabel = function(key) { + var getLabels = function() { + var getLabel = function(key) { if ($scope.workflowOptions && $scope.workflowOptions[key]) { return $scope.workflowOptions[key].choices .filter(val => val[0] === $scope.workflow[key]) @@ -44,9 +44,9 @@ export default ['workflowData', 'workflowResultsService', 'workflowDataOptions', } }; - $scope.status_label = getTowerLabel('status'); - $scope.type_label = getTowerLabel('job_type'); - $scope.verbosity_label = getTowerLabel('verbosity'); + $scope.status_label = getLabel('status'); + $scope.type_label = getLabel('job_type'); + $scope.verbosity_label = getLabel('verbosity'); }; var updateWorkflowJobElapsedTimer = function(time) { @@ -75,11 +75,11 @@ export default ['workflowData', 'workflowResultsService', 'workflowDataOptions', // stdout full screen toggle tooltip text $scope.toggleStdoutFullscreenTooltip = i18n._("Expand Output"); - // turn related api browser routes into tower routes - getTowerLinks(); + // turn related api browser routes into front end routes + getLinks(); // use options labels to manipulate display of details - getTowerLabels(); + getLabels(); // set up a read only code mirror for extra vars $scope.variables = ParseVariableString($scope.workflow.extra_vars);