fix for individual inv script

This commit is contained in:
jaredevantabor
2017-02-02 16:11:20 -08:00
parent 893dd20ead
commit 0dab765b06
6 changed files with 8 additions and 14 deletions

View File

@@ -49,16 +49,6 @@ export default {
function(list, qs, $stateParams, GetBasePath) { function(list, qs, $stateParams, GetBasePath) {
let path = GetBasePath(list.basePath) || GetBasePath(list.name); let path = GetBasePath(list.basePath) || GetBasePath(list.name);
let stateParams = $stateParams[`${list.iterator}_search`]; let stateParams = $stateParams[`${list.iterator}_search`];
if($stateParams.target === "inventory_script"){
stateParams.or__object1__in = 'custom_inventory_script';
stateParams.or__object2__in = 'custom_inventory_script';
if(stateParams.inventory_script){
stateParams.custom_inventory_script = stateParams.inventory_script;
delete stateParams.inventory_script;
}
}
// Sending or__object1__in=null will result in an api error response so lets strip // Sending or__object1__in=null will result in an api error response so lets strip
// these out. This should only be null when hitting the All Activity page. // these out. This should only be null when hitting the All Activity page.
if(stateParams.or__object1__in && stateParams.or__object1__in === null) { if(stateParams.or__object1__in && stateParams.or__object1__in === null) {

View File

@@ -24,7 +24,7 @@ export default ['templateUrl', 'i18n', function(templateUrl, i18n) {
{label: i18n._('Credentials'), value: 'credential'}, {label: i18n._('Credentials'), value: 'credential'},
{label: i18n._('Hosts'), value: 'host'}, {label: i18n._('Hosts'), value: 'host'},
{label: i18n._('Inventories'), value: 'inventory'}, {label: i18n._('Inventories'), value: 'inventory'},
{label: i18n._('Inventory Scripts'), value: 'inventory_script'}, {label: i18n._('Inventory Scripts'), value: 'custom_inventory_script'},
{label: i18n._('Jobs'), value: 'job'}, {label: i18n._('Jobs'), value: 'job'},
{label: i18n._('Notification Templates'), value: 'notification_template'}, {label: i18n._('Notification Templates'), value: 'notification_template'},
{label: i18n._('Organizations'), value: 'organization'}, {label: i18n._('Organizations'), value: 'organization'},

View File

@@ -61,6 +61,10 @@ export default
if(streamConfig.activityStreamId) { if(streamConfig.activityStreamId) {
stateGoParams.id = $state.params[streamConfig.activityStreamId]; stateGoParams.id = $state.params[streamConfig.activityStreamId];
} }
if(stateGoParams.target === "custom_inventory_script"){
stateGoParams.activity_search[streamConfig.activityStreamTarget] = $state.params.inventory_script_id;
stateGoParams.id = $state.params.inventory_script_id;
}
} }
originalRoute = $state.current; originalRoute = $state.current;

View File

@@ -43,7 +43,7 @@ export default
case 'job': case 'job':
rtnTitle = i18n._('JOBS'); rtnTitle = i18n._('JOBS');
break; break;
case 'inventory_script': case 'custom_inventory_script':
rtnTitle = i18n._('INVENTORY SCRIPTS'); rtnTitle = i18n._('INVENTORY SCRIPTS');
break; break;
case 'schedule': case 'schedule':

View File

@@ -48,7 +48,7 @@ export default
case 'management_job': case 'management_job':
basePathKey = 'management_jobs'; basePathKey = 'management_jobs';
break; break;
case 'inventory_script': case 'custom_inventory_script':
basePathKey = 'inventory_scripts'; basePathKey = 'inventory_scripts';
break; break;
case 'workflow_job_template': case 'workflow_job_template':

View File

@@ -59,7 +59,7 @@ angular.module('inventoryScripts', [
}, },
data: { data: {
activityStream: true, activityStream: true,
activityStreamTarget: 'inventory_script' activityStreamTarget: 'custom_inventory_script'
}, },
ncyBreadcrumb: { ncyBreadcrumb: {
parent: 'setup', parent: 'setup',