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());
|
this.store.dispatch(ErrorActions.clearBannerErrors());
|
||||||
if (request.entity.id === currentProcessGroupId) {
|
if (request.entity.id === currentProcessGroupId) {
|
||||||
this.store.dispatch(
|
this.store.dispatch(
|
||||||
FlowActions.enterProcessGroup({
|
FlowActions.loadProcessGroup({
|
||||||
request: {
|
request: {
|
||||||
id: currentProcessGroupId
|
id: currentProcessGroupId,
|
||||||
|
transitionRequired: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
|
@ -20,6 +20,7 @@ import { initialState } from '../../../state/flow/flow.reducer';
|
||||||
|
|
||||||
import { RouterLink } from '@angular/router';
|
import { RouterLink } from '@angular/router';
|
||||||
import { BreadcrumbEntity } from '../../../state/shared';
|
import { BreadcrumbEntity } from '../../../state/shared';
|
||||||
|
import { Title } from '@angular/platform-browser';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'breadcrumbs',
|
selector: 'breadcrumbs',
|
||||||
|
@ -42,6 +43,8 @@ export class Breadcrumbs {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
constructor(private title: Title) {}
|
||||||
|
|
||||||
prepareBreadcrumbs(): BreadcrumbEntity[] {
|
prepareBreadcrumbs(): BreadcrumbEntity[] {
|
||||||
const breadcrumbs: BreadcrumbEntity[] = [];
|
const breadcrumbs: BreadcrumbEntity[] = [];
|
||||||
this.prepareBreadcrumb(breadcrumbs, this.entity);
|
this.prepareBreadcrumb(breadcrumbs, this.entity);
|
||||||
|
@ -50,8 +53,15 @@ export class Breadcrumbs {
|
||||||
|
|
||||||
prepareBreadcrumb(breadcrumbs: BreadcrumbEntity[], breadcrumbEntity: BreadcrumbEntity): void {
|
prepareBreadcrumb(breadcrumbs: BreadcrumbEntity[], breadcrumbEntity: BreadcrumbEntity): void {
|
||||||
breadcrumbs.push(breadcrumbEntity);
|
breadcrumbs.push(breadcrumbEntity);
|
||||||
|
|
||||||
if (breadcrumbEntity.parentBreadcrumb) {
|
if (breadcrumbEntity.parentBreadcrumb) {
|
||||||
this.prepareBreadcrumb(breadcrumbs, 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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (breadcrumb.parentBreadcrumb) {
|
|
||||||
return this.currentProcessGroupId == 'root';
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,10 +24,6 @@ import { PageContent } from '../../../ui/common/page-content/page-content.compon
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [Logout],
|
declarations: [Logout],
|
||||||
exports: [Logout],
|
exports: [Logout],
|
||||||
imports: [
|
imports: [CommonModule, LogoutRoutingModule, PageContent]
|
||||||
CommonModule,
|
|
||||||
LogoutRoutingModule,
|
|
||||||
PageContent
|
|
||||||
]
|
|
||||||
})
|
})
|
||||||
export class LogoutModule {}
|
export class LogoutModule {}
|
||||||
|
|
Loading…
Reference in New Issue