Merge pull request #7126 from jaredevantabor/tower-string-audit

removing more references to "Tower" in the code base
This commit is contained in:
Jared Tabor 2017-07-19 09:28:35 -07:00 committed by GitHub
commit 98bca3b70b
28 changed files with 45 additions and 38 deletions

View File

@ -276,7 +276,7 @@ i:active,
opacity: 0;
}
#configure-tower-dialog, #configure-schedules-form-container {
#configure-dialog, #configure-schedules-form-container {
display: none;
overflow-x: hidden;
overflow-y: auto;

View File

@ -8,8 +8,8 @@
import route from './about.route';
export default
angular.module('aboutTower', [])
.controller('aboutTower', controller)
angular.module('about', [])
.controller('about', controller)
.run(['$stateExtender', function($stateExtender){
$stateExtender.addState(route);
}]);
}]);

View File

@ -76,7 +76,7 @@ import '../lib/models';
import '../lib/services';
import '../features';
var tower = angular.module('Tower', [
var awApp = angular.module('awApp', [
// how to add CommonJS / AMD third-party dependencies:
// 1. npm install --save package-name
// 2. add package name to ./grunt-tasks/webpack.vendorFiles
@ -227,6 +227,10 @@ var tower = angular.module('Tower', [
$rootScope.breadcrumb = {};
$rootScope.BRAND_NAME = AppStrings.get('BRAND_NAME');
$rootScope.tabTitle = `Ansible ${$rootScope.BRAND_NAME}`;
$rootScope.$watch('$state.current.ncyBreadcrumbLabel', function(title) {
$rootScope.tabTitle = `Ansible ${$rootScope.BRAND_NAME} ${title || ""}`;
});
function activateTab() {
// Make the correct tab active
@ -276,6 +280,8 @@ var tower = angular.module('Tower', [
$rootScope.crumbCache = [];
$rootScope.$on("$stateChangeStart", function (event, next) {
// let current_title = $rootScope.$state.current.ncyBreadcrumbLabel || "";
// $rootScope.tabTitle = `Ansible ${$rootScope.BRAND_NAME} ${current_title}`;
// Remove any lingering intervals
// except on jobResults.* states
var jobResultStates = [
@ -455,4 +461,4 @@ var tower = angular.module('Tower', [
}
]);
export default tower;
export default awApp;

View File

@ -65,7 +65,7 @@ export default
})
.error(function (data, status) {
Wait('stop');
// TODO: hopefully this conditional error handling will to away in a future version of tower. The reason why we cannot
// TODO: hopefully this conditional error handling will to away in a future versions. The reason why we cannot
// simply pass this error to ProcessErrors is because it will actually match the form element 'ssh_key_unlock' and show
// the error there. The ssh_key_unlock field is not shown when the kind of credential is gce/azure and as a result the
// error is never shown. In the future, the API will hopefully either behave or respond differently.

View File

@ -8,4 +8,4 @@ import footerDirective from './footer.directive';
export default
angular.module('footer', [])
.directive('towerFooter', footerDirective);
.directive('customFooter', footerDirective);

View File

@ -32,7 +32,7 @@
* that with the login form. Doing this each time the controller is instantiated insures the form is clean and not pre-populated with a prior user's username and password.
*
* Just before the release of 2.0 a bug was discovered where clicking logout and then immediately clicking login without providing a username and password would successfully log
* the user back into Tower. Implementing the above approach fixed this, forcing a new username/password to be entered each time the login dialog appears.
* the user back into the app. Implementing the above approach fixed this, forcing a new username/password to be entered each time the login dialog appears.
*
* #Login Workflow
*
@ -44,7 +44,7 @@
* - 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 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
* - 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
*
* 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

View File

@ -42,7 +42,7 @@ export default
// Cancel
scope.cancelConfigure = function () {
try {
$('#configure-tower-dialog').dialog('close');
$('#configure-dialog').dialog('close');
$("#configure-save-button").remove();
}
catch(e) {
@ -131,7 +131,7 @@ export default
.success(function(data) {
Wait('stop');
$("#prompt-for-days-facts").dialog("close");
$("#configure-tower-dialog").dialog('close');
$("#configure-dialog").dialog('close');
$state.go('managementJobStdout', {id: data.system_job}, {reload:true});
})
.error(function(data, status) {
@ -151,7 +151,7 @@ export default
scope.removePromptForDays();
}
scope.removePromptForDays = scope.$on('PromptForDaysFacts', function() {
// $('#configure-tower-dialog').dialog('close');
// $('#configure-dialog').dialog('close');
$('#prompt-for-days-facts').show();
$('#prompt-for-days-facts').dialog('open');
CreateSelect2({
@ -221,7 +221,7 @@ export default
.success(function(data) {
Wait('stop');
$("#prompt-for-days").dialog("close");
// $("#configure-tower-dialog").dialog('close');
// $("#configure-dialog").dialog('close');
$state.go('managementJobStdout', {id: data.system_job}, {reload:true});
})
.error(function(data, status) {
@ -241,7 +241,7 @@ export default
scope.removePromptForDays();
}
scope.removePromptForDays = scope.$on('PromptForDays', function() {
// $('#configure-tower-dialog').dialog('close');
// $('#configure-dialog').dialog('close');
$('#prompt-for-days').show();
$('#prompt-for-days').dialog('open');
Wait('stop');

View File

@ -98,7 +98,7 @@ export default
str = `ws-${data.group_name}-${data.ad_hoc_command}`;
}
else if(data.group_name==="control"){
// As of Tower v. 3.1.0, there is only 1 "control"
// As of v. 3.1.0, there is only 1 "control"
// message, which is for expiring the session if the
// session limit is breached.
$log.debug(data.reason);

View File

@ -13,6 +13,7 @@ function loadFactTemplate(factTemplate, fact) {
}
}
FactTemplate.prototype.render = function(factData) {
if (_.isUndefined(factData) || _.isEmpty(factData)) {

View File

@ -1,11 +1,11 @@
<!DOCTYPE html>
{% load i18n %}
<html lang="en" ng-app="Tower">
<html lang="en" ng-app="awApp">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>{% trans 'Ansible Tower' %}</title>
<title ng-bind="tabTitle"></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="{{ STATIC_URL }}assets/custom-theme/jquery-ui-1.10.3.custom.min.css" />
<link rel="stylesheet" href="{{ STATIC_URL }}assets/ansible-bootstrap.min.css" />
@ -166,7 +166,7 @@
<p>{% trans 'working...' %}</p>
</div>
</div>
<tower-footer></tower-footer>
<custom-footer></custom-footer>
</body>
</html>

View File

@ -10,7 +10,7 @@ import low_insights_json from './data/low.insights-data.js';
describe('Service: InsightsService', () => {
let InsightsService;
beforeEach(angular.mock.module('Tower'));
beforeEach(angular.mock.module('awApp'));
beforeEach(angular.mock.inject(( _InsightsService_) => {
InsightsService = _InsightsService_;

View File

@ -5,7 +5,7 @@ describe('Service: InventoriesService', () => {
let Rest,
InventoriesService;
beforeEach(angular.mock.module('Tower'), ($provide)=>{
beforeEach(angular.mock.module('awApp'), ($provide)=>{
$provide.value('Rest', Rest);
});
beforeEach(angular.mock.module('inventoryManage'));

View File

@ -196,7 +196,7 @@ describe('Controller: jobResultsController', () => {
});
});
describe('getTowerLinks()', () => {
describe('getLinks()', () => {
beforeEach(() => {
jobData.related = {
"created_by": "api/v2/users/12",
@ -225,7 +225,7 @@ describe('Controller: jobResultsController', () => {
});
});
describe('getTowerLabels()', () => {
describe('getLabels()', () => {
beforeEach(() => {
jobDataOptions.actions.GET = {
status: {

View File

@ -3,7 +3,7 @@
describe('jobResultsService', () => {
let jobResultsService;
beforeEach(angular.mock.module('Tower'));
beforeEach(angular.mock.module('awApp'));
beforeEach(angular.mock.inject(( _jobResultsService_) => {
jobResultsService = _jobResultsService_;

View File

@ -4,7 +4,7 @@ describe('parseStdoutService', () => {
let parseStdoutService,
log;
beforeEach(angular.mock.module('Tower'));
beforeEach(angular.mock.module('awApp'));
beforeEach(angular.mock.module('jobResults',($provide) => {
log = jasmine.createSpyObj('$log', [

View File

@ -8,7 +8,7 @@ describe('Controller: LicenseController', () => {
ProcessErrors,
config;
beforeEach(angular.mock.module('Tower'));
beforeEach(angular.mock.module('awApp'));
beforeEach(angular.mock.module('license', ($provide) => {
ConfigService = jasmine.createSpyObj('ConfigService', [
'getConfig',

View File

@ -3,7 +3,7 @@
describe('Filter: append', () => {
var filter;
beforeEach(angular.mock.module('Tower'));
beforeEach(angular.mock.module('awApp'));
beforeEach(function(){
inject(function($injector){

View File

@ -3,7 +3,7 @@
describe('Filter: capitalize', () => {
var filter;
beforeEach(angular.mock.module('Tower'));
beforeEach(angular.mock.module('awApp'));
beforeEach(function(){
inject(function($injector){

View File

@ -3,7 +3,7 @@
describe('Filter: formatEpoch', () => {
var filter;
beforeEach(angular.mock.module('Tower'));
beforeEach(angular.mock.module('awApp'));
beforeEach(function(){
inject(function($injector){

View File

@ -3,7 +3,7 @@
describe('Filter: isEmpty', () => {
var filter;
beforeEach(angular.mock.module('Tower'));
beforeEach(angular.mock.module('awApp'));
beforeEach(function(){
inject(function($injector){

View File

@ -3,7 +3,7 @@
describe('Filter: longDate', () => {
var filter;
beforeEach(angular.mock.module('Tower'));
beforeEach(angular.mock.module('awApp'));
beforeEach(function(){
inject(function($injector){

View File

@ -3,7 +3,7 @@
describe('Filter: prepend', () => {
var filter;
beforeEach(angular.mock.module('Tower'));
beforeEach(angular.mock.module('awApp'));
beforeEach(function(){
inject(function($injector){

View File

@ -3,7 +3,7 @@
describe('Filter: sanitize', () => {
var filter;
beforeEach(angular.mock.module('Tower'));
beforeEach(angular.mock.module('awApp'));
beforeEach(function(){
inject(function($injector){

View File

@ -6,7 +6,7 @@ describe('Service: QuerySet', () => {
Authorization,
SmartSearchService;
beforeEach(angular.mock.module('Tower', ($provide) =>{
beforeEach(angular.mock.module('awApp', ($provide) =>{
// @todo: improve app source / write testing utilities for interim
// we don't want to be concerned with this provision in every test that involves the Rest module
Authorization = {

View File

@ -3,7 +3,7 @@
describe('Service: SmartSearch', () => {
let SmartSearchService;
beforeEach(angular.mock.module('Tower'));
beforeEach(angular.mock.module('awApp'));
beforeEach(angular.mock.module('SmartSearchModule'));

View File

@ -18,7 +18,7 @@ describe('Controller: TemplatesList', () => {
deleteJobTemplateDeferred,
Dataset;
beforeEach(angular.mock.module('Tower'));
beforeEach(angular.mock.module('awApp'));
beforeEach(angular.mock.module('templates', ($provide) => {
state = jasmine.createSpyObj('state', [

View File

@ -18,7 +18,7 @@ describe('Controller: WorkflowAdd', () => {
ToJSON,
availableLabels;
beforeEach(angular.mock.module('Tower'));
beforeEach(angular.mock.module('awApp'));
beforeEach(angular.mock.module('RestServices'));
beforeEach(angular.mock.module('templates', ($provide) => {

View File

@ -8,7 +8,7 @@ describe('Controller: WorkflowMaker', () => {
q,
getWorkflowJobTemplateNodesDeferred;
beforeEach(angular.mock.module('Tower'));
beforeEach(angular.mock.module('awApp'));
beforeEach(angular.mock.module('templates', () => {
TemplatesService = {