Merge pull request #5137 from jaredevantabor/activity-stream

Fixing Activity Stream for individual inventory script
This commit is contained in:
Jared Tabor 2017-02-03 10:26:11 -08:00 committed by GitHub
commit 84b88edea6
8 changed files with 19 additions and 7 deletions

View File

@ -167,7 +167,7 @@ table, tbody {
}
.List-auxActionStream {
width: 175px;
width: 200px;
}
.List-action:not(.ng-hide) ~ .List-action:not(.ng-hide) {

View File

@ -24,8 +24,9 @@ export default ['templateUrl', 'i18n', function(templateUrl, i18n) {
{label: i18n._('Credentials'), value: 'credential'},
{label: i18n._('Hosts'), value: 'host'},
{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._('Notification Templates'), value: 'notification_template'},
{label: i18n._('Organizations'), value: 'organization'},
{label: i18n._('Projects'), value: 'project'},
{label: i18n._('Schedules'), value: 'schedule'},

View File

@ -61,6 +61,10 @@ export default
if(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;

View File

@ -34,13 +34,16 @@ export default
case 'team':
rtnTitle = i18n._('TEAMS');
break;
case 'notification_template':
rtnTitle = i18n._('NOTIFICATION TEMPLATES');
break;
case 'organization':
rtnTitle = i18n._('ORGANIZATIONS');
break;
case 'job':
rtnTitle = i18n._('JOBS');
break;
case 'inventory_script':
case 'custom_inventory_script':
rtnTitle = i18n._('INVENTORY SCRIPTS');
break;
case 'schedule':

View File

@ -39,13 +39,16 @@ export default
case 'team':
basePathKey = 'teams';
break;
case 'notification_template':
basePathKey = 'notification_templates';
break;
case 'organization':
basePathKey = 'organizations';
break;
case 'management_job':
basePathKey = 'management_jobs';
break;
case 'inventory_script':
case 'custom_inventory_script':
basePathKey = 'inventory_scripts';
break;
case 'workflow_job_template':

View File

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

View File

@ -81,7 +81,7 @@ angular.module('notifications', [
},
data: {
activityStream: true,
activityStreamTarget: 'notification'
activityStreamTarget: 'notification_template'
},
ncyBreadcrumb: {
parent: 'setup',

View File

@ -76,7 +76,8 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti
}
break;
case 'notification_template':
throw {name : 'NotImplementedError', message : 'activity.summary_fields to build this url not implemented yet'};
url += `notification_templates/${obj.id}`;
break;
case 'role':
throw {name : 'NotImplementedError', message : 'role object management is not consolidated to a single UI view'};
default: