Skip to content

Commit ee9bb3d

Browse files
authored
Merge pull request ceph#59765 from rhcs-dashboard/carbon-ui-cleanups
mgr/dashboard: fix minor issues in carbon tables Reviewed-by: Ankush Behl <[email protected]> Reviewed-by: ivoalmeida <NOT@FOUND>
2 parents 5ecc740 + 528f09c commit ee9bb3d

File tree

11 files changed

+57
-44
lines changed

11 files changed

+57
-44
lines changed

src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-detail/cephfs-detail.component.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
<div class="row">
2-
<div class="col-sm-6">
2+
<div class="col-sm-8">
33
<legend i18n>Ranks</legend>
44
<cd-table [data]="data.ranks"
55
[columns]="columns.ranks"
66
[toolHeader]="false">
77
</cd-table>
88

9-
<legend i18n>Standbys</legend>
10-
<cd-table-key-value [data]="standbys">
11-
</cd-table-key-value>
12-
</div>
13-
14-
<div class="col-sm-6">
159
<legend i18n>Pools</legend>
1610
<cd-table [data]="data.pools"
1711
[columns]="columns.pools"
1812
[toolHeader]="false">
1913
</cd-table>
2014
</div>
15+
16+
<div class="col-sm-4">
17+
<legend i18n>Standbys</legend>
18+
<cd-table-key-value [data]="standbys">
19+
</cd-table-key-value>
20+
</div>
2121
</div>
2222

2323
<legend i18n>MDS performance counters</legend>

src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-list/cephfs-subvolume-list.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<div class="row">
2-
<div class="col-sm-1"
2+
<div class="col-sm-2"
33
*ngIf="subVolumeGroups$ | async as subVolumeGroups">
44
<cd-vertical-navigation title="Groups"
55
[items]="subvolumeGroupList"
66
inputIdentifier="group-filter"
77
(emitActiveItem)="selectSubVolumeGroup($event)"></cd-vertical-navigation>
88
</div>
9-
<div class="col-11 vertical-line">
9+
<div class="col-10 vertical-line">
1010
<cd-table [data]="subVolumes$ | async"
1111
columnMode="flex"
1212
[columns]="columns"

