Skip to content

Commit c940c43

Browse files
committed
mgr/dashboard: Drop support for older version of dashboard
Fixes https://tracker.ceph.com/issues/72739 - remove the code for previous version of dashboard - popover css was globally added in infocard component which needs to be removed now. So include css in respective components- dashboard and upgrade. Signed-off-by: Afreen Misbah <[email protected]>
1 parent 3de82e3 commit c940c43

36 files changed

+61
-1922
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
@use './src/styles/vendor/variables' as vv;
2+
3+
.info-card-content-clickable {
4+
border: 1px solid vv.$gray-200;
5+
border-radius: 3px;
6+
cursor: pointer;
7+
font-size: 1.25em;
8+
padding: 7px;
9+
}
10+
11+
.info-card-content-clickable:hover {
12+
background-color: vv.$gray-200;
13+
border-color: vv.$gray-400;
14+
}

src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard-v3/dashboard/dashboard-v3.component.scss

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use './src/styles/vendor/variables' as vv;
2+
13
.details {
24
font-size: larger;
35

@@ -31,3 +33,44 @@
3133
white-space: normal;
3234
}
3335
}
36+
37+
.info-card-popover-cluster-status {
38+
max-height: 20vh;
39+
max-width: 23vw;
40+
41+
.popover-body {
42+
font-size: 1rem;
43+
max-height: 19vh;
44+
max-width: 100%;
45+
overflow: auto;
46+
47+
li {
48+
span {
49+
font-size: 1.1em;
50+
font-weight: bold;
51+
}
52+
53+
span.health-warn-description {
54+
color: vv.$health-color-warning-800 !important;
55+
}
56+
}
57+
}
58+
}
59+
60+
@media (max-width: vv.$screen-lg-max) {
61+
.info-card-popover-cluster-status {
62+
max-width: 31vw;
63+
}
64+
}
65+
66+
@media (max-width: vv.$screen-md-max) {
67+
.info-card-popover-cluster-status {
68+
max-width: 46vw;
69+
}
70+
}
71+
72+
@media (max-width: vv.$screen-sm-max) {
73+
.info-card-popover-cluster-status {
74+
max-width: 83vw;
75+
}
76+
}

src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/dashboard.module.ts

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,6 @@ import { CephSharedModule } from '../shared/ceph-shared.module';
1212
import { FeedbackComponent } from '../shared/feedback/feedback.component';
1313
import { DashboardComponent } from './dashboard/dashboard.component';
1414
import { HealthPieComponent } from './health-pie/health-pie.component';
15-
import { HealthComponent } from './health/health.component';
16-
import { InfoCardComponent } from './info-card/info-card.component';
17-
import { InfoGroupComponent } from './info-group/info-group.component';
18-
import { MdsDashboardSummaryPipe } from './mds-dashboard-summary.pipe';
19-
import { MgrDashboardSummaryPipe } from './mgr-dashboard-summary.pipe';
20-
import { MonSummaryPipe } from './mon-summary.pipe';
21-
import { osdDashboardSummaryPipe } from './osd-dashboard-summary.pipe';
2215
import { ToggletipModule } from 'carbon-components-angular';
2316

2417
@NgModule({
@@ -34,18 +27,7 @@ import { ToggletipModule } from 'carbon-components-angular';
3427
BaseChartDirective,
3528
ToggletipModule
3629
],
37-
declarations: [
38-
HealthComponent,
39-
DashboardComponent,
40-
MonSummaryPipe,
41-
osdDashboardSummaryPipe,
42-
MgrDashboardSummaryPipe,
43-
MdsDashboardSummaryPipe,
44-
HealthPieComponent,
45-
InfoCardComponent,
46-
InfoGroupComponent,
47-
FeedbackComponent
48-
],
30+
declarations: [DashboardComponent, HealthPieComponent, FeedbackComponent],
4931
providers: [provideCharts(withDefaultRegisterables())]
5032
})
5133
export class DashboardModule {}

src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/dashboard/dashboard.component.html

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,7 @@
22
<a href="#main"
33
class="sr-only">skip to content</a>
44

5-
<ng-container *ngIf="(enabledFeature$ | async)?.dashboard === false; else dashboardV3"
6-
class="main-padding">
7-
<cd-refresh-selector></cd-refresh-selector>
8-
9-
<cd-health id="main"></cd-health>
10-
</ng-container>
11-
12-
<ng-template #dashboardV3>
5+
<ng-container class="main-padding">
136
<cd-dashboard-v3></cd-dashboard-v3>
14-
</ng-template>
7+
</ng-container>
158
</main>
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
main:has(cd-health) {
2-
padding-top: 20px;
3-
}
Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
import { Component } from '@angular/core';
2-
import { Observable } from 'rxjs';
3-
import { FeatureTogglesService } from '~/app/shared/services/feature-toggles.service';
42

53
@Component({
64
selector: 'cd-dashboard',
75
templateUrl: './dashboard.component.html',
86
styleUrls: ['./dashboard.component.scss']
97
})
10-
export class DashboardComponent {
11-
enabledFeature$: Observable<Object>;
12-
13-
constructor(private featureToggles: FeatureTogglesService) {
14-
this.enabledFeature$ = this.featureToggles.get();
15-
}
16-
}
8+
export class DashboardComponent {}

src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.html

Lines changed: 0 additions & 247 deletions
This file was deleted.

0 commit comments

Comments
 (0)