mirror of https://github.com/apache/nifi.git
NIFI-13367: (#8933)
- Updating the page title to align with the root Process Group. This closes #8933
This commit is contained in:
parent
5c335cbbec
commit
9e11c1a788
|
@ -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
|
||||
}
|
||||
})
|
||||
);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {}
|
||||
|
|
Loading…
Reference in New Issue