Merge pull request #3913 from marshmalien/3886-instance-group-breadcrumb-label

Dynamically show instance group name in breadcrumb

Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
softwarefactory-project-zuul[bot] 2019-05-21 14:28:55 +00:00 committed by GitHub
commit 75fe801efb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 5 deletions

View File

@ -7,8 +7,7 @@ function InstanceGroupsStrings (BaseString) {
ns.state = {
INSTANCE_GROUPS_BREADCRUMB_LABEL: t.s('INSTANCE GROUPS'),
INSTANCES_BREADCRUMB_LABEL: t.s('INSTANCES'),
ADD_BREADCRUMB_LABEL: t.s('CREATE INSTANCE GROUP'),
EDIT_BREADCRUMB_LABEL: t.s('EDIT INSTANCE GROUP')
ADD_BREADCRUMB_LABEL: t.s('CREATE INSTANCE GROUP')
};
ns.list = {

View File

@ -1,5 +1,28 @@
export default ['$scope', '$filter', '$state', 'Alert', 'resolvedModels', 'Dataset', 'InstanceGroupsStrings','ProcessErrors', 'Prompt', 'Wait',
function($scope, $filter, $state, Alert, resolvedModels, Dataset, strings, ProcessErrors, Prompt, Wait) {
export default [
'$rootScope',
'$scope',
'$filter',
'$state',
'Alert',
'resolvedModels',
'Dataset',
'InstanceGroupsStrings',
'ProcessErrors',
'Prompt',
'Wait',
function(
$rootScope,
$scope,
$filter,
$state,
Alert,
resolvedModels,
Dataset,
strings,
ProcessErrors,
Prompt,
Wait
) {
const vm = this;
const { instanceGroup } = resolvedModels;
let paginateQuerySet = {};
@ -10,6 +33,7 @@ export default ['$scope', '$filter', '$state', 'Alert', 'resolvedModels', 'Datas
init();
function init(){
$rootScope.breadcrumb.instance_group_name = $filter('sanitize')(instanceGroup.get('name'));
$scope.list = {
iterator: 'instance_group',
name: 'instance_groups'

View File

@ -148,7 +148,7 @@ function InstanceGroupsRun ($stateExtender, strings) {
name: 'instanceGroups.edit',
route: '/:instance_group_id',
ncyBreadcrumb: {
label: strings.get('state.EDIT_BREADCRUMB_LABEL')
label: '{{breadcrumb.instance_group_name}}'
},
params: {
instance_search: {