Search is not available for this dataset
repo stringlengths 2 152 ⌀ | file stringlengths 15 239 | code stringlengths 0 58.4M | file_length int64 0 58.4M | avg_line_length float64 0 1.81M | max_line_length int64 0 12.7M | extension_type stringclasses 364
values |
|---|---|---|---|---|---|---|
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/monitor.service.ts | import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class MonitorService {
constructor(private http: HttpClient) {}
getMonitor() {
return this.http.get('api/monitor');
}
}
| 272 | 18.5 | 50 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/motd.service.spec.ts | import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';
import { MotdService } from '~/app/shared/api/motd.service';
import { configureTestBed } from '~/testing/unit-test-helper';
describe('MotdService', () => {
let service: Mot... | 897 | 24.657143 | 94 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/motd.service.ts | import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
export interface Motd {
message: string;
md5: string;
severity: 'info' | 'warning' | 'danger';
// The expiration date in ISO 8601. Does not expire if empty.
expires: string;
}
@... | 550 | 20.192308 | 63 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/nfs.service.spec.ts | import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { fakeAsync, TestBed, tick } from '@angular/core/testing';
import { configureTestBed } from '~/testing/unit-test-helper';
import { NfsService } from './nfs.service';
describe('NfsService', () => {
let service: NfsS... | 2,392 | 30.906667 | 94 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/nfs.service.ts | import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable, throwError } from 'rxjs';
import { NfsFSAbstractionLayer } from '~/app/ceph/nfs/models/nfs.fsal';
import { ApiClient } from '~/app/shared/api/api-client';
export interface Directory {
paths: string[]... | 2,750 | 24.238532 | 95 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/orchestrator.service.spec.ts | import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';
import { configureTestBed } from '~/testing/unit-test-helper';
import { OrchestratorService } from './orchestrator.service';
describe('OrchestratorService', () => {
let ser... | 987 | 26.444444 | 94 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/orchestrator.service.ts | import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import _ from 'lodash';
import { Observable } from 'rxjs';
import { OrchestratorFeature } from '../models/orchestrator.enum';
import { OrchestratorStatus } from '../models/orchestrator.interface';
@Injectable({
providedI... | 1,406 | 26.588235 | 94 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/osd.service.spec.ts | import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';
import { configureTestBed } from '~/testing/unit-test-helper';
import { OsdService } from './osd.service';
describe('OsdService', () => {
let service: OsdService;
let htt... | 5,832 | 30.701087 | 94 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/osd.service.ts | import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import _ from 'lodash';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
import { CdDevice } from '../models/devices';
import { InventoryDeviceType } from '../models/inventory-device-type.model';
imp... | 5,236 | 26.418848 | 97 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/paginate.model.ts | import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
export class PaginateObservable<Type> {
observable: Observable<Type>;
count: number;
constructor(obs: Observable<Type>) {
this.observable = obs.pipe(
map((response: any) => {
this.count = Number(response.headers?.get('X-T... | 390 | 22 | 68 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/performance-counter.service.spec.ts | import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';
import { configureTestBed } from '~/testing/unit-test-helper';
import { PerformanceCounterService } from './performance-counter.service';
describe('PerformanceCounterService'... | 1,312 | 27.543478 | 94 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/performance-counter.service.ts | import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { of as observableOf } from 'rxjs';
import { mergeMap } from 'rxjs/operators';
import { cdEncode } from '../decorators/cd-encode';
@cdEncode
@Injectable({
providedIn: 'root'
})
export class PerformanceCounterServi... | 686 | 21.9 | 75 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/pool.service.spec.ts | import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { fakeAsync, TestBed, tick } from '@angular/core/testing';
import { configureTestBed } from '~/testing/unit-test-helper';
import { RbdConfigurationSourceField } from '../models/configuration';
import { RbdConfiguratio... | 3,838 | 29.959677 | 94 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/pool.service.ts | import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
import { cdEncode } from '../decorators/cd-encode';
import { RbdConfigurationEntry } from '../models/configuration';
import { RbdConfigurationService ... | 1,976 | 25.36 | 100 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/prometheus.service.spec.ts | import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';
import { configureTestBed } from '~/testing/unit-test-helper';
import { AlertmanagerNotification } from '../models/prometheus-alerts';
import { PrometheusService } from './pro... | 6,817 | 26.491935 | 94 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/prometheus.service.ts | import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
import { AlertmanagerSilence } from '../models/alertmanager-silence';
import {
AlertmanagerAlert,
AlertmanagerNotification,
PrometheusRuleGroup
... | 3,529 | 28.663866 | 95 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rbd-mirroring.service.spec.ts | import { HttpRequest } from '@angular/common/http';
import {
HttpClientTestingModule,
HttpTestingController,
TestRequest
} from '@angular/common/http/testing';
import { fakeAsync, TestBed, tick } from '@angular/core/testing';
import { configureTestBed } from '~/testing/unit-test-helper';
import { RbdMirroringSer... | 4,861 | 28.466667 | 95 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rbd-mirroring.service.ts | import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { BehaviorSubject, Observable, Subscription } from 'rxjs';
import { filter } from 'rxjs/operators';
import { cdEncode, cdEncodeNot } from '../decorators/cd-encode';
import { MirroringSummary } from '../models/mirrori... | 3,463 | 28.109244 | 99 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rbd.model.ts | import { RbdConfigurationEntry } from '../models/configuration';
export interface RbdPool {
pool_name: string;
status: number;
value: RbdImage[];
headers: any;
}
export interface RbdImage {
disk_usage: number;
stripe_unit: number;
name: string;
parent: any;
pool_name: string;
num_objs: number;
b... | 618 | 18.967742 | 64 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rbd.service.spec.ts | import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';
import { CdTableFetchDataContext } from '~/app/shared/models/cd-table-fetch-data-context';
import { configureTestBed } from '~/testing/unit-test-helper';
import { ImageSpec } ... | 6,706 | 35.254054 | 100 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rbd.service.ts | import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import _ from 'lodash';
import { map } from 'rxjs/operators';
import { ApiClient } from '~/app/shared/api/api-client';
import { cdEncode, cdEncodeNot } from '../decorators/cd-encode';
import { ImageSpec } from '../models/im... | 5,712 | 27.004902 | 100 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-bucket.service.spec.ts | import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';
import { configureTestBed, RgwHelper } from '~/testing/unit-test-helper';
import { RgwBucketService } from './rgw-bucket.service';
describe('RgwBucketService', () => {
let ... | 3,967 | 30.244094 | 280 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-bucket.service.ts | import { HttpClient, HttpParams } from '@angular/common/http';
import { Injectable } from '@angular/core';
import _ from 'lodash';
import { of as observableOf } from 'rxjs';
import { catchError, mapTo } from 'rxjs/operators';
import { ApiClient } from '~/app/shared/api/api-client';
import { RgwDaemonService } from '~... | 5,571 | 27.721649 | 89 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-daemon.service.spec.ts | import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { fakeAsync, TestBed, tick } from '@angular/core/testing';
import { of } from 'rxjs';
import { RgwDaemon } from '~/app/ceph/rgw/models/rgw-daemon';
import { configureTestBed, RgwHelper } from '~/testing/unit-test-hel... | 3,365 | 35.989011 | 106 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-daemon.service.ts | import { HttpClient, HttpParams } from '@angular/common/http';
import { Injectable } from '@angular/core';
import _ from 'lodash';
import { BehaviorSubject, Observable, of, throwError } from 'rxjs';
import { mergeMap, take, tap } from 'rxjs/operators';
import { RgwDaemon } from '~/app/ceph/rgw/models/rgw-daemon';
imp... | 2,814 | 28.946809 | 100 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-multisite.service.ts | import { HttpClient, HttpParams } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { RgwRealm, RgwZone, RgwZonegroup } from '~/app/ceph/rgw/models/rgw-multisite';
import { RgwDaemonService } from './rgw-daemon.service';
@Injectable({
providedIn: 'root'
})
export class RgwMultisiteServi... | 1,011 | 33.896552 | 86 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-realm.service.spec.ts | import { HttpClientTestingModule } from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';
import { configureTestBed } from '~/testing/unit-test-helper';
import { RgwRealmService } from './rgw-realm.service';
describe('RgwRealmService', () => {
let service: RgwRealmService;
configur... | 570 | 23.826087 | 71 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-realm.service.ts | import { HttpClient, HttpParams } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { RgwRealm } from '~/app/ceph/rgw/models/rgw-multisite';
import { Icons } from '../enum/icons.enum';
import { RgwDaemonService } from './rgw-daemon.service';
@Injectable(... | 2,403 | 27.282353 | 88 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-site.service.spec.ts | import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';
import { configureTestBed, RgwHelper } from '~/testing/unit-test-helper';
import { RgwSiteService } from './rgw-site.service';
describe('RgwSiteService', () => {
let servic... | 1,260 | 27.659091 | 94 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-site.service.ts | import { HttpClient, HttpParams } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { map, mergeMap } from 'rxjs/operators';
import { RgwDaemon } from '~/app/ceph/rgw/models/rgw-daemon';
import { RgwDaemonService } from '~/app/shared/api/rgw-daemon.serv... | 1,123 | 27.820513 | 88 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-user.service.spec.ts | import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';
import { of as observableOf, throwError } from 'rxjs';
import { configureTestBed, RgwHelper } from '~/testing/unit-test-helper';
import { RgwUserService } from './rgw-user.se... | 5,579 | 31.631579 | 98 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-user.service.ts | import { HttpClient, HttpParams } from '@angular/common/http';
import { Injectable } from '@angular/core';
import _ from 'lodash';
import { forkJoin as observableForkJoin, Observable, of as observableOf } from 'rxjs';
import { catchError, mapTo, mergeMap } from 'rxjs/operators';
import { RgwDaemonService } from '~/ap... | 5,621 | 30.233333 | 91 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-zone.service.spec.ts | import { HttpClientTestingModule } from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';
import { configureTestBed } from '~/testing/unit-test-helper';
import { RgwZoneService } from './rgw-zone.service';
describe('RgwZoneService', () => {
let service: RgwZoneService;
configureTes... | 565 | 23.608696 | 71 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-zone.service.ts | import { HttpClient, HttpParams } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { RgwRealm, RgwZone, RgwZonegroup } from '~/app/ceph/rgw/models/rgw-multisite';
import { Icons } from '../enum/icons.enum';
@Injectable({
providedIn: 'root'
})
export c... | 4,990 | 28.532544 | 94 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-zonegroup.service.spec.ts | import { HttpClientTestingModule } from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';
import { configureTestBed } from '~/testing/unit-test-helper';
import { RgwZonegroupService } from './rgw-zonegroup.service';
describe('RgwZonegroupService', () => {
let service: RgwZonegroupServ... | 590 | 24.695652 | 71 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-zonegroup.service.ts | import { HttpClient, HttpParams } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { RgwRealm, RgwZonegroup } from '~/app/ceph/rgw/models/rgw-multisite';
import { Icons } from '../enum/icons.enum';
@Injectable({
providedIn: 'root'
})
export class RgwZ... | 3,038 | 31.329787 | 96 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/role.service.spec.ts | import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';
import { configureTestBed } from '~/testing/unit-test-helper';
import { RoleService } from './role.service';
describe('RoleService', () => {
let service: RoleService;
let... | 2,204 | 28.013158 | 94 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/role.service.ts | import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable, of as observableOf } from 'rxjs';
import { mergeMap } from 'rxjs/operators';
import { RoleFormModel } from '~/app/core/auth/role-form/role-form.model';
@Injectable({
providedIn: 'root'
})
export clas... | 1,192 | 22.86 | 75 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/scope.service.spec.ts | import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';
import { configureTestBed } from '~/testing/unit-test-helper';
import { ScopeService } from './scope.service';
describe('ScopeService', () => {
let service: ScopeService;
... | 891 | 24.485714 | 94 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/scope.service.ts | import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class ScopeService {
constructor(private http: HttpClient) {}
list() {
return this.http.get('ui-api/scope');
}
}
| 265 | 18 | 50 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/settings.service.spec.ts | import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { fakeAsync, TestBed, tick } from '@angular/core/testing';
import { configureTestBed } from '~/testing/unit-test-helper';
import { SettingsService } from './settings.service';
describe('SettingsService', () => {
le... | 4,884 | 30.516129 | 94 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/settings.service.ts | import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import _ from 'lodash';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
class SettingResponse {
name: string;
default: any;
type: string;
value: any;
}
@Injectable({
providedIn: 'root'
})... | 1,952 | 24.038462 | 93 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/telemetry.service.spec.ts | import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';
import { configureTestBed } from '~/testing/unit-test-helper';
import { TelemetryService } from './telemetry.service';
describe('TelemetryService', () => {
let service: Tel... | 1,863 | 30.59322 | 94 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/telemetry.service.ts | import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class TelemetryService {
private url = 'api/telemetry';
constructor(private http: HttpClient) {}
getReport() {
return this.http.get(`${this.url}/report`);
}
enabl... | 506 | 20.125 | 50 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/upgrade.service.spec.ts | import { UpgradeService } from './upgrade.service';
import { configureTestBed } from '~/testing/unit-test-helper';
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';
import { SummaryService } from '../services/summary.service';... | 1,842 | 29.213115 | 103 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/upgrade.service.ts | import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { ApiClient } from './api-client';
import { map } from 'rxjs/operators';
import { SummaryService } from '../services/summary.service';
import { UpgradeInfoInterface } from '../models/upgrade.interface';
@Injectable({
... | 1,450 | 31.244444 | 95 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/user.service.spec.ts | import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';
import { UserFormModel } from '~/app/core/auth/user-form/user-form.model';
import { configureTestBed } from '~/testing/unit-test-helper';
import { UserService } from './user.s... | 3,479 | 32.142857 | 99 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/api/user.service.ts | import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable, of as observableOf } from 'rxjs';
import { catchError, mapTo } from 'rxjs/operators';
import { UserFormModel } from '~/app/core/auth/user-form/user-form.model';
@Injectable({
providedIn: 'root'
})
ex... | 1,708 | 26.126984 | 91 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/classes/cd-helper.class.spec.ts | import { CdHelperClass } from './cd-helper.class';
class MockClass {
n = 42;
o = {
x: 'something',
y: [1, 2, 3],
z: true
};
b: boolean;
}
describe('CdHelperClass', () => {
describe('updateChanged', () => {
let old: MockClass;
let used: MockClass;
let structure = {
n: 42,
... | 1,461 | 20.820896 | 51 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/classes/cd-helper.class.ts | import _ from 'lodash';
export class CdHelperClass {
/**
* Simple way to only update variables if they have really changed and not just the reference
*
* @param componentThis - In order to update the variables if necessary
* @param change - The variable name (attribute of the object) is followed by the c... | 924 | 30.896552 | 97 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/classes/crush.node.selection.class.spec.ts | import { FormControl } from '@angular/forms';
import _ from 'lodash';
import { configureTestBed, Mocks } from '~/testing/unit-test-helper';
import { CrushNode } from '../models/crush-node';
import { CrushNodeSelectionClass } from './crush.node.selection.class';
describe('CrushNodeSelectionService', () => {
const n... | 7,717 | 33.923077 | 109 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/classes/crush.node.selection.class.ts | import { AbstractControl } from '@angular/forms';
import _ from 'lodash';
import { CrushNode } from '../models/crush-node';
export class CrushNodeSelectionClass {
private nodes: CrushNode[] = [];
private idTree: { [id: number]: CrushNode } = {};
private allDevices: string[] = [];
private controls: {
root... | 6,996 | 30.518018 | 94 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/classes/css-helper.ts | export class CssHelper {
propertyValue(propertyName: string): string {
return getComputedStyle(document.body).getPropertyValue(`--${propertyName}`);
}
}
| 161 | 26 | 81 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/classes/list-with-details.class.ts | import { NgZone } from '@angular/core';
import { TableStatus } from './table-status';
export class ListWithDetails {
expandedRow: any;
staleTimeout: number;
tableStatus: TableStatus;
constructor(protected ngZone?: NgZone) {}
setExpandedRow(expandedRow: any) {
this.expandedRow = expandedRow;
}
set... | 729 | 23.333333 | 96 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/classes/table-status-view-cache.spec.ts | import { ViewCacheStatus } from '../enum/view-cache-status.enum';
import { TableStatusViewCache } from './table-status-view-cache';
describe('TableStatusViewCache', () => {
it('should create an instance', () => {
const ts = new TableStatusViewCache();
expect(ts).toBeTruthy();
expect(ts).toEqual({ msg: ''... | 1,582 | 37.609756 | 99 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/classes/table-status-view-cache.ts | import { ViewCacheStatus } from '../enum/view-cache-status.enum';
import { TableStatus } from './table-status';
export class TableStatusViewCache extends TableStatus {
constructor(status: ViewCacheStatus = ViewCacheStatus.ValueOk, statusFor: string = '') {
super();
switch (status) {
case ViewCacheStat... | 1,224 | 31.236842 | 100 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/classes/table-status.spec.ts | import { TableStatus } from './table-status';
describe('TableStatus', () => {
it('should create an instance', () => {
const ts = new TableStatus();
expect(ts).toBeTruthy();
expect(ts).toEqual({ msg: '', type: 'light' });
});
it('should create with parameters', () => {
const ts = new TableStatus(... | 433 | 26.125 | 55 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/classes/table-status.ts | export class TableStatus {
constructor(public type: 'info' | 'warning' | 'danger' | 'light' = 'light', public msg = '') {}
}
| 127 | 31 | 97 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/components.module.ts | import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import {
NgbAlertModule,
NgbDatepickerModule,
NgbDropdownModule,
NgbPopoverModule,
NgbProgressbarModule,... | 5,341 | 37.710145 | 121 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/alert-panel/alert-panel.component.html | <ngb-alert type="{{ bootstrapClass }}"
[dismissible]="dismissible"
(closed)="onClose()"
[ngClass]="spacingClass">
<table>
<ng-container *ngIf="size === 'normal'; else slim">
<tr>
<td *ngIf="showIcon"
rowspan="2"
class="alert-panel-icon">
... | 1,273 | 27.954545 | 67 | html |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/alert-panel/alert-panel.component.spec.ts | import { ComponentFixture, TestBed } from '@angular/core/testing';
import { NgbAlertModule } from '@ng-bootstrap/ng-bootstrap';
import { configureTestBed } from '~/testing/unit-test-helper';
import { AlertPanelComponent } from './alert-panel.component';
describe('AlertPanelComponent', () => {
let component: AlertP... | 725 | 25.888889 | 66 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/alert-panel/alert-panel.component.ts | import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { Icons } from '~/app/shared/enum/icons.enum';
@Component({
selector: 'cd-alert-panel',
templateUrl: './alert-panel.component.html',
styleUrls: ['./alert-panel.component.scss']
})
export class AlertPanelComponent implements O... | 1,995 | 26.342466 | 79 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/back-button/back-button.component.html | <button class="btn btn-light tc_backButton"
aria-label="Back"
(click)="back()"
type="button">
{{ name }}
</button>
| 141 | 19.285714 | 43 | html |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/back-button/back-button.component.spec.ts | import { ComponentFixture, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { configureTestBed } from '~/testing/unit-test-helper';
import { BackButtonComponent } from './back-button.component';
describe('BackButtonComponent', () => {
let component: BackB... | 731 | 27.153846 | 66 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/back-button/back-button.component.ts | import { Location } from '@angular/common';
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { ActionLabelsI18n } from '~/app/shared/constants/app.constants';
@Component({
selector: 'cd-back-button',
templateUrl: './back-button.component.html',
styleUrls: ['./back-button.component.... | 693 | 26.76 | 84 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/cd-label/cd-label.component.html | <span *ngIf="!key; else key_value"
class="badge badge-{{value}}"
ngClass="{{value | colorClassFromText}}">
{{ value }}
</span>
<ng-template #key_value>
<span class="badge badge-background-primary badge-{{key}}-{{value}}">
{{ key }}: {{ value }}
</span>
</ng-template>
| 295 | 23.666667 | 71 | html |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/cd-label/cd-label.component.spec.ts | import { ComponentFixture, TestBed } from '@angular/core/testing';
import { CdLabelComponent } from './cd-label.component';
import { ColorClassFromTextPipe } from './color-class-from-text.pipe';
describe('CdLabelComponent', () => {
let component: CdLabelComponent;
let fixture: ComponentFixture<CdLabelComponent>;
... | 722 | 26.807692 | 70 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/cd-label/cd-label.component.ts | import { Component, Input } from '@angular/core';
@Component({
selector: 'cd-label',
templateUrl: './cd-label.component.html',
styleUrls: ['./cd-label.component.scss']
})
export class CdLabelComponent {
@Input() key?: string;
@Input() value?: string;
}
| 264 | 21.083333 | 49 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/cd-label/color-class-from-text.pipe.ts | import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'colorClassFromText'
})
export class ColorClassFromTextPipe implements PipeTransform {
readonly cssClasses: string[] = [
'badge-cd-label-green',
'badge-cd-label-cyan',
'badge-cd-label-purple',
'badge-cd-label-light-blue',
'badge... | 735 | 24.37931 | 62 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/config-option/config-option.component.html | <div [formGroup]="optionsFormGroup">
<div *ngFor="let option of options; let last = last">
<div class="form-group row pt-2"
*ngIf="option.type === 'bool'">
<label class="cd-col-form-label"
[for]="option.name">
<b>{{ option.text }}</b>
<br>
<span class="text-mute... | 3,046 | 39.092105 | 126 | html |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/config-option/config-option.component.spec.ts | import { HttpClientTestingModule } from '@angular/common/http/testing';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ReactiveFormsModule } from '@angular/forms';
import { NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap';
import _ from 'lodash';
import { of as observableOf } from 'rxj... | 9,069 | 29.641892 | 98 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/config-option/config-option.component.ts | import { Component, Input, OnInit } from '@angular/core';
import { FormControl, NgForm } from '@angular/forms';
import _ from 'lodash';
import { ConfigurationService } from '~/app/shared/api/configuration.service';
import { Icons } from '~/app/shared/enum/icons.enum';
import { CdFormGroup } from '~/app/shared/forms/c... | 3,959 | 31.727273 | 87 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/config-option/config-option.model.ts | export class ConfigFormModel {
name: string;
desc: string;
long_desc: string;
type: string;
value: Array<any>;
default: any;
daemon_default: any;
min: any;
max: any;
services: Array<string>;
}
| 213 | 15.461538 | 30 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/config-option/config-option.types.spec.ts | import { ConfigFormModel } from './config-option.model';
import { ConfigOptionTypes } from './config-option.types';
describe('ConfigOptionTypes', () => {
describe('getType', () => {
it('should return uint type', () => {
const ret = ConfigOptionTypes.getType('uint');
expect(ret).toBeTruthy();
ex... | 9,811 | 34.941392 | 100 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/config-option/config-option.types.ts | import { Validators } from '@angular/forms';
import _ from 'lodash';
import { CdValidators } from '~/app/shared/forms/cd-validators';
import { ConfigFormModel } from './config-option.model';
export class ConfigOptionTypes {
// TODO: I18N
private static knownTypes: Array<any> = [
{
name: 'uint',
i... | 4,426 | 28.912162 | 96 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/confirmation-modal/confirmation-modal.component.html | <cd-modal (hide)="cancel()">
<ng-container class="modal-title">
<span class="text-warning"
*ngIf="warning">
<i class="fa fa-exclamation-triangle fa-1x"></i>
</span>{{ titleText }}</ng-container>
<ng-container class="modal-content">
<form name="confirmationForm"
#formDir="ngForm... | 1,073 | 36.034483 | 87 | html |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/confirmation-modal/confirmation-modal.component.spec.ts | import { Component, NgModule, NO_ERRORS_SCHEMA, TemplateRef, ViewChild } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ReactiveFormsModule } from '@angular/forms';
import { RouterTestingModule } from '@angular/router/testing';
import { NgbActiveModal, NgbModalModule,... | 5,754 | 29.94086 | 97 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/confirmation-modal/confirmation-modal.component.ts | import { Component, OnDestroy, OnInit, TemplateRef } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
@Component({
selector: 'cd-confirmation-modal',
templateUrl: './confirmation-modal.component.html',
styleUrls: ['./confirmation-moda... | 1,677 | 24.044776 | 74 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/copy2clipboard-button/copy2clipboard-button.component.html | <button (click)="onClick()"
type="button"
class="btn btn-light"
i18n-title
title="Copy to Clipboard">
<i [ngClass]="[icons.clipboard]"></i>
</button>
| 184 | 22.125 | 39 | html |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/copy2clipboard-button/copy2clipboard-button.component.spec.ts | import { TestBed } from '@angular/core/testing';
import * as BrowserDetect from 'detect-browser';
import { ToastrService } from 'ngx-toastr';
import { configureTestBed } from '~/testing/unit-test-helper';
import { Copy2ClipboardButtonComponent } from './copy2clipboard-button.component';
describe('Copy2ClipboardButto... | 1,919 | 28.090909 | 82 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/copy2clipboard-button/copy2clipboard-button.component.ts | import { Component, HostListener, Input } from '@angular/core';
import { detect } from 'detect-browser';
import { ToastrService } from 'ngx-toastr';
import { Icons } from '~/app/shared/enum/icons.enum';
@Component({
selector: 'cd-copy-2-clipboard-button',
templateUrl: './copy2clipboard-button.component.html',
... | 1,740 | 30.089286 | 97 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/critical-confirmation-modal/critical-confirmation-modal.component.html | <cd-modal #modal
[modalRef]="activeModal">
<ng-container class="modal-title">
<ng-container *ngTemplateOutlet="deletionHeading"></ng-container>
</ng-container>
<ng-container class="modal-content">
<form name="deletionForm"
#formDir="ngForm"
[formGroup]="deletionForm"
... | 2,340 | 40.803571 | 126 | html |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/critical-confirmation-modal/critical-confirmation-modal.component.spec.ts | import { Component, NgModule, NO_ERRORS_SCHEMA, TemplateRef, ViewChild } from '@angular/core';
import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
import { NgForm, ReactiveFormsModule } from '@angular/forms';
import { NgbActiveModal, NgbModalModule, NgbModalRef } from '@ng-bootstrap/ng-... | 8,300 | 34.173729 | 99 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/critical-confirmation-modal/critical-confirmation-modal.component.ts | import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core';
import { FormControl, Validators } from '@angular/forms';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { Observable } from 'rxjs';
import { CdFormGroup } from '~/app/shared/forms/cd-form-group';
import { SubmitButtonComp... | 1,870 | 28.234375 | 81 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/custom-login-banner/custom-login-banner.component.html | <p class="login-text"
*ngIf="bannerText$ | async as bannerText">{{ bannerText }}</p>
| 88 | 28.666667 | 65 | html |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/custom-login-banner/custom-login-banner.component.spec.ts | import { HttpClientTestingModule } from '@angular/common/http/testing';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { configureTestBed } from '~/testing/unit-test-helper';
import { CustomLoginBannerComponent } from './custom-login-banner.component';
describe('CustomLoginBannerComponent',... | 794 | 29.576923 | 77 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/custom-login-banner/custom-login-banner.component.ts | import { Component, OnInit } from '@angular/core';
import _ from 'lodash';
import { Observable } from 'rxjs';
import { CustomLoginBannerService } from '~/app/shared/api/custom-login-banner.service';
@Component({
selector: 'cd-custom-login-banner',
templateUrl: './custom-login-banner.component.html',
styleUrls:... | 635 | 29.285714 | 88 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/date-time-picker/date-time-picker.component.html | <div class="d-flex justify-content-center">
<ngb-datepicker #dp
[(ngModel)]="date"
[minDate]="minDate"
(ngModelChange)="onModelChange()"></ngb-datepicker>
</div>
<div class="d-flex justify-content-center"
*ngIf="hasTime">
<ngb-timepicker [seconds]="hasSeco... | 439 | 30.428571 | 69 | html |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/date-time-picker/date-time-picker.component.spec.ts | import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
import { FormControl, FormsModule } from '@angular/forms';
import { NgbDatepickerModule, NgbTimepickerModule } from '@ng-bootstrap/ng-bootstrap';
import { configureTestBed } from '~/testing/unit-test-helper';
import { DateTimePickerCo... | 2,002 | 32.949153 | 86 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/date-time-picker/date-time-picker.component.ts | import { Component, Input, OnInit } from '@angular/core';
import { FormControl } from '@angular/forms';
import { NgbCalendar, NgbDateStruct, NgbTimeStruct } from '@ng-bootstrap/ng-bootstrap';
import moment from 'moment';
import { Subscription } from 'rxjs';
@Component({
selector: 'cd-date-time-picker',
templateUr... | 1,647 | 23.235294 | 87 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/doc/doc.component.html | <a href="{{ docUrl }}"
target="_blank">{{ docText }}</a>
| 60 | 19.333333 | 36 | html |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/doc/doc.component.spec.ts | import { HttpClientTestingModule } from '@angular/common/http/testing';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { CephReleaseNamePipe } from '~/app/shared/pipes/ceph-release-name.pipe';
import { configureTestBed } from '~/testing/unit-test-helper';
import { DocComponent } from './doc.... | 813 | 28.071429 | 80 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/doc/doc.component.ts | import { Component, Input, OnInit } from '@angular/core';
import { DocService } from '~/app/shared/services/doc.service';
@Component({
selector: 'cd-doc',
templateUrl: './doc.component.html',
styleUrls: ['./doc.component.scss']
})
export class DocComponent implements OnInit {
@Input() section: string;
@Inpu... | 701 | 23.206897 | 68 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/download-button/download-button.component.html | <div ngbDropdown
placement="bottom-right">
<button type="button"
[title]="title"
class="btn btn-light dropdown-toggle-split"
ngbDropdownToggle>
<i [ngClass]="[icons.download]"></i>
</button>
<div ngbDropdownMenu>
<button ngbDropdownItem
(click)="download('jso... | 618 | 24.791667 | 53 | html |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/download-button/download-button.component.spec.ts | import { ComponentFixture, TestBed } from '@angular/core/testing';
import { TextToDownloadService } from '~/app/shared/services/text-to-download.service';
import { configureTestBed } from '~/testing/unit-test-helper';
import { DownloadButtonComponent } from './download-button.component';
describe('DownloadButtonCompo... | 1,259 | 30.5 | 87 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/download-button/download-button.component.ts | import { Component, Input } from '@angular/core';
import { Icons } from '~/app/shared/enum/icons.enum';
import { TextToDownloadService } from '~/app/shared/services/text-to-download.service';
@Component({
selector: 'cd-download-button',
templateUrl: './download-button.component.html',
styleUrls: ['./download-bu... | 975 | 29.5 | 87 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/form-button-panel/form-button-panel.component.html | <div [class]="wrappingClass">
<cd-back-button *ngIf="showCancel"
class="m-2"
(backAction)="backAction()"
[name]="cancelText"></cd-back-button>
<cd-submit-button *ngIf="showSubmit"
(submitAction)="submitAction()"
[disabled]... | 494 | 37.076923 | 75 | html |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/form-button-panel/form-button-panel.component.spec.ts | import { NO_ERRORS_SCHEMA } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { configureTestBed } from '~/testing/unit-test-helper';
import { FormButtonPanelComponent } from './form-button-panel.component';
describe('FormButtonPanelComponent', () => {
let component: Fo... | 751 | 27.923077 | 73 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/form-button-panel/form-button-panel.component.ts | import { Location } from '@angular/common';
import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core';
import { FormGroup, NgForm } from '@angular/forms';
import { ActionLabelsI18n } from '~/app/shared/constants/app.constants';
import { ModalService } from '~/app/shared/services/modal.service';... | 1,569 | 24.322581 | 82 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/form-modal/form-modal.component.html | <cd-modal [modalRef]="activeModal">
<ng-container *ngIf="titleText"
class="modal-title">
{{ titleText }}
</ng-container>
<ng-container class="modal-content">
<form [formGroup]="formGroup"
#formDir="ngForm"
novalidate>
<div class="modal-body">
<p *ngIf="mes... | 2,956 | 41.242857 | 91 | html |