NIFI-13367: (#8933)

- Updating the page title to align with the root Process Group.

This closes #8933
This commit is contained in:
Matt Gilman 2024-06-06 11:00:10 -04:00 committed by GitHub
parent 5c335cbbec
commit 9e11c1a788
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 14 additions and 11 deletions

View File

@ -1619,9 +1619,10 @@ export class FlowEffects {
this.store.dispatch(ErrorActions.clearBannerErrors());
if (request.entity.id === currentProcessGroupId) {
this.store.dispatch(
FlowActions.enterProcessGroup({
FlowActions.loadProcessGroup({
request: {
id: currentProcessGroupId
id: currentProcessGroupId,
transitionRequired: true
}
})
);

View File

@ -20,6 +20,7 @@ import { initialState } from '../../../state/flow/flow.reducer';
import { RouterLink } from '@angular/router';
import { BreadcrumbEntity } from '../../../state/shared';
import { Title } from '@angular/platform-browser';
@Component({
selector: 'breadcrumbs',
@ -42,6 +43,8 @@ export class Breadcrumbs {
}
}
constructor(private title: Title) {}
prepareBreadcrumbs(): BreadcrumbEntity[] {
const breadcrumbs: BreadcrumbEntity[] = [];
this.prepareBreadcrumb(breadcrumbs, this.entity);
@ -50,8 +53,15 @@ export class Breadcrumbs {
prepareBreadcrumb(breadcrumbs: BreadcrumbEntity[], breadcrumbEntity: BreadcrumbEntity): void {
breadcrumbs.push(breadcrumbEntity);
if (breadcrumbEntity.parentBreadcrumb) {
this.prepareBreadcrumb(breadcrumbs, breadcrumbEntity.parentBreadcrumb);
} else {
if (breadcrumbEntity.permissions.canRead) {
this.title.setTitle(breadcrumbEntity.breadcrumb.name);
} else {
this.title.setTitle('NiFi Flow');
}
}
}
@ -60,10 +70,6 @@ export class Breadcrumbs {
return true;
}
if (breadcrumb.parentBreadcrumb) {
return this.currentProcessGroupId == 'root';
}
return false;
}

View File

@ -24,10 +24,6 @@ import { PageContent } from '../../../ui/common/page-content/page-content.compon
@NgModule({
declarations: [Logout],
exports: [Logout],
imports: [
CommonModule,
LogoutRoutingModule,
PageContent
]
imports: [CommonModule, LogoutRoutingModule, PageContent]
})
export class LogoutModule {}