mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 16:51:11 +03:00
Fixes breadcrumbs for all the schedule states
This commit is contained in:
parent
77e195bbb9
commit
e04b2b7455
@ -33,6 +33,7 @@ export default ['$state', '$stateParams', '$scope', 'ParseVariableString',
|
||||
{verbosity: inventorySourceData.verbosity});
|
||||
|
||||
$scope.inventory_source_obj = inventorySourceData;
|
||||
$scope.breadcrumb.inventory_source_name = inventorySourceData.name;
|
||||
if (inventorySourceData.credential) {
|
||||
$scope.credential_name = inventorySourceData.summary_fields.credential.name;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ export default {
|
||||
url: "/edit/:inventory_source_id",
|
||||
ncyBreadcrumb: {
|
||||
parent: "inventories.edit.inventory_sources",
|
||||
label: N_("INVENTORY SOURCES")
|
||||
label: '{{breadcrumb.inventory_source_name}}'
|
||||
},
|
||||
views: {
|
||||
'groupForm@inventories': {
|
||||
|
@ -5,8 +5,8 @@ export default {
|
||||
name: 'inventories.edit.inventory_sources.edit.schedules.edit',
|
||||
url: '/:schedule_id',
|
||||
ncyBreadcrumb: {
|
||||
parent: "inventories.edit.inventory_sources.edit.schedules",
|
||||
label: "{{schedule_obj.name}}"
|
||||
parent: 'inventories.edit.inventory_sources.edit.schedules',
|
||||
label: "{{breadcrumb.schedule_name}}"
|
||||
},
|
||||
views: {
|
||||
'scheduler@inventories': {
|
||||
|
@ -156,6 +156,7 @@ export default ['$scope', '$rootScope', '$stateParams', 'ProjectsForm', 'Rest',
|
||||
|
||||
$scope.project_obj = data;
|
||||
$scope.name = data.name;
|
||||
$scope.breadcrumb.project_name = data.name;
|
||||
$scope.$emit('projectLoaded');
|
||||
Wait('stop');
|
||||
})
|
||||
|
@ -91,6 +91,9 @@ angular.module('Projects', [])
|
||||
ncyBreadcrumb: {
|
||||
label: N_('PROJECTS')
|
||||
},
|
||||
breadcrumbs: {
|
||||
edit: '{{breadcrumb.project_name}}'
|
||||
},
|
||||
resolve: {
|
||||
add: projectResolve,
|
||||
edit: projectResolve
|
||||
|
@ -223,6 +223,8 @@ function($filter, $state, $stateParams, Wait, $scope, moment,
|
||||
$scope.showRRuleDetail = false;
|
||||
scheduler.setRRule(schedule.rrule);
|
||||
scheduler.setName(schedule.name);
|
||||
$rootScope.breadcrumb.schedule_name = $scope.schedulerName;
|
||||
$rootScope.breadcrumb[`${$scope.parentObject.type}_name`] = $scope.parentObject.name;
|
||||
scheduler.scope.timeZones = timezonesResolve;
|
||||
scheduler.scope.schedulerTimeZone = scheduleResolve.timezone;
|
||||
if ($scope.cleanupJob){
|
||||
|
@ -12,7 +12,6 @@ const jobTemplatesSchedulesListRoute = {
|
||||
activityStreamId: 'id'
|
||||
},
|
||||
ncyBreadcrumb: {
|
||||
parent: 'templates.editJobTemplate({job_template_id: parentObject.id})',
|
||||
label: N_('SCHEDULES')
|
||||
},
|
||||
resolve: {
|
||||
@ -72,7 +71,6 @@ const jobTemplatesSchedulesAddRoute = {
|
||||
}
|
||||
},
|
||||
ncyBreadcrumb: {
|
||||
parent: 'templates.editJobTemplate({job_template_id: parentObject.id})',
|
||||
label: N_('CREATE SCHEDULE')
|
||||
}
|
||||
};
|
||||
@ -87,8 +85,7 @@ const jobTemplatesSchedulesEditRoute = {
|
||||
}
|
||||
},
|
||||
ncyBreadcrumb: {
|
||||
parent: 'templates.editJobTemplate({job_template_id: parentObject.id})',
|
||||
label: '{{schedule_obj.name}}'
|
||||
label: "{{breadcrumb.schedule_name}}"
|
||||
},
|
||||
resolve: editScheduleResolve()
|
||||
};
|
||||
@ -104,7 +101,6 @@ const workflowSchedulesRoute = {
|
||||
activityStreamId: 'id'
|
||||
},
|
||||
ncyBreadcrumb: {
|
||||
parent: 'templates.editWorkflowJobTemplate({workflow_job_template_id: parentObject.id})',
|
||||
label: N_('SCHEDULES')
|
||||
},
|
||||
resolve: {
|
||||
@ -164,7 +160,6 @@ const workflowSchedulesAddRoute = {
|
||||
}
|
||||
},
|
||||
ncyBreadcrumb: {
|
||||
parent: 'templates.editWorkflowJobTemplate({workflow_job_template_id: parentObject.id})',
|
||||
label: N_('CREATE SCHEDULE')
|
||||
}
|
||||
};
|
||||
@ -179,8 +174,7 @@ const workflowSchedulesEditRoute = {
|
||||
}
|
||||
},
|
||||
ncyBreadcrumb: {
|
||||
parent: 'templates.editWorkflowJobTemplate({workflow_job_template_id: parentObject.id})',
|
||||
label: '{{schedule_obj.name}}'
|
||||
label: '{{breadcrumb.schedule_name}}'
|
||||
},
|
||||
resolve: editScheduleResolve()
|
||||
};
|
||||
@ -195,7 +189,6 @@ const projectsSchedulesListRoute = {
|
||||
activityStreamId: 'id'
|
||||
},
|
||||
ncyBreadcrumb: {
|
||||
parent: 'projects.edit({project_id: parentObject.id})',
|
||||
label: N_('SCHEDULES')
|
||||
},
|
||||
resolve: {
|
||||
@ -263,7 +256,7 @@ const projectsSchedulesEditRoute = {
|
||||
name: 'projects.edit.schedules.edit',
|
||||
route: '/:schedule_id',
|
||||
ncyBreadcrumb: {
|
||||
label: '{{schedule_obj.name}}'
|
||||
label: "{{breadcrumb.schedule_name}}"
|
||||
},
|
||||
views: {
|
||||
'scheduler@projects': {
|
||||
|
@ -278,6 +278,7 @@ export default
|
||||
$scope.removeLoadJobs = $scope.$on('LoadJobs', function() {
|
||||
$scope.job_template_obj = jobTemplateData;
|
||||
$scope.name = jobTemplateData.name;
|
||||
$scope.breadcrumb.job_template_name = jobTemplateData.name;
|
||||
var fld, i;
|
||||
for (fld in form.fields) {
|
||||
if (fld !== 'extra_vars' && fld !== 'survey' && fld !== 'forks' && jobTemplateData[fld] !== null && jobTemplateData[fld] !== undefined) {
|
||||
|
@ -164,6 +164,9 @@ angular.module('templates', [surveyMaker.name, jobTemplates.name, labels.name, p
|
||||
activityStreamTarget: 'job_template',
|
||||
activityStreamId: 'job_template_id'
|
||||
},
|
||||
breadcrumbs: {
|
||||
edit: '{{breadcrumb.job_template_name}}'
|
||||
},
|
||||
resolve: {
|
||||
edit: {
|
||||
jobTemplateData: ['$stateParams', 'TemplatesService', 'ProcessErrors',
|
||||
@ -346,6 +349,9 @@ angular.module('templates', [surveyMaker.name, jobTemplates.name, labels.name, p
|
||||
activityStreamTarget: 'workflow_job_template',
|
||||
activityStreamId: 'workflow_job_template_id'
|
||||
},
|
||||
breadcrumbs: {
|
||||
edit: '{{breadcrumb.workflow_job_template_name}}'
|
||||
},
|
||||
resolve: {
|
||||
edit: {
|
||||
availableLabels: ['Rest', '$stateParams', 'GetBasePath', 'ProcessErrors', 'TemplatesService',
|
||||
|
@ -264,6 +264,7 @@ export default [
|
||||
$scope.workflow_job_template_obj = workflowJobTemplateData;
|
||||
$scope.name = workflowJobTemplateData.name;
|
||||
$scope.can_edit = workflowJobTemplateData.summary_fields.user_capabilities.edit;
|
||||
$scope.breadcrumb.workflow_job_template_name = $scope.name;
|
||||
let fld, i;
|
||||
for (fld in form.fields) {
|
||||
if (fld !== 'variables' && fld !== 'survey' && workflowJobTemplateData[fld] !== null && workflowJobTemplateData[fld] !== undefined) {
|
||||
|
Loading…
Reference in New Issue
Block a user