applications: any;
readonly APP_LABELS: Record<string, string> = {
- cephfs: 'Filesystem',
- rbd: 'Block',
- rgw: 'Object'
+ cephfs: $localize`Filesystem (CephFS)`,
+ rbd: $localize`Block (RBD)`,
+ rgw: $localize`Object (RGW)`
};
constructor() {
const selectedApps = this.data.applications.selected || [];
this.data.applications.available = _.uniq(apps.sort()).map((x: string) => {
const option = new SelectOption(selectedApps.includes(x), x, this.data.APP_LABELS?.[x] || x);
- (option as any).content = x;
+ (option as any).content = this.data.APP_LABELS?.[x] || x;
return option;
});
}
'wr'
];
const emptyStat: PoolStat = { latest: 0, rate: 0, rates: [] };
+ const applicationLabels: Record<string, string> = {
+ cephfs: $localize`filesystem`,
+ rbd: $localize`block`,
+ rgw: $localize`object`
+ };
_.forEach(pools, (pool: Pool) => {
pool['pg_status'] = this.transformPgStatus(pool['pg_status']);
if (pool['type'] === 'replicated') {
pool['data_protection'] = `replica: ×${pool['size']}`;
}
+
+ pool['application_metadata'] = (pool.application_metadata || []).map(
+ (application: string) => applicationLabels[application] || application
+ );
});
return pools;