import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
-import { Subscription } from 'rxjs/Subscription';
+import { Subscription } from 'rxjs';
import { HealthService } from '../../../shared/api/health.service';
+import { Icons } from '../../../shared/enum/icons.enum';
import { Permissions } from '../../../shared/models/permissions';
import { DimlessBinaryPipe } from '../../../shared/pipes/dimless-binary.pipe';
import { DimlessPipe } from '../../../shared/pipes/dimless.pipe';
interval = new Subscription();
permissions: Permissions;
enabledFeature$: FeatureTogglesMap$;
+ icons = Icons;
rawCapacityChartConfig = {
options: {
});
}
- prepareReadWriteRatio(chart) {
+ prepareReadWriteRatio(chart: Record<string, any>) {
const ratioLabels = [];
const ratioData = [];
chart.labels = ratioLabels;
}
- prepareRawUsage(chart, data) {
+ prepareRawUsage(chart: Record<string, any>, data: Record<string, any>) {
const percentAvailable = this.calcPercentage(
data.df.stats.total_bytes - data.df.stats.total_used_raw_bytes,
data.df.stats.total_bytes
)} ${this.i18n('total')}`;
}
- preparePgStatus(chart, data) {
- const categoryPgAmount = {};
+ preparePgStatus(chart: Record<string, any>, data: Record<string, any>) {
+ const categoryPgAmount: Record<string, number> = {};
let totalPgs = 0;
_.forEach(data.pg_info.statuses, (pgAmount, pgStatesText) => {
];
}
- prepareObjects(chart, data) {
+ prepareObjects(chart: Record<string, any>, data: Record<string, any>) {
const totalReplicas = data.pg_info.object_stats.num_object_copies;
const healthy =
totalReplicas -