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
8 changed files with 19 additions and 7 deletions

View File

@@ -167,7 +167,7 @@ table, tbody {
} }
.List-auxActionStream { .List-auxActionStream {
width: 175px; width: 200px;
} }
.List-action:not(.ng-hide) ~ .List-action:not(.ng-hide) { .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._('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._('Organizations'), value: 'organization'}, {label: i18n._('Organizations'), value: 'organization'},
{label: i18n._('Projects'), value: 'project'}, {label: i18n._('Projects'), value: 'project'},
{label: i18n._('Schedules'), value: 'schedule'}, {label: i18n._('Schedules'), value: 'schedule'},

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

@@ -34,13 +34,16 @@ export default
case 'team': case 'team':
rtnTitle = i18n._('TEAMS'); rtnTitle = i18n._('TEAMS');
break; break;
case 'notification_template':
rtnTitle = i18n._('NOTIFICATION TEMPLATES');
break;
case 'organization': case 'organization':
rtnTitle = i18n._('ORGANIZATIONS'); rtnTitle = i18n._('ORGANIZATIONS');
break; break;
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

@@ -39,13 +39,16 @@ export default
case 'team': case 'team':
basePathKey = 'teams'; basePathKey = 'teams';
break; break;
case 'notification_template':
basePathKey = 'notification_templates';
break;
case 'organization': case 'organization':
basePathKey = 'organizations'; basePathKey = 'organizations';
break; break;
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',

View File

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

View File

@@ -76,7 +76,8 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti
} }
break; break;
case 'notification_template': 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': case 'role':
throw {name : 'NotImplementedError', message : 'role object management is not consolidated to a single UI view'}; throw {name : 'NotImplementedError', message : 'role object management is not consolidated to a single UI view'};
default: default: