mirror of
https://github.com/ansible/awx.git
synced 2026-02-24 06:26:00 -03:30
Removed user-facing "Standard Inventory" remnants
This commit is contained in:
@@ -76,9 +76,9 @@ angular.module('inventory', [
|
|||||||
|
|
||||||
function generateInventoryStates() {
|
function generateInventoryStates() {
|
||||||
|
|
||||||
let basicInventoryAdd = stateDefinitions.generateTree({
|
let standardInventoryAdd = stateDefinitions.generateTree({
|
||||||
name: 'inventories.add', // top-most node in the generated tree (will replace this state definition)
|
name: 'inventories.add', // top-most node in the generated tree (will replace this state definition)
|
||||||
url: '/standard_inventory/add',
|
url: '/inventory/add',
|
||||||
modes: ['add'],
|
modes: ['add'],
|
||||||
form: 'InventoryForm',
|
form: 'InventoryForm',
|
||||||
controllers: {
|
controllers: {
|
||||||
@@ -86,9 +86,9 @@ angular.module('inventory', [
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
let basicInventoryEdit = stateDefinitions.generateTree({
|
let standardInventoryEdit = stateDefinitions.generateTree({
|
||||||
name: 'inventories.edit',
|
name: 'inventories.edit',
|
||||||
url: '/standard_inventory/:inventory_id',
|
url: '/inventory/:inventory_id',
|
||||||
modes: ['edit'],
|
modes: ['edit'],
|
||||||
form: 'InventoryForm',
|
form: 'InventoryForm',
|
||||||
controllers: {
|
controllers: {
|
||||||
@@ -190,8 +190,8 @@ angular.module('inventory', [
|
|||||||
smartInventoryAdhocCredential.name = 'inventories.editSmartInventory.adhoc.credential';
|
smartInventoryAdhocCredential.name = 'inventories.editSmartInventory.adhoc.credential';
|
||||||
|
|
||||||
return Promise.all([
|
return Promise.all([
|
||||||
basicInventoryAdd,
|
standardInventoryAdd,
|
||||||
basicInventoryEdit,
|
standardInventoryEdit,
|
||||||
smartInventoryAdd,
|
smartInventoryAdd,
|
||||||
smartInventoryEdit
|
smartInventoryEdit
|
||||||
]).then((generated) => {
|
]).then((generated) => {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ function(i18n, InventoryCompletedJobsList) {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
||||||
addTitle: i18n._('NEW STANDARD INVENTORY'),
|
addTitle: i18n._('NEW INVENTORY'),
|
||||||
editTitle: '{{ inventory_name }}',
|
editTitle: '{{ inventory_name }}',
|
||||||
name: 'inventory',
|
name: 'inventory',
|
||||||
basePath: 'inventory',
|
basePath: 'inventory',
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy
|
|||||||
return '/#/inventories/smart_inventory/' + $scope.job.summary_fields.inventory.id;
|
return '/#/inventories/smart_inventory/' + $scope.job.summary_fields.inventory.id;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return '/#/inventories/standard_inventory/' + $scope.job.summary_fields.inventory.id;
|
return '/#/inventories/inventory/' + $scope.job.summary_fields.inventory.id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ export function JobStdoutController ($rootScope, $scope, $state, $stateParams,
|
|||||||
$scope.job_template_url = '/#/templates/' + data.unified_job_template;
|
$scope.job_template_url = '/#/templates/' + data.unified_job_template;
|
||||||
if($scope.inventory_name && data.inventory && data.summary_fields.inventory && data.summary_fields.inventory.kind) {
|
if($scope.inventory_name && data.inventory && data.summary_fields.inventory && data.summary_fields.inventory.kind) {
|
||||||
if(data.summary_fields.inventory.kind === '') {
|
if(data.summary_fields.inventory.kind === '') {
|
||||||
$scope.inventory_url = '/#/inventories/standard_inventory' + data.inventory;
|
$scope.inventory_url = '/#/inventories/inventory' + data.inventory;
|
||||||
}
|
}
|
||||||
else if(data.summary_fields.inventory.kind === 'smart') {
|
else if(data.summary_fields.inventory.kind === 'smart') {
|
||||||
$scope.inventory_url = '/#/inventories/smart_inventory' + data.inventory;
|
$scope.inventory_url = '/#/inventories/smart_inventory' + data.inventory;
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ describe('Controller: jobResultsController', () => {
|
|||||||
|
|
||||||
it('should transform related links and set to scope var', () => {
|
it('should transform related links and set to scope var', () => {
|
||||||
expect($scope.created_by_link).toBe('/#/users/12');
|
expect($scope.created_by_link).toBe('/#/users/12');
|
||||||
expect($scope.inventory_link).toBe('/#/inventories/standard_inventory/12');
|
expect($scope.inventory_link).toBe('/#/inventories/inventory/12');
|
||||||
expect($scope.project_link).toBe('/#/projects/12');
|
expect($scope.project_link).toBe('/#/projects/12');
|
||||||
expect($scope.machine_credential_link).toBe('/#/credentials/12');
|
expect($scope.machine_credential_link).toBe('/#/credentials/12');
|
||||||
expect($scope.cloud_credential_link).toBe('/#/credentials/13');
|
expect($scope.cloud_credential_link).toBe('/#/credentials/13');
|
||||||
|
|||||||
Reference in New Issue
Block a user