Skip to content

Commit 66fb04f

Browse files
committed
mgr/dashboard: carbonize breadcrums
Fixes: https://tracker.ceph.com/issues/67231 Signed-off-by: Nizamudeen A <[email protected]>
1 parent 7d55db5 commit 66fb04f

File tree

3 files changed

+17
-25
lines changed

3 files changed

+17
-25
lines changed
Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
<ol *ngIf="crumbs.length"
2-
class="breadcrumb">
3-
<li *ngFor="let crumb of crumbs; let last = last"
4-
[ngClass]="{ 'active': last && finished }"
5-
class="breadcrumb-item">
6-
<a *ngIf="!last && crumb.path !== null"
7-
[routerLink]="crumb.path"
8-
preserveFragment>{{ crumb.text }}</a>
9-
<span *ngIf="last || crumb.path === null">{{ crumb.text }}</span>
10-
</li>
11-
</ol>
1+
<cds-breadcrumb [noTrailingSlash]="true"
2+
*ngIf="crumbs.length">
3+
<ng-container *ngFor="let crumb of crumbs; let last = last">
4+
<cds-breadcrumb-item *ngIf="!last && crumb.path !== null"
5+
href="#/{{ crumb.path }}">
6+
{{ crumb.text }}
7+
</cds-breadcrumb-item>
8+
9+
<cds-breadcrumb-item *ngIf="last || crumb.path === null">
10+
{{ crumb.text }}
11+
</cds-breadcrumb-item>
12+
</ng-container>
13+
</cds-breadcrumb>
Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +0,0 @@
1-
.breadcrumb {
2-
background-color: transparent;
3-
border-radius: 0;
4-
margin-top: 8px;
5-
padding: 8px 0;
6-
}
7-
8-
.breadcrumb > li + li::before {
9-
content: '\f101';
10-
font-family: 'ForkAwesome';
11-
padding: 0 5px 0 7px;
12-
}

src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation.module.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import {
1010
IconModule,
1111
ThemeModule,
1212
DialogModule,
13-
GridModule
13+
GridModule,
14+
BreadcrumbModule
1415
} from 'carbon-components-angular';
1516

1617
import { AppRoutingModule } from '~/app/app-routing.module';
@@ -56,7 +57,8 @@ import LogoutIcon from '@carbon/icons/es/logout/16';
5657
IconModule,
5758
ThemeModule,
5859
DialogModule,
59-
GridModule
60+
GridModule,
61+
BreadcrumbModule
6062
],
6163
declarations: [
6264
AboutComponent,

0 commit comments

Comments
 (0)