src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/services.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,13 +232,13 @@ export class ServicesComponent extends ListWithDetails implements OnChanges, OnI
232232
pagination_obs.observable.subscribe(
233233
(services: CephServiceSpec[]) => {
234234
this.services = services;
235-
this.count = pagination_obs.count;
236235
this.services = this.services.filter((col: any) => {
237236
if (col.service_type === 'mgmt-gateway' && col.status.running) {
238237
this.isMgmtGateway = true;
239238
}
240239
return !this.hiddenServices.includes(col.service_name);
241240
});
241+
this.count = this.services.length;
242242
this.isLoadingServices = false;
243243
},
244244
() => {

src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-details/rgw-bucket-details.component.html

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -139,26 +139,24 @@
139139
<td><pre>{{ selection.bucket_policy | json}}</pre></td>
140140
</tr>
141141
<tr>
142-
<div>
143-
<td i18n
144-
class="bold w-25">Lifecycle
145-
<div *ngIf="(selection.lifecycle | json) !== '{}'"
146-
class="input-group">
147-
<button type="button"
148-
class="btn btn-light"
149-
[ngClass]="{'active': lifecycleFormat === 'json'}"
150-
(click)="lifecycleFormat = 'json'">
151-
JSON
152-
</button>
153-
<button type="button"
154-
class="btn btn-light"
155-
[ngClass]="{'active': lifecycleFormat === 'xml'}"
156-
(click)="lifecycleFormat = 'xml'">
157-
XML
158-
</button>
159-
</div>
160-
</td>
161-
</div>
142+
<td i18n
143+
class="bold w-25">Lifecycle
144+
<div *ngIf="(selection.lifecycle | json) !== '{}'"
145+
class="input-group">
146+
<button type="button"
147+
class="btn btn-light"
148+
[ngClass]="{'active': lifecycleFormat === 'json'}"
149+
(click)="lifecycleFormat = 'json'">
150+
JSON
151+
</button>
152+
<button type="button"
153+
class="btn btn-light"
154+
[ngClass]="{'active': lifecycleFormat === 'xml'}"
155+
(click)="lifecycleFormat = 'xml'">
156+
XML
157+
</button>
158+
</div>
159+
</td>
162160
<td>
163161
<pre *ngIf="lifecycleFormat === 'json'">{{selection.lifecycle | json}}</pre>
164162
<pre *ngIf="lifecycleFormat === 'xml'">{{ (selection.lifecycle | xml) || '-'}}</pre>

src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-overview-dashboard/rgw-overview-dashboard.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ <h1>{{ averageObjectSize | dimlessBinary}}</h1>
102102
<cd-alert-panel type="info"
103103
i18n>
104104
Multi-site needs to be configured in order to see the multi-site sync status.
105-
Please consult the <cd-doc section="multisite"></cd-doc> on how to configure and enable the multi-site functionality.
105+
Please consult the <cd-doc section="multisite"></cd-doc>&nbsp;on how to configure and enable the multi-site functionality.
106106
</cd-alert-panel>
107107
</span>
108108
</ng-template>

src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/device-list/device-list.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@
4040

4141
<ng-template #lifeExpectancy
4242
let-value="data.value">
43-
<span *ngIf="!value.life_expectancy_enabled"
43+
<span *ngIf="!value?.life_expectancy_enabled"
4444
i18n>{{ "" | notAvailable }}</span>
45-
<span *ngIf="value.min && !value.max">&gt; {{value.min | i18nPlural: translationMapping}}</span>
46-
<span *ngIf="value.max && !value.min">&lt; {{value.max | i18nPlural: translationMapping}}</span>
47-
<span *ngIf="value.max && value.min">{{value.min}} to {{value.max | i18nPlural: translationMapping}}</span>
45+
<span *ngIf="value?.min && !value?.max">&gt; {{value.min | i18nPlural: translationMapping}}</span>
46+
<span *ngIf="value?.max && !value?.min">&lt; {{value.max | i18nPlural: translationMapping}}</span>
47+
<span *ngIf="value?.max && value?.min">{{value.min}} to {{value.max | i18nPlural: translationMapping}}</span>
4848
</ng-template>
4949

5050
<ng-template #lifeExpectancyTimestamp
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<a href="{{ docUrl }}"
2-
target="_blank">{{ docText }}</a>
2+
target="_blank">&nbsp;{{ docText }}</a>

src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@
7272
i18n-title
7373
i18n-description
7474
class="toolbar-action"
75-
placement="bottom">
75+
placement="bottom"
76+
*ngIf="fetchData?.observers?.length > 0">
7677
<svg cdsIcon="renew"
7778
size="16"
7879
[ngClass]="{ 'cds--toolbar-action__icon': true, 'reload': loadingIndicator }"></svg>
@@ -195,7 +196,8 @@
195196
(selectPage)="onPageChange($event)"
196197
[disabled]="limit === 0"
197198
[skeleton]="loadingIndicator"
198-
[pageInputDisabled]="limit === 0">
199+
[pageInputDisabled]="limit === 0"
200+
*ngIf="footer">
199201
</cds-pagination>
200202
</cds-table-container>
201203

src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ export class TableComponent implements AfterViewInit, OnInit, OnChanges, OnDestr
411411
template: col?.headerTemplate,
412412
// if cellClass is a function it cannot be called here as it requires table data to execute
413413
// instead if cellClass is a function it will be called and applied while parsing the data
414-
className: _.isString(col?.cellClass) ? col?.cellClass : col?.className,
414+
className: _.isString(col?.cellClass) ? `${col?.cellClass}` : `${col?.className}`,
415415
visible: !col.isHidden,
416416
sortable: _.isNil(col.sortable) ? true : col.sortable
417417
})
@@ -556,12 +556,12 @@ export class TableComponent implements AfterViewInit, OnInit, OnChanges, OnDestr
556556
// this method was triggered by ngOnChanges().
557557
if (this.fetchData.observers.length > 0) {
558558
this.loadingIndicator = true;
559+
const loadingSubscription = this.fetchData.subscribe(() => {
560+
this.loadingIndicator = false;
561+
this.cdRef.detectChanges();
562+
});
563+
this._subscriptions.add(loadingSubscription);
559564
}
560-
const loadingSubscription = this.fetchData.subscribe(() => {
561-
this.loadingIndicator = false;
562-
this.cdRef.detectChanges();
563-
});
564-
this._subscriptions.add(loadingSubscription);
565565

566566
if (_.isInteger(this.autoReload) && this.autoReload > 0) {
567567
this.reloadSubscriber = this.timerService

src/pybind/mgr/dashboard/frontend/src/styles.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,4 +237,5 @@ formly-form {
237237
// Overriding legend css due to change in bootstrap v5 and setting it to none;
238238
legend {
239239
float: none;
240+
margin-top: 1rem;
240241
}

0 commit comments

Comments
 (0)