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/components/form-modal/form-modal.component.spec.ts
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { ReactiveFormsModule, Validators } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { CdValidators } from '~/app/shared/forms/cd-validator...
4,646
29.98
99
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/form-modal/form-modal.component.ts
import { Component, OnInit } from '@angular/core'; import { FormControl, ValidatorFn, Validators } from '@angular/forms'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import _ from 'lodash'; import { CdFormBuilder } from '~/app/shared/forms/cd-form-builder'; import { CdFormGroup } from '~/app/shared/f...
3,248
28.27027
94
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/grafana/grafana.component.html
<!-- Embed dashboard --> <cd-loading-panel *ngIf="loading && grafanaExist" i18n>Loading panel data...</cd-loading-panel> <cd-alert-panel type="info" *ngIf="!grafanaExist" i18n>Please consult the <cd-doc section="grafana"></cd-doc> on how to configure and enable the m...
2,955
33.776471
224
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/grafana/grafana.component.spec.ts
import { HttpClientTestingModule } from '@angular/common/http/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { FormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbAlertModule } from '@ng-bootstrap/ng-bootstrap'; import { o...
4,172
38.367925
147
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/grafana/grafana.component.ts
import { Component, Input, OnChanges, OnInit } from '@angular/core'; import { DomSanitizer, SafeUrl } from '@angular/platform-browser'; import { SettingsService } from '~/app/shared/api/settings.service'; import { Icons } from '~/app/shared/enum/icons.enum'; @Component({ selector: 'cd-grafana', templateUrl: './gr...
5,092
23.843902
136
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/helper/helper.component.html
<ng-template #popoverTpl> <div [class]="class" [innerHtml]="html"> </div> <ng-content></ng-content> </ng-template> <i [ngClass]="iconClass ? iconClass : [icons.questionCircle]" aria-hidden="true" [ngbPopover]="popoverTpl" (click)="$event.preventDefault();"> </i>
285
22.833333
61
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/helper/helper.component.spec.ts
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap'; import { configureTestBed } from '~/testing/unit-test-helper'; import { HelperComponent } from './helper.component'; describe('HelperComponent', () => { let component: HelperComponent; ...
700
24.962963
66
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/helper/helper.component.ts
import { Component, Input } from '@angular/core'; import { Icons } from '~/app/shared/enum/icons.enum'; @Component({ selector: 'cd-helper', templateUrl: './helper.component.html', styleUrls: ['./helper.component.scss'] }) export class HelperComponent { @Input() class: string; @Input() iconClass = ''; ...
364
15.590909
53
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/language-selector/language-selector.component.html
<div ngbDropdown display="dynamic" placement="bottom-right"> <a ngbDropdownToggle i18n-title id="toggle-language-button" title="Select a Language" role="button"> {{ allLanguages[selectedLanguage] }} </a> <div ngbDropdownMenu role="listbox" aria-labelledby="toggle-la...
591
24.73913
69
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/language-selector/language-selector.component.spec.ts
import { HttpClientTestingModule } from '@angular/common/http/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { FormsModule } from '@angular/forms'; import { configureTestBed } from '~/testing/unit-test-helper'; import { LanguageSelectorComponent } from './language-selector.componen...
2,176
24.313953
97
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/language-selector/language-selector.component.ts
import { Component, OnInit } from '@angular/core'; import _ from 'lodash'; import { LanguageService } from '~/app/shared/services/language.service'; import { SupportedLanguages } from './supported-languages.enum'; @Component({ selector: 'cd-language-selector', templateUrl: './language-selector.component.html', ...
1,138
26.780488
76
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/language-selector/supported-languages.enum.ts
// When adding a new supported language make sure to add a test for it in: // language-selector.component.spec.ts export enum SupportedLanguages { 'cs' = 'Čeština', 'de' = 'Deutsch', 'en-US' = 'English', 'es' = 'Español', 'fr' = 'Français', 'id' = 'Bahasa Indonesia', 'it' = 'Italiano', 'ja' = '日本語', '...
438
23.388889
74
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/loading-panel/loading-panel.component.html
<ngb-alert type="info" [dismissible]="false"> <strong> <i [ngClass]="[icons.spinner, icons.spin]" aria-hidden="true" class="me-2"></i> </strong> <ng-content></ng-content> </ngb-alert>
219
21
46
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/loading-panel/loading-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 { LoadingPanelComponent } from './loading-panel.component'; describe('LoadingPanelComponent', () => { let component: ...
739
26.407407
66
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/loading-panel/loading-panel.component.ts
import { Component } from '@angular/core'; import { Icons } from '~/app/shared/enum/icons.enum'; @Component({ selector: 'cd-loading-panel', templateUrl: './loading-panel.component.html', styleUrls: ['./loading-panel.component.scss'] }) export class LoadingPanelComponent { icons = Icons; }
300
22.153846
53
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/modal/modal.component.html
<div [ngClass]="pageURL ? 'modal' : ''"> <div [ngClass]="pageURL ? 'modal-dialog' : ''"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title float-start"> <ng-content select=".modal-title"></ng-content> </h4> <button type="button" c...
532
27.052632
57
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/modal/modal.component.spec.ts
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { Router } from '@angular/router'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { configureTestBed } from '~/testing/unit-test-helper'; import { ModalComponen...
1,749
30.818182
92
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/modal/modal.component.ts
import { Component, EventEmitter, Input, Output } from '@angular/core'; import { Router } from '@angular/router'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; @Component({ selector: 'cd-modal', templateUrl: './modal.component.html', styleUrls: ['./modal.component.scss'] }) export class ModalComp...
728
21.78125
74
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/motd/motd.component.html
<cd-alert-panel *ngIf="motd" size="slim" [showTitle]="false" [type]="motd.severity" [dismissible]="motd.severity !== 'danger'" (dismissed)="onDismissed()"> <span [innerHTML]="motd.message | sanitizeHtml"></span> </cd-alert-panel>
312
33.777778
58
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/motd/motd.component.spec.ts
import { HttpClientTestingModule } from '@angular/common/http/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { DashboardModule } from '~/app/ceph/dashboard/dashboard.module'; import { SharedModule } from '~/app/shared/shared.module'; import { configureTestBed } from '~/testing/unit...
829
29.740741
72
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/motd/motd.component.ts
import { Component, OnDestroy, OnInit } from '@angular/core'; import { Subscription } from 'rxjs'; import { Motd } from '~/app/shared/api/motd.service'; import { MotdNotificationService } from '~/app/shared/services/motd-notification.service'; @Component({ selector: 'cd-motd', templateUrl: './motd.component.html...
871
24.647059
98
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/notifications-sidebar/notifications-sidebar.component.html
<ng-template #tasksTpl> <!-- Executing --> <div *ngFor="let executingTask of executingTasks; trackBy:trackByFn"> <div class="card tc_task border-0"> <div class="row no-gutters"> <div class="col-md-2 text-center"> <span [ngClass]="[icons.stack, icons.large2x]" class="text-...
5,251
35.22069
129
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/notifications-sidebar/notifications-sidebar.component.spec.ts
import { HttpClientTestingModule } from '@angular/common/http/testing'; import { ComponentFixture, discardPeriodicTasks, fakeAsync, TestBed, tick } from '@angular/core/testing'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/te...
7,483
34.808612
102
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/notifications-sidebar/notifications-sidebar.component.ts
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, HostBinding, NgZone, OnDestroy, OnInit } from '@angular/core'; import { Mutex } from 'async-mutex'; import _ from 'lodash'; import moment from 'moment'; import { Subscription } from 'rxjs'; import { PrometheusService } from '~/app/shared/ap...
7,053
29.803493
102
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/orchestrator-doc-panel/orchestrator-doc-panel.component.html
<cd-alert-panel *ngIf="missingFeatures; else elseBlock" type="info" i18n>The feature is not supported in the current Orchestrator.</cd-alert-panel> <ng-template #elseBlock> <cd-alert-panel type="info" i18n>Orchestrator is not available. Please consult the <cd-doc...
432
38.363636
95
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/orchestrator-doc-panel/orchestrator-doc-panel.component.spec.ts
import { HttpClientTestingModule } from '@angular/common/http/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { CephReleaseNamePipe } from '~/app/shared/pipes/ceph-release-name.pipe'; import { SummaryService } from '~/ap...
1,130
36.7
83
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/orchestrator-doc-panel/orchestrator-doc-panel.component.ts
import { Component, Input } from '@angular/core'; import { OrchestratorFeature } from '~/app/shared/models/orchestrator.enum'; @Component({ selector: 'cd-orchestrator-doc-panel', templateUrl: './orchestrator-doc-panel.component.html', styleUrls: ['./orchestrator-doc-panel.component.scss'] }) export class Orches...
401
27.714286
76
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/pwd-expiration-notification/pwd-expiration-notification.component.html
<cd-alert-panel class="no-margin-bottom" [type]="alertType" *ngIf="displayNotification" [showTitle]="false" size="slim" [dismissible]="alertType !== 'danger'" (dismissed)="onDismissed()"> <div *ngIf="expirationDays === 0" ...
738
42.470588
92
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/pwd-expiration-notification/pwd-expiration-notification.component.spec.ts
import { HttpClientTestingModule } from '@angular/common/http/testing'; import { Component } from '@angular/core'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { Routes } from '@angular/router'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbAlertModule } from '...
4,126
37.212963
96
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/pwd-expiration-notification/pwd-expiration-notification.component.ts
import { Component, OnDestroy, OnInit } from '@angular/core'; import { SettingsService } from '~/app/shared/api/settings.service'; import { CdPwdExpirationSettings } from '~/app/shared/models/cd-pwd-expiration-settings'; import { AuthStorageService } from '~/app/shared/services/auth-storage.service'; @Component({ s...
2,068
35.946429
89
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/refresh-selector/refresh-selector.component.html
<div class="container-fluid"> <div class="row"> <form> <div class="col-sm-1 d-flex float-end"> <label for="refreshInterval" class="col-form-label my-0 mx-2 float-end" i18n>Refresh</label> <select id="refreshInterval" name="refreshInterval" ...
653
31.7
69
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/refresh-selector/refresh-selector.component.spec.ts
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { FormsModule } from '@angular/forms'; import { RefreshIntervalService } from '~/app/shared/services/refresh-interval.service'; import { configureTestBed } from '~/testing/unit-test-helper'; import { RefreshSelectorComponent } from './refresh-se...
871
30.142857
88
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/refresh-selector/refresh-selector.component.ts
import { Component, OnInit } from '@angular/core'; import { RefreshIntervalService } from '~/app/shared/services/refresh-interval.service'; @Component({ selector: 'cd-refresh-selector', templateUrl: './refresh-selector.component.html', styleUrls: ['./refresh-selector.component.scss'] }) export class RefreshSele...
910
26.606061
88
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/select-badges/select-badges.component.html
<cd-select #cdSelect [data]="data" [options]="options" [messages]="messages" [selectionLimit]="selectionLimit" [customBadges]="customBadges" [customBadgeValidators]="customBadgeValidators" elemClass="me-2 select-menu-edit" (selectio...
692
29.130435
58
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/select-badges/select-badges.component.spec.ts
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { ReactiveFormsModule, Validators } from '@angular/forms'; import { NgbPopoverModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; import { configureTestBed } from '~/testing/unit-test-helper'; import { SelectMessages } from '../select...
2,136
35.844828
84
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/select-badges/select-badges.component.ts
import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core'; import { ValidatorFn } from '@angular/forms'; import { Icons } from '~/app/shared/enum/icons.enum'; import { SelectMessages } from '../select/select-messages.model'; import { SelectOption } from '../select/select-option.model'; import {...
960
25.694444
82
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/select/select-messages.model.ts
import _ from 'lodash'; export class SelectMessages { empty: string; selectionLimit: any; customValidations = {}; filter: string; add: string; noOptions: string; constructor(messages: {}) { this.empty = $localize`No items selected.`; this.selectionLimit = { tooltip: $localize`Deselect item...
608
24.375
73
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/select/select-option.model.ts
export class SelectOption { selected: boolean; name: string; description: string; enabled: boolean; constructor(selected: boolean, name: string, description: string, enabled = true) { this.selected = selected; this.name = name; this.description = description; this.enabled = enabled; } }
317
21.714286
85
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/select/select.component.html
<ng-template #popTemplate> <form name="form" #formDir="ngForm" [formGroup]="form" novalidate> <div> <input type="text" formControlName="filter" i18n-placeholder [placeholder]="messages.filter" (keyup)="$event.keyCode === 13 ? select...
2,565
31.075
115
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/select/select.component.spec.ts
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { ReactiveFormsModule, Validators } from '@angular/forms'; import { NgbPopoverModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; import { configureTestBed } from '~/testing/unit-test-helper'; import { SelectOption } from './select-op...
8,583
29.98917
93
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/select/select.component.ts
import { Component, EventEmitter, Input, OnChanges, OnInit, Output } from '@angular/core'; import { FormControl, ValidatorFn } from '@angular/forms'; import _ from 'lodash'; import { Icons } from '~/app/shared/enum/icons.enum'; import { CdFormGroup } from '~/app/shared/forms/cd-form-group'; import { SelectMessages } ...
3,848
24.66
100
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/sparkline/sparkline.component.html
<div class="chart-container" [ngStyle]="style"> <canvas baseChart #sparkCanvas [labels]="labels" [datasets]="datasets" [options]="options" [colors]="colors" [chartType]="'line'"> </canvas> <div class="chartjs-tooltip" #sparkTooltip> <tabl...
347
20.75
31
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/sparkline/sparkline.component.spec.ts
import { NO_ERRORS_SCHEMA, SimpleChange } from '@angular/core'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { DimlessBinaryPipe } from '~/app/shared/pipes/dimless-binary.pipe'; import { FormatterService } from '~/app/shared/services/formatter.service'; import { configureTestBed } from '~/...
1,782
32.641509
83
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/sparkline/sparkline.component.ts
import { Component, ElementRef, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core'; import { ChartTooltip } from '~/app/shared/models/chart-tooltip'; import { DimlessBinaryPipe } from '~/app/shared/pipes/dimless-binary.pipe'; @Component({ selector: 'cd-sparkline', templateUrl:...
2,855
20.801527
75
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/submit-button/submit-button.component.html
<button [type]="type" class="btn btn-accent tc_submitButton" [ngClass]="btnClass" [disabled]="loading || disabled" (click)="submit($event)" [attr.aria-label]="ariaLabel"> <ng-content></ng-content> <span *ngIf="loading"> <i [ngClass]="[icons.spinner, icons.spin]"></i> </...
336
27.083333
51
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/submit-button/submit-button.component.spec.ts
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { FormGroup } from '@angular/forms'; import { configureTestBed } from '~/testing/unit-test-helper'; import { SubmitButtonComponent } from './submit-button.component'; describe('SubmitButtonComponent', () => { let component: SubmitButtonCompon...
736
25.321429
66
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/submit-button/submit-button.component.ts
import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { AbstractControl, FormGroup, FormGroupDirective, NgForm } from '@angular/forms'; import _ from 'lodash'; import { Icons } from '~/app/shared/enum/icons.enum'; /** * This component will render a submit button with the...
2,555
24.56
95
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/telemetry-notification/telemetry-notification.component.html
<cd-alert-panel *ngIf="displayNotification" class="no-margin-bottom" [showTitle]="false" size="slim" [type]="notificationSeverity" [dismissible]="notificationSeverity !== 'danger'" (dismissed)="onDismissed()"> <div i18n>Th...
596
44.923077
86
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/telemetry-notification/telemetry-notification.component.spec.ts
import { HttpClientTestingModule } from '@angular/common/http/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { NgbAlertModule } from '@ng-bootstrap/ng-bootstrap'; import { ToastrModule } from 'ngx-toastr'; import { of } from 'rxjs'; import { MgrModuleService } from '~/app/shared/a...
4,314
38.953704
100
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/telemetry-notification/telemetry-notification.component.ts
import { Component, OnDestroy, OnInit } from '@angular/core'; import _ from 'lodash'; import { MgrModuleService } from '~/app/shared/api/mgr-module.service'; import { NotificationType } from '~/app/shared/enum/notification-type.enum'; import { AuthStorageService } from '~/app/shared/services/auth-storage.service'; im...
2,264
34.952381
100
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/usage-bar/usage-bar.component.html
<ng-template #usageTooltipTpl> <table> <tr> <td class="text-left">Used:&nbsp;</td> <td class="text-right"><strong> {{ isBinary ? (used | dimlessBinary) : (used | dimless) }}</strong></td> </tr> <tr *ngIf="calculatePerc"> <td class="text-left">Free:&nbsp;</td> <td class="'text-right...
1,184
36.03125
126
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/usage-bar/usage-bar.component.spec.ts
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; import { PipesModule } from '~/app/shared/pipes/pipes.module'; import { configureTestBed } from '~/testing/unit-test-helper'; import { UsageBarComponent } from './usage-bar.component'; de...
791
27.285714
66
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/usage-bar/usage-bar.component.ts
import { Component, Input, OnChanges } from '@angular/core'; import _ from 'lodash'; @Component({ selector: 'cd-usage-bar', templateUrl: './usage-bar.component.html', styleUrls: ['./usage-bar.component.scss'] }) export class UsageBarComponent implements OnChanges { @Input() total: number; @Input() used:...
1,025
21.304348
80
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/wizard/wizard.component.html
<div class="card-body"> <div class="row m-7"> <nav class="col"> <ul class="nav nav-pills flex-column" *ngFor="let step of steps | async; let i = index;"> <li class="nav-item"> <a class="nav-link" (click)="onStepClick(step)" [ngClass]="{active: currentSte...
642
31.15
80
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/wizard/wizard.component.spec.ts
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { SharedModule } from '~/app/shared/shared.module'; import { configureTestBed } from '~/testing/unit-test-helper'; import { WizardComponent } from './wizard.component'; describe('WizardComponent', () => { let component: WizardComponent; let...
706
26.192308
66
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/components/wizard/wizard.component.ts
import { Component, Input, OnDestroy, OnInit } from '@angular/core'; import * as _ from 'lodash'; import { Observable, Subscription } from 'rxjs'; import { WizardStepModel } from '~/app/shared/models/wizard-steps'; import { WizardStepsService } from '~/app/shared/services/wizard-steps.service'; @Component({ select...
1,114
26.875
99
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/constants/app.constants.ts
import { Injectable } from '@angular/core'; import { environment } from '~/environments/environment'; export class AppConstants { public static readonly organization = 'ceph'; public static readonly projectName = 'Ceph Dashboard'; public static readonly license = 'Free software (LGPL 2.1).'; public static rea...
8,046
23.533537
96
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/datatable.module.ts
import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import { NgbDropdownModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; import { NgxDatatableModule } from '@swimlane/ngx-datatable'; import { NgxPipeFunctionModule } from...
3,969
41.688172
117
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/crud-table/crud-table.component.html
<ul class="nav nav-tabs" *ngIf="tabs"> <li class="nav-item" *ngFor="let tab of tabs; keyvalue"> <a class="nav-link" [routerLink]="tab.url" routerLinkActive="active" ariaCurrentWhenActive="page" [routerLinkActiveOptions]="{exact: true}" i18n>{{tab.name}}</a> </li> </u...
2,449
30.818182
97
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/crud-table/crud-table.component.spec.ts
/* tslint:disable:no-unused-variable */ import { HttpClientTestingModule } from '@angular/common/http/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { FormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbDropdownModule, Ngb...
1,841
33.111111
90
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/crud-table/crud-table.component.ts
import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; import _ from 'lodash'; import { Observable } from 'rxjs'; import { CrudMetadata } from '~/app/shared/models/crud-table-metadat...
6,258
34.162921
136
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-actions/table-actions.component.html
<div class="btn-group"> <ng-container *ngIf="currentAction"> <button type="button" title="{{ useDisableDesc(currentAction) }}" class="btn btn-{{btnColor}}" [ngClass]="{'disabled': disableSelectionAction(currentAction)}" (click)="useClickAction(currentAction)" ...
1,869
39.652174
76
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-actions/table-actions.component.spec.ts
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { NgxPipeFunctionModule } from 'ngx-pipe-function'; import { ComponentsModule } from '~/app/shared/components/components.module'; import { CdTableAction } from '~/app/shared/models/...
7,396
33.565421
96
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-actions/table-actions.component.ts
import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core'; import _ from 'lodash'; import { Icons } from '~/app/shared/enum/icons.enum'; import { CdTableAction } from '~/app/shared/models/cd-table-action'; import { CdTableSelection } from '~/app/shared/models/cd-table-selection'; import { Per...
4,958
29.611111
100
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-key-value/table-key-value.component.html
<div class="table-scroller"> <cd-table #table [data]="tableData" [columns]="columns" columnMode="flex" [toolHeader]="false" [autoReload]="autoReload" [customCss]="customCss" [autoSave]="false" [header]="false" ...
383
24.6
37
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-key-value/table-key-value.component.spec.ts
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { FormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbDropdownModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; import { NgxDatatableModule } from '@swimlane/ngx-datatable';...
11,424
31.365439
95
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-key-value/table-key-value.component.ts
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, ViewChild } from '@angular/core'; import _ from 'lodash'; import { CellTemplate } from '~/app/shared/enum/cell-template.enum'; import { CdTableColumn } from '~/app/shared/models/cd-table-column'; import { CdDatePipe } from '~/app/shared...
6,160
26.382222
95
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-pagination/table-pagination.component.html
<nav class="pagination" aria-label="Pagination" i18n-aria-label> <button class="pagination__btn pagination__btn_first" aria-label="Go to first page" i18n-aria-label [disabled]="!canPrevious()" (click)="selectPage(1)" > <i class="fa fa-angle-double-left" aria-hidden="true"></...
1,464
23.830508
57
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-pagination/table-pagination.component.spec.ts
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { TablePaginationComponent } from './table-pagination.component'; describe('TablePaginationComponent', () => { let component: TablePaginationComponent; let fixture: ComponentFixture<TablePaginationComponent>; let element: HTMLElement; ...
1,611
28.309091
83
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-pagination/table-pagination.component.ts
import { Component, EventEmitter, Input, Output } from '@angular/core'; @Component({ selector: 'cd-table-pagination', templateUrl: './table-pagination.component.html', styleUrls: ['./table-pagination.component.scss'] }) export class TablePaginationComponent { private _size = 0; private _count = 0; private ...
2,348
20.162162
74
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.html
<div class="dataTables_wrapper"> <div *ngIf="onlyActionHeader" class="dataTables_header clearfix"> <div class="cd-datatable-actions"> <ng-content select=".only-table-actions"></ng-content> </div> </div> <div class="dataTables_header clearfix" *ngIf="toolHeader"> <!-- actions --> ...
12,585
35.80117
247
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.spec.ts
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { FormsModule } from '@angular/forms'; import { By } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbDro...
26,419
32.742018
99
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts
import { AfterContentChecked, ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, PipeTransform, SimpleChanges, TemplateRef, ViewChild } from '@angular/core'; import { DatatableComponent, getterForProp, SortDirection, Sor...
28,752
30.050756
105
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/decorators/cd-encode.spec.ts
import { cdEncode, cdEncodeNot } from './cd-encode'; describe('cdEncode', () => { @cdEncode class ClassA { x2: string; y2: string; methodA(x1: string, @cdEncodeNot y1: string) { this.x2 = x1; this.y2 = y1; } } class ClassB { x2: string; y2: string; @cdEncode metho...
848
19.214286
73
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/decorators/cd-encode.ts
import _ from 'lodash'; /** * This decorator can be used in a class or method. * It will encode all the string parameters of all the methods of a class * or, if applied on a method, the specified method. * * @export * @param {Function} [target=null] * @returns {*} */ export function cdEncode(...args: any[]): a...
2,320
27.654321
89
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/auth-storage.directive.spec.ts
import { Component } from '@angular/core'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { Permissions } from '~/app/shared/models/permissions'; import { AuthStorageService } from '~/app/shared/services/auth-storage.service'; import { configureTestBed } from '~/testing/unit-test-helper'; im...
3,535
32.67619
89
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/auth-storage.directive.ts
import { Directive, Input, TemplateRef, ViewContainerRef } from '@angular/core'; import _ from 'lodash'; import { Permission, Permissions } from '~/app/shared/models/permissions'; import { AuthStorageService } from '~/app/shared/services/auth-storage.service'; type Condition = string | string[] | Partial<{ [Property...
1,500
29.632653
100
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/autofocus.directive.spec.ts
import { Component } from '@angular/core'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { configureTestBed } from '~/testing/unit-test-helper'; import { AutofocusDirective } from './autofocus.directive'; @Component({ template: ` <form>...
2,565
27.197802
100
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/autofocus.directive.ts
import { AfterViewInit, Directive, ElementRef, Input } from '@angular/core'; import _ from 'lodash'; @Directive({ selector: '[autofocus]' // eslint-disable-line }) export class AutofocusDirective implements AfterViewInit { private focus = true; constructor(private elementRef: ElementRef) {} ngAfterViewInit(...
667
22.034483
76
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/dimless-binary-per-second.directive.spec.ts
import { DimlessBinaryPerSecondDirective } from './dimless-binary-per-second.directive'; export class MockElementRef { nativeElement: {}; } describe('DimlessBinaryPerSecondDirective', () => { it('should create an instance', () => { const directive = new DimlessBinaryPerSecondDirective(new MockElementRef(), nu...
383
28.538462
98
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/dimless-binary-per-second.directive.ts
import { Directive, ElementRef, EventEmitter, HostListener, Input, OnInit, Output } from '@angular/core'; import { NgControl } from '@angular/forms'; import _ from 'lodash'; import { DimlessBinaryPerSecondPipe } from '../pipes/dimless-binary-per-second.pipe'; import { FormatterService } from '../service...
3,647
26.428571
97
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/dimless-binary.directive.spec.ts
import { DimlessBinaryDirective } from './dimless-binary.directive'; export class MockElementRef { nativeElement: {}; } describe('DimlessBinaryDirective', () => { it('should create an instance', () => { const directive = new DimlessBinaryDirective(new MockElementRef(), null, null, null); expect(directive)...
345
25.615385
89
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/dimless-binary.directive.ts
import { Directive, ElementRef, EventEmitter, HostListener, Input, OnInit, Output } from '@angular/core'; import { NgControl } from '@angular/forms'; import _ from 'lodash'; import { DimlessBinaryPipe } from '../pipes/dimless-binary.pipe'; import { FormatterService } from '../services/formatter.service'...
3,261
25.520325
91
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/directives.module.ts
import { NgModule } from '@angular/core'; import { AuthStorageDirective } from './auth-storage.directive'; import { AutofocusDirective } from './autofocus.directive'; import { DimlessBinaryPerSecondDirective } from './dimless-binary-per-second.directive'; import { DimlessBinaryDirective } from './dimless-binary.direct...
2,033
34.684211
104
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/form-input-disable.directive.spec.ts
import { Component, DebugElement, Input } from '@angular/core'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { configureTestBed } from '~/testing/unit-test-helper'; import { Permission } from '../models/permissions'; import { AuthStorageServi...
2,204
28.013158
87
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/form-input-disable.directive.ts
import { AfterViewInit, Directive, ElementRef, Optional } from '@angular/core'; import { Permissions } from '../models/permissions'; import { AuthStorageService } from '../services/auth-storage.service'; import { FormScopeDirective } from './form-scope.directive'; @Directive({ selector: 'input:not([cdNoFormInpu...
964
33.464286
133
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/form-loading.directive.spec.ts
import { Component } from '@angular/core'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { NgbAlertModule } from '@ng-bootstrap/ng-bootstrap'; import { configureTestBed } from '~/testing/unit-test-helper'; import { AlertPanelComponent } from ...
2,814
30.277778
97
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/form-loading.directive.ts
import { Directive, Input, TemplateRef, ViewContainerRef } from '@angular/core'; import { AlertPanelComponent } from '../components/alert-panel/alert-panel.component'; import { LoadingPanelComponent } from '../components/loading-panel/loading-panel.component'; import { LoadingStatus } from '../forms/cd-form'; @Direct...
1,432
33.95122
97
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/form-scope.directive.spec.ts
import { FormScopeDirective } from './form-scope.directive'; describe('UpdateOnlyDirective', () => { it('should create an instance', () => { const directive = new FormScopeDirective(); expect(directive).toBeTruthy(); }); });
238
25.555556
60
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/form-scope.directive.ts
import { Directive, Input } from '@angular/core'; @Directive({ selector: '[cdFormScope]' }) export class FormScopeDirective { @Input() cdFormScope: any; }
160
16.888889
49
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/iops.directive.spec.ts
import { IopsDirective } from './iops.directive'; describe('IopsDirective', () => { it('should create an instance', () => { const directive = new IopsDirective(null, null); expect(directive).toBeTruthy(); }); });
226
24.222222
52
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/iops.directive.ts
import { Directive, EventEmitter, HostListener, Input, OnInit } from '@angular/core'; import { NgControl } from '@angular/forms'; import { FormatterService } from '../services/formatter.service'; @Directive({ selector: '[cdIops]' }) export class IopsDirective implements OnInit { @Input() ngDataReady: EventEmitt...
841
25.3125
85
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/milliseconds.directive.spec.ts
import { MillisecondsDirective } from './milliseconds.directive'; describe('MillisecondsDirective', () => { it('should create an instance', () => { const directive = new MillisecondsDirective(null, null); expect(directive).toBeTruthy(); }); });
258
27.777778
65
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/milliseconds.directive.ts
import { Directive, EventEmitter, HostListener, Input, OnInit } from '@angular/core'; import { NgControl } from '@angular/forms'; import { FormatterService } from '../services/formatter.service'; @Directive({ selector: '[cdMilliseconds]' }) export class MillisecondsDirective implements OnInit { @Input() ngDataR...
851
25.625
85
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/password-button.directive.spec.ts
import { PasswordButtonDirective } from './password-button.directive'; describe('PasswordButtonDirective', () => { it('should create an instance', () => { const directive = new PasswordButtonDirective(null, null); expect(directive).toBeTruthy(); }); });
267
28.777778
70
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/password-button.directive.ts
import { Directive, ElementRef, HostListener, Input, OnInit, Renderer2 } from '@angular/core'; @Directive({ selector: '[cdPasswordButton]' }) export class PasswordButtonDirective implements OnInit { private iElement: HTMLElement; @Input() private cdPasswordButton: string; constructor(private elementRef: El...
1,440
30.326087
94
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/stateful-tab.directive.spec.ts
import { NgbConfig, NgbNav, NgbNavChangeEvent, NgbNavConfig } from '@ng-bootstrap/ng-bootstrap'; import { StatefulTabDirective } from './stateful-tab.directive'; describe('StatefulTabDirective', () => { it('should create an instance', () => { const directive = new StatefulTabDirective(null); expect(directiv...
1,081
36.310345
99
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/stateful-tab.directive.ts
import { Directive, Host, HostListener, Input, OnInit, Optional } from '@angular/core'; import { NgbNav, NgbNavChangeEvent } from '@ng-bootstrap/ng-bootstrap'; @Directive({ selector: '[cdStatefulTab]' }) export class StatefulTabDirective implements OnInit { @Input() cdStatefulTab: string; private localStorag...
919
27.75
87
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/trim.directive.spec.ts
import { Component } from '@angular/core'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms'; import { By } from '@angular/platform-browser'; import { configureTestBed } from '~/testing/unit-test-helper'; import { CdFormGro...
1,581
30.019608
92
ts
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/trim.directive.ts
import { Directive, HostListener } from '@angular/core'; import { NgControl } from '@angular/forms'; import _ from 'lodash'; @Directive({ selector: '[cdTrim]' }) export class TrimDirective { constructor(private ngControl: NgControl) {} @HostListener('input', ['$event.target.value']) onInput(value: string) { ...
489
21.272727
56
ts