repo
stringlengths
1
152
file
stringlengths
15
205
code
stringlengths
0
41.6M
file_length
int64
0
41.6M
avg_line_length
float64
0
1.81M
max_line_length
int64
0
12.7M
extension_type
stringclasses
90 values
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/pool-list/pool-list.component.html
<cd-table [data]="data" columnMode="flex" [columns]="columns" identifier="name" forceIdentifier="true" [autoReload]="-1" (fetchData)="refresh()" selectionType="single" (updateSelection)="updateSelection($event)" [status]="tableStatus"> <cd-table-actions class="table-actions" [permission]="permission" [selection]="selection" [tableActions]="tableActions"> </cd-table-actions> </cd-table> <ng-template #healthTmpl let-row="row" let-value="value"> <span [ngClass]="row.health_color | mirrorHealthColor">{{ value }}</span> </ng-template> <ng-template #localTmpl> <span i18n i18n-ngbTooltip ngbTooltip="Local image count"># Local</span> </ng-template> <ng-template #remoteTmpl> <span i18n i18n-ngbTooltip ngbTooltip="Remote image count"># Remote</span> </ng-template> <router-outlet name="modal"></router-outlet>
1,029
29.294118
75
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-configuration-form/rbd-configuration-form.component.html
<fieldset #cfgFormGroup [formGroup]="form.get('configuration')"> <legend i18n>RBD Configuration</legend> <div *ngFor="let section of rbdConfigurationService.sections" class="col-12"> <h4 class="cd-header"> <span (click)="toggleSectionVisibility(section.class)" class="collapsible"> {{ section.heading }} <i [ngClass]="!sectionVisibility[section.class] ? icons.addCircle : icons.minusCircle" aria-hidden="true"></i> </span> </h4> <div class="{{ section.class }}" [hidden]="!sectionVisibility[section.class]"> <div class="form-group row" *ngFor="let option of section.options"> <label class="cd-col-form-label" [for]="option.name">{{ option.displayName }}<cd-helper>{{ option.description }}</cd-helper></label> <div class="cd-col-form-input {{ section.heading }}"> <div class="input-group"> <ng-container [ngSwitch]="option.type"> <ng-container *ngSwitchCase="configurationType.milliseconds"> <input [id]="option.name" [name]="option.name" [formControlName]="option.name" type="text" class="form-control" [ngDataReady]="ngDataReady" cdMilliseconds> </ng-container> <ng-container *ngSwitchCase="configurationType.bps"> <input [id]="option.name" [name]="option.name" [formControlName]="option.name" type="text" class="form-control" defaultUnit="b" [ngDataReady]="ngDataReady" cdDimlessBinaryPerSecond> </ng-container> <ng-container *ngSwitchCase="configurationType.iops"> <input [id]="option.name" [name]="option.name" [formControlName]="option.name" type="text" class="form-control" [ngDataReady]="ngDataReady" cdIops> </ng-container> </ng-container> <button class="btn btn-light" type="button" data-toggle="button" [ngClass]="{'active': isDisabled(option.name)}" title="Remove the local configuration value. The parent configuration value will be inherited and used instead." i18n-title (click)="reset(option.name)"> <i [ngClass]="[icons.erase]" aria-hidden="true"></i> </button> </div> <span i18n class="invalid-feedback" *ngIf="form.showError('configuration.' + option.name, cfgFormGroup, 'min')">The minimum value is 0</span> </div> </div> </div> </div> </fieldset>
3,075
41.136986
132
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-configuration-list/rbd-configuration-list.component.html
<cd-table #poolConfTable [data]="data" [columns]="poolConfigurationColumns" identifier="name"> </cd-table> <ng-template #configurationSourceTpl let-value="value"> <div [ngSwitch]="value"> <span *ngSwitchCase="'global'" i18n>Global</span> <strong *ngSwitchCase="'image'" i18n>Image</strong> <strong *ngSwitchCase="'pool'" i18n>Pool</strong> </div> </ng-template> <ng-template #configurationValueTpl let-row="row" let-value="value"> <div [ngSwitch]="row.type"> <span *ngSwitchCase="typeField.bps">{{ value | dimlessBinaryPerSecond }}</span> <span *ngSwitchCase="typeField.milliseconds">{{ value | milliseconds }}</span> <span *ngSwitchCase="typeField.iops">{{ value | iops }}</span> <span *ngSwitchDefault>{{ value }}</span> </div> </ng-template>
887
28.6
83
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-details/rbd-details.component.html
<ng-template #usageNotAvailableTooltipTpl> <ng-container i18n>Only available for RBD images with <strong>fast-diff</strong> enabled</ng-container> </ng-template> <ng-container *ngIf="selection && selection.source !== 'REMOVING'"> <nav ngbNav #nav="ngbNav" class="nav-tabs" cdStatefulTab="rbd-details"> <ng-container ngbNavItem="details"> <a ngbNavLink i18n>Details</a> <ng-template ngbNavContent> <table class="table table-striped table-bordered"> <tbody> <tr> <td i18n class="bold w-25">Name</td> <td class="w-75">{{ selection.name }}</td> </tr> <tr> <td i18n class="bold">Pool</td> <td>{{ selection.pool_name }}</td> </tr> <tr> <td i18n class="bold">Data Pool</td> <td>{{ selection.data_pool | empty }}</td> </tr> <tr> <td i18n class="bold">Created</td> <td>{{ selection.timestamp | cdDate }}</td> </tr> <tr> <td i18n class="bold">Size</td> <td>{{ selection.size | dimlessBinary }}</td> </tr> <tr> <td i18n class="bold">Objects</td> <td>{{ selection.num_objs | dimless }}</td> </tr> <tr> <td i18n class="bold">Object size</td> <td>{{ selection.obj_size | dimlessBinary }}</td> </tr> <tr> <td i18n class="bold">Features</td> <td> <span *ngFor="let feature of selection.features_name"> <span class="badge badge-dark me-2">{{ feature }}</span> </span> </td> </tr> <tr> <td i18n class="bold">Provisioned</td> <td> <span *ngIf="selection.features_name?.indexOf('fast-diff') === -1"> <span class="form-text text-muted" [ngbTooltip]="usageNotAvailableTooltipTpl" placement="top" i18n>N/A</span> </span> <span *ngIf="selection.features_name?.indexOf('fast-diff') !== -1"> {{ selection.disk_usage | dimlessBinary }} </span> </td> </tr> <tr> <td i18n class="bold">Total provisioned</td> <td> <span *ngIf="selection.features_name?.indexOf('fast-diff') === -1"> <span class="form-text text-muted" [ngbTooltip]="usageNotAvailableTooltipTpl" placement="top" i18n>N/A</span> </span> <span *ngIf="selection.features_name?.indexOf('fast-diff') !== -1"> {{ selection.total_disk_usage | dimlessBinary }} </span> </td> </tr> <tr> <td i18n class="bold">Striping unit</td> <td>{{ selection.stripe_unit | dimlessBinary }}</td> </tr> <tr> <td i18n class="bold">Striping count</td> <td>{{ selection.stripe_count }}</td> </tr> <tr> <td i18n class="bold">Parent</td> <td> <span *ngIf="selection.parent">{{ selection.parent.pool_name }}<span *ngIf="selection.parent.pool_namespace">/{{ selection.parent.pool_namespace }}</span>/{{ selection.parent.image_name }}@{{ selection.parent.snap_name }}</span> <span *ngIf="!selection.parent">-</span> </td> </tr> <tr> <td i18n class="bold">Block name prefix</td> <td>{{ selection.block_name_prefix }}</td> </tr> <tr> <td i18n class="bold">Order</td> <td>{{ selection.order }}</td> </tr> <tr> <td i18n class="bold">Format Version</td> <td>{{ selection.image_format }}</td> </tr> </tbody> </table> </ng-template> </ng-container> <ng-container ngbNavItem="snapshots"> <a ngbNavLink i18n>Snapshots</a> <ng-template ngbNavContent> <cd-rbd-snapshot-list [snapshots]="selection.snapshots" [featuresName]="selection.features_name" [poolName]="selection.pool_name" [primary]="selection.primary" [namespace]="selection.namespace" [mirroring]="selection.mirror_mode" [rbdName]="selection.name"></cd-rbd-snapshot-list> </ng-template> </ng-container> <ng-container ngbNavItem="configuration"> <a ngbNavLink i18n>Configuration</a> <ng-template ngbNavContent> <cd-rbd-configuration-table [data]="selection['configuration']"></cd-rbd-configuration-table> </ng-template> </ng-container> <ng-container ngbNavItem="performance"> <a ngbNavLink i18n>Performance</a> <ng-template ngbNavContent> <cd-grafana i18n-title title="RBD details" [grafanaPath]="rbdDashboardUrl" [type]="'metrics'" uid="YhCYGcuZz" grafanaStyle="one"> </cd-grafana> </ng-template> </ng-container> </nav> <div [ngbNavOutlet]="nav"></div> </ng-container> <ng-container *ngIf="selection && selection.source === 'REMOVING'"> <cd-alert-panel type="warning" i18n>Information can not be displayed for RBD in status 'Removing'.</cd-alert-panel> </ng-container> <ng-template #poolConfigurationSourceTpl let-row="row" let-value="value"> <ng-container *ngIf="+value; else global"> <strong i18n i18n-ngbTooltip ngbTooltip="This setting overrides the global value">Image</strong> </ng-container> <ng-template #global> <span i18n i18n-ngbTooltip ngbTooltip="This is the global value. No value for this option has been set for this image.">Global</span> </ng-template> </ng-template>
6,689
35.162162
183
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-form/rbd-form.component.html
<div class="cd-col-form" *cdFormLoading="loading"> <form name="rbdForm" #formDir="ngForm" [formGroup]="rbdForm" novalidate> <div class="card"> <div i18n="form title" class="card-header">{{ action | titlecase }} {{ resource | upperFirst }}</div> <div class="card-body"> <!-- Parent --> <div class="form-group row" *ngIf="rbdForm.getValue('parent')"> <label i18n class="cd-col-form-label" for="name">{{ action | titlecase }} from</label> <div class="cd-col-form-input"> <input class="form-control" type="text" id="parent" name="parent" formControlName="parent"> <hr> </div> </div> <!-- Name --> <div class="form-group row"> <label class="cd-col-form-label required" for="name" i18n>Name</label> <div class="cd-col-form-input"> <input class="form-control" type="text" placeholder="Name..." id="name" name="name" formControlName="name" autofocus> <span class="invalid-feedback" *ngIf="rbdForm.showError('name', formDir, 'required')"> <ng-container i18n>This field is required.</ng-container> </span> <span class="invalid-feedback" *ngIf="rbdForm.showError('name', formDir, 'pattern')"> <ng-container i18n>'/' and '@' are not allowed.</ng-container> </span> </div> </div> <!-- Pool --> <div class="form-group row" (change)="onPoolChange($event.target.value)"> <label class="cd-col-form-label" [ngClass]="{'required': mode !== 'editing'}" for="pool" i18n>Pool</label> <div class="cd-col-form-input"> <input class="form-control" type="text" placeholder="Pool name..." id="pool" name="pool" formControlName="pool" *ngIf="mode === 'editing' || !poolPermission.read"> <select id="pool" name="pool" class="form-select" formControlName="pool" *ngIf="mode !== 'editing' && poolPermission.read" (change)="setPoolMirrorMode()"> <option *ngIf="pools === null" [ngValue]="null" i18n>Loading...</option> <option *ngIf="pools !== null && pools.length === 0" [ngValue]="null" i18n>-- No rbd pools available --</option> <option *ngIf="pools !== null && pools.length > 0" [ngValue]="null" i18n>-- Select a pool --</option> <option *ngFor="let pool of pools" [value]="pool.pool_name">{{ pool.pool_name }}</option> </select> <span *ngIf="rbdForm.showError('pool', formDir, 'required')" class="invalid-feedback" i18n>This field is required.</span> </div> </div> <!-- Namespace --> <div class="form-group row" *ngIf="mode !== 'editing' && rbdForm.getValue('pool') && namespaces === null"> <div class="cd-col-form-offset"> <i [ngClass]="[icons.spinner, icons.spin]"></i> </div> </div> <div class="form-group row" *ngIf="(mode === 'editing' && rbdForm.getValue('namespace')) || mode !== 'editing' && (namespaces && namespaces.length > 0 || !poolPermission.read)"> <label class="cd-col-form-label" for="pool"> Namespace </label> <div class="cd-col-form-input"> <input class="form-control" type="text" placeholder="Namespace..." id="namespace" name="namespace" formControlName="namespace" *ngIf="mode === 'editing' || !poolPermission.read"> <select id="namespace" name="namespace" class="form-select" formControlName="namespace" *ngIf="mode !== 'editing' && poolPermission.read"> <option *ngIf="pools === null" [ngValue]="null" i18n>Loading...</option> <option *ngIf="pools !== null && pools.length === 0" [ngValue]="null" i18n>-- No namespaces available --</option> <option *ngIf="pools !== null && pools.length > 0" [ngValue]="null" i18n>-- Select a namespace --</option> <option *ngFor="let namespace of namespaces" [value]="namespace">{{ namespace }}</option> </select> </div> </div> <!-- Use a dedicated pool --> <div class="form-group row"> <div class="cd-col-form-offset"> <div class="custom-control custom-checkbox"> <input type="checkbox" class="custom-control-input" id="useDataPool" name="useDataPool" formControlName="useDataPool" (change)="onUseDataPoolChange()"> <label class="custom-control-label" for="useDataPool" i18n>Use a dedicated data pool</label> <cd-helper *ngIf="allDataPools.length <= 1"> <span i18n>You need more than one pool with the rbd application label use to use a dedicated data pool.</span> </cd-helper> </div> </div> </div> <!-- Data Pool --> <div class="form-group row" *ngIf="rbdForm.getValue('useDataPool')"> <label class="cd-col-form-label" for="dataPool"> <span [ngClass]="{'required': mode !== 'editing'}" i18n>Data pool</span> <cd-helper i18n-html html="Dedicated pool that stores the object-data of the RBD."> </cd-helper> </label> <div class="cd-col-form-input"> <input class="form-control" type="text" placeholder="Data pool name..." id="dataPool" name="dataPool" formControlName="dataPool" *ngIf="mode === 'editing' || !poolPermission.read"> <select id="dataPool" name="dataPool" class="form-select" formControlName="dataPool" (change)="onDataPoolChange($event.target.value)" *ngIf="mode !== 'editing' && poolPermission.read"> <option *ngIf="dataPools === null" [ngValue]="null" i18n>Loading...</option> <option *ngIf="dataPools !== null && dataPools.length === 0" [ngValue]="null" i18n>-- No data pools available --</option> <option *ngIf="dataPools !== null && dataPools.length > 0" [ngValue]="null">-- Select a data pool -- </option> <option *ngFor="let dataPool of dataPools" [value]="dataPool.pool_name">{{ dataPool.pool_name }}</option> </select> <span class="invalid-feedback" *ngIf="rbdForm.showError('dataPool', formDir, 'required')" i18n>This field is required.</span> </div> </div> <!-- Size --> <div class="form-group row"> <label class="cd-col-form-label required" for="size" i18n>Size</label> <div class="cd-col-form-input"> <input id="size" name="size" class="form-control" type="text" formControlName="size" i18n-placeholder placeholder="e.g., 10GiB" defaultUnit="GiB" cdDimlessBinary> <span class="invalid-feedback" *ngIf="rbdForm.showError('size', formDir, 'required')" i18n>This field is required.</span> <span class="invalid-feedback" *ngIf="rbdForm.showError('size', formDir, 'invalidSizeObject')" i18n>You have to increase the size.</span> </div> </div> <!-- Features --> <div class="form-group row" formGroupName="features"> <label i18n class="cd-col-form-label" for="features">Features</label> <div class="cd-col-form-input"> <div class="custom-control custom-checkbox" *ngFor="let feature of featuresList"> <input type="checkbox" class="custom-control-input" id="{{ feature.key }}" name="{{ feature.key }}" formControlName="{{ feature.key }}"> <label class="custom-control-label" for="{{ feature.key }}">{{ feature.desc }}</label> <cd-helper *ngIf="feature.helperHtml" html="{{ feature.helperHtml }}"> </cd-helper> </div> </div> </div> <!-- Mirroring --> <div class="form-group row"> <div class="cd-col-form-offset"> <div class="custom-control custom-checkbox"> <input type="checkbox" class="custom-control-input" id="mirroring" name="mirroring" (change)="setMirrorMode()" formControlName="mirroring"> <label class="custom-control-label" for="mirroring">Mirroring</label> <cd-helper *ngIf="mirroring === false && this.currentPoolName"> <span i18n>You need to enable a <b>mirror mode</b> in the selected pool. Please <a [routerLink]="['/block/mirroring', {outlets: {modal: ['edit', currentPoolName]}}]">click here to select a mode and enable it in this pool.</a></span> </cd-helper> </div> <div *ngIf="mirroring"> <div class="custom-control custom-radio ms-2" *ngFor="let option of mirroringOptions"> <input type="radio" class="form-check-input" [id]="option" [value]="option" name="mirroringMode" (change)="setExclusiveLock()" formControlName="mirroringMode" [attr.disabled]="(poolMirrorMode === 'pool' && option === 'snapshot') ? true : null"> <label class="form-check-label" [for]="option">{{ option | titlecase }}</label> <cd-helper *ngIf="poolMirrorMode === 'pool' && option === 'snapshot'"> <span i18n>You need to enable <b>image mirror mode</b> in the selected pool. Please <a [routerLink]="['/block/mirroring', {outlets: {modal: ['edit', currentPoolName]}}]">click here to select a mode and enable it in this pool.</a></span> </cd-helper> </div> </div> </div> </div> <div class="form-group row" *ngIf="rbdForm.getValue('mirroringMode') === 'snapshot' && mirroring"> <label class="cd-col-form-label" i18n>Schedule Interval <cd-helper i18n-html html="Create Mirror-Snapshots automatically on a periodic basis. The interval can be specified in days, hours, or minutes using d, h, m suffix respectively. To create mirror snapshots, you must import or create and have available peers to mirror"> </cd-helper></label> <div class="cd-col-form-input"> <input id="schedule" name="schedule" class="form-control" type="text" formControlName="schedule" i18n-placeholder placeholder="e.g., 12h or 1d or 10m" [attr.disabled]="(peerConfigured === false) ? true : null"> </div> </div> <!-- Advanced --> <div class="row"> <div class="col-sm-12"> <a class="float-end margin-right-md" (click)="advancedEnabled = true; false" *ngIf="!advancedEnabled" href="" i18n>Advanced...</a> </div> </div> <div [hidden]="!advancedEnabled"> <legend class="cd-header" i18n>Advanced</legend> <div class="col-md-12"> <h4 class="cd-header" i18n>Striping</h4> <!-- Object Size --> <div class="form-group row"> <label i18n class="cd-col-form-label" for="size">Object size<cd-helper>Objects in the Ceph Storage Cluster have a maximum configurable size (e.g., 2MB, 4MB, etc.). The object size should be large enough to accommodate many stripe units, and should be a multiple of the stripe unit.</cd-helper></label> <div class="cd-col-form-input"> <select id="obj_size" name="obj_size" class="form-select" formControlName="obj_size"> <option *ngFor="let objectSize of objectSizes" [value]="objectSize">{{ objectSize }}</option> </select> </div> </div> <!-- stripingUnit --> <div class="form-group row"> <label class="cd-col-form-label" [ngClass]="{'required': rbdForm.getValue('stripingCount')}" for="stripingUnit" i18n>Stripe unit<cd-helper>Stripes have a configurable unit size (e.g., 64kb). The Ceph Client divides the data it will write to objects into equally sized stripe units, except for the last stripe unit. A stripe width, should be a fraction of the Object Size so that an object may contain many stripe units.</cd-helper></label> <div class="cd-col-form-input"> <select id="stripingUnit" name="stripingUnit" class="form-select" formControlName="stripingUnit"> <option i18n [ngValue]="null">-- Select stripe unit --</option> <option *ngFor="let objectSize of objectSizes" [value]="objectSize">{{ objectSize }}</option> </select> <span class="invalid-feedback" *ngIf="rbdForm.showError('stripingUnit', formDir, 'required')" i18n>This field is required because stripe count is defined!</span> <span class="invalid-feedback" *ngIf="rbdForm.showError('stripingUnit', formDir, 'invalidStripingUnit')" i18n>Stripe unit is greater than object size.</span> </div> </div> <!-- Stripe Count --> <div class="form-group row"> <label class="cd-col-form-label" [ngClass]="{'required': rbdForm.getValue('stripingUnit')}" for="stripingCount" i18n>Stripe count<cd-helper>The Ceph Client writes a sequence of stripe units over a series of objects determined by the stripe count. The series of objects is called an object set. After the Ceph Client writes to the last object in the object set, it returns to the first object in the object set.</cd-helper></label> <div class="cd-col-form-input"> <input id="stripingCount" name="stripingCount" formControlName="stripingCount" class="form-control" type="number"> <span class="invalid-feedback" *ngIf="rbdForm.showError('stripingCount', formDir, 'required')" i18n>This field is required because stripe unit is defined!</span> <span class="invalid-feedback" *ngIf="rbdForm.showError('stripingCount', formDir, 'min')" i18n>Stripe count must be greater than 0.</span> </div> </div> </div> <cd-rbd-configuration-form [form]="rbdForm" [initializeData]="initializeConfigData" (changes)="getDirtyConfigurationValues = $event"></cd-rbd-configuration-form> </div> </div> <div class="card-footer"> <cd-form-button-panel (submitActionEvent)="submit()" [form]="formDir" [submitText]="(action | titlecase) + ' ' + (resource | upperFirst)" wrappingClass="text-right"></cd-form-button-panel> </div> </div> </form> </div>
17,893
44.186869
348
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-list/rbd-list.component.html
<cd-rbd-tabs></cd-rbd-tabs> <cd-table #table [data]="images" columnMode="flex" [columns]="columns" identifier="unique_id" [searchableObjects]="true" [serverSide]="true" [count]="count" forceIdentifier="true" selectionType="single" [hasDetails]="true" [status]="tableStatus" [maxLimit]="25" [autoReload]="-1" (fetchData)="taskListService.fetch($event)" (setExpandedRow)="setExpandedRow($event)" (updateSelection)="updateSelection($event)"> <cd-table-actions class="table-actions" [permission]="permission" [selection]="selection" [tableActions]="tableActions"> </cd-table-actions> <cd-rbd-details cdTableDetail [selection]="expandedRow"> </cd-rbd-details> </cd-table> <ng-template #scheduleStatus> <div i18n [innerHtml]="'Only available for RBD images with <strong>fast-diff</strong> enabled'"></div> </ng-template> <ng-template #provisionedNotAvailableTooltipTpl let-row="row"> <span *ngIf="row.disk_usage === null && !row.features_name.includes('fast-diff'); else provisioned" [ngbTooltip]="usageNotAvailableTooltipTpl" placement="top" i18n>N/A</span> <ng-template #provisioned i18n>{{row.disk_usage | dimlessBinary}}</ng-template> </ng-template> <ng-template #totalProvisionedNotAvailableTooltipTpl let-row="row"> <span *ngIf="row.total_disk_usage === null && !row.features_name.includes('fast-diff'); else totalProvisioned" [ngbTooltip]="usageNotAvailableTooltipTpl" placement="top" i18n>N/A</span> <ng-template #totalProvisioned i18n>{{row.total_disk_usage | dimlessBinary}}</ng-template> </ng-template> <ng-template #parentTpl let-value="value"> <span *ngIf="value">{{ value.pool_name }}<span *ngIf="value.pool_namespace">/{{ value.pool_namespace }}</span>/{{ value.image_name }}@{{ value.snap_name }}</span> <span *ngIf="!value">-</span> </ng-template> <ng-template #mirroringTpl let-value="value" let-row="row"> <span *ngIf="value.length === 3; else probb" class="badge badge-info">{{ value[0] }}</span>&nbsp; <span *ngIf="value.length === 3" class="badge badge-info">{{ value[1] }}</span>&nbsp; <span *ngIf="row.primary === true" class="badge badge-info" i18n>primary</span> <span *ngIf="row.primary === false" class="badge badge-info" i18n>secondary</span> <ng-template #probb> <span class="badge badge-info">{{ value }}</span> </ng-template> </ng-template> <ng-template #ScheduleTpl let-value="value" let-row="row"> <span *ngIf="value.length === 3" class="badge badge-info">{{ value[2] | cdDate }}</span> </ng-template> <ng-template #flattenTpl let-value> You are about to flatten <strong>{{ value.child }}</strong>. <br> <br> All blocks will be copied from parent <strong>{{ value.parent }}</strong> to child <strong>{{ value.child }}</strong>. </ng-template> <ng-template #deleteTpl let-hasSnapshots="hasSnapshots" let-snapshots="snapshots"> <div class="alert alert-warning" *ngIf="hasSnapshots" role="alert"> <span i18n>Deleting this image will also delete all its snapshots.</span> <br> <ng-container *ngIf="snapshots.length > 0"> <span i18n>The following snapshots are currently protected and will be removed:</span> <ul> <li *ngFor="let snapshot of snapshots">{{ snapshot }}</li> </ul> </ng-container> </div> </ng-template> <ng-template #removingStatTpl let-column="column" let-value="value" let-row="row"> <i [ngClass]="[icons.spinner, icons.spin]" *ngIf="row.cdExecuting"></i> <span [ngClass]="column?.customTemplateConfig?.valueClass"> {{ value }} </span> <span *ngIf="row.cdExecuting" [ngClass]="column?.customTemplateConfig?.executingClass ? column.customTemplateConfig.executingClass : 'text-muted italic'"> ({{ row.cdExecuting }}) </span> <i *ngIf="row.source && row.source === 'REMOVING'" i18n-title title="RBD in status 'Removing'" class="{{ icons.warning }} warn"></i> </ng-template> <ng-template #forcePromoteConfirmation> <cd-alert-panel type="warning">{{ errorMessage }}</cd-alert-panel> <div class="m-4" i18n> <strong> Do you want to force the operation? </strong> </div> </ng-template>
4,692
31.365517
125
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-form/rbd-namespace-form-modal.component.html
<cd-modal [modalRef]="activeModal"> <ng-container class="modal-title" i18n>Create Namespace</ng-container> <ng-container class="modal-content"> <form name="namespaceForm" #formDir="ngForm" [formGroup]="namespaceForm" novalidate> <div class="modal-body"> <!-- Pool --> <div class="form-group row"> <label class="cd-col-form-label required" for="pool" i18n>Pool</label> <div class="cd-col-form-input"> <input class="form-control" type="text" placeholder="Pool name..." id="pool" name="pool" formControlName="pool" *ngIf="!poolPermission.read"> <select id="pool" name="pool" class="form-select" formControlName="pool" *ngIf="poolPermission.read"> <option *ngIf="pools === null" [ngValue]="null" i18n>Loading...</option> <option *ngIf="pools !== null && pools.length === 0" [ngValue]="null" i18n>-- No rbd pools available --</option> <option *ngIf="pools !== null && pools.length > 0" [ngValue]="null" i18n>-- Select a pool --</option> <option *ngFor="let pool of pools" [value]="pool.pool_name">{{ pool.pool_name }}</option> </select> <span *ngIf="namespaceForm.showError('pool', formDir, 'required')" class="invalid-feedback" i18n>This field is required.</span> </div> </div> <!-- Name --> <div class="form-group row"> <label class="cd-col-form-label required" for="namespace" i18n>Name</label> <div class="cd-col-form-input"> <input class="form-control" type="text" placeholder="Namespace name..." id="namespace" name="namespace" formControlName="namespace" autofocus> <span class="invalid-feedback" *ngIf="namespaceForm.showError('namespace', formDir, 'required')" i18n>This field is required.</span> <span class="invalid-feedback" *ngIf="namespaceForm.showError('namespace', formDir, 'namespaceExists')" i18n>Namespace already exists.</span> </div> </div> </div> <div class="modal-footer"> <cd-form-button-panel (submitActionEvent)="submit()" [form]="namespaceForm" [submitText]="actionLabels.CREATE"></cd-form-button-panel> </div> </form> </ng-container> </cd-modal>
3,012
36.6625
90
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-list/rbd-namespace-list.component.html
<cd-rbd-tabs></cd-rbd-tabs> <cd-table [data]="namespaces" (fetchData)="refresh()" columnMode="flex" [columns]="columns" identifier="id" forceIdentifier="true" selectionType="single" (updateSelection)="updateSelection($event)"> <div class="table-actions btn-toolbar"> <cd-table-actions class="btn-group" [permission]="permission" [selection]="selection" [tableActions]="tableActions"> </cd-table-actions> </div> </cd-table>
572
29.157895
54
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-performance/rbd-performance.component.html
<cd-rbd-tabs></cd-rbd-tabs> <cd-grafana i18n-title title="RBD overview" [grafanaPath]="'rbd-overview?'" [type]="'metrics'" uid="41FrpeUiz" grafanaStyle="two"> </cd-grafana>
234
22.5
43
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form-modal.component.html
<cd-modal [modalRef]="activeModal"> <ng-container i18n="form title" class="modal-title">{{ action | titlecase }} {{ resource | upperFirst }}</ng-container> <ng-container class="modal-content"> <form name="snapshotForm" #formDir="ngForm" [formGroup]="snapshotForm" novalidate> <div class="modal-body"> <!-- Name --> <div class="form-group row"> <label class="cd-col-form-label required" for="snapshotName" i18n>Name</label> <div class="cd-col-form-input"> <input class="form-control" type="text" placeholder="Snapshot name..." id="snapshotName" name="snapshotName" [attr.disabled]="((mirroring === 'snapshot') ? true : null) && (snapshotForm.getValue('mirrorImageSnapshot') === true) ? true: null" formControlName="snapshotName" autofocus> <span class="invalid-feedback" *ngIf="snapshotForm.showError('snapshotName', formDir, 'required')" i18n>This field is required.</span> <span *ngIf="((mirroring === 'snapshot') ? true : null) && (snapshotForm.getValue('mirrorImageSnapshot') === true) ? true: null" i18n>Snapshot mode is enabled on image <b>{{ imageName }}</b>: snapshot names are auto generated</span> </div> </div> <ng-container *ngIf="(mirroring === 'snapshot') ? true : null"> <div class="form-group row" *ngIf="peerConfigured$ | async as peerConfigured"> <div class="cd-col-form-offset"> <div class="custom-control custom-checkbox"> <input type="checkbox" class="custom-control-input" formControlName="mirrorImageSnapshot" name="mirrorImageSnapshot" id="mirrorImageSnapshot" [attr.disabled]="!(peerConfigured.length > 0) ? true : null" (change)="onMirrorCheckBoxChange()"> <label for="mirrorImageSnapshot" class="custom-control-label" i18n>Mirror Image Snapshot</label> <cd-helper i18n *ngIf="!peerConfigured.length > 0">The peer must be registered to do this action.</cd-helper> </div> </div> </div> </ng-container> </div> <div class="modal-footer"> <cd-form-button-panel (submitActionEvent)="submit()" [form]="snapshotForm" [submitText]="(action | titlecase) + ' ' + (resource | upperFirst)"></cd-form-button-panel> </div> </form> </ng-container> </cd-modal>
2,896
45.725806
151
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.html
<cd-table [data]="data" columnMode="flex" selectionType="single" (updateSelection)="updateSelection($event)" [columns]="columns"> <cd-table-actions class="table-actions" [permission]="permission" [selection]="selection" [tableActions]="tableActions"> </cd-table-actions> </cd-table> <ng-template #rollbackTpl let-value> <ng-container i18n>You are about to rollback</ng-container> <strong> {{ value.snapName }}</strong>. </ng-template>
557
30
61
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-tabs/rbd-tabs.component.html
<ul class="nav nav-tabs"> <li class="nav-item"> <a class="nav-link" routerLink="/block/rbd" routerLinkActive="active" ariaCurrentWhenActive="page" [routerLinkActiveOptions]="{exact: true}" i18n>Images</a> </li> <li class="nav-item"> <a class="nav-link" routerLink="/block/rbd/namespaces" routerLinkActive="active" ariaCurrentWhenActive="page" [routerLinkActiveOptions]="{exact: true}" i18n>Namespaces</a> </li> <li class="nav-item"> <a class="nav-link" routerLink="/block/rbd/trash" routerLinkActive="active" ariaCurrentWhenActive="page" [routerLinkActiveOptions]="{exact: true}" i18n>Trash</a> </li> <li class="nav-item" *ngIf="grafanaPermission.read"> <a class="nav-link" routerLink="/block/rbd/performance" routerLinkActive="active" ariaCurrentWhenActive="page" [routerLinkActiveOptions]="{exact: true}" i18n>Overall Performance</a> </li> </ul>
1,026
27.527778
48
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-list/rbd-trash-list.component.html
<cd-rbd-tabs></cd-rbd-tabs> <cd-table [data]="images" columnMode="flex" [columns]="columns" identifier="id" forceIdentifier="true" selectionType="single" [status]="tableStatus" [autoReload]="-1" (fetchData)="taskListService.fetch()" (updateSelection)="updateSelection($event)"> <div class="table-actions btn-toolbar"> <cd-table-actions class="btn-group" [permission]="permission" [selection]="selection" [tableActions]="tableActions"> </cd-table-actions> <button class="btn btn-light" type="button" (click)="purgeModal()" [disabled]="disablePurgeBtn" *ngIf="permission.delete"> <i [ngClass]="[icons.destroy]" aria-hidden="true"></i> <ng-container i18n>Purge Trash</ng-container> </button> </div> </cd-table> <ng-template #expiresTpl let-row="row" let-value="value"> <ng-container *ngIf="row.cdIsExpired" i18n>Expired at</ng-container> <ng-container *ngIf="!row.cdIsExpired" i18n>Protected until</ng-container> {{ value | cdDate }} </ng-template> <ng-template #deleteTpl let-expiresAt="expiresAt" let-isExpired="isExpired"> <p class="text-danger" *ngIf="!isExpired"> <strong> <ng-container i18n>This image is protected until {{ expiresAt | cdDate }}.</ng-container> </strong> </p> </ng-template>
1,558
28.415094
95
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-move-modal/rbd-trash-move-modal.component.html
<cd-modal [modalRef]="activeModal"> <ng-container i18n class="modal-title">Move an image to trash</ng-container> <ng-container class="modal-content"> <form name="moveForm" class="form" #formDir="ngForm" [formGroup]="moveForm" novalidate> <div class="modal-body"> <div class="alert alert-warning" *ngIf="hasSnapshots" role="alert"> <span i18n>This image contains snapshot(s), which will prevent it from being removed after moved to trash.</span> </div> <p i18n>To move <kbd>{{ imageSpecStr }}</kbd> to trash, click <kbd>Move</kbd>. Optionally, you can pick an expiration date.</p> <div class="form-group"> <label class="col-form-label" for="expiresAt" i18n>Protection expires at</label> <input type="text" placeholder="NOT PROTECTED" i18n-placeholder class="form-control" formControlName="expiresAt" [ngbPopover]="popContent" triggers="manual" #p="ngbPopover" (click)="p.open()" (keypress)="p.close()"> <span class="invalid-feedback" *ngIf="moveForm.showError('expiresAt', formDir, 'format')" i18n>Wrong date format. Please use "YYYY-MM-DD HH:mm:ss".</span> <span class="invalid-feedback" *ngIf="moveForm.showError('expiresAt', formDir, 'expired')" i18n>Protection has already expired. Please pick a future date or leave it empty.</span> </div> </div> <div class="modal-footer"> <cd-form-button-panel (submitActionEvent)="moveImage()" [form]="moveForm" [submitText]="actionLabels.MOVE"></cd-form-button-panel> </div> </form> </ng-container> </cd-modal> <ng-template #popContent> <cd-date-time-picker [control]="moveForm.get('expiresAt')"></cd-date-time-picker> </ng-template>
2,134
35.810345
104
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-purge-modal/rbd-trash-purge-modal.component.html
<cd-modal [modalRef]="activeModal"> <ng-container i18n class="modal-title">Purge Trash</ng-container> <ng-container class="modal-content"> <form name="purgeForm" class="form" #formDir="ngForm" [formGroup]="purgeForm" novalidate> <div class="modal-body"> <p i18n>To purge, select&nbsp; <kbd>All</kbd>&nbsp; or one pool and click&nbsp; <kbd>Purge</kbd>.&nbsp;</p> <div class="form-group"> <label class="col-form-label mx-auto" i18n>Pool:</label> <input class="form-control" type="text" placeholder="Pool name..." i18n-placeholder formControlName="poolName" *ngIf="!poolPermission.read"> <select id="poolName" name="poolName" class="form-control" formControlName="poolName" *ngIf="poolPermission.read"> <option value="" i18n>All</option> <option *ngFor="let pool of pools" [value]="pool">{{ pool }}</option> </select> </div> </div> <div class="modal-footer"> <cd-form-button-panel (submitActionEvent)="purge()" [form]="purgeForm" [submitText]="actionLabels.PURGE"></cd-form-button-panel> </div> </form> </ng-container> </cd-modal>
1,525
31.468085
87
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-restore-modal/rbd-trash-restore-modal.component.html
<cd-modal [modalRef]="activeModal"> <ng-container i18n class="modal-title">Restore Image</ng-container> <ng-container class="modal-content"> <form name="restoreForm" class="form" #formDir="ngForm" [formGroup]="restoreForm" novalidate> <div class="modal-body"> <p i18n>To restore&nbsp; <kbd>{{ imageSpec }}@{{ imageId }}</kbd>,&nbsp; type the image's new name and click&nbsp; <kbd>Restore</kbd>.</p> <div class="form-group"> <label class="col-form-label" for="name" i18n>New Name</label> <input type="text" class="form-control" name="name" id="name" autocomplete="off" formControlName="name" autofocus> <span class="invalid-feedback" *ngIf="restoreForm.showError('name', formDir, 'required')" i18n>This field is required.</span> </div> </div> <div class="modal-footer"> <cd-form-button-panel (submitActionEvent)="restore()" [form]="restoreForm" [submitText]="actionLabels.RESTORE"></cd-form-button-panel> </div> </form> </ng-container> </cd-modal>
1,364
31.5
89
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-chart/cephfs-chart.component.html
<div class="chart-container"> <canvas baseChart #chartCanvas [datasets]="chart.datasets" [options]="chart.options" [chartType]="chart.chartType"> </canvas> <div class="chartjs-tooltip" #chartTooltip> <table></table> </div> </div>
289
21.307692
40
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-clients/cephfs-clients.component.html
<cd-table [data]="clients.data" [columns]="columns" [status]="clients.status" [autoReload]="-1" (fetchData)="triggerApiUpdate.emit()" selectionType="single" (updateSelection)="updateSelection($event)"> <cd-table-actions class="table-actions" [permission]="permission" [selection]="selection" [tableActions]="tableActions"> </cd-table-actions> </cd-table>
479
33.285714
54
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-detail/cephfs-detail.component.html
<div class="row"> <div class="col-sm-6"> <legend i18n>Ranks</legend> <cd-table [data]="data.ranks" [columns]="columns.ranks" [toolHeader]="false"> </cd-table> <legend i18n>Standbys</legend> <cd-table-key-value [data]="standbys"> </cd-table-key-value> </div> <div class="col-sm-6"> <legend i18n>Pools</legend> <cd-table [data]="data.pools" [columns]="columns.pools" [toolHeader]="false"> </cd-table> </div> </div> <legend i18n>MDS performance counters</legend> <div class="row" *ngFor="let mdsCounter of objectValues(data.mdsCounters); trackBy: trackByFn"> <div class="col-md-12"> <cd-cephfs-chart [mdsCounter]="mdsCounter"></cd-cephfs-chart> </div> </div> <!-- templates --> <ng-template #poolUsageTpl let-row="row"> <cd-usage-bar [total]="row.size" [used]="row.used" [title]="row.pool_name"></cd-usage-bar> </ng-template> <ng-template #activityTmpl let-row="row" let-value="value"> {{ row.state === 'standby-replay' ? 'Evts' : 'Reqs' }}: {{ value | dimless }} /s </ng-template>
1,172
25.659091
83
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.html
<div class="row"> <div class="col-sm-4 pe-0"> <div class="card"> <div class="card-header"> <button type="button" [class.disabled]="loadingIndicator" class="btn btn-light pull-right" (click)="refreshAllDirectories()"> <i [ngClass]="[icons.large, icons.refresh]" [class.fa-spin]="loadingIndicator"></i> </button> </div> <div class="card-body"> <tree-root *ngIf="nodes" [nodes]="nodes" [options]="treeOptions"> <ng-template #loadingTemplate> <i [ngClass]="[icons.spinner, icons.spin]"></i> </ng-template> </tree-root> </div> </div> </div> <!-- Selection details --> <div class="col-sm-8 metadata" *ngIf="selectedDir"> <div class="card"> <div class="card-header"> {{ selectedDir.path }} </div> <div class="card-body"> <ng-container *ngIf="selectedDir.path !== '/'"> <legend i18n>Quotas</legend> <cd-table [data]="settings" [columns]="quota.columns" [limit]="0" [footer]="false" selectionType="single" (updateSelection)="quota.updateSelection($event)" [onlyActionHeader]="true" identifier="quotaKey" [forceIdentifier]="true" [toolHeader]="false"> <cd-table-actions class="only-table-actions" [permission]="permission" [selection]="quota.selection" [tableActions]="quota.tableActions"> </cd-table-actions> </cd-table> </ng-container> <legend i18n>Snapshots</legend> <cd-table [data]="selectedDir.snapshots" [columns]="snapshot.columns" identifier="name" forceIdentifier="true" selectionType="multiClick" (updateSelection)="snapshot.updateSelection($event)"> <cd-table-actions class="table-actions" [permission]="permission" [selection]="snapshot.selection" [tableActions]="snapshot.tableActions"> </cd-table-actions> </cd-table> </div> </div> </div> </div> <ng-template #origin let-row="row" let-value="value"> <span class="quota-origin" (click)="selectOrigin(value)">{{value}}</span> </ng-template>
2,652
33.907895
71
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-list/cephfs-list.component.html
<cd-table [data]="filesystems" columnMode="flex" [columns]="columns" (fetchData)="loadFilesystems($event)" identifier="id" forceIdentifier="true" selectionType="single" [hasDetails]="true" (setExpandedRow)="setExpandedRow($event)" (updateSelection)="updateSelection($event)"> <cd-cephfs-tabs cdTableDetail [selection]="expandedRow"> </cd-cephfs-tabs> </cd-table>
475
30.733333
54
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-tabs/cephfs-tabs.component.html
<ng-container *ngIf="selection"> <nav ngbNav #nav="ngbNav" (navChange)="softRefresh()" class="nav-tabs" cdStatefulTab="cephfs-tabs"> <ng-container ngbNavItem="details"> <a ngbNavLink i18n>Details</a> <ng-template ngbNavContent> <cd-cephfs-detail [data]="details"> </cd-cephfs-detail> </ng-template> </ng-container> <ng-container ngbNavItem="clients"> <a ngbNavLink> <ng-container i18n>Clients</ng-container> <span class="badge badge-pill badge-tab ms-1">{{ clients.data.length }}</span> </a> <ng-template ngbNavContent> <cd-cephfs-clients [id]="id" [clients]="clients" (triggerApiUpdate)="refresh()"> </cd-cephfs-clients> </ng-template> </ng-container> <ng-container ngbNavItem="directories"> <a ngbNavLink i18n>Directories</a> <ng-template ngbNavContent> <cd-cephfs-directories [id]="id"></cd-cephfs-directories> </ng-template> </ng-container> <ng-container ngbNavItem="performance-details"> <a ngbNavLink i18n>Performance Details</a> <ng-template ngbNavContent> <cd-grafana i18n-title title="CephFS MDS performance" [grafanaPath]="'mds-performance?var-mds_servers=mds.' + grafanaId" [type]="'metrics'" uid="tbO9LAiZz" grafanaStyle="one"> </cd-grafana> </ng-template> </ng-container> </nav> <div [ngbNavOutlet]="nav"></div> </ng-container>
1,639
31.156863
86
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration.component.html
<cd-table [data]="data" (fetchData)="getConfigurationList($event)" [columns]="columns" [extraFilterableColumns]="filters" selectionType="single" [hasDetails]="true" (setExpandedRow)="setExpandedRow($event)" (updateSelection)="updateSelection($event)"> <cd-table-actions class="table-actions" [permission]="permission" [selection]="selection" [tableActions]="tableActions"> </cd-table-actions> <cd-configuration-details cdTableDetail [selection]="expandedRow"> </cd-configuration-details> </cd-table> <ng-template #confValTpl let-value="value"> <span *ngIf="value"> <span *ngFor="let conf of value; last as isLast"> {{ conf.section }}: {{ conf.value }}{{ !isLast ? "," : "" }}<br /> </span> </span> </ng-template>
911
32.777778
72
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration-details/configuration-details.component.html
<ng-container *ngIf="selection"> <table class="table table-striped table-bordered"> <tbody> <tr> <td i18n class="bold w-25">Name</td> <td class="w-75">{{ selection.name }}</td> </tr> <tr> <td i18n class="bold">Description</td> <td>{{ selection.desc }}</td> </tr> <tr> <td i18n class="bold">Long description</td> <td>{{ selection.long_desc }}</td> </tr> <tr> <td i18n class="bold">Current values</td> <td> <span *ngFor="let conf of selection.value; last as isLast"> {{ conf.section }}: {{ conf.value }}{{ !isLast ? "," : "" }}<br /> </span> </td> </tr> <tr> <td i18n class="bold">Default</td> <td>{{ selection.default }}</td> </tr> <tr> <td i18n class="bold">Daemon default</td> <td>{{ selection.daemon_default }}</td> </tr> <tr> <td i18n class="bold">Type</td> <td>{{ selection.type }}</td> </tr> <tr> <td i18n class="bold">Min</td> <td>{{ selection.min }}</td> </tr> <tr> <td i18n class="bold">Max</td> <td>{{ selection.max }}</td> </tr> <tr> <td i18n class="bold">Flags</td> <td> <span *ngFor="let flag of selection.flags"> <span title="{{ flags[flag] }}"> <span class="badge badge-dark me-2">{{ flag | uppercase }}</span> </span> </span> </td> </tr> <tr> <td i18n class="bold">Services</td> <td> <span *ngFor="let service of selection.services"> <span class="badge badge-dark me-2">{{ service }}</span> </span> </td> </tr> <tr> <td i18n class="bold">Source</td> <td>{{ selection.source }}</td> </tr> <tr> <td i18n class="bold">Level</td> <td>{{ selection.level }}</td> </tr> <tr> <td i18n class="bold">Can be updated at runtime (editable)</td> <td>{{ selection.can_update_at_runtime | booleanText }}</td> </tr> <tr> <td i18n class="bold">Tags</td> <td>{{ selection.tags }}</td> </tr> <tr> <td i18n class="bold">Enum values</td> <td>{{ selection.enum_values }}</td> </tr> <tr> <td i18n class="bold">See also</td> <td>{{ selection.see_also }}</td> </tr> </tbody> </table> </ng-container>
2,727
24.735849
79
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration-form/configuration-form.component.html
<div class="cd-col-form" *cdFormLoading="loading"> <form name="configForm" #formDir="ngForm" [formGroup]="configForm" novalidate> <div class="card"> <div class="card-header"> <ng-container i18>Edit</ng-container> {{ configForm.getValue('name') }} </div> <div class="card-body"> <!-- Name --> <div class="form-group row"> <label i18n class="cd-col-form-label">Name</label> <div class="cd-col-form-input"> <input class="form-control" type="text" id="name" formControlName="name" readonly> </div> </div> <!-- Description --> <div class="form-group row" *ngIf="configForm.getValue('desc')"> <label i18n class="cd-col-form-label">Description</label> <div class="cd-col-form-input"> <textarea class="form-control resize-vertical" id="desc" formControlName="desc" readonly> </textarea> </div> </div> <!-- Long description --> <div class="form-group row" *ngIf="configForm.getValue('long_desc')"> <label i18n class="cd-col-form-label">Long description</label> <div class="cd-col-form-input"> <textarea class="form-control resize-vertical" id="long_desc" formControlName="long_desc" readonly> </textarea> </div> </div> <!-- Default --> <div class="form-group row" *ngIf="configForm.getValue('default') !== ''"> <label i18n class="cd-col-form-label">Default</label> <div class="cd-col-form-input"> <input class="form-control" type="text" id="default" formControlName="default" readonly> </div> </div> <!-- Daemon default --> <div class="form-group row" *ngIf="configForm.getValue('daemon_default') !== ''"> <label i18n class="cd-col-form-label">Daemon default</label> <div class="cd-col-form-input"> <input class="form-control" type="text" id="daemon_default" formControlName="daemon_default" readonly> </div> </div> <!-- Services --> <div class="form-group row" *ngIf="configForm.getValue('services').length > 0"> <label i18n class="cd-col-form-label">Services</label> <div class="cd-col-form-input"> <span *ngFor="let service of configForm.getValue('services')" class="form-component-badge"> <span class="badge badge-dark">{{ service }}</span> </span> </div> </div> <!-- Values --> <div formGroupName="values"> <h3 i18n class="cd-header">Values</h3> <ng-container *ngFor="let section of availSections"> <div class="form-group row" *ngIf="type === 'bool'"> <label class="cd-col-form-label" [for]="section">{{ section }} </label> <div class="cd-col-form-input"> <select id="pool" name="pool" class="form-select" [formControlName]="section"> <option [ngValue]="null" i18n>-- Default --</option> <option [ngValue]="true" i18n>true</option> <option [ngValue]="false" i18n>false</option> </select> </div> </div> <div class="form-group row" *ngIf="type !== 'bool'"> <label class="cd-col-form-label" [for]="section">{{ section }} </label> <div class="cd-col-form-input"> <input class="form-control" [type]="inputType" [id]="section" [placeholder]="humanReadableType" [formControlName]="section" [step]="getStep(type, this.configForm.getValue(section))"> <span class="invalid-feedback" *ngIf="configForm.showError(section, formDir, 'pattern')"> {{ patternHelpText }} </span> <span class="invalid-feedback" *ngIf="configForm.showError(section, formDir, 'invalidUuid')"> {{ patternHelpText }} </span> <span class="invalid-feedback" *ngIf="configForm.showError(section, formDir, 'max')" i18n>The entered value is too high! It must not be greater than {{ maxValue }}.</span> <span class="invalid-feedback" *ngIf="configForm.showError(section, formDir, 'min')" i18n>The entered value is too low! It must not be lower than {{ minValue }}.</span> </div> </div> </ng-container> </div> </div> <!-- Footer --> <div class="card-footer"> <cd-form-button-panel (submitActionEvent)="submit()" [form]="configForm" [submitText]="actionLabels.UPDATE" wrappingClass="text-right"></cd-form-button-panel> </div> </div> </form> </div>
5,920
35.776398
108
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster-review.component.html
<div class="row"> <div class="col-lg-3"> <fieldset> <legend class="cd-header" i18n>Cluster Resources</legend> <table class="table table-striped"> <tr> <td i18n class="bold">Hosts</td> <td>{{ hostsCount }}</td> </tr> <tr> <td> <dl> <dt> <p i18n>Storage Capacity</p> </dt> <dd> <p i18n>Number of devices</p> </dd> <dd> <p i18n>Raw capacity</p> </dd> </dl> </td> <td class="pt-5"><p>{{ totalDevices }}</p><p> {{ totalCapacity | dimlessBinary }}</p></td> </tr> <tr> <td i18n class="bold">CPUs</td> <td>{{ totalCPUs | empty }}</td> </tr> <tr> <td i18n class="bold">Memory</td> <td>{{ totalMemory | empty }}</td> </tr> </table> </fieldset> </div> <div class="col-lg-9"> <legend i18n class="cd-header">Host Details</legend> <cd-hosts [hiddenColumns]="['services', 'status']" [hideToolHeader]="true" [hasTableDetails]="false" [showGeneralActionsOnly]="true"> </cd-hosts> </div> </div>
1,314
23.811321
56
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster.component.html
<div class="container h-75" *ngIf="!startClusterCreation"> <div class="row h-100 justify-content-center align-items-center"> <div class="blank-page"> <!-- htmllint img-req-src="false" --> <img [src]="projectConstants.cephLogo" alt="Ceph" class="img-fluid mx-auto d-block"> <h3 class="text-center m-2" i18n>Welcome to {{ projectConstants.projectName }}</h3> <div class="m-4"> <h4 class="text-center" i18n>Please expand your cluster first</h4> <div class="text-center"> <button class="btn btn-accent m-2" name="expand-cluster" (click)="createCluster()" aria-label="Expand Cluster" i18n>Expand Cluster</button> <button class="btn btn-light" name="skip-cluster-creation" aria-label="Skip" (click)="skipClusterCreation()" i18n>Skip</button> </div> </div> </div> </div> </div> <div class="card" *ngIf="startClusterCreation"> <div class="card-header" i18n>Expand Cluster</div> <div class="container-fluid"> <cd-wizard [stepsTitle]="stepTitles"></cd-wizard> <div class="card-body vertical-line"> <ng-container [ngSwitch]="currentStep?.stepIndex"> <div *ngSwitchCase="'1'" class="ms-5"> <h4 class="title" i18n>Add Hosts</h4> <br> <cd-hosts [hiddenColumns]="['services']" [hideMaintenance]="true" [hasTableDetails]="false" [showGeneralActionsOnly]="true"></cd-hosts> </div> <div *ngSwitchCase="'2'" class="ms-5"> <h4 class="title" i18n>Create OSDs</h4> <div class="alignForm"> <cd-osd-form [hideTitle]="true" [hideSubmitBtn]="true" (emitDriveGroup)="setDriveGroup($event)" (emitDeploymentOption)="setDeploymentOptions($event)" (emitMode)="setDeploymentMode($event)"></cd-osd-form> </div> </div> <div *ngSwitchCase="'3'" class="ms-5"> <h4 class="title" i18n>Create Services</h4> <br> <cd-services [hasDetails]="false" [hiddenServices]="['mon', 'mgr', 'crash', 'agent']" [hiddenColumns]="['status.running', 'status.size', 'status.last_refresh']" [routedModal]="false"></cd-services> </div> <div *ngSwitchCase="'4'" class="ms-5"> <cd-create-cluster-review></cd-create-cluster-review> </div> </ng-container> </div> </div> <div class="card-footer"> <button class="btn btn-accent m-2 float-end" (click)="onNextStep()" aria-label="Next" i18n>{{ showSubmitButtonLabel() }}</button> <cd-back-button class="m-2 float-end" aria-label="Close" (backAction)="onPreviousStep()" [name]="showCancelButtonLabel()"></cd-back-button> <button class="btn btn-light m-2 me-4 float-end" id="skipStepBtn" (click)="onSkip()" aria-label="Skip this step" *ngIf="stepTitles[currentStep.stepIndex - 1] === 'Create OSDs'" i18n>Skip</button> </div> </div> <ng-template #skipConfirmTpl> <span i18n>You are about to skip the cluster expansion process. You’ll need to <strong>navigate through the menu to add hosts and services.</strong></span> <div class="mt-4" i18n>Are you sure you want to continue?</div> </ng-template>
3,799
35.538462
104
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/crushmap/crushmap.component.html
<div class="row"> <div class="col-sm-12 col-lg-12"> <div class="card"> <div class="card-header" i18n>CRUSH map viewer</div> <div class="card-body"> <div class="row"> <div class="col-sm-6 col-lg-6 tree-container"> <i *ngIf="loadingIndicator" [ngClass]="[icons.large, icons.spinner, icons.spin]"></i> <tree-root #tree [nodes]="nodes" [options]="treeOptions" (updateData)="onUpdateData()"> <ng-template #treeNodeTemplate let-node> <span *ngIf="node.data.status" class="badge" [ngClass]="{'badge-success': ['in', 'up'].includes(node.data.status), 'badge-danger': ['down', 'out', 'destroyed'].includes(node.data.status)}"> {{ node.data.status }} </span> <span>&nbsp;</span> <span class="node-name" [ngClass]="{'type-osd': node.data.type === 'osd'}" [innerHTML]="node.data.name"></span> </ng-template> </tree-root> </div> <div class="col-sm-6 col-lg-6 metadata" *ngIf="metadata"> <legend>{{ metadataTitle }}</legend> <div> <cd-table-key-value [data]="metadata"></cd-table-key-value> </div> </div> </div> </div> </div> </div> </div>
1,534
35.547619
166
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.html
<nav ngbNav #nav="ngbNav" class="nav-tabs"> <ng-container ngbNavItem> <a ngbNavLink i18n>Hosts List</a> <ng-template ngbNavContent> <cd-table #table [data]="hosts" [columns]="columns" columnMode="flex" (fetchData)="getHosts($event)" selectionType="single" [searchableObjects]="true" [hasDetails]="hasTableDetails" (setExpandedRow)="setExpandedRow($event)" (updateSelection)="updateSelection($event)" [toolHeader]="!hideToolHeader"> <div class="table-actions btn-toolbar"> <cd-table-actions [permission]="permissions.hosts" [selection]="selection" class="btn-group" id="host-actions" [tableActions]="tableActions"> </cd-table-actions> </div> <cd-host-details cdTableDetail [permissions]="permissions" [selection]="expandedRow"> </cd-host-details> </cd-table> </ng-template> </ng-container> <ng-container ngbNavItem *ngIf="permissions.grafana.read"> </ng-container> <ng-container ngbNavItem *ngIf="permissions.grafana.read"> <a ngbNavLink i18n>Overall Performance</a> <ng-template ngbNavContent> <cd-grafana i18n-title title="Host overview" [grafanaPath]="'host-overview?'" [type]="'metrics'" uid="y0KGL0iZz" grafanaStyle="two"> </cd-grafana> </ng-template> </ng-container> </nav> <div [ngbNavOutlet]="nav"></div> <ng-template #servicesTpl let-services="value"> <span *ngFor="let service of services"> <cd-label [key]="service['type']" [value]="service['count']" class="me-1"></cd-label> </span> </ng-template> <ng-template #hostNameTpl let-row="row"> <span [ngClass]="row"> {{ row.hostname }} </span><br> <span class="text-muted fst-italic" *ngIf="row.addr"> ({{ row.addr }}) </span> </ng-template> <ng-template #maintenanceConfirmTpl> <div *ngFor="let msg of errorMessage; let last=last"> <ul *ngIf="!last || errorMessage.length === '1'"> <li i18n>{{ msg }}</li> </ul> </div> <ng-container i18n *ngIf="showSubmit">Are you sure you want to continue?</ng-container> </ng-template> <ng-template #orchTmpl> <span i18n i18n-ngbTooltip ngbTooltip="Data will be available only if Orchestrator is available.">N/A</span> </ng-template> <ng-template #flashTmpl> <span i18n i18n-ngbTooltip ngbTooltip="SSD, NVMEs">Flash</span> </ng-template> <router-outlet name="modal"></router-outlet>
2,920
29.113402
89
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/host-details/host-details.component.html
<ng-container *ngIf="selection"> <nav ngbNav #nav="ngbNav" class="nav-tabs" cdStatefulTab="host-details"> <ng-container ngbNavItem="devices"> <a ngbNavLink i18n>Devices</a> <ng-template ngbNavContent> <cd-device-list [hostname]="selection['hostname']"></cd-device-list> </ng-template> </ng-container> <ng-container ngbNavItem="inventory" *ngIf="permissions.hosts.read"> <a ngbNavLink i18n>Physical Disks</a> <ng-template ngbNavContent> <cd-inventory [hostname]="selectedHostname"></cd-inventory> </ng-template> </ng-container> <ng-container ngbNavItem="daemons" *ngIf="permissions.hosts.read"> <a ngbNavLink i18n>Daemons</a> <ng-template ngbNavContent> <cd-service-daemon-list [hostname]="selectedHostname" flag="hostDetails" [hiddenColumns]="['hostname']"> </cd-service-daemon-list> </ng-template> </ng-container> <ng-container ngbNavItem="performance-details" *ngIf="permissions.grafana.read"> <a ngbNavLink i18n>Performance Details</a> <ng-template ngbNavContent> <cd-grafana i18n-title title="Host details" [grafanaPath]="'host-details?var-ceph_hosts=' + selectedHostname" [type]="'metrics'" uid="rtOg0AiWz" grafanaStyle="four"> </cd-grafana> </ng-template> </ng-container> <ng-container ngbNavItem="device-health"> <a ngbNavLink i18n>Device health</a> <ng-template ngbNavContent> <cd-smart-list *ngIf="selectedHostname; else noHostname" [hostname]="selectedHostname"></cd-smart-list> </ng-template> </ng-container> </nav> <div [ngbNavOutlet]="nav"></div> </ng-container> <ng-template #noHostname> <cd-alert-panel type="error" i18n>No hostname found.</cd-alert-panel> </ng-template>
2,108
32.47619
85
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/host-form/host-form.component.html
<cd-modal [pageURL]="pageURL" [modalRef]="activeModal"> <span class="modal-title" i18n>{{ action | titlecase }} {{ resource | upperFirst }}</span> <ng-container class="modal-content"> <div *cdFormLoading="loading"> <form name="hostForm" #formDir="ngForm" [formGroup]="hostForm" novalidate> <div class="modal-body"> <!-- Hostname --> <div class="form-group row"> <label class="cd-col-form-label required" for="hostname"> <ng-container i18n>Hostname</ng-container> <cd-helper> <p i18n>To add multiple hosts at once, you can enter:</p> <ul> <li i18n>a comma-separated list of hostnames <samp>(e.g.: example-01,example-02,example-03)</samp>,</li> <li i18n>a range expression <samp>(e.g.: example-[01-03].ceph)</samp>,</li> <li i18n>a comma separated range expression <samp>(e.g.: example-[01-05].lab.com,example2-[1-4].lab.com,example3-[001-006].lab.com)</samp></li> </ul> </cd-helper> </label> <div class="cd-col-form-input"> <input class="form-control" type="text" placeholder="mon-123" id="hostname" name="hostname" formControlName="hostname" autofocus (keyup)="checkHostNameValue()"> <span class="invalid-feedback" *ngIf="hostForm.showError('hostname', formDir, 'required')" i18n>This field is required.</span> <span class="invalid-feedback" *ngIf="hostForm.showError('hostname', formDir, 'uniqueName')" i18n>The chosen hostname is already in use.</span> </div> </div> <!-- Address --> <div class="form-group row" *ngIf="!hostPattern"> <label class="cd-col-form-label" for="addr" i18n>Network address</label> <div class="cd-col-form-input"> <input class="form-control" type="text" placeholder="192.168.0.1" id="addr" name="addr" formControlName="addr"> <span class="invalid-feedback" *ngIf="hostForm.showError('addr', formDir, 'pattern')" i18n>The value is not a valid IP address.</span> </div> </div> <!-- Labels --> <div class="form-group row"> <label i18n for="labels" class="cd-col-form-label">Labels</label> <div class="cd-col-form-input"> <cd-select-badges id="labels" [data]="hostForm.controls.labels.value" [options]="labelsOption" [customBadges]="true" [messages]="messages"> </cd-select-badges> </div> </div> <!-- Maintenance Mode --> <div class="form-group row" *ngIf="!hideMaintenance"> <div class="cd-col-form-offset"> <div class="custom-control custom-checkbox"> <input class="custom-control-input" id="maintenance" type="checkbox" formControlName="maintenance"> <label class="custom-control-label" for="maintenance" i18n>Maintenance Mode</label> </div> </div> </div> </div> <div class="modal-footer"> <cd-form-button-panel (submitActionEvent)="submit()" [form]="hostForm" [submitText]="(action | titlecase) + ' ' + (resource | upperFirst)" wrappingClass="text-right"></cd-form-button-panel> </div> </form> </div> </ng-container> </cd-modal>
4,270
38.183486
159
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/inventory/inventory.component.html
<cd-orchestrator-doc-panel *ngIf="showDocPanel"></cd-orchestrator-doc-panel> <ng-container *ngIf="orchStatus?.available"> <legend i18n>Physical Disks</legend> <div class="row"> <div class="col-md-12"> <cd-inventory-devices [devices]="devices" [hiddenColumns]="hostname === undefined ? [] : ['hostname']" selectionType="single" (fetchInventory)="refresh()" [orchStatus]="orchStatus"> </cd-inventory-devices> </div> </div> </ng-container>
575
37.4
88
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/inventory/inventory-devices/inventory-devices.component.html
<cd-table [data]="devices" [columns]="columns" identifier="uid" [forceIdentifier]="true" [selectionType]="selectionType" columnMode="flex" (fetchData)="getDevices()" [searchField]="false" (updateSelection)="updateSelection($event)" (columnFiltersChanged)="onColumnFiltersChanged($event)"> <cd-table-actions class="table-actions" [permission]="permission" [selection]="selection" [tableActions]="tableActions"> </cd-table-actions> </cd-table>
596
34.117647
66
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/logs/logs.component.html
<div *ngIf="contentData"> <ng-container *ngTemplateOutlet="logFiltersTpl"></ng-container> <nav ngbNav #nav="ngbNav" class="nav-tabs" cdStatefulTab="logs"> <ng-container ngbNavItem="cluster-logs"> <a ngbNavLink i18n>Cluster Logs</a> <ng-template ngbNavContent> <div class="card bg-light mb-3" *ngIf="clog"> <div class="btn-group" role="group" *ngIf="clog.length"> <cd-download-button [objectItem]="clog" [textItem]="clogText" fileName="cluster_log"> </cd-download-button> <cd-copy-2-clipboard-button [source]="clogText" [byId]="false"> </cd-copy-2-clipboard-button> </div> <div class="card-body"> <p *ngFor="let line of clog"> <span class="timestamp">{{ line.stamp | cdDate }}</span> <span class="priority {{ line.priority | logPriority }}">{{ line.priority }}</span> <span class="message" [innerHTML]="line.message | searchHighlight: search"></span> </p> <ng-container *ngIf="clog.length !== 0 else noEntriesTpl"></ng-container> </div> </div> </ng-template> </ng-container> <ng-container ngbNavItem="audit-logs"> <a ngbNavLink i18n>Audit Logs</a> <ng-template ngbNavContent> <div class="card bg-light mb-3" *ngIf="audit_log"> <div class="btn-group" role="group" *ngIf="audit_log.length"> <cd-download-button [objectItem]="audit_log" [textItem]="auditLogText" fileName="audit_log"> </cd-download-button> <cd-copy-2-clipboard-button [source]="auditLogText" [byId]="false"> </cd-copy-2-clipboard-button> </div> <div class="card-body"> <p *ngFor="let line of audit_log"> <span class="timestamp">{{ line.stamp | cdDate }}</span> <span class="priority {{ line.priority | logPriority }}">{{ line.priority }}</span> <span class="message" [innerHTML]="line.message | searchHighlight: search"></span> </p> <ng-container *ngIf="audit_log.length !== 0 else noEntriesTpl"></ng-container> </div> </div> </ng-template> </ng-container> <ng-container ngbNavItem="daemon-logs"> <a ngbNavLink i18n>Daemon Logs</a> <ng-template ngbNavContent> <ng-container *ngIf="lokiServiceStatus$ | async as lokiServiceStatus; else daemonLogsTpl"> <div *ngIf="promtailServiceStatus$ | async as promtailServiceStatus; else daemonLogsTpl"> <cd-grafana i18n-title title="Daemon logs" [grafanaPath]="'explore?'" [type]="'logs'" uid="CrAHE0iZz" grafanaStyle="three"> </cd-grafana> </div> </ng-container> </ng-template> </ng-container> </nav> <div [ngbNavOutlet]="nav"></div> </div> <ng-template #logFiltersTpl> <div class="row mb-3"> <div class="col-lg-10 d-flex"> <div class="col-sm-1 me-3"> <label for="logs-priority" class="fw-bold" i18n>Priority:</label> <select id="logs-priority" class="form-select" [(ngModel)]="priority" (ngModelChange)="filterLogs()"> <option *ngFor="let prio of priorities" [value]="prio.value">{{ prio.name }}</option> </select> </div> <div class="col-md-3 me-3"> <label for="logs-keyword" class="fw-bold" i18n>Keyword:</label> <div class="input-group"> <span class="input-group-text"> <i [ngClass]="[icons.search]"></i> </span> <input class="form-control" id="logs-keyword" type="text" [(ngModel)]="search" (keyup)="filterLogs()"> <button type="button" class="btn btn-light" (click)="clearSearchKey()" title="Clear"> <i class="icon-prepend {{ icons.destroy }}"></i> </button> </div> </div> <div class="col-md-3 me-3"> <label for="logs-date" class="fw-bold" i18n>Date:</label> <div class="input-group"> <input class="form-control" id="logs-date" placeholder="YYYY-MM-DD" ngbDatepicker [maxDate]="maxDate" #d="ngbDatepicker" (click)="d.open()" [(ngModel)]="selectedDate" (ngModelChange)="filterLogs()"> <button type="button" class="btn btn-light" (click)="clearDate()" title="Clear"> <i class="icon-prepend {{ icons.destroy }}"></i> </button> </div> </div> <div class="col-md-5"> <label i18n class="fw-bold">Time range:</label> <div class="d-flex"> <ngb-timepicker [spinners]="false" [(ngModel)]="startTime" (ngModelChange)="filterLogs()"></ngb-timepicker> <span class="mt-2">&nbsp;&mdash;&nbsp;</span> <ngb-timepicker [spinners]="false" [(ngModel)]="endTime" (ngModelChange)="filterLogs()"></ngb-timepicker> </div></div> </div></div> </ng-template> <ng-template #noEntriesTpl> <span i18n>No log entries found. Please try to select different filter options.</span> <span>&nbsp;</span> <a href="#" (click)="resetFilter()" i18n>Reset filter.</a> </ng-template> <ng-template #daemonLogsTpl> <cd-alert-panel type="info" title="Loki/Promtail service not running" i18n-title> <ng-container i18n>Please start the loki and promtail service to see these logs.</ng-container> </cd-alert-panel> </ng-template>
6,308
32.737968
99
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/mgr-modules/mgr-module-details/mgr-module-details.component.html
<ng-container *ngIf="selection"> <cd-table-key-value [data]="module_config"> </cd-table-key-value> </ng-container>
119
23
45
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/mgr-modules/mgr-module-form/mgr-module-form.component.html
<div class="cd-col-form" *cdFormLoading="loading"> <form name="mgrModuleForm" #frm="ngForm" [formGroup]="mgrModuleForm" novalidate> <div class="card"> <div class="card-header" i18n>Edit Manager module</div> <div class="card-body"> <div class="form-group row" *ngFor="let moduleOption of moduleOptions | keyvalue"> <!-- Field label --> <label class="cd-col-form-label" for="{{ moduleOption.value.name }}"> {{ moduleOption.value.name }} <cd-helper *ngIf="moduleOption.value.long_desc || moduleOption.value.desc"> {{ moduleOption.value.long_desc || moduleOption.value.desc | upperFirst }} </cd-helper> </label> <!-- Field control --> <!-- bool --> <div class="cd-col-form-input" *ngIf="moduleOption.value.type === 'bool'"> <div class="custom-control custom-checkbox"> <input id="{{ moduleOption.value.name }}" type="checkbox" class="custom-control-input" formControlName="{{ moduleOption.value.name }}"> <label class="custom-control-label" for="{{ moduleOption.value.name }}"></label> </div> </div> <!-- addr|str|uuid --> <div class="cd-col-form-input" *ngIf="['addr', 'str', 'uuid'].includes(moduleOption.value.type)"> <input id="{{ moduleOption.value.name }}" class="form-control" type="text" formControlName="{{ moduleOption.value.name }}" *ngIf="moduleOption.value.enum_allowed.length === 0"> <select id="{{ moduleOption.value.name }}" class="form-select" formControlName="{{ moduleOption.value.name }}" *ngIf="moduleOption.value.enum_allowed.length > 0"> <option *ngFor="let value of moduleOption.value.enum_allowed" [ngValue]="value"> {{ value }} </option> </select> <span class="invalid-feedback" *ngIf="mgrModuleForm.showError(moduleOption.value.name, frm, 'invalidUuid')" i18n>The entered value is not a valid UUID, e.g.: 67dcac9f-2c03-4d6c-b7bd-1210b3a259a8</span> <span class="invalid-feedback" *ngIf="mgrModuleForm.showError(moduleOption.value.name, frm, 'pattern')" i18n>The entered value needs to be a valid IP address.</span> </div> <!-- uint|int|size|secs --> <div class="cd-col-form-input" *ngIf="['uint', 'int', 'size', 'secs'].includes(moduleOption.value.type)"> <input id="{{ moduleOption.value.name }}" class="form-control" type="number" formControlName="{{ moduleOption.value.name }}" min="{{ moduleOption.value.min }}" max="{{ moduleOption.value.max }}"> <span class="invalid-feedback" *ngIf="mgrModuleForm.showError(moduleOption.value.name, frm, 'required')" i18n>This field is required.</span> <span class="invalid-feedback" *ngIf="mgrModuleForm.showError(moduleOption.value.name, frm, 'max')" i18n>The entered value is too high! It must be lower or equal to {{ moduleOption.value.max }}.</span> <span class="invalid-feedback" *ngIf="mgrModuleForm.showError(moduleOption.value.name, frm, 'min')" i18n>The entered value is too low! It must be greater or equal to {{ moduleOption.value.min }}.</span> <span class="invalid-feedback" *ngIf="mgrModuleForm.showError(moduleOption.value.name, frm, 'pattern')" i18n>The entered value needs to be a number.</span> </div> <!-- float --> <div class="cd-col-form-input" *ngIf="moduleOption.value.type === 'float'"> <input id="{{ moduleOption.value.name }}" class="form-control" type="number" formControlName="{{ moduleOption.value.name }}"> <span class="invalid-feedback" *ngIf="mgrModuleForm.showError(moduleOption.value.name, frm, 'required')" i18n>This field is required.</span> <span class="invalid-feedback" *ngIf="mgrModuleForm.showError(moduleOption.value.name, frm, 'pattern')" i18n>The entered value needs to be a number or decimal.</span> </div> </div> </div> <div class="card-footer"> <cd-form-button-panel (submitActionEvent)="onSubmit()" [form]="mgrModuleForm" [submitText]="actionLabels.UPDATE" wrappingClass="text-right"></cd-form-button-panel> </div> </div> </form> </div>
5,185
45.720721
120
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/mgr-modules/mgr-module-list/mgr-module-list.component.html
<cd-table #table [autoReload]="false" [data]="modules" [columns]="columns" columnMode="flex" selectionType="single" [hasDetails]="true" (setExpandedRow)="setExpandedRow($event)" (updateSelection)="updateSelection($event)" identifier="module" (fetchData)="getModuleList($event)"> <cd-table-actions class="table-actions" [permission]="permission" [selection]="selection" [tableActions]="tableActions"> </cd-table-actions> <cd-mgr-module-details cdTableDetail [selection]="expandedRow"> </cd-mgr-module-details> </cd-table>
714
33.047619
53
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/monitor/monitor.component.html
<div class="row"> <div class="col-lg-4"> <fieldset> <legend class="cd-header" i18n>Status</legend> <table class="table table-striped" *ngIf="mon_status"> <tbody> <tr> <td i18n class="bold">Cluster ID</td> <td>{{ mon_status.monmap.fsid }}</td> </tr> <tr> <td i18n class="bold">monmap modified</td> <td>{{ mon_status.monmap.modified | relativeDate }}</td> </tr> <tr> <td i18n class="bold">monmap epoch</td> <td>{{ mon_status.monmap.epoch }}</td> </tr> <tr> <td i18n class="bold">quorum con</td> <td>{{ mon_status.features.quorum_con }}</td> </tr> <tr> <td i18n class="bold">quorum mon</td> <td>{{ mon_status.features.quorum_mon }}</td> </tr> <tr> <td i18n class="bold">required con</td> <td>{{ mon_status.features.required_con }}</td> </tr> <tr> <td i18n class="bold">required mon</td> <td>{{ mon_status.features.required_mon }}</td> </tr> </tbody> </table> </fieldset> </div> <div class="col-lg-8"> <legend i18n class="in-quorum cd-header">In Quorum</legend> <div> <cd-table [data]="inQuorum.data" [columns]="inQuorum.columns"> </cd-table></div> <legend i18n class="in-quorum cd-header">Not In Quorum</legend> <div> <cd-table [data]="notInQuorum.data" (fetchData)="refresh()" [columns]="notInQuorum.columns"> </cd-table></div> </div> </div>
1,837
26.848485
68
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-creation-preview-modal/osd-creation-preview-modal.component.html
<cd-modal [modalRef]="activeModal"> <ng-container class="modal-title" i18n>OSD creation preview</ng-container> <ng-container class="modal-content"> <form #frm="ngForm" [formGroup]="formGroup" novalidate> <div class="modal-body"> <h4 i18n>DriveGroups</h4> <pre>{{ driveGroups | json}}</pre> </div> <div class="modal-footer"> <cd-form-button-panel (submitActionEvent)="onSubmit()" [form]="formGroup" [submitText]="action | titlecase"></cd-form-button-panel> </div> </form> </ng-container> </cd-modal>
658
30.380952
87
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-details/osd-details.component.html
<ng-container *ngIf="selection"> <nav ngbNav #nav="ngbNav" id="tabset-osd-details" class="nav-tabs" cdStatefulTab="osd-details"> <ng-container ngbNavItem="devices"> <a ngbNavLink i18n>Devices</a> <ng-template ngbNavContent> <cd-device-list [osdId]="osd?.id" [hostname]="selection?.host.name" [osdList]="true"></cd-device-list> </ng-template> </ng-container> <ng-container ngbNavItem="attributes"> <a ngbNavLink i18n>Attributes (OSD map)</a> <ng-template ngbNavContent> <cd-table-key-value [data]="osd?.details?.osd_map"> </cd-table-key-value> </ng-template> </ng-container> <ng-container ngbNavItem="metadata"> <a ngbNavLink i18n>Metadata</a> <ng-template ngbNavContent> <cd-table-key-value *ngIf="osd?.details?.osd_metadata; else noMetaData" (fetchData)="refresh()" [data]="osd?.details?.osd_metadata"> </cd-table-key-value> <ng-template #noMetaData> <cd-alert-panel type="warning" i18n>Metadata not available</cd-alert-panel> </ng-template> </ng-template> </ng-container> <ng-container ngbNavItem="device-health"> <a ngbNavLink i18n>Device health</a> <ng-template ngbNavContent> <cd-smart-list [osdId]="osd?.id"></cd-smart-list> </ng-template> </ng-container> <ng-container ngbNavItem="performance-counter"> <a ngbNavLink i18n>Performance counter</a> <ng-template ngbNavContent> <cd-table-performance-counter *ngIf="osd?.details" serviceType="osd" [serviceId]="osd?.id"> </cd-table-performance-counter> </ng-template> </ng-container> <ng-container ngbNavItem="performance-details" *ngIf="grafanaPermission.read"> <a ngbNavLink i18n>Performance Details</a> <ng-template ngbNavContent> <cd-grafana i18n-title title="OSD details" [grafanaPath]="'osd-device-details?var-osd=osd.' + osd['id']" [type]="'metrics'" uid="CrAHE0iZz" grafanaStyle="three"> </cd-grafana> </ng-template> </ng-container> </nav> <div [ngbNavOutlet]="nav"></div> </ng-container>
2,524
33.589041
81
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-devices-selection-groups/osd-devices-selection-groups.component.html
<!-- button --> <div class="form-group row"> <label class="cd-col-form-label" for="createDeleteButton"> <ng-container i18n>{{ name }} devices</ng-container> <cd-helper> <span i18n *ngIf="type === 'data'">The primary storage devices. These devices contain all OSD data.</span> <span i18n *ngIf="type === 'wal'">Write-Ahead-Log devices. These devices are used for BlueStore’s internal journal. It is only useful to use a WAL device if the device is faster than the primary device (e.g. NVME devices or SSDs). If there is only a small amount of fast storage available (e.g., less than a gigabyte), we recommend using it as a WAL device.</span> <span i18n *ngIf="type === 'db'">DB devices can be used for storing BlueStore’s internal metadata. It is only helpful to provision a DB device if it is faster than the primary device (e.g. NVME devices or SSD).</span> </cd-helper> </label> <div class="cd-col-form-input"> <ng-container *ngIf="devices.length === 0; else blockClearDevices"> <button type="button" class="btn btn-light" (click)="showSelectionModal()" data-toggle="tooltip" [title]="addButtonTooltip" [disabled]="availDevices.length === 0 || !canSelect || expansionCanSelect"> <i [ngClass]="[icons.add]"></i> <ng-container i18n>Add</ng-container> </button> </ng-container> <ng-template #blockClearDevices> <div class="pb-2 my-2 border-bottom"> <span *ngFor="let filter of appliedFilters"> <span class="badge badge-dark me-2">{{ filter.name }}: {{ filter.value.formatted }}</span> </span> <a class="tc_clearSelections" href="" (click)="clearDevices(); false"> <i [ngClass]="[icons.clearFilters]"></i> <ng-container i18n>Clear</ng-container> </a> </div> <div> <cd-inventory-devices [devices]="devices" [hiddenColumns]="['available', 'osd_ids']" [filterColumns]="[]"> </cd-inventory-devices> </div> <div *ngIf="type === 'data'" class="float-end"> <span i18n>Raw capacity: {{ capacity | dimlessBinary }}</span> </div> </ng-template> </div> </div>
2,360
44.403846
365
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-devices-selection-modal/osd-devices-selection-modal.component.html
<cd-modal [modalRef]="activeModal"> <ng-container class="modal-title" i18n>{{ deviceType }} devices</ng-container> <ng-container class="modal-content"> <form #frm="ngForm" [formGroup]="formGroup" novalidate> <div class="modal-body"> <cd-alert-panel *ngIf="!canSubmit" type="warning" size="slim" [showTitle]="false"> <ng-container i18n>At least one of these filters must be applied in order to proceed:</ng-container> <span *ngFor="let filter of requiredFilters" class="badge badge-dark ms-2"> {{ filter }} </span> </cd-alert-panel> <cd-inventory-devices #inventoryDevices [devices]="devices" [filterColumns]="filterColumns" [hostname]="hostname" [diskType]="diskType" [hiddenColumns]="['available', 'osd_ids']" (filterChange)="onFilterChange($event)"> </cd-inventory-devices> <div *ngIf="canSubmit"> <p class="text-center"> <span i18n>Number of devices: {{ filteredDevices.length }}. Raw capacity: {{ capacity | dimlessBinary }}.</span> </p> </div> </div> <div class="modal-footer"> <cd-form-button-panel (submitActionEvent)="onSubmit()" [form]="formGroup" [disabled]="!canSubmit || filteredDevices.length === 0" [submitText]="action | titlecase"></cd-form-button-panel> </div> </form> </ng-container> </cd-modal>
1,791
39.727273
110
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-flags-indiv-modal/osd-flags-indiv-modal.component.html
<cd-modal [modalRef]="activeModal"> <ng-container class="modal-title" i18n>Individual OSD Flags</ng-container> <ng-container class="modal-content"> <form name="osdFlagsForm" #formDir="ngForm" [formGroup]="osdFlagsForm" novalidate> <div class="modal-body osd-modal"> <div class="custom-control custom-checkbox" *ngFor="let flag of flags; let last = last"> <input class="custom-control-input" type="checkbox" [checked]="flag.value" [indeterminate]="flag.indeterminate" (change)="changeValue(flag)" [name]="flag.code" [id]="flag.code"> <label class="custom-control-label" [for]="flag.code" ng-class="['tc_' + key]"> <strong>{{ flag.name }}</strong> <span class="badge badge-hdd ms-2" [ngbTooltip]="clusterWideTooltip" *ngIf="flag.clusterWide" i18n>Cluster-wide</span> <br> <span class="form-text text-muted">{{ flag.description }}</span> </label> <hr class="m-1" *ngIf="!last"> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-light" (click)="resetSelection()" i18n>Restore previous selection</button> <cd-form-button-panel (submitActionEvent)="submitAction()" [form]="osdFlagsForm" [showSubmit]="permissions.osd.update" [submitText]="actionLabels.UPDATE"></cd-form-button-panel> </div> </form> </ng-container> </cd-modal>
1,810
35.959184
88
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-flags-modal/osd-flags-modal.component.html
<cd-modal [modalRef]="activeModal"> <ng-container class="modal-title" i18n>Cluster-wide OSD Flags</ng-container> <ng-container class="modal-content"> <form name="osdFlagsForm" #formDir="ngForm" [formGroup]="osdFlagsForm" novalidate cdFormScope="osd"> <div class="modal-body osd-modal"> <div class="custom-control custom-checkbox" *ngFor="let flag of flags; let last = last"> <input class="custom-control-input" type="checkbox" [checked]="flag.value" (change)="flag.value = !flag.value" [name]="flag.code" [id]="flag.code" [disabled]="flag.disabled"> <label class="custom-control-label" [for]="flag.code" ng-class="['tc_' + key]"> <strong>{{ flag.name }}</strong> <br> <span class="form-text text-muted">{{ flag.description }}</span> </label> <hr class="m-1" *ngIf="!last"> </div> </div> <div class="modal-footer"> <cd-form-button-panel (submitActionEvent)="submitAction()" [form]="osdFlagsForm" [showSubmit]="permissions.osd.update" [submitText]="actionLabels.UPDATE"></cd-form-button-panel> </div> </form> </ng-container> </cd-modal>
1,484
34.357143
88
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-form/osd-form.component.html
<cd-orchestrator-doc-panel *ngIf="!hasOrchestrator"></cd-orchestrator-doc-panel> <div class="card" *cdFormLoading="loading"> <div i18n="form title|Example: Create Pool@@formTitle" class="card-header" *ngIf="!hideTitle">{{ action | titlecase }} {{ resource | upperFirst }}</div> <div class="card-body ms-2"> <form name="form" #formDir="ngForm" [formGroup]="form" novalidate> <cd-alert-panel *ngIf="!deploymentOptions?.recommended_option" type="warning" class="mx-3" i18n> No devices(HDD, SSD or NVME) were found. Creation of OSDs will remain disabled until devices are added. </cd-alert-panel> <div class="accordion"> <div class="accordion-item"> <h2 class="accordion-header"> <button class="accordion-button" type="button" data-toggle="collapse" aria-label="toggle deployment options" [ngClass]="{collapsed: !simpleDeployment}" (click)="emitDeploymentMode()" i18n>Deployment Options</button> </h2> </div> <div class="accordion-collapse collapse" [ngClass]="{show: simpleDeployment}"> <div class="accordion-body"> <div class="pt-3 pb-3" *ngFor="let optionName of optionNames"> <div class="custom-control form-check custom-control-inline"> <input class="form-check-input" type="radio" name="deploymentOption" [id]="optionName" [value]="optionName" formControlName="deploymentOption" (change)="emitDeploymentSelection()" [attr.disabled]="!deploymentOptions?.options[optionName].available ? true : null"> <label class="form-check-label" [id]="'label_' + optionName" [for]="optionName" i18n>{{ deploymentOptions?.options[optionName].title }} {{ deploymentOptions?.recommended_option === optionName ? "(Recommended)" : "" }} <cd-helper> <span>{{ deploymentOptions?.options[optionName].desc }}</span> </cd-helper> </label> </div> </div> <!-- @TODO: Visualize the storage used on a chart --> <!-- <div class="pie-chart"> <h4 class="text-center">Selected Capacity</h4> <h5 class="margin text-center">10 Hosts | 30 NVMes </h5> <div class="char-i-contain"> <cd-health-pie [data]="data" [config]="rawCapacityChartConfig" [isBytesData]="true" (prepareFn)="prepareRawUsage($event[0], $event[1])"> </cd-health-pie> </div> </div> --> </div> </div> <div class="accordion-item"> <h2 class="accordion-header"> <button class="accordion-button" type="button" aria-label="toggle advanced mode" [ngClass]="{collapsed: simpleDeployment}" (click)="emitDeploymentMode()" i18n>Advanced Mode</button> </h2> </div> <div class="accordion-collapse collapse" [ngClass]="{show: !simpleDeployment}"> <div class="accordion-body"> <div class="card-body"> <fieldset> <cd-osd-devices-selection-groups #dataDeviceSelectionGroups name="Primary" type="data" [availDevices]="availDevices" [canSelect]="availDevices.length !== 0" (selected)="onDevicesSelected($event)" (cleared)="onDevicesCleared($event)"> </cd-osd-devices-selection-groups> </fieldset> <!-- Shared devices --> <fieldset> <legend i18n>Shared devices</legend> <!-- WAL devices button and table --> <cd-osd-devices-selection-groups #walDeviceSelectionGroups name="WAL" type="wal" [availDevices]="availDevices" [canSelect]="dataDeviceSelectionGroups.devices.length !== 0" (selected)="onDevicesSelected($event)" (cleared)="onDevicesCleared($event)" [hostname]="hostname"> </cd-osd-devices-selection-groups> <!-- WAL slots --> <div class="form-group row" *ngIf="walDeviceSelectionGroups.devices.length !== 0"> <label class="cd-col-form-label" for="walSlots"> <ng-container i18n>WAL slots</ng-container> <cd-helper> <span i18n>How many OSDs per WAL device.</span> <br> <span i18n>Specify 0 to let Orchestrator backend decide it.</span> </cd-helper> </label> <div class="cd-col-form-input"> <input class="form-control" id="walSlots" name="walSlots" type="number" min="0" formControlName="walSlots"> <span class="invalid-feedback" *ngIf="form.showError('walSlots', formDir, 'min')" i18n>Value should be greater than or equal to 0</span> </div> </div> <!-- DB devices button and table --> <cd-osd-devices-selection-groups #dbDeviceSelectionGroups name="DB" type="db" [availDevices]="availDevices" [canSelect]="dataDeviceSelectionGroups.devices.length !== 0" (selected)="onDevicesSelected($event)" (cleared)="onDevicesCleared($event)" [hostname]="hostname"> </cd-osd-devices-selection-groups> <!-- DB slots --> <div class="form-group row" *ngIf="dbDeviceSelectionGroups.devices.length !== 0"> <label class="cd-col-form-label" for="dbSlots"> <ng-container i18n>DB slots</ng-container> <cd-helper> <span i18n>How many OSDs per DB device.</span> <br> <span i18n>Specify 0 to let Orchestrator backend decide it.</span> </cd-helper> </label> <div class="cd-col-form-input"> <input class="form-control" id="dbSlots" name="dbSlots" type="number" min="0" formControlName="dbSlots"> <span class="invalid-feedback" *ngIf="form.showError('dbSlots', formDir, 'min')" i18n>Value should be greater than or equal to 0</span> </div> </div> </fieldset> </div> </div> </div> <!-- Features --> <div class="accordion-item"> <h2 class="accordion-header"> <button class="accordion-button" type="button" data-toggle="collapse" aria-label="features" aria-expanded="true" i18n>Features</button> </h2> </div> <div class="accordion-collapse collapse show"> <div class="accordion-body"> <div class="pt-3 pb-3" formGroupName="features"> <div class="custom-control custom-checkbox" *ngFor="let feature of featureList"> <input type="checkbox" class="custom-control-input" id="{{ feature.key }}" name="{{ feature.key }}" formControlName="{{ feature.key }}" (change)="emitDeploymentSelection()"> <label class="custom-control-label" for="{{ feature.key }}">{{ feature.desc }}</label> </div> </div> </div> </div> </div> </form> </div> <div class="card-footer" *ngIf="!hideSubmitBtn"> <cd-form-button-panel #previewButtonPanel (submitActionEvent)="submit()" [form]="form" [disabled]="dataDeviceSelectionGroups.devices.length === 0 && !simpleDeployment" [submitText]="simpleDeployment ? 'Create OSDs' : actionLabels.PREVIEW" wrappingClass="text-right"></cd-form-button-panel> </div> </div>
10,052
44.90411
109
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.html
<nav ngbNav #nav="ngbNav" class="nav-tabs"> <ng-container ngbNavItem> <a ngbNavLink i18n>OSDs List</a> <ng-template ngbNavContent> <cd-table [data]="osds" (fetchData)="getOsdList()" [columns]="columns" selectionType="multiClick" [hasDetails]="true" (setExpandedRow)="setExpandedRow($event)" (updateSelection)="updateSelection($event)" [updateSelectionOnRefresh]="'never'"> <div class="table-actions btn-toolbar"> <cd-table-actions [permission]="permissions.osd" [selection]="selection" class="btn-group" id="osd-actions" [tableActions]="tableActions"> </cd-table-actions> <cd-table-actions [permission]="{read: true}" [selection]="selection" dropDownOnly="Cluster-wide configuration" btnColor="light" class="btn-group" id="cluster-wide-actions" [tableActions]="clusterWideActions"> </cd-table-actions> </div> <cd-osd-details cdTableDetail [selection]="expandedRow"> </cd-osd-details> </cd-table> </ng-template> </ng-container> <ng-container ngbNavItem *ngIf="permissions.grafana.read"> <a ngbNavLink i18n>Overall Performance</a> <ng-template ngbNavContent> <cd-grafana i18n-title title="OSD list" [grafanaPath]="'osd-overview?'" [type]="'metrics'" uid="lo02I1Aiz" grafanaStyle="four"> </cd-grafana> </ng-template> </ng-container> </nav> <div [ngbNavOutlet]="nav"></div> <ng-template #markOsdConfirmationTpl let-markActionDescription="markActionDescription" let-osdIds="osdIds"> <ng-container i18n><strong>OSD(s) {{ osdIds | join }}</strong> will be marked <strong>{{ markActionDescription }}</strong> if you proceed.</ng-container> </ng-template> <ng-template #criticalConfirmationTpl let-safeToPerform="safeToPerform" let-message="message" let-active="active" let-missingStats="missingStats" let-storedPgs="storedPgs" let-actionDescription="actionDescription" let-osdIds="osdIds"> <div *ngIf="!safeToPerform" class="danger mb-3"> <cd-alert-panel type="warning"> <span i18n> The {selection.hasSingleSelection, select, true {OSD is} other {OSDs are}} not safe to be {{ actionDescription }}! </span> <br> <ul class="mb-0 ps-4"> <li *ngIf="active.length > 0" i18n> {selection.hasSingleSelection, select, true {} other {{{ active | join }} : }} Some PGs are currently mapped to {active.length === 1, select, true {it} other {them}}. </li> <li *ngIf="missingStats.length > 0" i18n> {selection.hasSingleSelection, select, true {} other {{{ missingStats | join }} : }} There are no reported stats and not all PGs are active and clean. </li> <li *ngIf="storedPgs.length > 0" i18n> {selection.hasSingleSelection, select, true {OSD} other {{{ storedPgs | join }} : OSDs }} still store some PG data and not all PGs are active and clean. </li> <li *ngIf="message"> {{ message }} </li> </ul> </cd-alert-panel> </div> <div *ngIf="safeToPerform" class="danger mb-3"> <cd-alert-panel type="info"> <span i18n> The {selection.hasSingleSelection, select, true {OSD is} other {OSDs are}} safe to destroy without reducing data durability. </span> </cd-alert-panel> </div> <ng-container i18n><strong>OSD {{ osdIds | join }}</strong> will be <strong>{{ actionDescription }}</strong> if you proceed.</ng-container> </ng-template> <ng-template #flagsTpl let-row="row"> <span *ngFor="let flag of row.cdClusterFlags;" class="badge badge-hdd me-1">{{ flag }}</span> <span *ngFor="let flag of row.cdIndivFlags;" class="badge badge-info me-1">{{ flag }}</span> </ng-template> <ng-template #osdUsageTpl let-row="row"> <cd-usage-bar [title]="'osd ' + row.osd" [total]="row.stats.stat_bytes" [used]="row.stats.stat_bytes_used" [warningThreshold]="osdSettings.nearfull_ratio" [errorThreshold]="osdSettings.full_ratio"> </cd-usage-bar> </ng-template> <ng-template #deleteOsdExtraTpl let-form="form"> <ng-container [formGroup]="form"> <ng-container formGroupName="child"> <div class="form-group"> <div class="custom-control custom-checkbox"> <input type="checkbox" class="custom-control-input" name="preserve" id="preserve" formControlName="preserve"> <label class="custom-control-label" for="preserve" i18n>Preserve OSD ID(s) for replacement.</label> </div> </div> </ng-container> </ng-container> </ng-template>
5,469
34.290323
99
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-pg-scrub-modal/osd-pg-scrub-modal.component.html
<cd-modal [modalRef]="activeModal"> <ng-container i18n="form title" class="modal-title">{{ action | titlecase }} {{ resource | upperFirst }}</ng-container> <ng-container class="modal-content"> <form #formDir="ngForm" [formGroup]="osdPgScrubForm" novalidate cdFormScope="osd"> <div class="modal-body osd-modal"> <!-- Basic --> <cd-config-option [optionNames]="basicOptions" [optionsForm]="osdPgScrubForm" [optionsFormDir]="formDir" [optionsFormGroupName]="'basicFormGroup'" #basicOptionsValues></cd-config-option> <!-- Advanced --> <div class="row"> <div class="col-sm-12"> <a class="pull-right margin-right-md" (click)="advancedEnabled = true" *ngIf="!advancedEnabled" i18n>Advanced...</a> </div> </div> <div *ngIf="advancedEnabled"> <h3 class="page-header" i18n>Advanced configuration options</h3> <cd-config-option [optionNames]="advancedOptions" [optionsForm]="osdPgScrubForm" [optionsFormDir]="formDir" [optionsFormGroupName]="'advancedFormGroup'" #advancedOptionsValues></cd-config-option> </div> </div> <div class="modal-footer"> <cd-form-button-panel (submitActionEvent)="submitAction()" [form]="osdPgScrubForm" [showSubmit]="permissions.configOpt.update" [submitText]="(action | titlecase) + ' ' + (resource | upperFirst)"> </cd-form-button-panel> </div> </form> </ng-container> </cd-modal>
1,873
39.73913
103
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-recv-speed-modal/osd-recv-speed-modal.component.html
<cd-modal [modalRef]="activeModal"> <ng-container class="modal-title" i18n>OSD Recovery Priority</ng-container> <ng-container class="modal-content"> <form #formDir="ngForm" [formGroup]="osdRecvSpeedForm" novalidate cdFormScope="osd"> <div class="modal-body"> <!-- Priority --> <div class="form-group row"> <label class="cd-col-form-label required" for="priority" i18n>Priority</label> <div class="cd-col-form-input"> <select class="form-select" formControlName="priority" id="priority" (change)="onPriorityChange($event.target.value)"> <option *ngFor="let priority of priorities" [value]="priority.name"> {{ priority.text }} </option> </select> <span class="invalid-feedback" *ngIf="osdRecvSpeedForm.showError('priority', formDir, 'required')" i18n>This field is required.</span> </div> </div> <!-- Customize priority --> <div class="form-group row"> <div class="cd-col-form-offset"> <div class="custom-control custom-checkbox"> <input formControlName="customizePriority" class="custom-control-input" id="customizePriority" name="customizePriority" type="checkbox" (change)="onCustomizePriorityChange()"> <label class="custom-control-label" for="customizePriority" i18n>Customize priority values</label> </div> </div> </div> <!-- Priority values --> <div class="form-group row" *ngFor="let attr of priorityAttrs | keyvalue"> <label class="cd-col-form-label" [for]="attr.key"> <span [ngClass]="{'required': osdRecvSpeedForm.getValue('customizePriority')}"> {{ attr.value.text }} </span> <cd-helper *ngIf="attr.value.desc">{{ attr.value.desc }}</cd-helper> </label> <div class="cd-col-form-input"> <input class="form-control" type="number" [id]="attr.key" [formControlName]="attr.key" [readonly]="!osdRecvSpeedForm.getValue('customizePriority')"> <span class="invalid-feedback" *ngIf="osdRecvSpeedForm.getValue('customizePriority') && osdRecvSpeedForm.showError(attr.key, formDir, 'required')" i18n>This field is required!</span> <span class="invalid-feedback" *ngIf="osdRecvSpeedForm.getValue('customizePriority') && osdRecvSpeedForm.showError(attr.key, formDir, 'pattern')" i18n>{{ attr.value.patternHelpText }}</span> <span class="invalid-feedback" *ngIf="osdRecvSpeedForm.getValue('customizePriority') && osdRecvSpeedForm.showError(attr.key, formDir, 'max')" i18n>The entered value is too high! It must not be greater than {{ attr.value.maxValue }}.</span> <span class="invalid-feedback" *ngIf="osdRecvSpeedForm.getValue('customizePriority') && osdRecvSpeedForm.showError(attr.key, formDir, 'min')" i18n>The entered value is too low! It must not be lower than {{ attr.value.minValue }}.</span> </div> </div> </div> <div class="modal-footer"> <cd-form-button-panel (submitActionEvent)="submitAction()" [form]="osdRecvSpeedForm" [submitText]="actionLabels.UPDATE" [showSubmit]="permissions.configOpt.update"></cd-form-button-panel> </div> </form> </ng-container> </cd-modal>
4,085
42.935484
115
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-reweight-modal/osd-reweight-modal.component.html
<cd-modal [modalRef]="activeModal"> <ng-container class="modal-title" i18n>Reweight OSD: {{ osdId }}</ng-container> <ng-container class="modal-content"> <form [formGroup]="reweightForm"> <div class="modal-body"> <div class="row"> <label for="weight" class="cd-col-form-label">Weight</label> <div class="cd-col-form-input"> <input id="weight" class="form-control" type="number" step="0.1" formControlName="weight" min="0" max="1" [value]="currentWeight"> <span class="invalid-feedback" *ngIf="weight.errors"> <span *ngIf="weight.errors?.required" i18n>This field is required.</span> <span *ngIf="weight.errors?.max || weight.errors?.min" i18n>The value needs to be between 0 and 1.</span> </span> </div> </div> </div> <div class="modal-footer"> <cd-form-button-panel (submitActionEvent)="reweight()" [form]="reweightForm" [submitText]="actionLabels.REWEIGHT"></cd-form-button-panel> </div> </form> </ng-container> </cd-modal>
1,367
34.076923
90
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-scrub-modal/osd-scrub-modal.component.html
<cd-modal [modalRef]="activeModal"> <span class="modal-title" i18n>OSDs {deep, select, true {Deep } other {}}Scrub</span> <ng-container class="modal-content"> <form name="scrubForm" #formDir="ngForm" [formGroup]="scrubForm" novalidate> <div class="modal-body"> <p i18n>You are about to apply a {deep, select, true {deep } other {}}scrub to the OSD(s): <strong>{{ selected | join }}</strong>.</p> </div> <div class="modal-footer"> <cd-form-button-panel (submitActionEvent)="scrub()" [form]="scrubForm" [submitText]="actionLabels.UPDATE"></cd-form-button-panel> </div> </form> </ng-container> </cd-modal>
767
32.391304
88
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/active-alert-list/active-alert-list.component.html
<cd-prometheus-tabs></cd-prometheus-tabs> <cd-alert-panel *ngIf="!isAlertmanagerConfigured" type="info" i18n>To see all active Prometheus alerts, please provide the URL to the API of Prometheus' Alertmanager as described in the <cd-doc section="prometheus"></cd-doc>.</cd-alert-panel> <cd-table *ngIf="isAlertmanagerConfigured" [data]="prometheusAlertService.alerts" [columns]="columns" identifier="fingerprint" [forceIdentifier]="true" [customCss]="customCss" selectionType="single" [hasDetails]="true" (setExpandedRow)="setExpandedRow($event)" (updateSelection)="updateSelection($event)"> <cd-table-actions class="table-actions" [permission]="permission" [selection]="selection" [tableActions]="tableActions"> </cd-table-actions> <cd-table-key-value cdTableDetail *ngIf="expandedRow" [renderObjects]="true" [hideEmpty]="true" [appendParentKey]="false" [data]="expandedRow" [customCss]="customCss" [autoReload]="false"> </cd-table-key-value> </cd-table> <ng-template #externalLinkTpl let-row="row" let-value="value"> <a [href]="value" target="_blank"><i [ngClass]="[icons.lineChart]"></i> Source</a> </ng-template>
1,501
34.761905
72
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/prometheus-tabs/prometheus-tabs.component.html
<ul class="nav nav-tabs"> <li class="nav-item"> <a class="nav-link" routerLink="/monitoring/active-alerts" routerLinkActive="active" ariaCurrentWhenActive="page" [routerLinkActiveOptions]="{exact: true}" i18n>Active Alerts <small *ngIf="prometheusAlertService.activeCriticalAlerts > 0" class="badge badge-danger ms-1">{{ prometheusAlertService.activeCriticalAlerts }}</small> <small *ngIf="prometheusAlertService.activeWarningAlerts > 0" class="badge badge-warning ms-1">{{ prometheusAlertService.activeWarningAlerts }}</small></a> </li> <li class="nav-item"> <a class="nav-link" routerLink="/monitoring/alerts" routerLinkActive="active" ariaCurrentWhenActive="page" [routerLinkActiveOptions]="{exact: true}" i18n>Alerts</a> </li> <li class="nav-item"> <a class="nav-link" routerLink="/monitoring/silences" routerLinkActive="active" ariaCurrentWhenActive="page" [routerLinkActiveOptions]="{exact: true}" i18n>Silences</a> </li> </ul>
1,087
34.096774
101
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/rules-list/rules-list.component.html
<cd-prometheus-tabs></cd-prometheus-tabs> <cd-alert-panel *ngIf="!isPrometheusConfigured" type="info" i18n>To see all configured Prometheus alerts, please provide the URL to the API of Prometheus as described in the <cd-doc section="prometheus"></cd-doc>.</cd-alert-panel> <cd-table *ngIf="isPrometheusConfigured" [data]="prometheusAlertService.rules" [columns]="columns" [selectionType]="'single'" [hasDetails]="true" (setExpandedRow)="setExpandedRow($event)" (updateSelection)="updateSelection($event)"> <cd-table-key-value cdTableDetail *ngIf="expandedRow" [data]="expandedRow" [renderObjects]="true" [hideKeys]="hideKeys"> </cd-table-key-value> </cd-table>
851
36.043478
68
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-form/silence-form.component.html
<ng-template #matcherTpl let-matcher="matcher" let-index="index"> <div class="input-group my-2"> <ng-container *ngFor="let config of matcherConfig"> <span class="input-group-text" *ngIf="config.attribute === 'isRegex'"> <i *ngIf="matcher[config.attribute]" [ngbTooltip]="config.tooltip">~</i> <i *ngIf="!matcher[config.attribute]" ngbTooltip="Equals">=</i> </span> <ng-container *ngIf="config.attribute !== 'isRegex'"> <input type="text" id="matcher-{{config.attribute}}-{{index}}" class="form-control" [value]="matcher[config.attribute]" disabled readonly> </ng-container> </ng-container> <!-- Matcher actions --> <button type="button" class="btn btn-light" id="matcher-edit-{{index}}" i18n-ngbTooltip ngbTooltip="Edit" (click)="showMatcherModal(index)"> <i [ngClass]="[icons.edit]"></i> </button> <button type="button" class="btn btn-light" id="matcher-delete-{{index}}" i18n-ngbTooltip ngbTooltip="Delete" (click)="deleteMatcher(index)"> <i [ngClass]="[icons.trash]"></i> </button> </div> <span class="help-block"></span> </ng-template> <div class="cd-col-form"> <form #formDir="ngForm" [formGroup]="form" class="form" name="form" novalidate> <div class="card"> <div class="card-header"> <span i18n>{{ action | titlecase }} {{ resource | upperFirst }}</span> <cd-helper *ngIf="edit" i18n>Editing a silence will expire the old silence and recreate it as a new silence</cd-helper> </div> <!-- Creator --> <div class="card-body"> <div class="form-group row"> <label class="cd-col-form-label required" for="created-by" i18n>Creator</label> <div class="cd-col-form-input"> <input class="form-control" formControlName="createdBy" id="created-by" name="created-by" type="text"> <span *ngIf="form.showError('createdBy', formDir, 'required')" class="invalid-feedback" i18n>This field is required!</span> </div> </div> <!-- Comment --> <div class="form-group row"> <label class="cd-col-form-label required" for="comment" i18n>Comment</label> <div class="cd-col-form-input"> <textarea class="form-control" formControlName="comment" id="comment" name="comment" type="text"> </textarea> <span *ngIf="form.showError('comment', formDir, 'required')" class="invalid-feedback" i18n>This field is required!</span> </div> </div> <!-- Start time --> <div class="form-group row"> <label class="cd-col-form-label" for="starts-at"> <span class="required" i18n>Start time</span> <cd-helper i18n>If the start time lies in the past the creation time will be used</cd-helper> </label> <div class="cd-col-form-input"> <input class="form-control" formControlName="startsAt" [ngbPopover]="popStart" triggers="manual" #ps="ngbPopover" (click)="ps.open()" (keypress)="ps.close()"> <span *ngIf="form.showError('startsAt', formDir, 'required')" class="invalid-feedback" i18n>This field is required!</span> </div> </div> <!-- Duration --> <div class="form-group row"> <label class="cd-col-form-label required" for="duration" i18n>Duration</label> <div class="cd-col-form-input"> <input class="form-control" formControlName="duration" id="duration" name="duration" type="text"> <span *ngIf="form.showError('duration', formDir, 'required')" class="invalid-feedback" i18n>This field is required!</span> </div> </div> <!-- End time --> <div class="form-group row"> <label class="cd-col-form-label required" for="ends-at" i18n>End time</label> <div class="cd-col-form-input"> <input class="form-control" formControlName="endsAt" [ngbPopover]="popEnd" triggers="manual" #pe="ngbPopover" (click)="pe.open()" (keypress)="pe.close()"> <span *ngIf="form.showError('endsAt', formDir, 'required')" class="invalid-feedback" i18n>This field is required!</span> </div> </div> <!-- Matchers --> <fieldset> <legend class="required" i18n>Matchers</legend> <div class="cd-col-form-offset"> <h5 *ngIf="matchers.length === 0" [ngClass]="{'text-warning': !formDir.submitted, 'text-danger': formDir.submitted}"> <strong i18n>A silence requires at least one matcher</strong> </h5> <span *ngFor="let matcher of matchers; let i=index;"> <ng-container *ngTemplateOutlet="matcherTpl; context:{index: i, matcher: matcher}"></ng-container> </span> <div class="row"> <div class="col-12"> <button type="button" id="add-matcher" class="btn btn-light float-end my-3" [ngClass]="{'btn-warning': formDir.submitted && matchers.length === 0 }" (click)="showMatcherModal()"> <i [ngClass]="[icons.add]"></i> <ng-container i18n>Add matcher</ng-container> </button> </div> </div> </div> <div *ngIf="matchers.length && matcherMatch" class="cd-col-form-offset {{matcherMatch.cssClass}}" id="match-state"> <span class="text-muted {{matcherMatch.cssClass}}"> {{ matcherMatch.status }} </span> </div> </fieldset> </div> <div class="card-footer"> <div class="text-right"> <cd-form-button-panel (submitActionEvent)="submit()" [form]="form" [submitText]="(action | titlecase) + ' ' + (resource | upperFirst)"></cd-form-button-panel> </div> </div> </div> </form> </div> <ng-template #popStart> <cd-date-time-picker [control]="form.get('startsAt')" [hasSeconds]="false"></cd-date-time-picker> </ng-template> <ng-template #popEnd> <cd-date-time-picker [control]="form.get('endsAt')" [hasSeconds]="false"></cd-date-time-picker> </ng-template>
7,499
34.377358
123
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-list/silence-list.component.html
<cd-prometheus-tabs></cd-prometheus-tabs> <cd-alert-panel *ngIf="!isAlertmanagerConfigured" type="info" i18n>To enable Silences, please provide the URL to the API of the Prometheus' Alertmanager as described in the <cd-doc section="prometheus"></cd-doc>.</cd-alert-panel> <cd-table *ngIf="isAlertmanagerConfigured" [data]="silences" [columns]="columns" [forceIdentifier]="true" [customCss]="customCss" [sorts]="sorts" selectionType="single" [hasDetails]="true" (setExpandedRow)="setExpandedRow($event)" (fetchData)="refresh()" (updateSelection)="updateSelection($event)"> <cd-table-actions class="table-actions" [permission]="permission" [selection]="selection" [tableActions]="tableActions"> </cd-table-actions> <cd-table-key-value cdTableDetail *ngIf="expandedRow" [renderObjects]="true" [hideEmpty]="true" [appendParentKey]="false" [data]="expandedRow" [customCss]="customCss" [autoReload]="false"> </cd-table-key-value> </cd-table>
1,296
36.057143
66
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-matcher-modal/silence-matcher-modal.component.html
<cd-modal [modalRef]="activeModal"> <span class="modal-title" i18n>{editMode, select, true {Edit} other {Add}} Matcher</span> <ng-container class="modal-content"> <form class="form" #formDir="ngForm" [formGroup]="form" novalidate> <div class="modal-body"> <!-- Name --> <div class="form-group row"> <label class="cd-col-form-label required" for="name" i18n>Name</label> <div class="cd-col-form-input"> <select class="form-select" id="name" formControlName="name" name="name"> <option [ngValue]="null" i18n>-- Select an attribute to match against --</option> <option *ngFor="let attribute of nameAttributes" [value]="attribute"> {{ attribute }} </option> </select> <span class="help-block" *ngIf="form.showError('name', formDir, 'required')" i18n>This field is required!</span> </div> </div> <!-- Value --> <div class="form-group row"> <label class="cd-col-form-label required" for="value" i18n>Value</label> <div class="cd-col-form-input"> <input id="value" (focus)="valueFocus.next($any($event).target.value)" (click)="valueClick.next($any($event).target.value)" class="form-control" type="text" [ngbTypeahead]="search" formControlName="value" #instance="ngbTypeahead"> <span *ngIf="form.showError('value', formDir, 'required')" class="help-block" i18n>This field is required!</span> </div> <div *ngIf="form.getValue('value') && !form.getValue('isRegex') && matcherMatch" class="cd-col-form-offset {{matcherMatch.cssClass}}" id="match-state"> <span class="text-muted {{matcherMatch.cssClass}}"> {{matcherMatch.status}} </span> </div> </div> <!-- isRegex --> <div class="form-group row"> <div class="cd-col-form-offset"> <div class="custom-control custom-checkbox"> <input type="checkbox" class="custom-control-input" formControlName="isRegex" name="is-regex" id="is-regex"> <label for="is-regex" class="custom-control-label" i18n>Use regular expression</label> </div> </div> </div> </div> <div class="modal-footer"> <cd-form-button-panel (submitActionEvent)="onSubmit()" [form]="form" [submitText]="getMode()"></cd-form-button-panel> </div> </form> </ng-container> </cd-modal>
3,139
35.511628
90
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/services.component.html
<cd-orchestrator-doc-panel *ngIf="showDocPanel"></cd-orchestrator-doc-panel> <ng-container *ngIf="orchStatus?.available"> <cd-table [data]="services" [columns]="columns" identifier="service_name" forceIdentifier="true" columnMode="flex" selectionType="single" [autoReload]="5000" (fetchData)="getServices($event)" [hasDetails]="hasDetails" [serverSide]="true" [count]="count" (setExpandedRow)="setExpandedRow($event)" (updateSelection)="updateSelection($event)"> <cd-table-actions class="table-actions" [permission]="permissions.hosts" [selection]="selection" [tableActions]="tableActions"> </cd-table-actions> <cd-service-details cdTableDetail [permissions]="permissions" [selection]="expandedRow"> </cd-service-details> </cd-table> </ng-container> <router-outlet name="modal"></router-outlet> <ng-template #runningTpl let-value="value"> <span ngbTooltip="Service instances running out of the total number of services requested."> {{ value.running }} / {{ value.size }} </span> <i *ngIf="value.running == 0 || value.size == 0" class="icon-warning-color" [ngClass]="[icons.warning]"> </i> </ng-template>
1,419
34.5
94
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-daemon-list/service-daemon-list.component.html
<cd-orchestrator-doc-panel *ngIf="showDocPanel"></cd-orchestrator-doc-panel> <div *ngIf="flag === 'hostDetails'; else serviceDetailsTpl"> <ng-container *ngTemplateOutlet="serviceDaemonDetailsTpl"></ng-container> </div> <ng-template #serviceDetailsTpl> <ng-container> <nav ngbNav #nav="ngbNav" class="nav-tabs" cdStatefulTab="service-details"> <ng-container ngbNavItem="details"> <a ngbNavLink i18n>Daemons</a> <ng-template ngbNavContent> <ng-container *ngTemplateOutlet="serviceDaemonDetailsTpl"></ng-container> </ng-template> </ng-container> <ng-container ngbNavItem="service_events"> <a ngbNavLink i18n>Service Events</a> <ng-template ngbNavContent> <cd-table *ngIf="hasOrchestrator" #serviceTable [data]="services" [columns]="serviceColumns" columnMode="flex" (fetchData)="getServices($event)"> </cd-table> </ng-template> </ng-container> </nav> <div [ngbNavOutlet]="nav"></div> </ng-container> </ng-template> <ng-template #statusTpl let-row="row"> <span class="badge" [ngClass]="row | pipeFunction:getStatusClass"> {{ row.status_desc }} </span> </ng-template> <ng-template #listTpl let-events="value"> <ul class="list-group list-group-flush" *ngIf="events?.length else noEventsAvailable"> <li class="list-group-item" *ngFor="let event of events; trackBy:trackByFn"> <b>{{ event.created | relativeDate }} - </b> <span class="badge badge-info">{{ event.subject }}</span><br> <span *ngIf="event.level === 'INFO'"> <i [ngClass]="[icons.infoCircle]" aria-hidden="true"></i> </span> <span *ngIf="event.level === 'ERROR'"> <i [ngClass]="[icons.warning]" aria-hidden="true"></i> </span> {{ event.message }} </li> </ul> <ng-template #noEventsAvailable> <div *ngIf="events?.length === 0" class="list-group-item"> <span>No data available</span> </div> </ng-template> </ng-template> <ng-template #serviceDaemonDetailsTpl> <cd-table *ngIf="hasOrchestrator" #daemonsTable [data]="daemons" selectionType="single" [columns]="columns" columnMode="flex" identifier="daemon_name" (fetchData)="getDaemons($event)" (updateSelection)="updateSelection($event)"> <cd-table-actions id="service-daemon-list-actions" class="table-actions" [selection]="selection" [permission]="permissions.hosts" [tableActions]="tableActions"> </cd-table-actions> </cd-table> </ng-template> <ng-template #cpuTpl let-row="row"> <cd-usage-bar [total]="total" [calculatePerc]="false" [used]="row.cpu_percentage" [isBinary]="false" [warningThreshold]="warningThreshold" [errorThreshold]="errorThreshold"> </cd-usage-bar> </ng-template>
3,227
30.339806
83
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-details/service-details.component.html
<ng-container *ngIf="selection"> <cd-service-daemon-list [serviceName]="selection['service_name']"> </cd-service-daemon-list> </ng-container>
146
28.4
68
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.html
<cd-modal [pageURL]="pageURL" [modalRef]="activeModal"> <span class="modal-title" i18n>{{ action | titlecase }} {{ resource | upperFirst }}</span> <ng-container class="modal-content"> <form #frm="ngForm" [formGroup]="serviceForm" novalidate> <div class="modal-body"> <cd-alert-panel *ngIf="serviceForm.controls.service_type.value === 'rgw' && showRealmCreationForm" type="info" spacingClass="mb-3" i18n> <a class="text-decoration-underline" (click)="createMultisiteSetup()"> Click here</a> to create a new realm/zonegroup/zone </cd-alert-panel> <!-- Service type --> <div class="form-group row"> <label class="cd-col-form-label required" for="service_type" i18n>Type</label> <div class="cd-col-form-input"> <select id="service_type" name="service_type" class="form-select" formControlName="service_type" (change)="getServiceIds($event.target.value)"> <option i18n [ngValue]="null">-- Select a service type --</option> <option *ngFor="let serviceType of serviceTypes" [value]="serviceType"> {{ serviceType }} </option> </select> <span class="invalid-feedback" *ngIf="serviceForm.showError('service_type', frm, 'required')" i18n>This field is required.</span> </div> </div> <!-- backend_service --> <div *ngIf="serviceForm.controls.service_type.value === 'ingress'" class="form-group row"> <label i18n class="cd-col-form-label" [ngClass]="{'required': ['ingress'].includes(serviceForm.controls.service_type.value)}" for="backend_service">Backend Service</label> <div class="cd-col-form-input"> <select id="backend_service" name="backend_service" class="form-select" formControlName="backend_service" (change)="prePopulateId()"> <option *ngIf="services === null" [ngValue]="null" i18n>Loading...</option> <option *ngIf="services !== null && services.length === 0" [ngValue]="null" i18n>-- No service available --</option> <option *ngIf="services !== null && services.length > 0" [ngValue]="null" i18n>-- Select an existing service --</option> <option *ngFor="let service of services" [value]="service.service_name">{{ service.service_name }}</option> </select> <span class="invalid-feedback" *ngIf="serviceForm.showError('backend_service', frm, 'required')" i18n>This field is required.</span> </div> </div> <!-- Service id --> <div class="form-group row" *ngIf="serviceForm.controls.service_type.value !== 'snmp-gateway'"> <label class="cd-col-form-label" [ngClass]="{'required': ['mds', 'rgw', 'nfs', 'iscsi', 'ingress'].includes(serviceForm.controls.service_type.value)}" for="service_id"> <span i18n>Id</span> <cd-helper i18n>Used in the service name which is &lt;service_type.service_id&gt;</cd-helper> </label> <div class="cd-col-form-input"> <input id="service_id" class="form-control" type="text" formControlName="service_id"> <span class="invalid-feedback" *ngIf="serviceForm.showError('service_id', frm, 'required')" i18n>This field is required.</span> <span class="invalid-feedback" *ngIf="serviceForm.showError('service_id', frm, 'uniqueName')" i18n>This service id is already in use.</span> <span class="invalid-feedback" *ngIf="serviceForm.showError('service_id', frm, 'mdsPattern')" i18n>MDS service id must start with a letter and contain alphanumeric characters or '.', '-', and '_'</span> </div> </div> <div class="form-group row" *ngIf="serviceForm.controls.service_type.value === 'rgw'"> <label class="cd-col-form-label" for="realm_name" i18n>Realm</label> <div class="cd-col-form-input"> <select class="form-select" id="realm_name" formControlName="realm_name" name="realm_name" [attr.disabled]="realmList.length === 0 || editing ? true : null"> <option *ngIf="realmList.length === 0" i18n selected>-- No realm available --</option> <option *ngFor="let realm of realmList" [value]="realm.name"> {{ realm.name }} </option> </select> </div> </div> <div class="form-group row" *ngIf="serviceForm.controls.service_type.value === 'rgw'"> <label class="cd-col-form-label" for="zonegroup_name" i18n>Zonegroup</label> <div class="cd-col-form-input"> <select class="form-select" id="zonegroup_name" formControlName="zonegroup_name" name="zonegroup_name" [attr.disabled]="zonegroupList.length === 0 || editing ? true : null"> <option *ngFor="let zonegroup of zonegroupList" [value]="zonegroup.name"> {{ zonegroup.name }} </option> </select> </div> </div> <div class="form-group row" *ngIf="serviceForm.controls.service_type.value === 'rgw'"> <label class="cd-col-form-label" for="zone_name" i18n>Zone</label> <div class="cd-col-form-input"> <select class="form-select" id="zone_name" formControlName="zone_name" name="zone_name" [attr.disabled]="zoneList.length === 0 || editing ? true : null"> <option *ngFor="let zone of zoneList" [value]="zone.name"> {{ zone.name }} </option> </select> </div> </div> <!-- unmanaged --> <div class="form-group row"> <div class="cd-col-form-offset"> <div class="custom-control custom-checkbox"> <input class="custom-control-input" id="unmanaged" type="checkbox" formControlName="unmanaged"> <label class="custom-control-label" for="unmanaged" i18n>Unmanaged</label> <cd-helper i18n>If set to true, the orchestrator will not start nor stop any daemon associated with this service. Placement and all other properties will be ignored.</cd-helper> </div> </div> </div> <!-- Placement --> <div *ngIf="!serviceForm.controls.unmanaged.value" class="form-group row"> <label class="cd-col-form-label" for="placement" i18n>Placement</label> <div class="cd-col-form-input"> <select id="placement" class="form-select" formControlName="placement"> <option i18n value="hosts">Hosts</option> <option i18n value="label">Label</option> </select> </div> </div> <!-- Label --> <div *ngIf="!serviceForm.controls.unmanaged.value && serviceForm.controls.placement.value === 'label'" class="form-group row"> <label i18n class="cd-col-form-label" for="label">Label</label> <div class="cd-col-form-input"> <input id="label" class="form-control" type="text" formControlName="label" [ngbTypeahead]="searchLabels" (focus)="labelFocus.next($any($event).target.value)" (click)="labelClick.next($any($event).target.value)"> <span class="invalid-feedback" *ngIf="serviceForm.showError('label', frm, 'required')" i18n>This field is required.</span> </div> </div> <!-- Hosts --> <div *ngIf="!serviceForm.controls.unmanaged.value && serviceForm.controls.placement.value === 'hosts'" class="form-group row"> <label class="cd-col-form-label" for="hosts" i18n>Hosts</label> <div class="cd-col-form-input"> <cd-select-badges id="hosts" [data]="serviceForm.controls.hosts.value" [options]="hosts.options" [messages]="hosts.messages"> </cd-select-badges> </div> </div> <!-- count --> <div *ngIf="!serviceForm.controls.unmanaged.value" class="form-group row"> <label class="cd-col-form-label" for="count"> <span i18n>Count</span> <cd-helper i18n>Only that number of daemons will be created.</cd-helper> </label> <div class="cd-col-form-input"> <input id="count" class="form-control" type="number" formControlName="count" min="1"> <span class="invalid-feedback" *ngIf="serviceForm.showError('count', frm, 'min')" i18n>The value must be at least 1.</span> <span class="invalid-feedback" *ngIf="serviceForm.showError('count', frm, 'pattern')" i18n>The entered value needs to be a number.</span> </div> </div> <!-- RGW --> <ng-container *ngIf="!serviceForm.controls.unmanaged.value && serviceForm.controls.service_type.value === 'rgw'"> <!-- rgw_frontend_port --> <div class="form-group row"> <label i18n class="cd-col-form-label" for="rgw_frontend_port">Port</label> <div class="cd-col-form-input"> <input id="rgw_frontend_port" class="form-control" type="number" formControlName="rgw_frontend_port" min="1" max="65535"> <span class="invalid-feedback" *ngIf="serviceForm.showError('rgw_frontend_port', frm, 'pattern')" i18n>The entered value needs to be a number.</span> <span class="invalid-feedback" *ngIf="serviceForm.showError('rgw_frontend_port', frm, 'min')" i18n>The value must be at least 1.</span> <span class="invalid-feedback" *ngIf="serviceForm.showError('rgw_frontend_port', frm, 'max')" i18n>The value cannot exceed 65535.</span> </div> </div> </ng-container> <!-- iSCSI --> <!-- pool --> <div class="form-group row" *ngIf="serviceForm.controls.service_type.value === 'iscsi'"> <label i18n class="cd-col-form-label required" for="pool">Pool</label> <div class="cd-col-form-input"> <select id="pool" name="pool" class="form-select" formControlName="pool"> <option *ngIf="pools === null" [ngValue]="null" i18n>Loading...</option> <option *ngIf="pools && pools.length === 0" [ngValue]="null" i18n>-- No pools available --</option> <option *ngIf="pools && pools.length > 0" [ngValue]="null" i18n>-- Select a pool --</option> <option *ngFor="let pool of pools" [value]="pool.pool_name">{{ pool.pool_name }}</option> </select> <span class="invalid-feedback" *ngIf="serviceForm.showError('pool', frm, 'required')" i18n>This field is required.</span> </div> </div> <!-- fields in iSCSI which are hidden when unmanaged is true --> <ng-container *ngIf="!serviceForm.controls.unmanaged.value && serviceForm.controls.service_type.value === 'iscsi'"> <!-- trusted_ip_list --> <div class="form-group row"> <label class="cd-col-form-label" for="trusted_ip_list"> <span i18n>Trusted IPs</span> <cd-helper> <span i18n>Comma separated list of IP addresses.</span> <br> <span i18n>Please add the <b>Ceph Manager</b> IP addresses here, otherwise the iSCSI gateways can't be reached.</span> </cd-helper> </label> <div class="cd-col-form-input"> <input id="trusted_ip_list" class="form-control" type="text" formControlName="trusted_ip_list"> </div> </div> <!-- api_port --> <div class="form-group row"> <label i18n class="cd-col-form-label" for="api_port">Port</label> <div class="cd-col-form-input"> <input id="api_port" class="form-control" type="number" formControlName="api_port" min="1" max="65535"> <span class="invalid-feedback" *ngIf="serviceForm.showError('api_port', frm, 'pattern')" i18n>The entered value needs to be a number.</span> <span class="invalid-feedback" *ngIf="serviceForm.showError('api_port', frm, 'min')" i18n>The value must be at least 1.</span> <span class="invalid-feedback" *ngIf="serviceForm.showError('api_port', frm, 'max')" i18n>The value cannot exceed 65535.</span> </div> </div> <!-- api_user --> <div class="form-group row"> <label i18n class="cd-col-form-label" [ngClass]="{'required': ['iscsi'].includes(serviceForm.controls.service_type.value)}" for="api_user">User</label> <div class="cd-col-form-input"> <input id="api_user" class="form-control" type="text" formControlName="api_user"> <span class="invalid-feedback" *ngIf="serviceForm.showError('api_user', frm, 'required')" i18n>This field is required.</span> </div> </div> <!-- api_password --> <div class="form-group row"> <label i18n class="cd-col-form-label" [ngClass]="{'required': ['iscsi'].includes(serviceForm.controls.service_type.value)}" for="api_password">Password</label> <div class="cd-col-form-input"> <div class="input-group"> <input id="api_password" class="form-control" type="password" autocomplete="new-password" formControlName="api_password"> <button type="button" class="btn btn-light" cdPasswordButton="api_password"> </button> <cd-copy-2-clipboard-button source="api_password"> </cd-copy-2-clipboard-button> <span class="invalid-feedback" *ngIf="serviceForm.showError('api_password', frm, 'required')" i18n>This field is required.</span> </div> </div> </div> </ng-container> <!-- Ingress --> <ng-container *ngIf="serviceForm.controls.service_type.value === 'ingress'"> <!-- virtual_ip --> <div class="form-group row"> <label class="cd-col-form-label" [ngClass]="{'required': ['ingress'].includes(serviceForm.controls.service_type.value)}" for="virtual_ip"> <span i18n>Virtual IP</span> <cd-helper> <span i18n>The virtual IP address and subnet (in CIDR notation) where the ingress service will be available.</span> </cd-helper> </label> <div class="cd-col-form-input"> <input id="virtual_ip" class="form-control" type="text" formControlName="virtual_ip"> <span class="invalid-feedback" *ngIf="serviceForm.showError('virtual_ip', frm, 'required')" i18n>This field is required.</span> </div> </div> <!-- frontend_port --> <div class="form-group row"> <label class="cd-col-form-label" [ngClass]="{'required': ['ingress'].includes(serviceForm.controls.service_type.value)}" for="frontend_port"> <span i18n>Frontend Port</span> <cd-helper> <span i18n>The port used to access the ingress service.</span> </cd-helper> </label> <div class="cd-col-form-input"> <input id="frontend_port" class="form-control" type="number" formControlName="frontend_port" min="1" max="65535"> <span class="invalid-feedback" *ngIf="serviceForm.showError('frontend_port', frm, 'pattern')" i18n>The entered value needs to be a number.</span> <span class="invalid-feedback" *ngIf="serviceForm.showError('frontend_port', frm, 'min')" i18n>The value must be at least 1.</span> <span class="invalid-feedback" *ngIf="serviceForm.showError('frontend_port', frm, 'max')" i18n>The value cannot exceed 65535.</span> <span class="invalid-feedback" *ngIf="serviceForm.showError('frontend_port', frm, 'required')" i18n>This field is required.</span> </div> </div> <!-- monitor_port --> <div class="form-group row"> <label class="cd-col-form-label" [ngClass]="{'required': ['ingress'].includes(serviceForm.controls.service_type.value)}" for="monitor_port"> <span i18n>Monitor Port</span> <cd-helper> <span i18n>The port used by haproxy for load balancer status.</span> </cd-helper> </label> <div class="cd-col-form-input"> <input id="monitor_port" class="form-control" type="number" formControlName="monitor_port" min="1" max="65535"> <span class="invalid-feedback" *ngIf="serviceForm.showError('monitor_port', frm, 'pattern')" i18n>The entered value needs to be a number.</span> <span class="invalid-feedback" *ngIf="serviceForm.showError('monitor_port', frm, 'min')" i18n>The value must be at least 1.</span> <span class="invalid-feedback" *ngIf="serviceForm.showError('monitor_port', frm, 'max')" i18n>The value cannot exceed 65535.</span> <span class="invalid-feedback" *ngIf="serviceForm.showError('monitor_port', frm, 'required')" i18n>This field is required.</span> </div> </div> <!-- virtual_interface_networks --> <div class="form-group row" *ngIf="!serviceForm.controls.unmanaged.value"> <label class="cd-col-form-label" for="virtual_interface_networks"> <span i18n>CIDR Networks</span> <cd-helper> <span i18n>A list of networks to identify which network interface to use for the virtual IP address.</span> </cd-helper> </label> <div class="cd-col-form-input"> <input id="virtual_interface_networks" class="form-control" type="text" formControlName="virtual_interface_networks"> </div> </div> </ng-container> <!-- SNMP-Gateway --> <ng-container *ngIf="serviceForm.controls.service_type.value === 'snmp-gateway'"> <!-- snmp-version --> <div class="form-group row"> <label class="cd-col-form-label required" for="snmp_version" i18n>Version</label> <div class="cd-col-form-input"> <select id="snmp_version" name="snmp_version" class="form-select" formControlName="snmp_version" (change)="clearValidations()"> <option i18n [ngValue]="null">-- Select SNMP version --</option> <option *ngFor="let snmpVersion of ['V2c', 'V3']" [value]="snmpVersion">{{ snmpVersion }}</option> </select> <span class="invalid-feedback" *ngIf="serviceForm.showError('snmp_version', frm, 'required')" i18n>This field is required.</span> </div> </div> <!-- Destination --> <div class="form-group row"> <label class="cd-col-form-label required" for="snmp_destination"> <span i18n>Destination</span> <cd-helper> <span i18n>Must be of the format hostname:port.</span> </cd-helper> </label> <div class="cd-col-form-input"> <input id="snmp_destination" class="form-control" type="text" formControlName="snmp_destination"> <span class="invalid-feedback" *ngIf="serviceForm.showError('snmp_destination', frm, 'required')" i18n>This field is required.</span> <span class="invalid-feedback" *ngIf="serviceForm.showError('snmp_destination', frm, 'snmpDestinationPattern')" i18n>The value does not match the pattern: <strong>hostname:port</strong></span> </div> </div> <!-- Engine id for snmp V3 --> <div class="form-group row" *ngIf="serviceForm.controls.snmp_version.value === 'V3'"> <label class="cd-col-form-label required" for="engine_id"> <span i18n>Engine Id</span> <cd-helper> <span i18n>Unique identifier for the device (in hex).</span> </cd-helper> </label> <div class="cd-col-form-input"> <input id="engine_id" class="form-control" type="text" formControlName="engine_id"> <span class="invalid-feedback" *ngIf="serviceForm.showError('engine_id', frm, 'required')" i18n>This field is required.</span> <span class="invalid-feedback" *ngIf="serviceForm.showError('engine_id', frm, 'snmpEngineIdPattern')" i18n>The value does not match the pattern: <strong>Must be in hexadecimal and length must be multiple of 2 with min value = 10 amd max value = 64.</strong></span> </div> </div> <!-- Auth protocol for snmp V3 --> <div class="form-group row" *ngIf="serviceForm.controls.snmp_version.value === 'V3'"> <label class="cd-col-form-label required" for="auth_protocol" i18n>Auth Protocol</label> <div class="cd-col-form-input"> <select id="auth_protocol" name="auth_protocol" class="form-select" formControlName="auth_protocol"> <option i18n [ngValue]="null">-- Select auth protocol --</option> <option *ngFor="let authProtocol of ['SHA', 'MD5']" [value]="authProtocol"> {{ authProtocol }} </option> </select> <span class="invalid-feedback" *ngIf="serviceForm.showError('auth_protocol', frm, 'required')" i18n>This field is required.</span> </div> </div> <!-- Privacy protocol for snmp V3 --> <div class="form-group row" *ngIf="serviceForm.controls.snmp_version.value === 'V3'"> <label class="cd-col-form-label" for="privacy_protocol" i18n>Privacy Protocol</label> <div class="cd-col-form-input"> <select id="privacy_protocol" name="privacy_protocol" class="form-select" formControlName="privacy_protocol"> <option i18n [ngValue]="null">-- Select privacy protocol --</option> <option *ngFor="let privacyProtocol of ['DES', 'AES']" [value]="privacyProtocol"> {{ privacyProtocol }} </option> </select> </div> </div> <!-- Credentials --> <fieldset> <legend i18n>Credentials</legend> <!-- snmp v2c snmp_community --> <div class="form-group row" *ngIf="serviceForm.controls.snmp_version.value === 'V2c'"> <label class="cd-col-form-label required" for="snmp_community"> <span i18n>SNMP Community</span> </label> <div class="cd-col-form-input"> <input id="snmp_community" class="form-control" type="text" formControlName="snmp_community"> <span class="invalid-feedback" *ngIf="serviceForm.showError('snmp_community', frm, 'required')" i18n>This field is required.</span> </div> </div> <!-- snmp v3 auth username --> <div class="form-group row" *ngIf="serviceForm.controls.snmp_version.value === 'V3'"> <label class="cd-col-form-label required" for="snmp_v3_auth_username"> <span i18n>Username</span> </label> <div class="cd-col-form-input"> <input id="snmp_v3_auth_username" class="form-control" type="text" formControlName="snmp_v3_auth_username"> <span class="invalid-feedback" *ngIf="serviceForm.showError('snmp_v3_auth_username', frm, 'required')" i18n>This field is required.</span> </div> </div> <!-- snmp v3 auth password --> <div class="form-group row" *ngIf="serviceForm.controls.snmp_version.value === 'V3'"> <label class="cd-col-form-label required" for="snmp_v3_auth_password"> <span i18n>Password</span> </label> <div class="cd-col-form-input"> <input id="snmp_v3_auth_password" class="form-control" type="password" formControlName="snmp_v3_auth_password"> <span class="invalid-feedback" *ngIf="serviceForm.showError('snmp_v3_auth_password', frm, 'required')" i18n>This field is required.</span> </div> </div> <!-- snmp v3 priv password --> <div class="form-group row" *ngIf="serviceForm.controls.snmp_version.value === 'V3' && serviceForm.controls.privacy_protocol.value !== null && serviceForm.controls.privacy_protocol.value !== undefined"> <label class="cd-col-form-label required" for="snmp_v3_priv_password"> <span i18n>Encryption</span> </label> <div class="cd-col-form-input"> <input id="snmp_v3_priv_password" class="form-control" type="password" formControlName="snmp_v3_priv_password"> <span class="invalid-feedback" *ngIf="serviceForm.showError('snmp_v3_priv_password', frm, 'required')" i18n>This field is required.</span> </div> </div> </fieldset> </ng-container> <!-- RGW, Ingress & iSCSI --> <ng-container *ngIf="!serviceForm.controls.unmanaged.value && ['rgw', 'iscsi', 'ingress'].includes(serviceForm.controls.service_type.value)"> <!-- ssl --> <div class="form-group row"> <div class="cd-col-form-offset"> <div class="custom-control custom-checkbox"> <input class="custom-control-input" id="ssl" type="checkbox" formControlName="ssl"> <label class="custom-control-label" for="ssl" i18n>SSL</label> </div> </div> </div> <!-- ssl_cert --> <div *ngIf="serviceForm.controls.ssl.value" class="form-group row"> <label class="cd-col-form-label" for="ssl_cert"> <span i18n>Certificate</span> <cd-helper i18n>The SSL certificate in PEM format.</cd-helper> </label> <div class="cd-col-form-input"> <textarea id="ssl_cert" class="form-control resize-vertical text-monospace text-pre" formControlName="ssl_cert" rows="5"> </textarea> <input type="file" (change)="fileUpload($event.target.files, 'ssl_cert')"> <span class="invalid-feedback" *ngIf="serviceForm.showError('ssl_cert', frm, 'required')" i18n>This field is required.</span> <span class="invalid-feedback" *ngIf="serviceForm.showError('ssl_cert', frm, 'pattern')" i18n>Invalid SSL certificate.</span> </div> </div> <!-- ssl_key --> <div *ngIf="serviceForm.controls.ssl.value && !(['rgw', 'ingress'].includes(serviceForm.controls.service_type.value))" class="form-group row"> <label class="cd-col-form-label" for="ssl_key"> <span i18n>Private key</span> <cd-helper i18n>The SSL private key in PEM format.</cd-helper> </label> <div class="cd-col-form-input"> <textarea id="ssl_key" class="form-control resize-vertical text-monospace text-pre" formControlName="ssl_key" rows="5"> </textarea> <input type="file" (change)="fileUpload($event.target.files,'ssl_key')"> <span class="invalid-feedback" *ngIf="serviceForm.showError('ssl_key', frm, 'required')" i18n>This field is required.</span> <span class="invalid-feedback" *ngIf="serviceForm.showError('ssl_key', frm, 'pattern')" i18n>Invalid SSL private key.</span> </div> </div> </ng-container> <!-- Grafana --> <ng-container *ngIf="serviceForm.controls.service_type.value === 'grafana'"> <div class="form-group row"> <label class="cd-col-form-label" for="grafana_port"> <span i18n>Grafana Port</span> <cd-helper> <span i18n>The default port used by grafana.</span> </cd-helper> </label> <div class="cd-col-form-input"> <input id="grafana_port" class="form-control" type="number" formControlName="grafana_port" min="1" max="65535"> <span class="invalid-feedback" *ngIf="serviceForm.showError('grafana_port', frm, 'pattern')" i18n>The entered value needs to be a number.</span> <span class="invalid-feedback" *ngIf="serviceForm.showError('grafana_port', frm, 'min')" i18n>The value must be at least 1.</span> <span class="invalid-feedback" *ngIf="serviceForm.showError('grafana_port', frm, 'max')" i18n>The value cannot exceed 65535.</span> <span class="invalid-feedback" *ngIf="serviceForm.showError('grafana_port', frm, 'required')" i18n>This field is required.</span> </div> </div> <div class="form-group row"> <label i18n class="cd-col-form-label" for="grafana_admin_password"> <span>Grafana Password</span> <cd-helper>The password of the default Grafana Admin. Set once on first-run.</cd-helper> </label> <div class="cd-col-form-input"> <div class="input-group"> <input id="grafana_admin_password" class="form-control" type="password" autocomplete="new-password" [attr.disabled]="editing ? true:null" formControlName="grafana_admin_password"> <span class="input-group-append"> <button type="button" class="btn btn-light" cdPasswordButton="grafana_admin_password"> </button> <cd-copy-2-clipboard-button source="grafana_admin_password"> </cd-copy-2-clipboard-button> </span> </div> </div> </div> </ng-container> </div> <div class="modal-footer"> <div class="text-right"> <cd-form-button-panel (submitActionEvent)="onSubmit()" [form]="serviceForm" [submitText]="(action | titlecase) + ' ' + (resource | upperFirst)"></cd-form-button-panel> </div> </div> </form> </ng-container> </cd-modal>
36,861
43.681212
191
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/telemetry/telemetry.component.html
<div class="cd-col-form" *cdFormLoading="loading"> <ng-container [ngSwitch]="step"> <!-- Configuration step --> <div *ngSwitchCase="1"> <form name="form" #formDir="ngForm" [formGroup]="configForm" novalidate> <div class="card"> <div class="card-header" i18n>Step {{ step }} of 2: Telemetry report configuration</div> <div class="card-body"> <p i18n>The telemetry module sends anonymous data about this Ceph cluster back to the Ceph developers to help understand how Ceph is used and what problems users may be experiencing.<br/> This data is visualized on <a href="https://telemetry-public.ceph.com/">public dashboards</a> that allow the community to quickly see summary statistics on how many clusters are reporting, their total capacity and OSD count, and version distribution trends.<br/><br/> The data being reported does <b>not</b> contain any sensitive data like pool names, object names, object contents, hostnames, or device serial numbers. It contains counters and statistics on how the cluster has been deployed, the version of Ceph, the distribution of the hosts and other parameters which help the project to gain a better understanding of the way Ceph is used. The data is sent secured to {{ sendToUrl }} and {{ sendToDeviceUrl }} (device report).</p> <div *ngIf="moduleEnabled"> The plugin is already <b>enabled</b>. Click <b>Deactivate</b> to disable it.&nbsp; <button type="button" class="btn btn-light" (click)="disableModule('The Telemetry module has been disabled successfully.')" i18n>Deactivate</button> </div> <legend i18n>Channels</legend> <p i18n>The telemetry report is broken down into several "channels", each with a different type of information that can be configured below.</p> <!-- Channel basic --> <div class="form-group row"> <label class="cd-col-form-label" for="channel_basic"> <ng-container i18n>Basic</ng-container> <cd-helper> <ng-container i18n>Includes basic information about the cluster:</ng-container> <ul> <li i18n>Capacity of the cluster</li> <li i18n>Number of monitors, managers, OSDs, MDSs, object gateways, or other daemons</li> <li i18n>Software version currently being used</li> <li i18n>Number and types of RADOS pools and CephFS file systems</li> <li i18n>Names of configuration options that have been changed from their default (but not their values)</li> </ul> </cd-helper> </label> <div class="cd-col-form-input"> <div class="custom-control custom-checkbox"> <input type="checkbox" class="custom-control-input" id="channel_basic" formControlName="channel_basic"> <label class="custom-control-label" for="channel_basic"></label> </div> </div> </div> <!-- Channel crash --> <div class="form-group row"> <label class="cd-col-form-label" for="channel_crash"> <ng-container i18n>Crash</ng-container> <cd-helper> <ng-container i18n>Includes information about daemon crashes:</ng-container> <ul> <li i18n>Type of daemon</li> <li i18n>Version of the daemon</li> <li i18n>Operating system (OS distribution, kernel version)</li> <li i18n>Stack trace identifying where in the Ceph code the crash occurred</li> </ul> </cd-helper> </label> <div class="cd-col-form-input"> <div class="custom-control custom-checkbox"> <input type="checkbox" class="custom-control-input" id="channel_crash" formControlName="channel_crash"> <label class="custom-control-label" for="channel_crash"></label> </div> </div> </div> <!-- Channel device --> <div class="form-group row"> <label class="cd-col-form-label" for="channel_device"> <ng-container i18n>Device</ng-container> <cd-helper i18n-html html="Includes information about device metrics like anonymized SMART metrics."> </cd-helper> </label> <div class="cd-col-form-input"> <div class="custom-control custom-checkbox"> <input type="checkbox" class="custom-control-input" id="channel_device" formControlName="channel_device"> <label class="custom-control-label" for="channel_device"></label> </div> </div> </div> <!-- Channel ident --> <div class="form-group row"> <label class="cd-col-form-label" for="channel_ident"> <ng-container i18n>Ident</ng-container> <cd-helper> <ng-container i18n>Includes user-provided identifying information about the cluster:</ng-container> <ul> <li>Cluster description</li> <li>Contact email address</li> </ul> </cd-helper> </label> <div class="cd-col-form-input"> <div class="custom-control custom-checkbox"> <input type="checkbox" class="custom-control-input" id="channel_ident" formControlName="channel_ident" (click)="toggleIdent()"> <label class="custom-control-label" for="channel_ident"></label> </div> </div> </div> <!-- Channel perf --> <div class="form-group row"> <label class="cd-col-form-label" for="channel_perf"> <ng-container i18n>Perf</ng-container> <cd-helper> <ng-container i18n>Includes various performance metrics of a cluster.</ng-container> </cd-helper> </label> <div class="cd-col-form-input"> <div class="custom-control custom-checkbox"> <input type="checkbox" class="custom-control-input" id="channel_perf" formControlName="channel_perf"> <label class="custom-control-label" for="channel_perf"></label> </div> </div> </div> <ng-container *ngIf="showContactInfo"> <legend> <ng-container i18n>Contact Information</ng-container> <cd-helper i18n>Submitting any contact information is completely optional and disabled by default.</cd-helper> </legend> <div class="form-group row"> <label class="cd-col-form-label" for="contact" i18n>Contact</label> <div class="cd-col-form-input"> <input id="contact" class="form-control" type="text" formControlName="contact" placeholder="Example User <[email protected]>"> </div> </div> <div class="form-group row"> <label class="cd-col-form-label" for="description" i18n>Description</label> <div class="cd-col-form-input"> <input id="description" class="form-control" type="text" formControlName="description" placeholder="My first Ceph cluster" i18n-placeholder> </div> </div> <div class="form-group row"> <label class="cd-col-form-label" for="organization" i18n>Organization</label> <div class="cd-col-form-input"> <input id="organization" class="form-control" type="text" formControlName="organization" placeholder="Organization name" i18n-placeholder> </div> </div> </ng-container> <legend i18n>Advanced Settings</legend> <div class="form-group row"> <label class="cd-col-form-label" for="interval"> <ng-container i18n>Interval</ng-container> <cd-helper i18n>The module compiles and sends a new report every 24 hours by default. You can adjust this interval by setting a different number of hours.</cd-helper> </label> <div class="cd-col-form-input"> <input id="interval" class="form-control" type="number" formControlName="interval" min="8"> <span class="invalid-feedback" *ngIf="configForm.showError('interval', formDir, 'min')" i18n>The entered value is too low! It must be greater or equal to 8.</span> </div> </div> <div class="form-group row"> <label class="cd-col-form-label" for="proxy"> <ng-container i18n>Proxy</ng-container> <cd-helper> <p i18n>If the cluster cannot directly connect to the configured telemetry endpoint (default telemetry.ceph.com), you can configure a HTTP/HTTPS proxy server by e.g. adding https://10.0.0.1:8080</p> <p i18n>You can also include a user:pass if needed e.g. https://ceph:[email protected]:8080</p> </cd-helper> </label> <div class="cd-col-form-input"> <input id="proxy" class="form-control" type="text" formControlName="proxy" placeholder="https://10.0.0.1:8080"> </div> </div> <br /> <p i18n><b>Note:</b> By clicking 'Next' you will first see a preview of the report content before you can activate the automatic submission of your data.</p> </div> <div class="card-footer"> <div class="button-group text-right"> <button type="button" class="btn btn-light" (click)="next()"> <ng-container>{{ actionLabels.NEXT }}</ng-container> </button> </div> </div> </div> </form> </div> <!-- Preview step --> <div *ngSwitchCase="2"> <form name="previewForm" #frm="ngForm" [formGroup]="previewForm" novalidate> <div class="card"> <div class="card-header" i18n>Step {{ step }} of 2: Telemetry report preview</div> <div class="card-body"> <!-- Telemetry report ID --> <div class="form-group row"> <label i18n for="reportId" class="cd-col-form-label">Report ID <cd-helper i18n-html html="A randomized UUID to identify a particular cluster over the course of several telemetry reports."> </cd-helper> </label> <div class="cd-col-form-input"> <input class="form-control" type="text" id="reportId" formControlName="reportId" readonly> </div> </div> <!-- Telemetry report --> <div class="form-group row"> <label i18n for="report" class="cd-col-form-label">Report preview <cd-helper i18n-html html="The actual telemetry data that will be submitted."><em>Note: Please select 'Download' to view the full report, including metrics from the perf channel.</em> </cd-helper> </label> <div class="cd-col-form-input"> <textarea class="form-control" id="report" formControlName="report" rows="15" readonly></textarea> </div> </div> <div class="form-group row"> <div class="cd-col-form-offset"> <div class="btn-group" role="group"> <cd-download-button [objectItem]="report" fileName="telemetry_report"> </cd-download-button> <cd-copy-2-clipboard-button source="report"> </cd-copy-2-clipboard-button> </div> </div> </div> <!-- License agreement --> <div class="form-group row"> <div class="cd-col-form-offset"> <div class="custom-control custom-checkbox"> <input type="checkbox" class="custom-control-input" id="licenseAgrmt" name="licenseAgrmt" formControlName="licenseAgrmt"> <label class="custom-control-label" for="licenseAgrmt" i18n>I agree to my telemetry data being submitted under the <a href="https://cdla.io/sharing-1-0/">Community Data License Agreement - Sharing - Version 1.0</a></label> </div> </div> </div> </div> <div class="card-footer"> <div class="button-group text-right"> <cd-form-button-panel (submitActionEvent)="onSubmit()" (backActionEvent)="back()" [form]="previewForm" [submitText]="actionLabels.UPDATE" [cancelText]="actionLabels.BACK"></cd-form-button-panel> </div> </div> </div> </form> </div> </ng-container> </div>
15,628
44.17052
192
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade.component.html
<ng-container *ngIf="{upgradeInfo: upgradeInfo$ | async, error: upgradeInfoError$ } as upgrade"> <div class="row h-25 ms-1" *ngIf="!upgrade.upgradeInfoError && upgrade.upgradeInfo as upgradeInfo; else checkUpgrade"> <ng-container *ngIf="healthData$ | async as healthData"> <div class="col-lg-3 h-50 d-flex flex-column border justify-content-center align-items-center"> <span class="bold">Current Version</span> <span class="mt-1">{{ version }}</span> </div> <div class="col-lg-3 h-50 d-flex flex-column border justify-content-center align-items-center"> <span class="bold">Cluster Status</span> <ng-template #healthChecks> <ul> <li *ngFor="let check of healthData.health.checks"> <span [ngStyle]="check.severity | healthColor" [class.health-warn-description]="check.severity === 'HEALTH_WARN'"> {{ check.type }}</span>: {{ check.summary.message }} </li> </ul> </ng-template> <div class="info-card-content-clickable mt-1" [ngStyle]="healthData.health.status | healthColor" [ngbPopover]="healthChecks" popoverClass="info-card-popover-cluster-status"> {{ healthData.health.status | healthLabel | uppercase }} <i *ngIf="healthData.health?.status !== 'HEALTH_OK'" class="fa fa-exclamation-triangle"></i> </div> </div> <div class="col-lg-3 h-50 d-flex flex-column border justify-content-center align-items-center"> <span class="bold">Upgrade Status</span> <ng-container *ngIf="upgradeInfo.versions.length > 0; else noUpgradesAvailable"> <span class="mt-2" i18n> <i [ngClass]="[icons.up]" class="text-info"></i> Upgrade available</span> <div i18n-ngbTooltip [ngbTooltip]="(healthData.mgr_map | mgrSummary).total <= 1 ? 'To upgrade, you need minimum 2 mgr daemons.' : ''"> <button class="btn btn-accent mt-2" id="upgrade" aria-label="Upgrade now" [disabled]="(healthData.mgr_map | mgrSummary).total <= 1" i18n>Upgrade now</button> </div> </ng-container> </div> <div class="col-lg-3 h-50 d-flex flex-column border justify-content-center align-items-center"> <span class="bold">MGR Count</span> <span class="mt-1"> <i class="text-success" [ngClass]="[icons.success]" *ngIf="(healthData.mgr_map | mgrSummary).total > 1; else warningIcon"> </i> {{ (healthData.mgr_map | mgrSummary).total }} </span> </div> <div class="d-flex mt-3 p-0"> <dl class="w-50" *ngIf="fsid$ | async as fsid"> <dt class="bold mt-5" i18n>Cluster FSID</dt> <dd class="mt-2">{{ fsid }}</dd> <dt class="bold mt-5" i18n>Release Image</dt> <dd class="mt-2">{{ upgradeInfo.image }}</dd> <dt class="bold mt-5" i18n>Registry</dt> <dd class="mt-2">{{ upgradeInfo.registry }}</dd> </dl> </div> </ng-container> </div> </ng-container> <ng-template #checkUpgrade> <div class="row h-75 justify-content-center align-items-center"> <h3 class="mt-1 bold text-center" id="checking-for-upgrades" i18n>Checking for upgrades <i [ngClass]="[icons.spin, icons.spinner]"></i> </h3> </div> </ng-template> <ng-template #noUpgradesAvailable> <span class="mt-1" id="no-upgrades-available" i18n> <i [ngClass]="[icons.success]" class="text-success"></i> Cluster is up-to-date </span> </ng-template> <ng-template #warningIcon> <i class="text-warning" [ngClass]="[icons.warning]" title="To upgrade, you need minimum 2 mgr daemons."> </i> </ng-template>
3,993
38.156863
128
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard-v3/card-row/card-row.component.html
<div class="d-flex pl-1 pb-2 pt-2"> <div class="ms-2 me-auto"> <a [routerLink]="link" *ngIf="link && total > 0; else noLinkTitle" [ngPlural]="total" i18n> {{ total }} <ng-template ngPluralCase="=0">{{ title }}</ng-template> <ng-template ngPluralCase="=1">{{ title }}</ng-template> <ng-template ngPluralCase="other">{{ title }}s</ng-template> </a> </div> <ng-container [ngSwitch]="summaryType"> <ng-container *ngSwitchCase="'iscsi'"> <ng-container *ngTemplateOutlet="iscsiSummary"></ng-container> </ng-container> <ng-container *ngSwitchCase="'osd'"> <ng-container *ngTemplateOutlet="osdSummary"></ng-container> </ng-container> <ng-container *ngSwitchCase="'simplified'"> <ng-container *ngTemplateOutlet="simplifiedSummary"></ng-container> </ng-container> <ng-container *ngSwitchDefault> <ng-container *ngTemplateOutlet="defaultSummary"></ng-container> </ng-container> </ng-container> </div> <ng-template #defaultSummary> <span *ngIf="data.success || data.categoryPgAmount?.clean || (data.success === 0 && data.total === 0)"> <span *ngIf="data.success || (data.success === 0 && data.total === 0)"> {{ data.success }} </span> <span *ngIf="data.categoryPgAmount?.clean"> {{ data.categoryPgAmount?.clean }} </span> <i class="text-success" [ngClass]="[icons.success]"> </i> </span> <span *ngIf="data.info" class="ms-2"> <span *ngIf="data.info"> {{ data.info }} </span> <i class="text-info" [ngClass]="[icons.danger]"> </i> </span> <span *ngIf="data.warn || data.categoryPgAmount?.warning" class="ms-2"> <span *ngIf="data.warn"> {{ data.warn }} </span> <span *ngIf="data.categoryPgAmount?.warning"> {{ data.categoryPgAmount?.warning }} </span> <i class="text-warning" [ngClass]="[icons.warning]"> </i> </span> <span *ngIf="data.error || data.categoryPgAmount?.unknown" class="ms-2"> <span *ngIf="data.error"> {{ data.error }} </span> <span *ngIf="data.categoryPgAmount?.unknown"> {{ data.categoryPgAmount?.unknown }} </span> <i class="text-danger" [ngClass]="[icons.danger]"> </i> </span> <span *ngIf="data.categoryPgAmount?.working" class="ms-2"> <span *ngIf="data.categoryPgAmount?.working"> {{ data.categoryPgAmount?.working }} </span> <i class="text-warning" [ngClass]="[icons.spinner, icons.spin]"> </i> </span> </ng-template> <ng-template #osdSummary> <span *ngIf="data.up === data.in"> {{ data.up }} <i class="text-success" [ngClass]="[icons.success]"> </i> </span> <span *ngIf="data.up !== data.in"> {{ data.up }} <span class="fw-bold text-success"> up </span> </span> <span *ngIf="data.in !== data.up" class="ms-2"> {{ data.in }} <span class="fw-bold text-success"> in </span> </span> <span *ngIf="data.down" class="ms-2"> {{ data.down }} <span class="fw-bold text-danger me-2"> down </span> </span> <span *ngIf="data.out" class="ms-2"> {{ data.out }} <span class="fw-bold text-danger me-2"> out </span> </span> <span *ngIf="data.nearfull" class="ms-2"> {{ data.nearfull }} <span class="fw-bold text-warning me-2"> nearfull</span></span> <span *ngIf="data.full" class="ms-2"> {{ data.full }} <span class="fw-bold text-danger"> full </span> </span> </ng-template> <ng-template #iscsiSummary> <span> {{ data.up }} <i class="text-success" *ngIf="data.up || data.up === 0" [ngClass]="[icons.success]"> </i> </span> <span *ngIf="data.down" class="ms-2"> {{ data.down }} <i class="text-danger" [ngClass]="[icons.danger]"> </i> </span> </ng-template> <ng-template #simplifiedSummary> <span> {{ data }} <i class="text-success" [ngClass]="[icons.success]"></i> </span> </ng-template> <ng-template #noLinkTitle> <span *ngIf="total || total === 0" [ngPlural]="total"> {{ total }} <ng-template ngPluralCase="=0">{{ title }}</ng-template> <ng-template ngPluralCase="=1">{{ title }}</ng-template> <ng-template ngPluralCase="other">{{ title }}s</ng-template> </span> </ng-template>
4,450
25.494048
105
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard-v3/card/card.component.html
<div class="card shadow-sm flex-fill"> <h4 class="card-title mt-4 ms-4 mb-0"> {{ cardTitle }} </h4> <div class="card-body ps-0 pe-0"> <ng-content></ng-content> </div> </div>
190
20.222222
40
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard-v3/dashboard-area-chart/dashboard-area-chart.component.html
<div class="row"> <div class="col-3 center-text"> <br> <b class="chartTitle" i18n>{{ chartTitle }}</b> <br> <span [ngbTooltip]="label" i18n>{{currentData}} {{ currentDataUnits }}</span> <br> <span [ngbTooltip]="label2" i18n>{{currentData2}} {{ currentDataUnits2 }}</span> </div> <div class="col-9"> <div class="chart"> <canvas baseChart [datasets]="chartData.dataset" [options]="options" [chartType]="'line'" [plugins]="chartAreaBorderPlugin"> </canvas> </div> </div> </div>
610
24.458333
62
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard-v3/dashboard-pie/dashboard-pie.component.html
<div class="chart-container"> <canvas baseChart #chartCanvas [datasets]="chartConfig.dataset" [chartType]="chartConfig.chartType" [options]="chartConfig.options" [labels]="chartConfig.labels" [colors]="chartConfig.colors" [plugins]="doughnutChartPlugins" class="chart-canvas"> </canvas> <div class="chartjs-tooltip" #chartTooltip> <table></table> </div> </div>
460
26.117647
45
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard-v3/dashboard-time-selector/dashboard-time-selector.component.html
<div class="timeSelector"> <select id="timepicker" name="timepicker" [(ngModel)]="time" (ngModelChange)="emitTime()" class="form-select"> <option *ngFor="let key of times" [ngValue]="key.value">{{ key.name }} </option> </select> </div>
300
24.083333
48
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard-v3/dashboard/dashboard-v3.component.html
<div class="container-fluid" *ngIf="healthData && enabledFeature$ | async as enabledFeature"> <div class="row mx-0"> <cd-card cardTitle="Details" i18n-title class="col-sm-3 px-3" [ngClass]="{'d-flex': flexHeight}" aria-label="Details card"> <dl class="ms-4 me-4"> <dt>FSID</dt> <dd>{{ detailsCardData.fsid }}</dd> <dt>Orchestrator</dt> <dd i18n>{{ detailsCardData.orchestrator || 'Orchestrator is not available' }}</dd> <dt>Ceph version</dt> <dd>{{ detailsCardData.cephVersion }}</dd> </dl> </cd-card> <cd-card cardTitle="Status" i18n-title class="col-sm-6 px-3 d-flex" aria-label="Status card"> <div class="d-flex ms-4 me-4 mb-5 center-content"> <ng-template #healthChecks> <ng-container *ngTemplateOutlet="logsLink"></ng-container> <ul> <li *ngFor="let check of healthData.health.checks"> <span [ngStyle]="check.severity | healthColor" [class.health-warn-description]="check.severity === 'HEALTH_WARN'"> {{ check.type }}</span>: {{ check.summary.message }} </li> </ul> </ng-template> <i *ngIf="healthData.health?.status" [ngClass]="[healthData.health.status | healthIcon, icons.large2x]" [ngStyle]="healthData.health.status | healthColor" [title]="healthData.health.status"></i> <a class="ms-2 mt-n1 lead text-primary" [ngbPopover]="healthChecks" popoverClass="info-card-popover-cluster-status" *ngIf="healthData.health?.checks?.length" i18n>Cluster</a> <span class="ms-2 mt-n1 lead" *ngIf="!healthData.health?.checks?.length" i18n>Cluster</span> </div> <section class="border-top mt-5" *ngIf="isAlertmanagerConfigured && (prometheusAlertService.activeCriticalAlerts || prometheusAlertService.activeWarningAlerts)"> <div class="d-flex flex-wrap ms-4 me-4"> <span class="pt-2" i18n>Alerts</span> <!-- Potentially make widget component --> <button class="btn btn-outline-danger rounded-pill ms-2" [ngClass]="{'active': showAlerts && alertType === 'critical'}" title="Danger" (click)="toggleAlertsWindow('danger')" id="dangerAlerts" i18n-title *ngIf="prometheusAlertService?.activeCriticalAlerts > 0"> <i [ngClass]="[icons.danger]"></i> <span>{{ prometheusAlertService.activeCriticalAlerts }}</span> </button> <button class="btn btn-outline-warning rounded-pill ms-2" [ngClass]="{'active': showAlerts && alertType === 'warning'}" title="Warning" (click)="toggleAlertsWindow('warning')" id="warningAlerts" i18n-title *ngIf="prometheusAlertService?.activeWarningAlerts > 0"> <i [ngClass]="[icons.infoCircle]"></i> <span>{{ prometheusAlertService.activeWarningAlerts }}</span> </button> <div class="pt-0 position-right"> <button class="btn btn-block dropdown-toggle" data-toggle="collapse" aria-label="toggle alert window" [attr.aria-expanded]="showAlerts" (click)="toggleAlertsWindow('danger', 'true')"></button> </div> </div> <div class="alerts pt-0" *ngIf="showAlerts"> <hr class="mt-4"> <ngx-simplebar [options]="simplebar"> <div class="card-body ps-0 pe-1 pt-1"> <ng-container *ngTemplateOutlet="alertsCard"></ng-container> </div> </ngx-simplebar> </div> </section> </cd-card> <cd-card cardTitle="Capacity" i18n-title class="col-sm-3 px-3" [ngClass]="{'d-flex': flexHeight}" aria-label="Capacity card"> <ng-container class="ms-4 me-4" *ngIf="capacity && osdSettings"> <cd-dashboard-pie [data]="{max: capacity.total_bytes, current: capacity.total_used_raw_bytes}" [lowThreshold]="osdSettings.nearfull_ratio" [highThreshold]="osdSettings.full_ratio"> </cd-dashboard-pie> </ng-container> </cd-card> </div> <!-- Second row --> <div class="row mx-0"> <!-- Inventory Card --> <cd-card cardTitle="Inventory" i18n-title class="col-sm-3 px-3 d-flex" aria-label="Inventory card"> <hr> <!-- Hosts --> <li class="list-group-item"> <cd-card-row [data]="healthData.hosts" link="/hosts" title="Host" summaryType="simplified" *ngIf="healthData.hosts != null"></cd-card-row> </li> <hr> <!-- Monitors --> <li class="list-group-item"> <cd-card-row [data]="healthData.mon_status.monmap.mons.length" link="/monitor" title="Monitor" summaryType="simplified" *ngIf="healthData.mon_status"></cd-card-row> </li> <hr> <!-- Managers --> <li *ngIf="healthData.mgr_map" class="list-group-item"> <cd-card-row [data]="healthData.mgr_map | mgrSummary" title="Manager" *ngIf="healthData.mgr_map"></cd-card-row> </li> <hr> <!-- OSDs --> <li class="list-group-item"> <cd-card-row [data]="healthData.osd_map | osdSummary" link="/osd" title="OSD" summaryType="osd" *ngIf="healthData.osd_map"></cd-card-row> </li> <hr> <!-- Pools --> <li *ngIf="healthData.pools" class="list-group-item"> <cd-card-row [data]="healthData.pools.length" link="/pool" title="Pool" summaryType="simplified" *ngIf="healthData.pools"></cd-card-row> </li> <hr> <!-- PG Info --> <li class="list-group-item"> <cd-card-row [data]="healthData.pg_info | pgSummary" title="PG" *ngIf="healthData.pg_info"></cd-card-row> </li> <hr> <!-- Object gateways --> <li *ngIf="enabledFeature.rgw && healthData.rgw != null" class="list-group-item" id="rgw-item"> <cd-card-row [data]="healthData.rgw" link="/rgw/daemon" title="Object Gateway" summaryType="simplified" *ngIf="healthData.rgw || healthData.rgw === 0 "></cd-card-row> </li> <hr> <!-- Metadata Servers --> <li *ngIf="enabledFeature.cephfs && healthData.fs_map" class="list-group-item" id="mds-item"> <cd-card-row [data]="healthData.fs_map | mdsSummary" title="Metadata Server" *ngIf="healthData.fs_map"></cd-card-row> </li> <hr> <!-- iSCSI Gateways --> <li *ngIf="enabledFeature.iscsi && healthData.iscsi_daemons != null" class="list-group-item" id="iscsi-item"> <cd-card-row [data]="healthData.iscsi_daemons" link="/iscsi/daemon" title="iSCSI Gateway" summaryType="iscsi" *ngIf="healthData.iscsi_daemons"></cd-card-row> </li> </cd-card> <cd-card cardTitle="Cluster utilization" i18n-title class="col-sm-9 px-3 d-flex" aria-label="Cluster utilization card"> <div class="ms-4 me-4 mt-0"> <cd-dashboard-time-selector (selectedTime)="getPrometheusData($event)"> </cd-dashboard-time-selector> <ng-container *ngIf="capacity"> <cd-dashboard-area-chart chartTitle="Used Capacity" [maxValue]="capacity.total_bytes" dataUnits="B" label="Used Capacity" [data]="queriesResults.USEDCAPACITY"> </cd-dashboard-area-chart> </ng-container> <cd-dashboard-area-chart chartTitle="IOPS" dataUnits="" label="OPS" label2="IPS" [data]="queriesResults.OPS" [data2]="queriesResults.IPS"> </cd-dashboard-area-chart> <cd-dashboard-area-chart chartTitle="Latency" dataUnits="ms" decimals="3" label="Read" label2="Write" [data]="queriesResults.READLATENCY" [data2]="queriesResults.WRITELATENCY"> </cd-dashboard-area-chart> <cd-dashboard-area-chart chartTitle="Client Throughput" dataUnits="B/s" label="Read" label2="Write" [data]="queriesResults.READCLIENTTHROUGHPUT" [data2]="queriesResults.WRITECLIENTTHROUGHPUT"> </cd-dashboard-area-chart> <cd-dashboard-area-chart chartTitle="Recovery Throughput" dataUnits="B/s" label="Recovery Throughput" [data]="queriesResults.RECOVERYBYTES"> </cd-dashboard-area-chart> </div> </cd-card> </div> </div> <ng-template #alertsCard> <ng-container *ngFor="let alert of alerts; let i = index"> <div [ngClass]="borderClass" *ngIf="alertType === alert.labels.severity"> <div class="card tc_alerts border-0 pt-3"> <div class="row no-gutters"> <div class="col-sm-1 text-center"> <span [ngClass]="[icons.stack, icons.large, textClass]"> <i [ngClass]="[icons.circle, icons.stack2x]"></i> <i [ngClass]="[icons.stack1x, icons.inverse, icons.warning]"></i> </span> </div> <div class="col-md-11"> <div class="card-body ps-0 pe-1 pt-1"> <h6 class="card-title bold">{{ alert.labels.alertname }}</h6> <p class="card-text me-3" [innerHtml]="alert.annotations.summary"></p> <p class="card-text text-muted me-3"> <small class="date" [title]="alert.startsAt | cdDate" i18n>Active since: {{ alert.startsAt | relativeDate }}</small> </p> </div> </div> </div> </div> <hr> </div> </ng-container> </ng-template> <ng-template #logsLink> <ng-container *ngIf="permissions.log.read"> <p class="logs-link" i18n><i [ngClass]="[icons.infoCircle]"></i> See <a routerLink="/logs">Logs</a> for more details.</p> </ng-container> </ng-template>
11,511
39.251748
143
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/dashboard/dashboard.component.html
<main aria-label="Dashboard"> <a href="#main" class="sr-only">skip to content</a> <ng-container *ngIf="(enabledFeature$ | async)?.dashboard === false; else dashboardV3" class="main-padding"> <cd-refresh-selector></cd-refresh-selector> <cd-health id="main"></cd-health> </ng-container> <ng-template #dashboardV3> <cd-dashboard-v3></cd-dashboard-v3> </ng-template> </main>
417
25.125
88
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health-pie/health-pie.component.html
<div class="chart-container"> <canvas baseChart #chartCanvas [datasets]="chartConfig.dataset" [chartType]="chartConfig.chartType" [options]="chartConfig.options" [labels]="chartConfig.labels" [colors]="chartConfig.colors" [plugins]="doughnutChartPlugins" class="chart-canvas"> </canvas> <div class="chartjs-tooltip" #chartTooltip> </div> </div>
440
26.5625
45
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.html
<div *ngIf="healthData && enabledFeature$ | async as enabledFeature" class="container-fluid"> <cd-info-group groupTitle="Status" i18n-groupTitle *ngIf="healthData.health?.status || healthData.mon_status || healthData.osd_map || healthData.mgr_map || healthData.hosts != null || healthData.rgw != null || healthData.fs_map || healthData.iscsi_daemons != null"> <cd-info-card cardTitle="Cluster Status" i18n-cardTitle class="cd-status-card" contentClass="content-highlight" *ngIf="healthData.health?.status"> <ng-container *ngIf="healthData.health?.checks?.length > 0"> <ng-template #healthChecks> <ng-container *ngTemplateOutlet="logsLink"></ng-container> <ul> <li *ngFor="let check of healthData.health.checks"> <span [ngStyle]="check.severity | healthColor" [class.health-warn-description]="check.severity === 'HEALTH_WARN'"> {{ check.type }}</span>: {{ check.summary.message }} </li> </ul> </ng-template> <div class="info-card-content-clickable" [ngStyle]="healthData.health.status | healthColor" [ngbPopover]="healthChecks" popoverClass="info-card-popover-cluster-status"> {{ healthData.health.status | healthLabel | uppercase }} <i *ngIf="healthData.health?.status !== 'HEALTH_OK'" class="fa fa-exclamation-triangle"></i> </div> </ng-container> <ng-container *ngIf="!healthData.health?.checks?.length"> <div [ngStyle]="healthData.health.status | healthColor"> {{ healthData.health.status | healthLabel | uppercase }} </div> </ng-container> </cd-info-card> <cd-info-card cardTitle="Hosts" i18n-cardTitle link="/hosts" class="cd-status-card" contentClass="content-highlight" *ngIf="healthData.hosts != null"> {{ healthData.hosts }} total </cd-info-card> <cd-info-card cardTitle="Monitors" i18n-cardTitle link="/monitor" class="cd-status-card" contentClass="content-highlight" *ngIf="healthData.mon_status"> {{ healthData.mon_status | monSummary }} </cd-info-card> <cd-info-card cardTitle="OSDs" i18n-cardTitle link="/osd" class="cd-status-card" *ngIf="(healthData.osd_map | osdSummary) as transformedResult" contentClass="content-highlight"> <span *ngFor="let result of transformedResult" [ngClass]="result.class"> {{ result.content }} </span> </cd-info-card> <cd-info-card cardTitle="Managers" i18n-cardTitle class="cd-status-card" contentClass="content-highlight" *ngIf="healthData.mgr_map"> <span *ngFor="let result of (healthData.mgr_map | mgrSummary)" [ngClass]="result.class" [title]="result.titleText != null ? result.titleText : ''"> {{ result.content }} </span> </cd-info-card> <cd-info-card cardTitle="Object Gateways" i18n-cardTitle link="/rgw/daemon" class="cd-status-card" contentClass="content-highlight" *ngIf="enabledFeature.rgw && healthData?.rgw != null"> {{ healthData.rgw }} total </cd-info-card> <cd-info-card cardTitle="Metadata Servers" i18n-cardTitle class="cd-status-card" *ngIf="(enabledFeature.cephfs && healthData.fs_map | mdsSummary) as transformedResult" [contentClass]="(transformedResult.length > 1 ? 'text-area-size-2' : '') + ' content-highlight'"> <!-- TODO: check text-area-size-2 --> <span *ngFor="let result of transformedResult" [ngClass]="result.class" [title]="result.titleText !== null ? result.titleText : ''"> {{ result.content }} </span> </cd-info-card> <cd-info-card cardTitle="iSCSI Gateways" i18n-cardTitle link="/block/iscsi" class="cd-status-card" contentClass="content-highlight" *ngIf="enabledFeature.iscsi && healthData?.iscsi_daemons != null"> {{ healthData.iscsi_daemons.up + healthData.iscsi_daemons.down }} total <span class="card-text-line-break"></span> {{ healthData.iscsi_daemons.up }} up, <span [ngClass]="{'card-text-error': healthData.iscsi_daemons.down > 0}">{{ healthData.iscsi_daemons.down }} down</span> </cd-info-card> </cd-info-group> <cd-info-group groupTitle="Capacity" i18n-groupTitle *ngIf="healthData.pools || healthData.df || healthData.pg_info"> <cd-info-card cardTitle="Raw Capacity" i18n-cardTitle class="cd-capacity-card cd-chart-card" contentClass="content-chart" *ngIf="healthData.df"> <cd-health-pie [data]="healthData" [config]="rawCapacityChartConfig" [isBytesData]="true" (prepareFn)="prepareRawUsage($event[0], $event[1])"> </cd-health-pie> </cd-info-card> <cd-info-card cardTitle="Objects" i18n-cardTitle class="cd-capacity-card cd-chart-card" contentClass="content-chart" *ngIf="healthData.pg_info?.object_stats?.num_objects != null"> <cd-health-pie [data]="healthData" (prepareFn)="prepareObjects($event[0], $event[1])"> </cd-health-pie> </cd-info-card> <cd-info-card cardTitle="PG Status" i18n-cardTitle class="cd-capacity-card cd-chart-card" contentClass="content-chart" *ngIf="healthData.pg_info"> <ng-template #pgStatus> <ng-container *ngTemplateOutlet="logsLink"></ng-container> <ul> <li *ngFor="let pgStatesText of healthData.pg_info.statuses | keyvalue"> {{ pgStatesText.key }}: {{ pgStatesText.value }} </li> </ul> </ng-template> <div class="pg-status-popover-wrapper"> <div [ngbPopover]="pgStatus"> <cd-health-pie [data]="healthData" [config]="pgStatusChartConfig" (prepareFn)="preparePgStatus($event[0], $event[1])"> </cd-health-pie> </div> </div> </cd-info-card> <cd-info-card cardTitle="Pools" i18n-cardTitle link="/pool" class="cd-capacity-card" contentClass="content-highlight" *ngIf="healthData.pools"> {{ healthData.pools.length }} </cd-info-card> <cd-info-card cardTitle="PGs per OSD" i18n-cardTitle class="cd-capacity-card" contentClass="content-highlight" *ngIf="healthData.pg_info"> {{ healthData.pg_info.pgs_per_osd | dimless }} </cd-info-card> </cd-info-group> <cd-info-group groupTitle="Performance" i18n-groupTitle *ngIf="healthData.client_perf || healthData.scrub_status"> <cd-info-card cardTitle="Client Read/Write" i18n-cardTitle class="cd-performance-card cd-chart-card" contentClass="content-chart" *ngIf="healthData.client_perf"> <cd-health-pie [data]="healthData" [config]="clientStatsConfig" (prepareFn)="prepareReadWriteRatio($event[0], $event[1])"> </cd-health-pie> </cd-info-card> <cd-info-card cardTitle="Client Throughput" i18n-cardTitle class="cd-performance-card cd-chart-card" contentClass="content-chart" *ngIf="healthData.client_perf"> <cd-health-pie [data]="healthData" [config]="clientStatsConfig" (prepareFn)="prepareClientThroughput($event[0], $event[1])"> </cd-health-pie> </cd-info-card> <cd-info-card cardTitle="Recovery Throughput" i18n-cardTitle class="cd-performance-card" contentClass="content-highlight" *ngIf="healthData.client_perf"> {{ (healthData.client_perf.recovering_bytes_per_sec | dimlessBinary) + '/s' }} </cd-info-card> <cd-info-card cardTitle="Scrubbing" i18n-cardTitle class="cd-performance-card" contentClass="content-highlight" *ngIf="healthData.scrub_status"> {{ healthData.scrub_status }} </cd-info-card> </cd-info-group> <ng-template #logsLink> <ng-container *ngIf="permissions.log.read"> <p class="logs-link" i18n><i [ngClass]="[icons.infoCircle]"></i> See <a routerLink="/logs">Logs</a> for more details.</p> </ng-container> </ng-template> </div>
9,536
38.572614
115
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/info-card/info-card.component.html
<div class="card shadow-sm" [ngClass]="cardClass"> <div class="card-body d-flex align-items-center justify-content-center"> <h4 class="card-title m-4"> <a *ngIf="link; else noLinkTitle" [routerLink]="link">{{ cardTitle }}</a> <ng-template #noLinkTitle> {{ cardTitle }} </ng-template> </h4> <div class="card-text text-center" [ngClass]="contentClass"> <ng-content></ng-content> </div> </div> </div>
475
24.052632
74
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/info-group/info-group.component.html
<div class="row"> <div class="info-group-title"> <span>{{ groupTitle }}</span> <cd-helper iconClass="fa fa-info-circle fa-2xs"> <div class="text-center" i18n>For an overview of {{ groupTitle|lowercase }} widgets click <cd-doc section="dashboard-landing-page-{{ groupTitle|lowercase }}" docText="here" i18n-docText></cd-doc> </div> </cd-helper> </div> </div> <div class="row"> <ng-content></ng-content> </div>
491
26.333333
75
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-details/nfs-details.component.html
<ng-container *ngIf="selection"> <nav ngbNav #nav="ngbNav" class="nav-tabs" cdStatefulTab="nfs-details"> <ng-container ngbNavItem="details"> <a ngbNavLink i18n>Details</a> <ng-template ngbNavContent> <cd-table-key-value [data]="data"> </cd-table-key-value> </ng-template> </ng-container> <ng-container ngbNavItem="clients"> <a ngbNavLink i18n>Clients ({{ clients.length }})</a> <ng-template ngbNavContent> <cd-table #table [data]="clients" columnMode="flex" [columns]="clientsColumns" identifier="addresses" forceIdentifier="true" selectionType=""> </cd-table> </ng-template> </ng-container> </nav> <div [ngbNavOutlet]="nav"></div> </ng-container>
887
25.909091
48
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form-client/nfs-form-client.component.html
<div class="form-group row"> <label class="cd-col-form-label" i18n>Clients</label> <div class="cd-col-form-input" [formGroup]="form" #formDir="ngForm"> <span *ngIf="form.get('clients').value.length === 0" class="no-border text-muted"> <span class="form-text text-muted" i18n>Any client can access</span> </span> <ng-container formArrayName="clients"> <div *ngFor="let item of clientsFormArray.controls; let index = index; trackBy: trackByFn"> <div class="card" [formGroup]="item"> <div class="card-header"> {{ (index + 1) | ordinal }} <span class="float-end clickable" name="remove_client" (click)="removeClient(index)" ngbTooltip="Remove">&times;</span> </div> <div class="card-body"> <!-- Addresses --> <div class="form-group row"> <label i18n class="cd-col-form-label required" for="addresses">Addresses</label> <div class="cd-col-form-input"> <input type="text" class="form-control" name="addresses" id="addresses" formControlName="addresses" placeholder="192.168.0.10, 192.168.1.0/8"> <span class="invalid-feedback"> <span *ngIf="showError(index, 'addresses', formDir, 'required')" i18n>This field is required.</span> <span *ngIf="showError(index, 'addresses', formDir, 'pattern')"> <ng-container i18n>Must contain one or more comma-separated values</ng-container> <br> <ng-container i18n>For example:</ng-container> 192.168.0.10, 192.168.1.0/8 </span> </span> </div> </div> <!-- Access Type--> <div class="form-group row"> <label i18n class="cd-col-form-label" for="access_type">Access Type</label> <div class="cd-col-form-input"> <select class="form-select" name="access_type" id="access_type" formControlName="access_type"> <option value="">{{ getNoAccessTypeDescr() }}</option> <option *ngFor="let item of nfsAccessType" [value]="item.value">{{ item.value }}</option> </select> <span class="form-text text-muted" *ngIf="getValue(index, 'access_type')"> {{ getAccessTypeHelp(index) }} </span> </div> </div> <!-- Squash --> <div class="form-group row"> <label class="cd-col-form-label" for="squash"> <span i18n>Squash</span> <ng-container *ngTemplateOutlet="squashHelperTpl"></ng-container> </label> <div class="cd-col-form-input"> <select class="form-select" name="squash" id="squash" formControlName="squash"> <option value="">{{ getNoSquashDescr() }}</option> <option *ngFor="let squash of nfsSquash" [value]="squash">{{ squash }}</option> </select> </div> </div> </div> </div> </div> </ng-container> <div class="row my-2"> <div class="col-12"> <div class="float-end"> <button class="btn btn-light " (click)="addClient()" name="add_client"> <i [ngClass]="[icons.add]"></i> <ng-container i18n>Add clients</ng-container> </button> </div> </div> </div> </div> </div>
4,119
36.454545
101
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.html
<div class="cd-col-form" *cdFormLoading="loading"> <form name="nfsForm" #formDir="ngForm" [formGroup]="nfsForm" novalidate> <div class="card"> <div i18n="form title" class="card-header">{{ action | titlecase }} {{ resource | upperFirst }}</div> <div class="card-body"> <!-- cluster_id --> <div class="form-group row"> <label class="cd-col-form-label" for="cluster_id"> <span class="required" i18n>Cluster</span> <cd-helper> <p i18n>This is the ID of an NFS Service.</p> </cd-helper> </label> <div class="cd-col-form-input"> <select class="form-select" formControlName="cluster_id" name="cluster_id" id="cluster_id"> <option *ngIf="allClusters === null" value="" i18n>Loading...</option> <option *ngIf="allClusters !== null && allClusters.length === 0" value="" i18n>-- No cluster available --</option> <option *ngIf="allClusters !== null && allClusters.length > 0" value="" i18n>-- Select the cluster --</option> <option *ngFor="let cluster of allClusters" [value]="cluster.cluster_id">{{ cluster.cluster_id }}</option> </select> <span class="invalid-feedback" *ngIf="nfsForm.showError('cluster_id', formDir, 'required') || allClusters?.length === 0" i18n>This field is required. To create a new NFS cluster, <a [routerLink]="['/services', {outlets: {modal: ['create']}}]" class="btn-link">add a new NFS Service</a>.</span> </div> </div> <!-- FSAL --> <div formGroupName="fsal"> <!-- Name --> <div class="form-group row"> <label class="cd-col-form-label required" for="name" i18n>Storage Backend</label> <div class="cd-col-form-input"> <select class="form-select" formControlName="name" name="name" id="name" (change)="fsalChangeHandler()"> <option *ngIf="allFsals === null" value="" i18n>Loading...</option> <option *ngIf="allFsals !== null && allFsals.length === 0" value="" i18n>-- No data pools available --</option> <option *ngIf="allFsals !== null && allFsals.length > 0" value="" i18n>-- Select the storage backend --</option> <option *ngFor="let fsal of allFsals" [value]="fsal.value" [disabled]="fsal.disabled">{{ fsal.descr }}</option> </select> <span class="invalid-feedback" *ngIf="nfsForm.showError('name', formDir, 'required')" i18n>This field is required.</span> <span class="invalid-feedback" *ngIf="fsalAvailabilityError" i18n>{{ fsalAvailabilityError }}</span> </div> </div> <!-- CephFS Volume --> <div class="form-group row" *ngIf="nfsForm.getValue('name') === 'CEPH'"> <label class="cd-col-form-label required" for="fs_name" i18n>Volume</label> <div class="cd-col-form-input"> <select class="form-select" formControlName="fs_name" name="fs_name" id="fs_name" (change)="pathChangeHandler()"> <option *ngIf="allFsNames === null" value="" i18n>Loading...</option> <option *ngIf="allFsNames !== null && allFsNames.length === 0" value="" i18n>-- No CephFS filesystem available --</option> <option *ngIf="allFsNames !== null && allFsNames.length > 0" value="" i18n>-- Select the CephFS filesystem --</option> <option *ngFor="let filesystem of allFsNames" [value]="filesystem.name">{{ filesystem.name }}</option> </select> <span class="invalid-feedback" *ngIf="nfsForm.showError('fs_name', formDir, 'required')" i18n>This field is required.</span> </div> </div> </div> <!-- Security Label --> <div class="form-group row" *ngIf="nfsForm.getValue('name') === 'CEPH'"> <label class="cd-col-form-label" [ngClass]="{'required': nfsForm.getValue('security_label')}" for="security_label" i18n>Security Label</label> <div class="cd-col-form-input"> <div class="custom-control custom-checkbox"> <input type="checkbox" class="custom-control-input" formControlName="security_label" name="security_label" id="security_label"> <label for="security_label" class="custom-control-label" i18n>Enable security label</label> </div> <br> <input type="text" *ngIf="nfsForm.getValue('security_label')" class="form-control" name="sec_label_xattr" id="sec_label_xattr" formControlName="sec_label_xattr"> <span class="invalid-feedback" *ngIf="nfsForm.showError('sec_label_xattr', formDir, 'required')" i18n>This field is required.</span> </div> </div> <!-- Path --> <div class="form-group row" *ngIf="nfsForm.getValue('name') === 'CEPH'"> <label class="cd-col-form-label" for="path"> <span class="required" i18n>CephFS Path</span> <cd-helper> <p i18n>A path in a CephFS file system.</p> </cd-helper> </label> <div class="cd-col-form-input"> <input type="text" class="form-control" name="path" id="path" data-testid="fs_path" formControlName="path" [ngbTypeahead]="pathDataSource" (selectItem)="pathChangeHandler()" (blur)="pathChangeHandler()"> <span class="invalid-feedback" *ngIf="nfsForm.showError('path', formDir, 'required')" i18n>This field is required.</span> <span class="invalid-feedback" *ngIf="nfsForm.showError('path', formDir, 'pattern')" i18n>Path need to start with a '/' and can be followed by a word</span> <span class="invalid-feedback" *ngIf="nfsForm.showError('path', formDir, 'pathNameNotAllowed')" i18n>The path does not exist in the selected volume.</span> </div> </div> <!-- Bucket --> <div class="form-group row" *ngIf="nfsForm.getValue('name') === 'RGW'"> <label class="cd-col-form-label" for="path"> <span class="required" i18n>Bucket</span> </label> <div class="cd-col-form-input"> <input type="text" class="form-control" name="path" id="path" data-testid="rgw_path" formControlName="path" [ngbTypeahead]="bucketDataSource"> <span class="invalid-feedback" *ngIf="nfsForm.showError('path', formDir, 'required')" i18n>This field is required.</span> <span class="invalid-feedback" *ngIf="nfsForm.showError('path', formDir, 'bucketNameNotAllowed')" i18n>The bucket does not exist or is not in the default realm (if multiple realms are configured). To continue, <a routerLink="/rgw/bucket/create" class="btn-link">create a new bucket</a>.</span> </div> </div> <!-- NFS Protocol --> <div class="form-group row"> <label class="cd-col-form-label required" for="protocols" i18n>NFS Protocol</label> <div class="cd-col-form-input"> <div class="custom-control custom-checkbox"> <input type="checkbox" class="custom-control-input" formControlName="protocolNfsv4" name="protocolNfsv4" id="protocolNfsv4" disabled> <label i18n class="custom-control-label" for="protocolNfsv4">NFSv4</label> </div> <span class="invalid-feedback" *ngIf="nfsForm.showError('protocolNfsv4', formDir, 'required')" i18n>This field is required.</span> </div> </div> <!-- Pseudo --> <div class="form-group row" *ngIf="nfsForm.getValue('protocolNfsv4')"> <label class="cd-col-form-label" for="pseudo"> <span class="required" i18n>Pseudo</span> <cd-helper> <p i18n>The position that this <strong>NFS v4</strong> export occupies in the <strong>Pseudo FS</strong> (it must be unique).</p> <p i18n>By using different Pseudo options, the same Path may be exported multiple times.</p> </cd-helper> </label> <div class="cd-col-form-input"> <input type="text" class="form-control" name="pseudo" id="pseudo" formControlName="pseudo"> <span class="invalid-feedback" *ngIf="nfsForm.showError('pseudo', formDir, 'required')" i18n>This field is required.</span> <span class="invalid-feedback" *ngIf="nfsForm.showError('pseudo', formDir, 'pseudoAlreadyExists')" i18n>The pseudo is already in use by another export.</span> <span class="invalid-feedback" *ngIf="nfsForm.showError('pseudo', formDir, 'pattern')" i18n>Pseudo needs to start with a '/' and can't contain any of the following: &gt;, &lt;, |, &, ( or ).</span> </div> </div> <!-- Access Type --> <div class="form-group row"> <label class="cd-col-form-label required" for="access_type" i18n>Access Type</label> <div class="cd-col-form-input"> <select class="form-select" formControlName="access_type" name="access_type" id="access_type" (change)="accessTypeChangeHandler()"> <option *ngIf="nfsAccessType === null" value="" i18n>Loading...</option> <option *ngIf="nfsAccessType !== null && nfsAccessType.length === 0" value="" i18n>-- No access type available --</option> <option *ngFor="let accessType of nfsAccessType" [value]="accessType.value">{{ accessType.value }}</option> </select> <span class="form-text text-muted" *ngIf="nfsForm.getValue('access_type')"> {{ getAccessTypeHelp(nfsForm.getValue('access_type')) }} </span> <span class="form-text text-warning" *ngIf="nfsForm.getValue('access_type') === 'RW' && nfsForm.getValue('name') === 'RGW'" i18n>The Object Gateway NFS backend has a number of limitations which will seriously affect applications writing to the share. Please consult the <cd-doc section="rgw-nfs"></cd-doc> for details before enabling write access.</span> <span class="invalid-feedback" *ngIf="nfsForm.showError('access_type', formDir, 'required')" i18n>This field is required.</span> </div> </div> <!-- Squash --> <div class="form-group row"> <label class="cd-col-form-label" for="squash"> <span i18n>Squash</span> <ng-container *ngTemplateOutlet="squashHelper"></ng-container> </label> <div class="cd-col-form-input"> <select class="form-select" name="squash" formControlName="squash" id="squash"> <option *ngIf="nfsSquash === null" value="" i18n>Loading...</option> <option *ngIf="nfsSquash !== null && nfsSquash.length === 0" value="" i18n>-- No squash available --</option> <option *ngFor="let squash of nfsSquash" [value]="squash">{{ squash }}</option> </select> <span class="invalid-feedback" *ngIf="nfsForm.showError('squash', formDir,'required')" i18n>This field is required.</span> </div> </div> <!-- Transport Protocol --> <div class="form-group row"> <label class="cd-col-form-label required" for="transports" i18n>Transport Protocol</label> <div class="cd-col-form-input"> <div class="custom-control custom-checkbox"> <input type="checkbox" class="custom-control-input" formControlName="transportUDP" name="transportUDP" id="transportUDP"> <label for="transportUDP" class="custom-control-label" i18n>UDP</label> </div> <div class="custom-control custom-checkbox"> <input type="checkbox" class="custom-control-input" formControlName="transportTCP" name="transportTCP" id="transportTCP"> <label for="transportTCP" class="custom-control-label" i18n>TCP</label> </div> <span class="invalid-feedback" *ngIf="nfsForm.showError('transportUDP', formDir, 'required') || nfsForm.showError('transportTCP', formDir, 'required')" i18n>This field is required.</span> <hr> </div> </div> <!-- Clients --> <cd-nfs-form-client [form]="nfsForm" [clients]="clients" #nfsClients> <ng-template #squashHelper> <cd-helper> <ul class="squash-helper"> <li> <span class="squash-helper-item-value">no_root_squash: </span> <span i18n>No user id squashing is performed.</span> </li> <li> <span class="squash-helper-item-value">root_id_squash: </span> <span i18n>uid 0 and gid 0 are squashed to the Anonymous_Uid and Anonymous_Gid gid 0 in alt_groups lists is also squashed.</span> </li> <li> <span class="squash-helper-item-value">root_squash: </span> <span i18n>uid 0 and gid of any value are squashed to the Anonymous_Uid and Anonymous_Gid alt_groups lists is discarded.</span> </li> <li> <span class="squash-helper-item-value">all_squash: </span> <span i18n>All users are squashed.</span> </li> </ul> </cd-helper> </ng-template> </cd-nfs-form-client> </div> <div class="card-footer"> <cd-form-button-panel (submitActionEvent)="submitAction()" [form]="nfsForm" [submitText]="(action | titlecase) + ' ' + (resource | upperFirst)" wrappingClass="text-right"></cd-form-button-panel> </div> </div> </form> </div>
17,215
41.932668
147
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-list/nfs-list.component.html
<cd-table #table [data]="exports" columnMode="flex" [columns]="columns" identifier="id" forceIdentifier="true" selectionType="single" [hasDetails]="true" (setExpandedRow)="setExpandedRow($event)" (updateSelection)="updateSelection($event)"> <div class="table-actions btn-toolbar"> <cd-table-actions class="btn-group" [permission]="permission" [selection]="selection" [tableActions]="tableActions"> </cd-table-actions> </div> <cd-nfs-details cdTableDetail [selection]="expandedRow"> </cd-nfs-details> </cd-table> <ng-template #nfsFsal let-value="value"> <ng-container *ngIf="value.name==='CEPH'" i18n>CephFS</ng-container> <ng-container *ngIf="value.name==='RGW'" i18n>Object Gateway</ng-container> </ng-template>
954
29.806452
54
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/performance-counter/performance-counter/performance-counter.component.html
<legend>{{ serviceType }}.{{ serviceId }}</legend> <cd-table-performance-counter [serviceType]="serviceType" [serviceId]="serviceId"> </cd-table-performance-counter>
196
38.4
57
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/performance-counter/table-performance-counter/table-performance-counter.component.html
<cd-table *ngIf="counters; else warning" [data]="counters" [columns]="columns" columnMode="flex" [autoSave]="false" (fetchData)="getCounters($event)"> <ng-template #valueTpl let-row="row"> {{ row.value | dimless }} {{ row.unit }} </ng-template> </cd-table> <ng-template #warning> <cd-alert-panel type="warning" i18n>Performance counters not available</cd-alert-panel> </ng-template>
476
28.8125
74
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/crush-rule-form-modal/crush-rule-form-modal.component.html
<cd-modal [modalRef]="activeModal"> <ng-container i18n="form title" class="modal-title">{{ action | titlecase }} {{ resource | upperFirst }}</ng-container> <ng-container class="modal-content"> <form #frm="ngForm" [formGroup]="form" novalidate> <div class="modal-body"> <div class="form-group row"> <label for="name" class="cd-col-form-label"> <ng-container i18n>Name</ng-container> <span class="required"></span> </label> <div class="cd-col-form-input"> <input type="text" id="name" name="name" class="form-control" placeholder="Name..." formControlName="name" autofocus> <span class="invalid-feedback" *ngIf="form.showError('name', frm, 'required')" i18n>This field is required!</span> <span class="invalid-feedback" *ngIf="form.showError('name', frm, 'pattern')" i18n>The name can only consist of alphanumeric characters, dashes and underscores.</span> <span class="invalid-feedback" *ngIf="form.showError('name', frm, 'uniqueName')" i18n>The chosen erasure code profile name is already in use.</span> </div> </div> <!-- Root --> <div class="form-group row"> <label for="root" class="cd-col-form-label"> <ng-container i18n>Root</ng-container> <cd-helper [html]="tooltips.root"> </cd-helper> <span class="required"></span> </label> <div class="cd-col-form-input"> <select class="form-select" id="root" name="root" formControlName="root"> <option *ngIf="!buckets" ngValue="" i18n>Loading...</option> <option *ngFor="let bucket of buckets" [ngValue]="bucket"> {{ bucket.name }} </option> </select> <span class="invalid-feedback" *ngIf="form.showError('root', frm, 'required')" i18n>This field is required!</span> </div> </div> <!-- Failure Domain Type --> <div class="form-group row"> <label for="failure_domain" class="cd-col-form-label"> <ng-container i18n>Failure domain type</ng-container> <cd-helper [html]="tooltips.failure_domain"> </cd-helper> <span class="required"></span> </label> <div class="cd-col-form-input"> <select class="form-select" id="failure_domain" name="failure_domain" formControlName="failure_domain"> <option *ngIf="!failureDomains" ngValue="" i18n>Loading...</option> <option *ngFor="let domain of failureDomainKeys" [ngValue]="domain"> {{ domain }} ( {{failureDomains[domain].length}} ) </option> </select> <span class="invalid-feedback" *ngIf="form.showError('failure_domain', frm, 'required')" i18n>This field is required!</span> </div> </div> <!-- Class --> <div class="form-group row"> <label for="device_class" class="cd-col-form-label"> <ng-container i18n>Device class</ng-container> <cd-helper [html]="tooltips.device_class"> </cd-helper> </label> <div class="cd-col-form-input"> <select class="form-select" id="device_class" name="device_class" formControlName="device_class"> <option ngValue="" i18n>Let Ceph decide</option> <option *ngFor="let deviceClass of devices" [ngValue]="deviceClass"> {{ deviceClass }} </option> </select> </div> </div> </div> <div class="modal-footer"> <cd-form-button-panel (submitActionEvent)="onSubmit()" [form]="form" [submitText]="(action | titlecase) + ' ' + (resource | upperFirst)"></cd-form-button-panel> </div> </form> </ng-container> </cd-modal>
4,708
36.975806
121
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form-modal.component.html
<cd-modal [modalRef]="activeModal"> <ng-container i18n="form title" class="modal-title">{{ action | titlecase }} {{ resource | upperFirst }}</ng-container> <ng-container class="modal-content"> <form #frm="ngForm" [formGroup]="form" novalidate> <div class="modal-body"> <div class="form-group row"> <label class="cd-col-form-label" for="name" i18n>Name</label> <div class="cd-col-form-input"> <input type="text" id="name" name="name" class="form-control" placeholder="Name..." formControlName="name" autofocus> <span class="invalid-feedback" *ngIf="form.showError('name', frm, 'required')" i18n>This field is required!</span> <span class="invalid-feedback" *ngIf="form.showError('name', frm, 'pattern')" i18n>The name can only consist of alphanumeric characters, dashes and underscores.</span> <span class="invalid-feedback" *ngIf="form.showError('name', frm, 'uniqueName')" i18n>The chosen erasure code profile name is already in use.</span> </div> </div> <div class="form-group row"> <label for="plugin" class="cd-col-form-label"> <span class="required" i18n>Plugin</span> <cd-helper [html]="tooltips.plugins[plugin].description"> </cd-helper> </label> <div class="cd-col-form-input"> <select class="form-select" id="plugin" name="plugin" formControlName="plugin"> <option *ngIf="!plugins" ngValue="" i18n>Loading...</option> <option *ngFor="let plugin of plugins" [ngValue]="plugin"> {{ plugin }} </option> </select> <span class="invalid-feedback" *ngIf="form.showError('name', frm, 'required')" i18n>This field is required!</span> </div> </div> <div class="form-group row"> <label for="k" class="cd-col-form-label"> <span class="required" i18n>Data chunks (k)</span> <cd-helper [html]="tooltips.k"> </cd-helper> </label> <div class="cd-col-form-input"> <input type="number" id="k" name="k" class="form-control" ng-model="$ctrl.erasureCodeProfile.k" placeholder="Data chunks..." formControlName="k" min="2"> <span class="invalid-feedback" *ngIf="form.showError('k', frm, 'required')" i18n>This field is required!</span> <span class="invalid-feedback" *ngIf="form.showError('k', frm, 'min')" i18n>Must be equal to or greater than 2.</span> <span class="invalid-feedback" *ngIf="form.showError('k', frm, 'max')" i18n>Chunks (k+m) have exceeded the available OSDs of {{deviceCount}}.</span> <span class="invalid-feedback" *ngIf="form.showError('k', frm, 'unequal')" i18n>For an equal distribution k has to be a multiple of (k+m)/l.</span> <span class="invalid-feedback" *ngIf="form.showError('k', frm, 'kLowerM')" i18n>K has to be equal to or greater than m in order to recover data correctly through c.</span> <span *ngIf="plugin === 'lrc'" class="form-text text-muted" i18n>Distribution factor: {{lrcMultiK}}</span> </div> </div> <div class="form-group row"> <label for="m" class="cd-col-form-label"> <span class="required" i18n>Coding chunks (m)</span> <cd-helper [html]="tooltips.m"> </cd-helper> </label> <div class="cd-col-form-input"> <input type="number" id="m" name="m" class="form-control" placeholder="Coding chunks..." formControlName="m" min="1"> <span class="invalid-feedback" *ngIf="form.showError('m', frm, 'required')" i18n>This field is required!</span> <span class="invalid-feedback" *ngIf="form.showError('m', frm, 'min')" i18n>Must be equal to or greater than 1.</span> <span class="invalid-feedback" *ngIf="form.showError('m', frm, 'max')" i18n>Chunks (k+m) have exceeded the available OSDs of {{deviceCount}}.</span> </div> </div> <div class="form-group row" *ngIf="plugin === 'shec'"> <label for="c" class="cd-col-form-label"> <span class="required" i18n>Durability estimator (c)</span> <cd-helper [html]="tooltips.plugins.shec.c"> </cd-helper> </label> <div class="cd-col-form-input"> <input type="number" id="c" name="c" class="form-control" placeholder="Coding chunks..." formControlName="c" min="1"> <span class="invalid-feedback" *ngIf="form.showError('c', frm, 'min')" i18n>Must be equal to or greater than 1.</span> <span class="invalid-feedback" *ngIf="form.showError('c', frm, 'cGreaterM')" i18n>C has to be equal to or lower than m as m defines the amount of chunks that can be used.</span> </div> </div> <div class="form-group row" *ngIf="plugin === 'clay'"> <label for="d" class="cd-col-form-label"> <span class="required" i18n>Helper chunks (d)</span> <cd-helper [html]="tooltips.plugins.clay.d"> </cd-helper> </label> <div class="cd-col-form-input"> <div class="input-group"> <input type="number" id="d" name="d" class="form-control" placeholder="Helper chunks..." formControlName="d"> <button class="btn btn-light" id="d-calc-btn" ngbTooltip="Set d manually or use the plugin's default calculation that maximizes d." i18n-ngbTooltip type="button" (click)="toggleDCalc()"> <i [ngClass]="dCalc ? icons.unlock : icons.lock" aria-hidden="true"></i> </button> </div> <span class="form-text text-muted" *ngIf="dCalc" i18n>D is automatically updated on k and m changes</span> <ng-container *ngIf="!dCalc"> <span class="form-text text-muted" *ngIf="getDMin() < getDMax()" i18n>D can be set from {{getDMin()}} to {{getDMax()}}</span> <span class="form-text text-muted" *ngIf="getDMin() === getDMax()" i18n>D can only be set to {{getDMax()}}</span> </ng-container> <span class="invalid-feedback" *ngIf="form.showError('d', frm, 'dMin')" i18n>D has to be greater than k ({{getDMin()}}).</span> <span class="invalid-feedback" *ngIf="form.showError('d', frm, 'dMax')" i18n>D has to be lower than k + m ({{getDMax()}}).</span> </div> </div> <div class="form-group row" *ngIf="plugin === PLUGIN.LRC"> <label class="cd-col-form-label" for="l"> <span class="required" i18n>Locality (l)</span> <cd-helper [html]="tooltips.plugins.lrc.l"> </cd-helper> </label> <div class="cd-col-form-input"> <input type="number" id="l" name="l" class="form-control" placeholder="Coding chunks..." formControlName="l" min="1"> <span class="invalid-feedback" *ngIf="form.showError('l', frm, 'required')" i18n>This field is required!</span> <span class="invalid-feedback" *ngIf="form.showError('l', frm, 'min')" i18n>Must be equal to or greater than 1.</span> <span class="invalid-feedback" *ngIf="form.showError('l', frm, 'unequal')" i18n>Can't split up chunks (k+m) correctly with the current locality.</span> <span class="form-text text-muted" i18n>Locality groups: {{lrcGroups}}</span> </div> </div> <div class="form-group row"> <label for="crushFailureDomain" class="cd-col-form-label"> <ng-container i18n>Crush failure domain</ng-container> <cd-helper [html]="tooltips.crushFailureDomain"> </cd-helper> </label> <div class="cd-col-form-input"> <select class="form-select" id="crushFailureDomain" name="crushFailureDomain" formControlName="crushFailureDomain"> <option *ngIf="!failureDomains" ngValue="" i18n>Loading...</option> <option *ngFor="let domain of failureDomainKeys" [ngValue]="domain"> {{ domain }} ( {{failureDomains[domain].length}} ) </option> </select> </div> </div> <div class="form-group row" *ngIf="plugin === PLUGIN.LRC"> <label for="crushLocality" class="cd-col-form-label"> <ng-container i18n>Crush Locality</ng-container> <cd-helper [html]="tooltips.plugins.lrc.crushLocality"> </cd-helper> </label> <div class="cd-col-form-input"> <select class="form-select" id="crushLocality" name="crushLocality" formControlName="crushLocality"> <option *ngIf="!failureDomains" ngValue="" i18n>Loading...</option> <option *ngIf="failureDomainKeys.length > 0" ngValue="" i18n>None</option> <option *ngFor="let domain of failureDomainKeys" [ngValue]="domain"> {{ domain }} ( {{failureDomains[domain].length}} ) </option> </select> </div> </div> <div class="form-group row" *ngIf="PLUGIN.CLAY === plugin"> <label for="scalar_mds" class="cd-col-form-label"> <ng-container i18n>Scalar mds</ng-container> <cd-helper [html]="tooltips.plugins.clay.scalar_mds"> </cd-helper> </label> <div class="cd-col-form-input"> <select class="form-select" id="scalar_mds" name="scalar_mds" formControlName="scalar_mds"> <option *ngFor="let plugin of [PLUGIN.JERASURE, PLUGIN.ISA, PLUGIN.SHEC]" [ngValue]="plugin"> {{ plugin }} </option> </select> </div> </div> <div class="form-group row" *ngIf="[PLUGIN.JERASURE, PLUGIN.ISA, PLUGIN.CLAY].includes(plugin)"> <label for="technique" class="cd-col-form-label"> <ng-container i18n>Technique</ng-container> <cd-helper [html]="tooltips.plugins[plugin].technique"> </cd-helper> </label> <div class="cd-col-form-input"> <select class="form-select" id="technique" name="technique" formControlName="technique"> <option *ngFor="let technique of techniques" [ngValue]="technique"> {{ technique }} </option> </select> </div> </div> <div class="form-group row" *ngIf="plugin === PLUGIN.JERASURE"> <label for="packetSize" class="cd-col-form-label"> <ng-container i18n>Packetsize</ng-container> <cd-helper [html]="tooltips.plugins.jerasure.packetSize"> </cd-helper> </label> <div class="cd-col-form-input"> <input type="number" id="packetSize" name="packetSize" class="form-control" placeholder="Packetsize..." formControlName="packetSize" min="1"> <span class="invalid-feedback" *ngIf="form.showError('packetSize', frm, 'min')" i18n>Must be equal to or greater than 1.</span> </div> </div> <div class="form-group row"> <label for="crushRoot" class="cd-col-form-label"> <ng-container i18n>Crush root</ng-container> <cd-helper [html]="tooltips.crushRoot"> </cd-helper> </label> <div class="cd-col-form-input"> <select class="form-select" id="crushRoot" name="crushRoot" formControlName="crushRoot"> <option *ngIf="!buckets" ngValue="" i18n>Loading...</option> <option *ngFor="let bucket of buckets" [ngValue]="bucket"> {{ bucket.name }} </option> </select> </div> </div> <div class="form-group row"> <label for="crushDeviceClass" class="cd-col-form-label"> <ng-container i18n>Crush device class</ng-container> <cd-helper [html]="tooltips.crushDeviceClass"> </cd-helper> </label> <div class="cd-col-form-input"> <select class="form-select" id="crushDeviceClass" name="crushDeviceClass" formControlName="crushDeviceClass"> <option ngValue="" i18n>Let Ceph decide</option> <option *ngFor="let deviceClass of devices" [ngValue]="deviceClass"> {{ deviceClass }} </option> </select> <span class="form-text text-muted" i18n>Available OSDs: {{deviceCount}}</span> </div> </div> <div class="form-group row"> <label for="directory" class="cd-col-form-label"> <ng-container i18n>Directory</ng-container> <cd-helper [html]="tooltips.directory"> </cd-helper> </label> <div class="cd-col-form-input"> <input type="text" id="directory" name="directory" class="form-control" placeholder="Path..." formControlName="directory"> </div> </div> </div> <div class="modal-footer"> <cd-form-button-panel (submitActionEvent)="onSubmit()" [form]="form" [submitText]="(action | titlecase) + ' ' + (resource | upperFirst)"></cd-form-button-panel> </div> </form> </ng-container> </cd-modal>
16,589
38.594272
121
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-details/pool-details.component.html
<ng-container *ngIf="selection" cdTableDetail> <nav ngbNav #nav="ngbNav" class="nav-tabs" cdStatefulTab="pool-details"> <ng-container ngbNavItem="details"> <a ngbNavLink i18n>Details</a> <ng-template ngbNavContent> <cd-table-key-value [renderObjects]="true" [data]="poolDetails" [autoReload]="false"> </cd-table-key-value> </ng-template> </ng-container> <ng-container ngbNavItem="performance-details" *ngIf="permissions.grafana.read"> <a ngbNavLink i18n>Performance Details</a> <ng-template ngbNavContent> <cd-grafana i18n-title title="Pool details" grafanaPath="ceph-pool-detail?var-pool_name={{selection.pool_name}}" [type]="'metrics'" uid="-xyV8KCiz" grafanaStyle="three"> </cd-grafana> </ng-template> </ng-container> <ng-container ngbNavItem="configuration" *ngIf="selection.type === 'replicated'"> <a ngbNavLink i18n>Configuration</a> <ng-template ngbNavContent> <cd-rbd-configuration-table [data]="selectedPoolConfiguration"></cd-rbd-configuration-table> </ng-template> </ng-container> <ng-container ngbNavItem="cache-tiers-details" *ngIf="selection['tiers']?.length > 0"> <a ngbNavLink i18n>Cache Tiers Details</a> <ng-template ngbNavContent> <cd-table [data]="cacheTiers" [columns]="cacheTierColumns" [autoSave]="false" columnMode="flex"> </cd-table> </ng-template> </ng-container> </nav> <div [ngbNavOutlet]="nav"></div> </ng-container>
1,848
32.618182
100
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.html
<div class="cd-col-form" *cdFormLoading="loading"> <form name="form" #formDir="ngForm" [formGroup]="form" novalidate> <div class="card"> <div i18n="form title|Example: Create Pool@@formTitle" class="card-header">{{ action | titlecase }} {{ resource | upperFirst }}</div> <div class="card-body"> <!-- Name --> <div class="form-group row"> <label class="cd-col-form-label required" for="name" i18n>Name</label> <div class="cd-col-form-input"> <input id="name" name="name" type="text" class="form-control" placeholder="Name..." i18n-placeholder formControlName="name" autofocus> <span class="invalid-feedback" *ngIf="form.showError('name', formDir, 'required')" i18n>This field is required!</span> <span class="invalid-feedback" *ngIf="form.showError('name', formDir, 'uniqueName')" i18n>The chosen Ceph pool name is already in use.</span> <span *ngIf="form.showError('name', formDir, 'rbdPool')" class="invalid-feedback" i18n>It's not possible to create an RBD pool with '/' in the name. Please change the name or remove 'rbd' from the applications list.</span> <span *ngIf="form.showError('name', formDir, 'pattern')" class="invalid-feedback" i18n>Pool name can only contain letters, numbers, '.', '-', '_' or '/'.</span> </div> </div> <!-- Pool type selection --> <div class="form-group row"> <label class="cd-col-form-label required" for="poolType" i18n>Pool type</label> <div class="cd-col-form-input"> <select class="form-select" id="poolType" formControlName="poolType" name="poolType"> <option ngValue="" i18n>-- Select a pool type --</option> <option *ngFor="let poolType of data.poolTypes" [value]="poolType"> {{ poolType }} </option> </select> <span class="invalid-feedback" *ngIf="form.showError('poolType', formDir, 'required')" i18n>This field is required!</span> </div> </div> <div *ngIf="isReplicated || isErasure"> <!-- PG Autoscale Mode --> <div class="form-group row"> <label i18n class="cd-col-form-label" for="pgAutoscaleMode">PG Autoscale</label> <div class="cd-col-form-input"> <select class="form-select" id="pgAutoscaleMode" name="pgAutoscaleMode" formControlName="pgAutoscaleMode"> <option *ngFor="let mode of pgAutoscaleModes" [value]="mode"> {{ mode }} </option> </select> </div> </div> <!-- Pg number --> <div class="form-group row" *ngIf="form.getValue('pgAutoscaleMode') !== 'on'"> <label class="cd-col-form-label required" for="pgNum" i18n>Placement groups</label> <div class="cd-col-form-input"> <input class="form-control" id="pgNum" name="pgNum" formControlName="pgNum" min="1" type="number" (focus)="externalPgChange = false" (blur)="alignPgs()" required> <span class="invalid-feedback" *ngIf="form.showError('pgNum', formDir, 'required')" i18n>This field is required!</span> <span class="invalid-feedback" *ngIf="form.showError('pgNum', formDir, 'min')" i18n>At least one placement group is needed!</span> <span class="invalid-feedback" *ngIf="form.showError('pgNum', formDir, '34')" i18n>Your cluster can't handle this many PGs. Please recalculate the PG amount needed.</span> <span class="form-text text-muted"> <cd-doc section="pgs" docText="Calculation help" i18n-docText></cd-doc> </span> <span class="form-text text-muted" *ngIf="externalPgChange" i18n>The current PGs settings were calculated for you, you should make sure the values suit your needs before submit.</span> </div> </div> <!-- Replica Size --> <div class="form-group row" *ngIf="isReplicated"> <label class="cd-col-form-label required" for="size" i18n>Replicated size</label> <div class="cd-col-form-input"> <input class="form-control" id="size" [max]="getMaxSize()" [min]="getMinSize()" name="size" type="number" formControlName="size"> <span class="invalid-feedback" *ngIf="form.showError('size', formDir)"> <ul class="list-inline"> <li i18n>Minimum: {{ getMinSize() }}</li> <li i18n>Maximum: {{ getMaxSize() }}</li> </ul> </span> <span class="invalid-feedback" *ngIf="form.showError('size', formDir)" i18n>The size specified is out of range. A value from {{ getMinSize() }} to {{ getMaxSize() }} is usable.</span> <span class="text-warning-dark" *ngIf="form.getValue('size') === 1" i18n>A size of 1 will not create a replication of the object. The 'Replicated size' includes the object itself.</span> </div> </div> <!-- Flags --> <div class="form-group row" *ngIf="info.is_all_bluestore && isErasure"> <label i18n class="cd-col-form-label">Flags</label> <div class="cd-col-form-input"> <div class="custom-control custom-checkbox"> <input type="checkbox" class="custom-control-input" id="ec-overwrites" formControlName="ecOverwrites"> <label class="custom-control-label" for="ec-overwrites" i18n>EC Overwrites</label> </div> </div> </div> </div> <!-- Applications --> <div class="form-group row"> <label i18n class="cd-col-form-label" for="applications">Applications</label> <div class="cd-col-form-input"> <cd-select-badges id="applications" [customBadges]="true" [customBadgeValidators]="data.applications.validators" [messages]="data.applications.messages" [data]="data.applications.selected" [options]="data.applications.available" [selectionLimit]="4" (selection)="appSelection()"> </cd-select-badges> <i *ngIf="data.applications.selected <= 0" i18n-title title="Pools should be associated with an application tag" class="{{icons.warning}} icon-warning-color"> </i> </div> </div> <!-- CRUSH --> <div *ngIf="isErasure || isReplicated"> <legend i18n>CRUSH</legend> <!-- Erasure Profile select --> <div class="form-group row" *ngIf="isErasure"> <label i18n class="cd-col-form-label" for="erasureProfile">Erasure code profile</label> <div class="cd-col-form-input"> <div class="input-group mb-1"> <select class="form-select" id="erasureProfile" name="erasureProfile" formControlName="erasureProfile"> <option *ngIf="!ecProfiles" ngValue="" i18n>Loading...</option> <option *ngIf="ecProfiles && ecProfiles.length === 0" [ngValue]="null" i18n>-- No erasure code profile available --</option> <option *ngIf="ecProfiles && ecProfiles.length > 0" [ngValue]="null" i18n>-- Select an erasure code profile --</option> <option *ngFor="let ecp of ecProfiles" [ngValue]="ecp"> {{ ecp.name }} </option> </select> <button class="btn btn-light" [ngClass]="{'active': data.erasureInfo}" id="ecp-info-button" type="button" (click)="data.erasureInfo = !data.erasureInfo"> <i [ngClass]="[icons.questionCircle]" aria-hidden="true"></i> </button> <button class="btn btn-light" type="button" *ngIf="!editing" (click)="addErasureCodeProfile()"> <i [ngClass]="[icons.add]" aria-hidden="true"></i> </button> <button class="btn btn-light" type="button" *ngIf="!editing" ngbTooltip="This profile can't be deleted as it is in use." i18n-ngbTooltip triggers="manual" #ecpDeletionBtn="ngbTooltip" (click)="deleteErasureCodeProfile()"> <i [ngClass]="[icons.trash]" aria-hidden="true"></i> </button> </div> <span class="form-text text-muted" id="ecp-info-block" *ngIf="data.erasureInfo && form.getValue('erasureProfile')"> <nav ngbNav #ecpInfoTabs="ngbNav" class="nav-tabs"> <ng-container ngbNavItem="ecp-info"> <a ngbNavLink i18n>Profile</a> <ng-template ngbNavContent> <cd-table-key-value [renderObjects]="true" [hideKeys]="['name']" [data]="form.getValue('erasureProfile')" [autoReload]="false"> </cd-table-key-value> </ng-template> </ng-container> <ng-container ngbNavItem="used-by-pools"> <a ngbNavLink i18n>Used by pools</a> <ng-template ngbNavContent> <ng-template #ecpIsNotUsed> <span i18n>Profile is not in use.</span> </ng-template> <ul *ngIf="ecpUsage; else ecpIsNotUsed"> <li *ngFor="let pool of ecpUsage"> {{ pool }} </li> </ul> </ng-template> </ng-container> </nav> <div [ngbNavOutlet]="ecpInfoTabs"></div> </span> </div> </div> <!-- Crush ruleset selection --> <div class="form-group row" *ngIf="isErasure && !editing"> <label class="cd-col-form-label" for="crushRule" i18n>Crush ruleset</label> <div class="cd-col-form-input"> <span class="form-text text-muted" i18n>A new crush ruleset will be implicitly created.</span> </div> </div> <div class="form-group row" *ngIf="isReplicated || editing"> <label class="cd-col-form-label" for="crushRule" i18n>Crush ruleset</label> <div class="cd-col-form-input"> <ng-template #noRules> <span class="form-text text-muted"> <span i18n>There are no rules.</span>&nbsp; </span> </ng-template> <div *ngIf="current.rules.length > 0; else noRules"> <div class="input-group"> <select class="form-select" id="crushRule" formControlName="crushRule" name="crushSet"> <option [ngValue]="null" i18n>-- Select a crush rule --</option> <option *ngFor="let rule of current.rules" [ngValue]="rule"> {{ rule.rule_name }} </option> </select> <button class="btn btn-light" [ngClass]="{'active': data.crushInfo}" id="crush-info-button" type="button" ngbTooltip="Placement and replication strategies or distribution policies that allow to specify how CRUSH places data replicas." i18n-ngbTooltip (click)="data.crushInfo = !data.crushInfo"> <i [ngClass]="[icons.questionCircle]" aria-hidden="true"></i> </button> <button class="btn btn-light" type="button" *ngIf="isReplicated && !editing" (click)="addCrushRule()"> <i [ngClass]="[icons.add]" aria-hidden="true"></i> </button> <button class="btn btn-light" *ngIf="isReplicated && !editing" type="button" ngbTooltip="This rule can't be deleted as it is in use." i18n-ngbTooltip triggers="manual" #crushDeletionBtn="ngbTooltip" (click)="deleteCrushRule()"> <i [ngClass]="[icons.trash]" aria-hidden="true"></i> </button> </div> <div class="form-text text-muted" id="crush-info-block" *ngIf="data.crushInfo && form.getValue('crushRule')"> <nav ngbNav #crushInfoTabs="ngbNav" class="nav-tabs"> <ng-container ngbNavItem="crush-rule-info"> <a ngbNavLink i18n>Crush rule</a> <ng-template ngbNavContent> <cd-table-key-value [renderObjects]="false" [hideKeys]="['steps', 'type', 'rule_name']" [data]="form.getValue('crushRule')" [autoReload]="false"> </cd-table-key-value> </ng-template> </ng-container> <ng-container ngbNavItem="crush-rule-steps"> <a ngbNavLink i18n>Crush steps</a> <ng-template ngbNavContent> <ol> <li *ngFor="let step of form.get('crushRule').value.steps"> {{ describeCrushStep(step) }} </li> </ol> </ng-template> </ng-container> <ng-container ngbNavItem="used-by-pools"> <a ngbNavLink i18n>Used by pools</a> <ng-template ngbNavContent> <ng-template #ruleIsNotUsed> <span i18n>Rule is not in use.</span> </ng-template> <ul *ngIf="crushUsage; else ruleIsNotUsed"> <li *ngFor="let pool of crushUsage"> {{ pool }} </li> </ul> </ng-template> </ng-container> </nav> <div [ngbNavOutlet]="crushInfoTabs"></div> </div> <span class="invalid-feedback" *ngIf="form.showError('crushRule', formDir, 'required')" i18n>This field is required!</span> <span class="invalid-feedback" *ngIf="form.showError('crushRule', formDir, 'tooFewOsds')" i18n>The rule can't be used in the current cluster as it has too few OSDs to meet the minimum required OSD by this rule.</span> </div> </div> </div> </div> <!-- Compression --> <div *ngIf="info.is_all_bluestore" formGroupName="compression"> <legend i18n>Compression</legend> <!-- Compression Mode --> <div class="form-group row"> <label i18n class="cd-col-form-label" for="mode">Mode</label> <div class="cd-col-form-input"> <select class="form-select" id="mode" name="mode" formControlName="mode"> <option *ngFor="let mode of info.compression_modes" [value]="mode"> {{ mode }} </option> </select> </div> </div> <div *ngIf="hasCompressionEnabled()"> <!-- Compression algorithm selection --> <div class="form-group row"> <label i18n class="cd-col-form-label" for="algorithm">Algorithm</label> <div class="cd-col-form-input"> <select class="form-select" id="algorithm" name="algorithm" formControlName="algorithm"> <option *ngIf="!info.compression_algorithms" ngValue="" i18n>Loading...</option> <option *ngIf="info.compression_algorithms && info.compression_algorithms.length === 0" i18n ngValue="">-- No erasure compression algorithm available --</option> <option *ngFor="let algorithm of info.compression_algorithms" [value]="algorithm"> {{ algorithm }} </option> </select> </div> </div> <!-- Compression min blob size --> <div class="form-group row"> <label i18n class="cd-col-form-label" for="minBlobSize">Minimum blob size</label> <div class="cd-col-form-input"> <input id="minBlobSize" name="minBlobSize" formControlName="minBlobSize" type="text" min="0" class="form-control" i18n-placeholder placeholder="e.g., 128KiB" defaultUnit="KiB" cdDimlessBinary> <span class="invalid-feedback" *ngIf="form.showError('minBlobSize', formDir, 'min')" i18n>Value should be greater than 0</span> <span class="invalid-feedback" *ngIf="form.showError('minBlobSize', formDir, 'maximum')" i18n>Value should be less than the maximum blob size</span> </div> </div> <!-- Compression max blob size --> <div class="form-group row"> <label i18n class="cd-col-form-label" for="maxBlobSize">Maximum blob size</label> <div class="cd-col-form-input"> <input id="maxBlobSize" type="text" min="0" formControlName="maxBlobSize" class="form-control" i18n-placeholder placeholder="e.g., 512KiB" defaultUnit="KiB" cdDimlessBinary> <span class="invalid-feedback" *ngIf="form.showError('maxBlobSize', formDir, 'min')" i18n>Value should be greater than 0</span> <span class="invalid-feedback" *ngIf="form.showError('maxBlobSize', formDir, 'minimum')" i18n>Value should be greater than the minimum blob size</span> </div> </div> <!-- Compression ratio --> <div class="form-group row"> <label i18n class="cd-col-form-label" for="ratio">Ratio</label> <div class="cd-col-form-input"> <input id="ratio" name="ratio" formControlName="ratio" type="number" min="0" max="1" step="0.1" class="form-control" i18n-placeholder placeholder="Compression ratio"> <span class="invalid-feedback" *ngIf="form.showError('ratio', formDir, 'min') || form.showError('ratio', formDir, 'max')" i18n>Value should be between 0.0 and 1.0</span> </div> </div> </div> </div> <!-- Quotas --> <div> <legend i18n>Quotas</legend> <!-- Max Bytes --> <div class="form-group row"> <label class="cd-col-form-label" for="max_bytes"> <ng-container i18n>Max bytes</ng-container> <cd-helper> <span i18n>Leave it blank or specify 0 to disable this quota.</span> <br> <span i18n>A valid quota should be greater than 0.</span> </cd-helper> </label> <div class="cd-col-form-input"> <input class="form-control" id="max_bytes" name="max_bytes" type="text" formControlName="max_bytes" i18n-placeholder placeholder="e.g., 10GiB" defaultUnit="GiB" cdDimlessBinary> </div> </div> <!-- Max Objects --> <div class="form-group row"> <label class="cd-col-form-label" for="max_objects"> <ng-container i18n>Max objects</ng-container> <cd-helper> <span i18n>Leave it blank or specify 0 to disable this quota.</span> <br> <span i18n>A valid quota should be greater than 0.</span> </cd-helper> </label> <div class="cd-col-form-input"> <input class="form-control" id="max_objects" min="0" name="max_objects" type="number" formControlName="max_objects"> <span class="invalid-feedback" *ngIf="form.showError('max_objects', formDir, 'min')" i18n>The value should be greater or equal to 0</span> </div> </div> </div> <!-- Pool configuration --> <div [hidden]="isErasure || data.applications.selected.indexOf('rbd') === -1"> <cd-rbd-configuration-form [form]="form" [initializeData]="initializeConfigData" (changes)="currentConfigurationValues = $event()"> </cd-rbd-configuration-form> </div> </div> <div class="card-footer"> <cd-form-button-panel (submitActionEvent)="submit()" [form]="form" [submitText]="(action | titlecase) + ' ' + (resource | upperFirst)" wrappingClass="text-right"></cd-form-button-panel> </div> </div> </form> </div>
26,023
41.662295
113
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.html
<nav ngbNav #nav="ngbNav" class="nav-tabs"> <ng-container ngbNavItem> <a ngbNavLink i18n>Pools List</a> <ng-template ngbNavContent> <cd-table #table id="pool-list" [data]="pools" [columns]="columns" selectionType="single" [hasDetails]="true" [status]="tableStatus" [autoReload]="-1" (fetchData)="taskListService.fetch()" (setExpandedRow)="setExpandedRow($event)" (updateSelection)="updateSelection($event)"> <cd-table-actions id="pool-list-actions" class="table-actions" [permission]="permissions.pool" [selection]="selection" [tableActions]="tableActions"> </cd-table-actions> <cd-pool-details cdTableDetail id="pool-list-details" [selection]="expandedRow" [permissions]="permissions" [cacheTiers]="cacheTiers"> </cd-pool-details> </cd-table> </ng-template> </ng-container> <ng-container ngbNavItem *cdScope="'grafana'"> <a ngbNavLink i18n>Overall Performance</a> <ng-template ngbNavContent> <cd-grafana i18n-title title="Ceph pools overview" [grafanaPath]="'ceph-pools-overview?'" [type]="'metrics'" uid="z99hzWtmk" grafanaStyle="two"> </cd-grafana> </ng-template> </ng-container> </nav> <div [ngbNavOutlet]="nav"></div> <ng-template #poolUsageTpl let-row="row"> <cd-usage-bar *ngIf="row.stats?.avail_raw?.latest" [total]="row.stats.bytes_used.latest + row.stats.avail_raw.latest" [used]="row.stats.bytes_used.latest" [title]="row.pool_name" decimals="2"> </cd-usage-bar> </ng-template>
2,055
32.16129
82
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/create-rgw-service-entities/create-rgw-service-entities.component.html
<cd-modal [modalRef]="activeModal"> <ng-container i18n="form title" class="modal-title">Create Realm/Zonegroup/Zone </ng-container> <ng-container class="modal-content"> <form name="createMultisiteEntitiesForm" #formDir="ngForm" [formGroup]="createMultisiteEntitiesForm" novalidate> <div class="modal-body"> <cd-alert-panel type="info" spacingClass="mb-3">The realm/zonegroup/zone created will be set as default and master. </cd-alert-panel> <div class="form-group row"> <label class="cd-col-form-label required" for="realmName" i18n>Realm Name</label> <div class="cd-col-form-input"> <input class="form-control" type="text" placeholder="Realm name..." id="realmName" name="realmName" formControlName="realmName"> <span class="invalid-feedback" *ngIf="createMultisiteEntitiesForm.showError('realmName', formDir, 'required')" i18n>This field is required.</span> </div> </div> <div class="form-group row"> <label class="cd-col-form-label required" for="zonegroupName" i18n>Zonegroup Name</label> <div class="cd-col-form-input"> <input class="form-control" type="text" placeholder="Zonegroup name..." id="zonegroupName" name="zonegroupName" formControlName="zonegroupName"> <span class="invalid-feedback" *ngIf="createMultisiteEntitiesForm.showError('zonegroupName', formDir, 'required')" i18n>This field is required.</span> </div> </div> <div class="form-group row"> <label class="cd-col-form-label required" for="zoneName" i18n>Zone Name</label> <div class="cd-col-form-input"> <input class="form-control" type="text" placeholder="Zone name..." id="zoneName" name="zoneName" formControlName="zoneName"> <span class="invalid-feedback" *ngIf="createMultisiteEntitiesForm.showError('zoneName', formDir, 'required')" i18n>This field is required.</span> </div> </div> </div> <div class="modal-footer"> <cd-form-button-panel (submitActionEvent)="submit()" [form]="createMultisiteEntitiesForm"></cd-form-button-panel> </div> </form> </ng-container> </cd-modal>
2,708
37.15493
109
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/models/rgw-multisite-zone-deletion-form/rgw-multisite-zone-deletion-form.component.html
<cd-modal [modalRef]="activeModal"> <ng-container i18n="form title" class="modal-title">Delete Zone</ng-container> <ng-container class="modal-content"> <form name="zoneForm" [formGroup]="zoneForm" novalidate> <div class="modal-body ms-4"> <label i18n> This will delete your <strong>{{zone?.name}}</strong> Zone. </label> <ng-container *ngIf="includedPools.size"> <label class="mt-3" i18n> Do you want to delete the associated pools with the <strong>{{zone?.name}}</strong> Zone?</label> <label class="mb-4" i18n> This will delete the following pools and any data stored in these pools:</label> <strong *ngFor="let pool of includedPools" class="block">{{ pool }}</strong> <div class="form-group"> <div class="custom-control custom-checkbox mt-2"> <input type="checkbox" class="custom-control-input" name="deletePools" id="deletePools" formControlName="deletePools" (change)="showDangerText()"> <label class="custom-control-label" for="deletePools" i18n>Yes, I want to delete the pools.</label> </div> <div *ngIf="displayText" class="me-4"> <cd-alert-panel type="danger" i18n> This will delete all the data in the pools! </cd-alert-panel> </div> </div> </ng-container> </div> <div class="modal-footer"> <cd-form-button-panel (submitActionEvent)="submit()" [form]="zoneForm" [submitText]="actionLabels.DELETE"> </cd-form-button-panel> </div> </form> </ng-container> </cd-modal>
2,032
35.963636
111
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/models/rgw-multisite-zonegroup-deletion-form/rgw-multisite-zonegroup-deletion-form.component.html
<cd-modal [modalRef]="activeModal"> <ng-container i18n="form title" class="modal-title">Delete Zonegroup</ng-container> <ng-container class="modal-content"> <form name="zonegroupForm" [formGroup]="zonegroupForm" novalidate> <div class="modal-body ms-4"> <label i18n> This will delete your <strong>{{zonegroup?.name}}</strong> Zonegroup. </label> <ng-container *ngIf="zonesList.length > 0"> <label class="mt-3" i18n> Do you want to delete the associated zones and pools with the <strong>{{zonegroup?.name}}</strong> Zonegroup?</label> <ng-container *ngIf="includedPools.size > 0"> <label i18n> This will delete the following:</label> </ng-container> <strong class="mt-3 mb-2 h5 block">Zones:</strong> <div id="scroll"> <strong *ngFor="let zone of zonesList" class="block">{{zone}}</strong> </div> <ng-container *ngIf="includedPools.size > 0"> <strong class="mt-3 mb-2 h5 block">Pools:</strong> <div id="scroll" class="mb-2"> <strong *ngFor="let pool of includedPools" class="block">{{ pool }}</strong> </div> </ng-container> <div class="form-group"> <div class="custom-control custom-checkbox mt-2"> <input type="checkbox" class="custom-control-input" name="deletePools" id="deletePools" formControlName="deletePools" (change)="showDangerText()"> <ng-container *ngIf="includedPools.size > 0 else noPoolsConfirmation"> <label class="custom-control-label" for="deletePools" i18n>Yes, I want to delete the zones and their pools.</label> </ng-container> </div> <div *ngIf="displayText" class="me-4"> <cd-alert-panel type="danger" i18n> This will delete all the data in the pools! </cd-alert-panel> </div> </div> </ng-container> </div> <div class="modal-footer"> <cd-form-button-panel (submitActionEvent)="submit()" [form]="zonegroupForm" [submitText]="actionLabels.DELETE "> </cd-form-button-panel> </div> </form> </ng-container> </cd-modal> <ng-template #noPoolsConfirmation> <label class="custom-control-label" for="deletePools" i18n>Yes, I want to delete the zones.</label> </ng-template>
2,844
36.434211
131
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-details/rgw-bucket-details.component.html
<ng-container *ngIf="selection"> <table class="table table-striped table-bordered"> <tbody> <tr> <td i18n class="bold w-25">Name</td> <td class="w-75">{{ selection.bid }}</td> </tr> <tr> <td i18n class="bold">ID</td> <td>{{ selection.id }}</td> </tr> <tr> <td i18n class="bold">Owner</td> <td>{{ selection.owner }}</td> </tr> <tr> <td i18n class="bold">Index type</td> <td>{{ selection.index_type }}</td> </tr> <tr> <td i18n class="bold">Placement rule</td> <td>{{ selection.placement_rule }}</td> </tr> <tr> <td i18n class="bold">Marker</td> <td>{{ selection.marker }}</td> </tr> <tr> <td i18n class="bold">Maximum marker</td> <td>{{ selection.max_marker }}</td> </tr> <tr> <td i18n class="bold">Version</td> <td>{{ selection.ver }}</td> </tr> <tr> <td i18n class="bold">Master version</td> <td>{{ selection.master_ver }}</td> </tr> <tr> <td i18n class="bold">Modification time</td> <td>{{ selection.mtime | cdDate }}</td> </tr> <tr> <td i18n class="bold">Zonegroup</td> <td>{{ selection.zonegroup }}</td> </tr> <tr> <td i18n class="bold">Versioning</td> <td>{{ selection.versioning }}</td> </tr> <tr> <td i18n class="bold">Encryption</td> <td>{{ selection.encryption }}</td> </tr> <tr> <td i18n class="bold">MFA Delete</td> <td>{{ selection.mfa_delete }}</td> </tr> </tbody> </table> <!-- Bucket quota --> <div *ngIf="selection.bucket_quota"> <legend i18n>Bucket quota</legend> <table class="table table-striped table-bordered"> <tbody> <tr> <td i18n class="bold w-25">Enabled</td> <td class="w-75">{{ selection.bucket_quota.enabled | booleanText }}</td> </tr> <tr> <td i18n class="bold">Maximum size</td> <td *ngIf="selection.bucket_quota.max_size <= -1" i18n>Unlimited</td> <td *ngIf="selection.bucket_quota.max_size > -1"> {{ selection.bucket_quota.max_size | dimless }} </td> </tr> <tr> <td i18n class="bold">Maximum objects</td> <td *ngIf="selection.bucket_quota.max_objects <= -1" i18n>Unlimited</td> <td *ngIf="selection.bucket_quota.max_objects > -1"> {{ selection.bucket_quota.max_objects }} </td> </tr> </tbody> </table> </div> <!-- Locking --> <legend i18n>Locking</legend> <table class="table table-striped table-bordered"> <tbody> <tr> <td i18n class="bold w-25">Enabled</td> <td class="w-75">{{ selection.lock_enabled | booleanText }}</td> </tr> <ng-container *ngIf="selection.lock_enabled"> <tr> <td i18n class="bold">Mode</td> <td>{{ selection.lock_mode }}</td> </tr> <tr> <td i18n class="bold">Days</td> <td>{{ selection.lock_retention_period_days }}</td> </tr> </ng-container> </tbody> </table> </ng-container>
3,545
25.661654
82
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.html
<div class="cd-col-form" *cdFormLoading="loading"> <form name="bucketForm" #frm="ngForm" [formGroup]="bucketForm" novalidate> <div class="card"> <div i18n="form title" class="card-header">{{ action | titlecase }} {{ resource | upperFirst }}</div> <div class="card-body"> <!-- Id --> <div class="form-group row" *ngIf="editing"> <label i18n class="cd-col-form-label" for="id">Id</label> <div class="cd-col-form-input"> <input id="id" name="id" class="form-control" type="text" formControlName="id" readonly> </div> </div> <!-- Name --> <div class="form-group row"> <label class="cd-col-form-label" [ngClass]="{required: !editing}" for="bid" i18n>Name</label> <div class="cd-col-form-input"> <input id="bid" name="bid" class="form-control" type="text" i18n-placeholder placeholder="Name..." formControlName="bid" [readonly]="editing" [autofocus]="!editing"> <span class="invalid-feedback" *ngIf="bucketForm.showError('bid', frm, 'required')" i18n>This field is required.</span> <span class="invalid-feedback" *ngIf="bucketForm.showError('bid', frm, 'bucketNameInvalid')" i18n>Bucket names can only contain lowercase letters, numbers, periods and hyphens.</span> <span class="invalid-feedback" *ngIf="bucketForm.showError('bid', frm, 'bucketNameNotAllowed')" i18n>The chosen name is already in use.</span> <span class="invalid-feedback" *ngIf="bucketForm.showError('bid', frm, 'containsUpperCase')" i18n>Bucket names must not contain uppercase characters or underscores.</span> <span class="invalid-feedback" *ngIf="bucketForm.showError('bid', frm, 'lowerCaseOrNumber')" i18n>Each label must start and end with a lowercase letter or a number.</span> <span class="invalid-feedback" *ngIf="bucketForm.showError('bid', frm, 'ipAddress')" i18n>Bucket names cannot be formatted as IP address.</span> <span class="invalid-feedback" *ngIf="bucketForm.showError('bid', frm, 'onlyLowerCaseAndNumbers')" i18n>Bucket labels cannot be empty and can only contain lowercase letters, numbers and hyphens.</span> <span class="invalid-feedback" *ngIf="bucketForm.showError('bid', frm, 'shouldBeInRange')" i18n>Bucket names must be 3 to 63 characters long.</span> </div> </div> <!-- Owner --> <div class="form-group row"> <label class="cd-col-form-label required" for="owner" i18n>Owner</label> <div class="cd-col-form-input"> <select id="owner" name="owner" class="form-select" formControlName="owner" [autofocus]="editing"> <option i18n *ngIf="owners === null" [ngValue]="null">Loading...</option> <option i18n *ngIf="owners !== null" [ngValue]="null">-- Select a user --</option> <option *ngFor="let owner of owners" [value]="owner">{{ owner }}</option> </select> <span class="invalid-feedback" *ngIf="bucketForm.showError('owner', frm, 'required')" i18n>This field is required.</span> </div> </div> <!-- Placement target --> <div class="form-group row"> <label class="cd-col-form-label" [ngClass]="{required: !editing}" for="placement-target" i18n>Placement target</label> <div class="cd-col-form-input"> <ng-template #placementTargetSelect> <select id="placement-target" name="placement-target" formControlName="placement-target" class="form-select"> <option i18n *ngIf="placementTargets === null" [ngValue]="null">Loading...</option> <option i18n *ngIf="placementTargets !== null" [ngValue]="null">-- Select a placement target --</option> <option *ngFor="let placementTarget of placementTargets" [value]="placementTarget.name">{{ placementTarget.description }}</option> </select> <span class="invalid-feedback" *ngIf="bucketForm.showError('placement-target', frm, 'required')" i18n>This field is required.</span> </ng-template> <ng-container *ngIf="editing; else placementTargetSelect"> <input id="placement-target" name="placement-target" formControlName="placement-target" class="form-control" type="text" readonly> </ng-container> </div> </div> <!-- Versioning --> <fieldset *ngIf="editing"> <legend class="cd-header" i18n>Versioning</legend> <div class="form-group row"> <div class="cd-col-form-offset"> <div class="custom-control custom-checkbox"> <input type="checkbox" class="custom-control-input" id="versioning" name="versioning" formControlName="versioning" (change)="setMfaDeleteValidators()"> <label class="custom-control-label" for="versioning" i18n>Enabled</label> <cd-helper> <span i18n>Enables versioning for the objects in the bucket.</span> </cd-helper> </div> </div> </div> </fieldset> <!-- Multi-Factor Authentication --> <fieldset *ngIf="editing"> <!-- MFA Delete --> <legend class="cd-header" i18n>Multi-Factor Authentication</legend> <div class="form-group row"> <div class="cd-col-form-offset"> <div class="custom-control custom-checkbox"> <input type="checkbox" class="custom-control-input" id="mfa-delete" name="mfa-delete" formControlName="mfa-delete" (change)="setMfaDeleteValidators()"> <label class="custom-control-label" for="mfa-delete" i18n>Delete enabled</label> <cd-helper> <span i18n>Enables MFA (multi-factor authentication) Delete, which requires additional authentication for changing the bucket versioning state.</span> </cd-helper> </div> </div> </div> <div *ngIf="areMfaCredentialsRequired()" class="form-group row"> <label i18n class="cd-col-form-label" for="mfa-token-serial">Token Serial Number</label> <div class="cd-col-form-input"> <input type="text" id="mfa-token-serial" name="mfa-token-serial" formControlName="mfa-token-serial" class="form-control"> <span class="invalid-feedback" *ngIf="bucketForm.showError('mfa-token-serial', frm, 'required')" i18n>This field is required.</span> </div> </div> <div *ngIf="areMfaCredentialsRequired()" class="form-group row"> <label i18n class="cd-col-form-label" for="mfa-token-pin">Token PIN</label> <div class="cd-col-form-input"> <input type="text" id="mfa-token-pin" name="mfa-token-pin" formControlName="mfa-token-pin" class="form-control"> <span class="invalid-feedback" *ngIf="bucketForm.showError('mfa-token-pin', frm, 'required')" i18n>This field is required.</span> </div> </div> </fieldset> <!-- Locking --> <fieldset> <legend class="cd-header" i18n>Locking</legend> <!-- Locking enabled --> <div class="form-group row"> <div class="cd-col-form-offset"> <div class="custom-control custom-checkbox"> <input class="custom-control-input" id="lock_enabled" formControlName="lock_enabled" type="checkbox"> <label class="custom-control-label" for="lock_enabled" i18n>Enabled</label> <cd-helper> <span i18n>Enables locking for the objects in the bucket. Locking can only be enabled while creating a bucket.</span> </cd-helper> </div> </div> </div> <!-- Locking mode --> <div *ngIf="bucketForm.getValue('lock_enabled')" class="form-group row"> <label class="cd-col-form-label" for="lock_mode" i18n>Mode</label> <div class="cd-col-form-input"> <select class="form-select" formControlName="lock_mode" name="lock_mode" id="lock_mode"> <option i18n value="COMPLIANCE">Compliance</option> <option i18n value="GOVERNANCE">Governance</option> </select> </div> </div> <!-- Retention period (days) --> <div *ngIf="bucketForm.getValue('lock_enabled')" class="form-group row"> <label class="cd-col-form-label" for="lock_retention_period_days"> <ng-container i18n>Days</ng-container> <cd-helper i18n>The number of days that you want to specify for the default retention period that will be applied to new objects placed in this bucket.</cd-helper> </label> <div class="cd-col-form-input"> <input class="form-control" type="number" id="lock_retention_period_days" formControlName="lock_retention_period_days" min="0"> <span class="invalid-feedback" *ngIf="bucketForm.showError('lock_retention_period_days', frm, 'pattern')" i18n>The entered value must be a positive integer.</span> <span class="invalid-feedback" *ngIf="bucketForm.showError('lock_retention_period_days', frm, 'lockDays')" i18n>Retention Days must be a positive integer.</span> </div> </div> </fieldset> <fieldset> <legend class="cd-header" i18n>Security</legend> <div class="form-group row"> <div class="cd-col-form-offset"> <div class="custom-control custom-checkbox"> <input class="form-check-input" id="encryption_enabled" name="encryption_enabled" formControlName="encryption_enabled" type="checkbox" [attr.disabled]="!kmsVaultConfig && !s3VaultConfig ? true : null"> <label class="form-check-label" for="encryption_enabled" i18n>Encryption</label> <cd-helper aria-label="toggle encryption helper"> <span i18n>Enables encryption for the objects in the bucket. To enable encryption on a bucket you need to set the configuration values for SSE-S3 or SSE-KMS. To set the configuration values <a href="#/rgw/bucket/create" (click)="openConfigModal()" aria-label="click here">Click here</a></span> </cd-helper> </div> </div> </div> <div *ngIf="bucketForm.getValue('encryption_enabled')"> <div class="form-group row"> <div class="cd-col-form-offset"> <div class="custom-control custom-radio custom-control-inline ps-5"> <input class="form-check-input" formControlName="encryption_type" id="sse_S3_enabled" type="radio" name="encryption_type" value="AES256" [attr.disabled]="!s3VaultConfig ? true : null"> <label class="form-control-label" for="sse_S3_enabled" i18n>SSE-S3 Encryption</label> </div> </div> </div> <div class="form-group row"> <div class="cd-col-form-offset"> <div class="custom-control custom-radio custom-control-inline ps-5"> <input class="form-check-input" formControlName="encryption_type" id="kms_enabled" name="encryption_type" value="aws:kms" [attr.disabled]="!kmsVaultConfig ? true : null" type="radio"> <label class="form-control-label" for="kms_enabled" i18n>Connect to an external key management service</label> </div> </div> </div> <div *ngIf="bucketForm.getValue('encryption_type') === 'aws:kms'"> <div class="form-group row"> <label class="cd-col-form-label required" for="kms_provider" i18n>KMS Provider</label> <div class="cd-col-form-input"> <select id="kms_provider" name="kms_provider" class="form-select" formControlName="kms_provider" [autofocus]="editing"> <option i18n *ngIf="kmsProviders !== null" [ngValue]="null">-- Select a provider --</option> <option *ngFor="let provider of kmsProviders" [value]="provider">{{ provider }}</option> </select> <span class="invalid-feedback" *ngIf="bucketForm.showError('kms_provider', frm, 'required')" i18n>This field is required.</span> </div> </div> </div> <div *ngIf="bucketForm.getValue('encryption_type') === 'aws:kms'"> <div class="form-group row"> <label class="cd-col-form-label required" for="keyId" i18n>Key Id </label> <div class="cd-col-form-input"> <input id="keyId" name="keyId" class="form-control" type="text" formControlName="keyId"> <span class="invalid-feedback" *ngIf="bucketForm.showError('keyId', frm, 'required')" i18n>This field is required.</span> </div> </div> </div> </div> </fieldset> </div> <div class="card-footer"> <cd-form-button-panel (submitActionEvent)="submit()" [form]="bucketForm" [submitText]="(action | titlecase) + ' ' + (resource | upperFirst)" wrappingClass="text-right"></cd-form-button-panel> </div> </div> </form> </div>
17,243
42.326633
177
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-list/rgw-bucket-list.component.html
<cd-table #table [autoReload]="false" [data]="buckets" [columns]="columns" columnMode="flex" selectionType="multiClick" [hasDetails]="true" (setExpandedRow)="setExpandedRow($event)" (updateSelection)="updateSelection($event)" identifier="bid" (fetchData)="getBucketList($event)" [status]="tableStatus"> <cd-table-actions class="table-actions" [permission]="permission" [selection]="selection" [tableActions]="tableActions"> </cd-table-actions> <cd-rgw-bucket-details cdTableDetail [selection]="expandedRow"> </cd-rgw-bucket-details> </cd-table> <ng-template #bucketSizeTpl let-row="row"> <cd-usage-bar *ngIf="row.bucket_quota.max_size > 0 && row.bucket_quota.enabled; else noSizeQuota" [total]="row.bucket_quota.max_size" [used]="row.bucket_size"> </cd-usage-bar> <ng-template #noSizeQuota i18n>No Limit</ng-template> </ng-template> <ng-template #bucketObjectTpl let-row="row"> <cd-usage-bar *ngIf="row.bucket_quota.max_objects > 0 && row.bucket_quota.enabled; else noObjectQuota" [total]="row.bucket_quota.max_objects" [used]="row.num_objects" [isBinary]="false"> </cd-usage-bar> <ng-template #noObjectQuota i18n>No Limit</ng-template> </ng-template>
1,507
32.511111
104
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-config-modal/rgw-config-modal.component.html
<cd-modal [modalRef]="activeModal"> <ng-container i18n="form title" class="modal-title">Update RGW Encryption Configurations</ng-container> <ng-container class="modal-content"> <form name="configForm" #frm="ngForm" [formGroup]="configForm"> <div class="modal-body"> <div class="form-group row"> <label class="cd-col-form-label required" for="encryptionType" i18n>Encryption Type</label> <div class="col-md-auto custom-checkbox form-check-inline ms-3"> <input class="form-check-input" formControlName="encryptionType" id="s3Enabled" type="radio" name="encryptionType" value="AES256"> <label class="custom-check-label" for="s3Enabled" i18n>SSE-S3 Encryption</label> </div> <div class="col-md-auto custom-checkbox form-check-inline"> <input class="form-check-input" formControlName="encryptionType" id="kmsEnabled" name="encryptionType" value="aws:kms" type="radio"> <label class="custom-check-label" for="kmsEnabled" i18n>SSE-KMS Encryption</label> </div> </div> <div *ngIf="configForm.getValue('encryptionType') === 'aws:kms' || configForm.getValue('encryptionType') === 'AES256'"> <div class="form-group row"> <label class="cd-col-form-label required" for="kms_provider" i18n>Key management service provider</label> <div class="cd-col-form-input"> <select id="kms_provider" name="kms_provider" class="form-select" formControlName="kms_provider"> <option i18n *ngIf="kmsProviders !== null" [ngValue]="null">-- Select a provider --</option> <option *ngFor="let provider of kmsProviders" [value]="provider">{{ provider }}</option> </select> <span class="invalid-feedback" *ngIf="configForm.showError('kms_provider', frm, 'required')" i18n>This field is required.</span> </div> </div> </div> <div *ngIf="configForm.getValue('encryptionType') === 'aws:kms' || configForm.getValue('encryptionType') === 'AES256'"> <div class="form-group row"> <label class="cd-col-form-label required" for="auth_method" i18n>Authentication Method</label> <div class="cd-col-form-input"> <select id="auth_method" name="auth_method" class="form-select" formControlName="auth_method"> <option *ngFor="let auth_method of authMethods" [value]="auth_method">{{ auth_method }}</option> </select> <span class="invalid-feedback" *ngIf="configForm.showError('auth_method', frm, 'required')" i18n>This field is required.</span> </div> </div> </div> <div *ngIf="configForm.getValue('encryptionType') === 'aws:kms' || configForm.getValue('encryptionType') === 'AES256'"> <div class="form-group row"> <label class="cd-col-form-label required" for="secret_engine" i18n>Secret Engine</label> <div class="cd-col-form-input"> <select id="secret_engine" name="secret_engine" class="form-select" formControlName="secret_engine"> <option *ngFor="let secret_engine of secretEngines" [value]="secret_engine">{{ secret_engine }}</option> </select> <span class="invalid-feedback" *ngIf="configForm.showError('secret_engine', frm, 'required')" i18n>This field is required.</span> </div> </div> </div> <div *ngIf="configForm.getValue('encryptionType') === 'aws:kms' || configForm.getValue('encryptionType') === 'AES256'"> <div class="form-group row"> <label class="cd-col-form-label" for="secret_path" i18n>Secret Path </label> <div class="cd-col-form-input"> <input id="secret_path" name="secret_path" class="form-control" type="text" formControlName="secret_path"> <span class="invalid-feedback" *ngIf="configForm.showError('secret_path', frm, 'required')" i18n>This field is required.</span> </div> </div> </div> <div *ngIf="configForm.getValue('encryptionType') === 'aws:kms' || configForm.getValue('encryptionType') === 'AES256'"> <div class="form-group row"> <label class="cd-col-form-label" for="namespace" i18n>Namespace </label> <div class="cd-col-form-input"> <input id="namespace" name="namespace" class="form-control" type="text" formControlName="namespace"> </div> </div> </div> <div *ngIf="configForm.getValue('encryptionType') === 'aws:kms' || configForm.getValue('encryptionType') === 'AES256'"> <div class="form-group row"> <label class="cd-col-form-label required" for="address" i18n>Vault Address </label> <div class="cd-col-form-input"> <input id="address" name="address" class="form-control" formControlName="address" placeholder="http://127.0.0.1:8000"> <span class="invalid-feedback" *ngIf="configForm.showError('address', frm, 'required')" i18n>This field is required.</span> </div> </div> </div> <div *ngIf="configForm.getValue('auth_method') === 'token'" class="form-group row"> <label class="cd-col-form-label required" for="token"> <span i18n>Token</span> <cd-helper i18n> The token authentication method expects a Vault token to be present in a plaintext file. </cd-helper> </label> <div class="cd-col-form-input"> <input type="file" formControlName="token" (change)="fileUpload($event.target.files, 'token')"> <span class="invalid-feedback" *ngIf="configForm.showError('token', frm, 'required')" i18n>This field is required.</span> </div> </div> <div *ngIf="configForm.getValue('encryptionType') === 'aws:kms' || configForm.getValue('encryptionType') === 'AES256'"> <div class="form-group row"> <label class="cd-col-form-label" for="ssl_cert"> <span i18n>CA Certificate</span> <cd-helper i18n>The SSL certificate in PEM format.</cd-helper> </label> <div class="cd-col-form-input"> <input type="file" formControlName="ssl_cert" (change)="fileUpload($event.target.files, 'ssl_cert')"> <span class="invalid-feedback" *ngIf="configForm.showError('ssl_cert', frm, 'required')" i18n>This field is required.</span> </div> </div> </div> <div *ngIf="configForm.getValue('encryptionType') === 'aws:kms' || configForm.getValue('encryptionType') === 'AES256'"> <div class="form-group row"> <label class="cd-col-form-label" for="client_cert"> <span i18n>Client Certificate</span> <cd-helper i18n>The Client certificate in PEM format.</cd-helper> </label> <div class="cd-col-form-input"> <input type="file" formControlName="client_cert" (change)="fileUpload($event.target.files, 'client_cert')"> <span class="invalid-feedback" *ngIf="configForm.showError('client_cert', frm, 'required')" i18n>This field is required.</span> </div> </div> </div> <div *ngIf="configForm.getValue('encryptionType') === 'aws:kms' || configForm.getValue('encryptionType') === 'AES256'"> <div class="form-group row"> <label class="cd-col-form-label" for="client_key"> <span i18n>Client Private Key</span> <cd-helper i18n>The Client Private Key in PEM format.</cd-helper> </label> <div class="cd-col-form-input"> <input type="file" (change)="fileUpload($event.target.files, 'client_key')"> <span class="invalid-feedback" *ngIf="configForm.showError('client_key', frm, 'required')" i18n>This field is required.</span> </div> </div> </div> </div> <div class="modal-footer"> <cd-form-button-panel (submitActionEvent)="onSubmit()" [submitText]="actionLabels.SUBMIT" [form]="configForm"></cd-form-button-panel> </div> </form> </ng-container> </cd-modal>
9,675
40
125
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-daemon-details/rgw-daemon-details.component.html
<ng-container *ngIf="selection"> <nav ngbNav #nav="ngbNav" class="nav-tabs" cdStatefulTab="rgw-daemon-details"> <ng-container ngbNavItem="details"> <a ngbNavLink i18n>Details</a> <ng-template ngbNavContent> <cd-table-key-value [data]="metadata" (fetchData)="getMetaData()"> </cd-table-key-value> </ng-template> </ng-container> <ng-container ngbNavItem="performance-counters"> <a ngbNavLink i18n>Performance Counters</a> <ng-template ngbNavContent> <cd-table-performance-counter serviceType="rgw" [serviceId]="serviceMapId"> </cd-table-performance-counter> </ng-template> </ng-container> <ng-container ngbNavItem="performance-details" *ngIf="grafanaPermission.read"> <a ngbNavLink i18n>Performance Details</a> <ng-template ngbNavContent> <cd-grafana i18n-title title="RGW instance details" [grafanaPath]="'rgw-instance-detail?var-rgw_servers=rgw.' + this.serviceId" [type]="'metrics'" uid="x5ARzZtmk" grafanaStyle="one"> </cd-grafana> </ng-template> </ng-container> </nav> <div [ngbNavOutlet]="nav"></div> </ng-container>
1,386
32.02381
95
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-daemon-list/rgw-daemon-list.component.html
<nav ngbNav #nav="ngbNav" class="nav-tabs"> <ng-container ngbNavItem> <a ngbNavLink i18n>Gateways List</a> <ng-template ngbNavContent> <cd-table [data]="daemons" [columns]="columns" columnMode="flex" [hasDetails]="true" (setExpandedRow)="setExpandedRow($event)" (fetchData)="getDaemonList($event)"> <cd-rgw-daemon-details cdTableDetail [selection]="expandedRow"> </cd-rgw-daemon-details> </cd-table> </ng-template> </ng-container> <ng-container ngbNavItem *ngIf="grafanaPermission.read"> <a ngbNavLink i18n>Overall Performance</a> <ng-template ngbNavContent> <cd-grafana i18n-title title="RGW overview" [grafanaPath]="'rgw-overview?'" [type]="'metrics'" uid="WAkugZpiz" grafanaStyle="two"> </cd-grafana> </ng-template> </ng-container> <ng-container ngbNavItem *ngIf="grafanaPermission.read && isMultiSite"> <a ngbNavLink i18n>Sync Performance</a> <ng-template ngbNavContent> <cd-grafana i18n-title title="Radosgw sync overview" [grafanaPath]="'radosgw-sync-overview?'" [type]="'metrics'" uid="rgw-sync-overview" grafanaStyle="two"> </cd-grafana> </ng-template> </ng-container> </nav> <div [ngbNavOutlet]="nav"></div>
1,574
28.716981
62
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-details/rgw-multisite-details.component.html
<div class="row"> <div class="col-sm-12 col-lg-12"> <div> <cd-alert-panel *ngIf="!rgwModuleStatus" type="info" spacingClass="mb-3" i18n>You need to enable the rgw module to access the import/export feature. <a class="text-decoration-underline" (click)="enableRgwModule()"> Enable RGW Module</a> </cd-alert-panel> <cd-table-actions class="btn-group mb-4 me-2" [permission]="permission" [selection]="selection" [tableActions]="createTableActions"> </cd-table-actions> <span *ngIf="showMigrateAction"> <cd-table-actions class="btn-group mb-4 me-2 secondary" [permission]="permission" [btnColor]="'light'" [selection]="selection" [tableActions]="migrateTableAction"> </cd-table-actions> </span> <cd-table-actions class="btn-group mb-4 me-2" [permission]="permission" [btnColor]="'light'" [selection]="selection" [tableActions]="importAction"> </cd-table-actions> <cd-table-actions class="btn-group mb-4 me-2" [permission]="permission" [btnColor]="'light'" [selection]="selection" [tableActions]="exportAction"> </cd-table-actions> </div> <div class="card"> <div class="card-header" i18n>Topology Viewer</div> <div class="card-body"> <div class="row"> <div class="col-sm-6 col-lg-6 tree-container"> <i *ngIf="loadingIndicator" [ngClass]="[icons.large, icons.spinner, icons.spin]"></i> <tree-root #tree [nodes]="nodes" [options]="treeOptions" (updateData)="onUpdateData()"> <ng-template #treeNodeTemplate let-node> <span *ngIf="node.data.name" class="me-3"> <span *ngIf="(node.data.show_warning)"> <i class="text-danger" i18n-title [title]="node.data.warning_message" [ngClass]="icons.danger"></i> </span> <i [ngClass]="node.data.icon"></i> {{ node.data.name }} </span> <span class="badge badge-success me-2" *ngIf="node.data.is_default"> default </span> <span class="badge badge-warning me-2" *ngIf="node.data.is_master"> master </span> <span class="badge badge-warning me-2" *ngIf="node.data.secondary_zone"> secondary-zone </span> <div class="btn-group align-inline-btns" *ngIf="node.isFocused" role="group"> <div [title]="editTitle" i18n-title> <button type="button" class="btn btn-light dropdown-toggle-split ms-1" (click)="openModal(node, true)" [disabled]="getDisable() || node.data.secondary_zone"> <i [ngClass]="[icons.edit]"></i> </button> </div> <div [title]="deleteTitle" i18n-title> <button type="button" class="btn btn-light ms-1" [disabled]="isDeleteDisabled(node) || node.data.secondary_zone" (click)="delete(node)"> <i [ngClass]="[icons.destroy]"></i> </button> </div> </div> </ng-template> </tree-root> </div> <div class="col-sm-6 col-lg-6 metadata" *ngIf="metadata"> <legend>{{ metadataTitle }}</legend> <cd-table-key-value cdTableDetail [data]="metadata"> </cd-table-key-value> </div> </div> </div> </div> </div> </div>
4,566
39.776786
99
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-export/rgw-multisite-export.component.html
<cd-modal [modalRef]="activeModal"> <ng-container i18n="form title" class="modal-title">Export Multi-site Realm Token</ng-container> <ng-container class="modal-content"> <form name="exportTokenForm" #frm="ngForm" [formGroup]="exportTokenForm"> <span *ngIf="loading" class="d-flex justify-content-center"> <i [ngClass]="[icons.large3x, icons.spinner, icons.spin]"></i></span> <div class="modal-body" *ngIf="!loading"> <cd-alert-panel *ngIf="!tokenValid" type="warning" class="mx-3" i18n> <div *ngFor="let realminfo of realms"> <b>{{realminfo.realm}}</b> - {{realminfo.token}} </div> </cd-alert-panel> <div *ngFor="let realminfo of realms"> <div class="form-group row"> <label class="cd-col-form-label" for="realmName" i18n>Realm Name </label> <div class="cd-col-form-input"> <input id="realmName" name="realmName" type="text" value="{{ realminfo.realm }}" readonly> </div> </div> <div class="form-group row"> <label class="cd-col-form-label" for="token" i18n>Token </label> <div class="cd-col-form-input"> <input id="realmToken" name="realmToken" type="text" value="{{ realminfo.token }}" class="me-2 mb-4" readonly> <cd-copy-2-clipboard-button source="{{ realminfo.token }}" [byId]="false"> </cd-copy-2-clipboard-button> </div> <hr *ngIf="realms.length > 1"> </div> </div> </div> <div class="modal-footer"> <cd-back-button class="m-2 float-end" aria-label="Close" (backAction)="activeModal.close()"></cd-back-button> </div> </form> </ng-container> </cd-modal>
2,175
31.969697
80
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-import/rgw-multisite-import.component.html
<cd-modal [modalRef]="activeModal"> <ng-container i18n="form title" class="modal-title">Import Multi-site Token</ng-container> <ng-container class="modal-content"> <form name="importTokenForm" #frm="ngForm" [formGroup]="importTokenForm"> <div class="modal-body"> <cd-alert-panel type="info" spacingClass="mb-3">Please create a rgw service using the secondary zone(created after submitting this form) to start the replication between zones. </cd-alert-panel> <div class="form-group row"> <label class="cd-col-form-label required" for="realmToken" i18n>Token </label> <div class="cd-col-form-input"> <input id="realmToken" name="realmToken" class="form-control" type="text" formControlName="realmToken"> <span class="invalid-feedback" *ngIf="importTokenForm.showError('realmToken', frm, 'required')" i18n>This field is required.</span> </div> </div> <div class="form-group row"> <label class="cd-col-form-label required" for="zoneName" i18n>Secondary Zone Name</label> <div class="cd-col-form-input"> <input class="form-control" type="text" placeholder="Zone name..." id="zoneName" name="zoneName" formControlName="zoneName"> <span class="invalid-feedback" *ngIf="importTokenForm.showError('zoneName', frm, 'required')" i18n>This field is required.</span> <span class="invalid-feedback" *ngIf="importTokenForm.showError('zoneName', frm, 'uniqueName')" i18n>The chosen zone name is already in use.</span> </div> </div> </div> <div class="modal-footer"> <cd-form-button-panel (submitActionEvent)="onSubmit()" [submitText]="actionLabels.IMPORT" [form]="importTokenForm"></cd-form-button-panel> </div> </form> </ng-container> </cd-modal>
2,234
38.210526
170
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-migrate/rgw-multisite-migrate.component.html
<cd-modal [modalRef]="activeModal"> <ng-container i18n="form title" class="modal-title">Migrate Single Site to Multi-site <cd-helper> <span>Migrate from a single-site deployment with a default zonegroup and zone to a multi-site system</span> </cd-helper> </ng-container> <ng-container class="modal-content"> <form name="multisiteMigrateForm" #formDir="ngForm" [formGroup]="multisiteMigrateForm" novalidate> <div class="modal-body"> <div class="form-group row"> <label class="cd-col-form-label required" for="realmName" i18n>Realm Name</label> <div class="cd-col-form-input"> <input class="form-control" type="text" placeholder="Realm name..." id="realmName" name="realmName" formControlName="realmName"> <span class="invalid-feedback" *ngIf="multisiteMigrateForm.showError('realmName', formDir, 'required')" i18n>This field is required.</span> <span class="invalid-feedback" *ngIf="multisiteMigrateForm.showError('realmName', formDir, 'uniqueName')" i18n>The chosen realm name is already in use.</span> </div> </div> <div class="form-group row"> <label class="cd-col-form-label required" for="zonegroupName" i18n>Rename default zonegroup</label> <div class="cd-col-form-input"> <input class="form-control" type="text" placeholder="Zonegroup name..." id="zonegroupName" name="zonegroupName" formControlName="zonegroupName"> <span class="invalid-feedback" *ngIf="multisiteMigrateForm.showError('zonegroupName', formDir, 'required')" i18n>This field is required.</span> <span class="invalid-feedback" *ngIf="multisiteMigrateForm.showError('zonegroupName', formDir, 'uniqueName')" i18n>The chosen zonegroup name is already in use.</span> </div> </div> <div class="form-group row"> <label class="cd-col-form-label required" for="zonegroup_endpoints" i18n>Zonegroup Endpoints</label> <div class="cd-col-form-input"> <input class="form-control" type="text" placeholder="e.g, http://ceph-node-00.com:80" id="zonegroup_endpoints" name="zonegroup_endpoints" formControlName="zonegroup_endpoints"> <span class="invalid-feedback" *ngIf="multisiteMigrateForm.showError('zonegroup_endpoints', formDir, 'required')" i18n>This field is required.</span> <span class="invalid-feedback" *ngIf="multisiteMigrateForm.showError('zonegroup_endpoints', formDir, 'endpoint')" i18n>Please enter a valid IP address.</span> </div> </div> <div class="form-group row"> <label class="cd-col-form-label required" for="zoneName" i18n>Rename default zone</label> <div class="cd-col-form-input"> <input class="form-control" type="text" placeholder="Zone name..." id="zoneName" name="zoneName" formControlName="zoneName"> <span class="invalid-feedback" *ngIf="multisiteMigrateForm.showError('zoneName', formDir, 'required')" i18n>This field is required.</span> <span class="invalid-feedback" *ngIf="multisiteMigrateForm.showError('zoneName', formDir, 'uniqueName')" i18n>The chosen zone name is already in use.</span> </div> </div> <div class="form-group row"> <label class="cd-col-form-label required" for="zone_endpoints" i18n>Zone Endpoints</label> <div class="cd-col-form-input"> <input class="form-control" type="text" placeholder="e.g, http://ceph-node-00.com:80" id="zone_endpoints" name="zone_endpoints" formControlName="zone_endpoints"> <span class="invalid-feedback" *ngIf="multisiteMigrateForm.showError('zone_endpoints', formDir, 'required')" i18n>This field is required.</span> <span class="invalid-feedback" *ngIf="multisiteMigrateForm.showError('zone_endpoints', formDir, 'endpoint')" i18n>Please enter a valid IP address.</span> </div> </div> <div class="form-group row"> <label class="cd-col-form-label required" for="access_key" i18n>Access key</label> <div class="cd-col-form-input"> <input class="form-control" type="text" placeholder="e.g." id="access_key" name="access_key" formControlName="access_key"> </div> </div> <div class="form-group row"> <label class="cd-col-form-label required" for="access_key" i18n>Secret key</label> <div class="cd-col-form-input"> <input class="form-control" type="text" placeholder="e.g." id="secret_key" name="secret_key" formControlName="secret_key"> </div> </div> </div> <div class="modal-footer"> <cd-form-button-panel (submitActionEvent)="submit()" [submitText]="actionLabels.MIGRATE" [form]="multisiteMigrateForm"></cd-form-button-panel> </div> </form> </ng-container> </cd-modal>
6,007
40.434483
113
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-realm-form/rgw-multisite-realm-form.component.html
<cd-modal [modalRef]="activeModal"> <ng-container i18n="form title" class="modal-title">{{ action | titlecase }} {{ resource | upperFirst }}</ng-container> <ng-container class="modal-content"> <form name="multisiteRealmForm" #formDir="ngForm" [formGroup]="multisiteRealmForm" novalidate> <div class="modal-body"> <div class="form-group row"> <label class="cd-col-form-label required" for="realmName" i18n>Realm Name</label> <div class="cd-col-form-input"> <input class="form-control" type="text" placeholder="Realm name..." id="realmName" name="realmName" formControlName="realmName"> <span class="invalid-feedback" *ngIf="multisiteRealmForm.showError('realmName', formDir, 'required')" i18n>This field is required.</span> <span class="invalid-feedback" *ngIf="multisiteRealmForm.showError('realmName', formDir, 'uniqueName')" i18n>The chosen realm name is already in use.</span> <div class="custom-control custom-checkbox"> <input class="form-check-input" id="default_realm" name="default_realm" formControlName="default_realm" [attr.disabled]="action === 'edit' ? true: null" type="checkbox"> <label class="form-check-label" for="default_realm" i18n>Default</label> <cd-helper *ngIf="action === 'edit' && info.data.is_default"> <span i18n>You cannot unset the default flag.</span> </cd-helper> <cd-helper *ngIf="action === 'edit' && !info.data.is_default"> <span i18n>Please consult the <a href="{{ docUrl }}">documentation</a> to follow the failover mechanism</span> </cd-helper> <cd-helper *ngIf="defaultRealmDisabled && action === 'create'"> <span i18n>Default realm already exists.</span> </cd-helper> </div> </div> </div> </div> <div class="modal-footer"> <cd-form-button-panel (submitActionEvent)="submit()" [form]="multisiteRealmForm" [submitText]="(action | titlecase) + ' ' + (resource | upperFirst)"></cd-form-button-panel> </div> </form> </ng-container> </cd-modal>
2,554
42.305085
124
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-zone-form/rgw-multisite-zone-form.component.html
<cd-modal [modalRef]="activeModal"> <ng-container i18n="form title" class="modal-title">{{ action | titlecase }} {{ resource | upperFirst }}</ng-container> <ng-container class="modal-content"> <form name="multisiteZoneForm" #formDir="ngForm" [formGroup]="multisiteZoneForm" novalidate> <div class="modal-body"> <div class="form-group row"> <label class="cd-col-form-label" for="selectedZonegroup" i18n>Select Zonegroup</label> <div class="cd-col-form-input"> <select class="form-select" id="selectedZonegroup" [attr.disabled]="action === 'edit' ? true : null" formControlName="selectedZonegroup" name="selectedZonegroup" (change)="onZoneGroupChange($event.target.value)"> <option *ngFor="let zonegroupName of zonegroupList" [value]="zonegroupName.name" [selected]="zonegroupName.name === multisiteZoneForm.getValue('selectedZonegroup')"> {{ zonegroupName.name }} </option> </select> </div> </div> <div class="form-group row"> <label class="cd-col-form-label required" for="zonegroupName" i18n>Zone Name</label> <div class="cd-col-form-input"> <input class="form-control" type="text" placeholder="Zone name..." id="zoneName" name="zoneName" formControlName="zoneName"> <span class="invalid-feedback" *ngIf="multisiteZoneForm.showError('zoneName', formDir, 'required')" i18n>This field is required.</span> <span class="invalid-feedback" *ngIf="multisiteZoneForm.showError('zoneName', formDir, 'uniqueName')" i18n>The chosen zone name is already in use.</span> <div class="custom-control custom-checkbox"> <input class="form-check-input" id="default_zone" name="default_zone" formControlName="default_zone" [attr.disabled]="action === 'edit' ? true : null" type="checkbox"> <label class="form-check-label" for="default_zone" i18n>Default</label> <span *ngIf="disableDefault && action === 'create'"> <cd-helper i18n>Default zone can only exist in a default zonegroup. </cd-helper> </span> <span *ngIf="isDefaultZone"> <cd-helper i18n>You cannot unset the default flag. </cd-helper> </span> <cd-helper *ngIf="action === 'edit' && !isDefaultZone"> <span i18n>Please consult the <a href="{{ docUrl }}">documentation</a> to follow the failover mechanism</span> </cd-helper><br> </div> <div class="custom-control custom-checkbox"> <input class="form-check-input" id="master_zone" name="master_zone" formControlName="master_zone" [attr.disabled]="action === 'edit' ? true : null" type="checkbox"> <label class="form-check-label" for="master_zone" i18n>Master</label> <span *ngIf="disableMaster"> <cd-helper i18n>Master zone already exists for the selected zonegroup. </cd-helper> </span> <span *ngIf="isMasterZone"> <cd-helper i18n>You cannot unset the master flag. </cd-helper> </span> <cd-helper *ngIf="action === 'edit' && !isMasterZone"> <span i18n>Please consult the <a href="{{ docUrl }}">documentation</a> to follow the failover mechanism</span> </cd-helper> </div> </div> </div> <div class="form-group row"> <label class="cd-col-form-label required" for="zone_endpoints" i18n>Endpoints</label> <div class="cd-col-form-input"> <input class="form-control" type="text" placeholder="e.g, http://ceph-node-00.com:80" id="zone_endpoints" name="zone_endpoints" formControlName="zone_endpoints"> <span class="invalid-feedback" *ngIf="multisiteZoneForm.showError('zone_endpoints', formDir, 'required')" i18n>This field is required.</span> <span class="invalid-feedback" *ngIf="multisiteZoneForm.showError('zone_endpoints', formDir, 'endpoint')" i18n>Please enter a valid IP address.</span> </div> </div> <div class="form-group row"> <label class="cd-col-form-label required" for="access_key" i18n>Access key</label> <div class="cd-col-form-input"> <input class="form-control" type="text" placeholder="DiPt4V7WWvy2njL1z6aC" id="access_key" name="access_key" formControlName="access_key"> </div> </div> <div class="form-group row"> <label class="cd-col-form-label required" for="access_key" i18n>Secret key</label> <div class="cd-col-form-input"> <input class="form-control" type="text" placeholder="xSZUdYky0bTctAdCEEW8ikhfBVKsBV5LFYL82vvh" id="secret_key" name="secret_key" formControlName="secret_key"> </div> </div> <div class="form-group row" *ngIf="action === 'edit'"> <div *ngIf="action === 'edit'"> <legend>Placement Targets</legend> <div class="form-group row"> <label class="cd-col-form-label" for="placementTarget" i18n>Placement target</label> <div class="cd-col-form-input"> <select class="form-select" id="placementTarget" formControlName="placementTarget" name="placementTarget" (change)="getZonePlacementData($event.target.value)"> <option *ngFor="let placement of placementTargets" [value]="placement.name" [selected]="placement.name === multisiteZoneForm.getValue('placementTarget')"> {{ placement.name }} </option> </select> </div> </div> <div class="form-group row"> <label class="cd-col-form-label" for="placementDataPool" i18n>Data pool</label> <div class="cd-col-form-input"> <select class="form-select" id="placementDataPool" formControlName="placementDataPool" [value]="placementDataPool" name="placementDataPool"> <option *ngFor="let pool of poolList" [value]="pool.poolname" [selected]="pool.poolname === multisiteZoneForm.getValue('placementDataPool')"> {{ pool.poolname }} </option> </select> </div> </div> <div class="form-group row"> <label class="cd-col-form-label" for="placementIndexPool" i18n>Index pool</label> <div class="cd-col-form-input"> <select class="form-select" id="placementIndexPool" formControlName="placementIndexPool" name="placementIndexPool"> <option *ngFor="let pool of poolList" [value]="pool.poolname" [selected]="pool.poolname === multisiteZoneForm.getValue('placementIndexPool')"> {{ pool.poolname }} </option> </select> </div> </div> <div class="form-group row"> <label class="cd-col-form-label" for="placementDataExtraPool" i18n>Data extra pool</label> <div class="cd-col-form-input"> <select class="form-select" id="placementDataExtraPool" formControlName="placementDataExtraPool" name="placementDataExtraPool"> <option *ngFor="let pool of poolList" [value]="pool.poolname" [selected]="pool.poolname === multisiteZoneForm.getValue('placementDataExtraPool')"> {{ pool.poolname }} </option> </select> </div> </div> <div> <legend>Storage Classes</legend> <div class="form-group row"> <label class="cd-col-form-label" for="storageClass" i18n>Storage Class</label> <div class="cd-col-form-input"> <select class="form-select" id="storageClass" formControlName="storageClass" (change)="getStorageClassData($event.target.value)" name="storageClass"> <option *ngFor="let str of storageClassList" [value]="str.value"> {{ str.value }} </option> </select> </div> </div> <div class="form-group row"> <label class="cd-col-form-label" for="storageDataPool" i18n>Data pool</label> <div class="cd-col-form-input"> <select class="form-select" id="storageDataPool" formControlName="storageDataPool" name="storageDataPool"> <option *ngFor="let pool of poolList" [value]="pool.poolname" [selected]="pool.poolname === multisiteZoneForm.getValue('storageDataPool')"> {{ pool.poolname }} </option> </select> </div> </div> <div class="form-group row"> <label class="cd-col-form-label" for="storageCompression" i18n>Compression</label> <div class="cd-col-form-input"> <select class="form-select" id="storageCompression" formControlName="storageCompression" name="storageCompression"> <option *ngFor="let compression of compressionTypes" [value]="compression"> {{ compression }} </option> </select> </div> </div> </div> </div> </div> </div> <div class="modal-footer"> <cd-form-button-panel (submitActionEvent)="submit()" [form]="multisiteZoneForm" [submitText]="(action | titlecase) + ' ' + (resource | upperFirst)"></cd-form-button-panel> </div> </form> </ng-container> </cd-modal>
11,731
41.507246
124
html
null
ceph-main/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-zonegroup-form/rgw-multisite-zonegroup-form.component.html
<cd-modal [modalRef]="activeModal"> <ng-container i18n="form title" class="modal-title">{{ action | titlecase }} {{ resource | upperFirst }}</ng-container> <ng-container class="modal-content"> <form name="multisiteZonegroupForm" #formDir="ngForm" [formGroup]="multisiteZonegroupForm" novalidate> <div class="modal-body"> <div class="form-group row"> <label class="cd-col-form-label" for="selectedRealm" i18n>Select Realm</label> <div class="cd-col-form-input"> <select class="form-select" id="selectedRealm" formControlName="selectedRealm" name="selectedRealm"> <option ngValue="" i18n>-- Select a realm --</option> <option *ngFor="let realmName of realmList" [value]="realmName.name" [selected]="realmName.name === multisiteZonegroupForm.getValue('selectedRealm')"> {{ realmName.name }} </option> </select> </div> </div> <div class="form-group row"> <label class="cd-col-form-label required" for="zonegroupName" i18n>Zonegroup Name</label> <div class="cd-col-form-input"> <input class="form-control" type="text" placeholder="Zonegroup name..." id="zonegroupName" name="zonegroupName" formControlName="zonegroupName"> <span class="invalid-feedback" *ngIf="multisiteZonegroupForm.showError('zonegroupName', formDir, 'required')" i18n>This field is required.</span> <span class="invalid-feedback" *ngIf="multisiteZonegroupForm.showError('zonegroupName', formDir, 'uniqueName')" i18n>The chosen zonegroup name is already in use.</span> <div class="custom-control custom-checkbox"> <input class="form-check-input" id="default_zonegroup" name="default_zonegroup" formControlName="default_zonegroup" [attr.disabled]="action === 'edit' ? true : null" type="checkbox"> <label class="form-check-label" for="default_zonegroup" i18n>Default</label> <span *ngIf="disableDefault && action === 'create'"> <cd-helper i18n>Zonegroup doesn't belong to the default realm.</cd-helper> </span> <cd-helper *ngIf="action === 'edit' && !info.data.is_default"> <span i18n>Please consult the <a href="{{ docUrl }}">documentation</a> to follow the failover mechanism</span> </cd-helper> <cd-helper *ngIf="action === 'edit' && info.data.is_default"> <span i18n>You cannot unset the default flag.</span> </cd-helper><br> <input class="form-check-input" id="master_zonegroup" name="master_zonegroup" formControlName="master_zonegroup" [attr.disabled]="action === 'edit' ? true : null" type="checkbox"> <label class="form-check-label" for="master_zonegroup" i18n>Master</label> <span *ngIf="disableMaster && action === 'create'"> <cd-helper i18n>Multiple master zonegroups can't be configured. If you want to create a new zonegroup and make it the master zonegroup, you must delete the default zonegroup.</cd-helper> </span> <cd-helper *ngIf="action === 'edit' && !info.data.is_master"> <span i18n>Please consult the <a href="{{ docUrl }}">documentation</a> to follow the failover mechanism</span> </cd-helper> <cd-helper *ngIf="action === 'edit' && info.data.is_master"> <span i18n>You cannot unset the master flag.</span> </cd-helper> </div> </div> </div> <div class="form-group row"> <label class="cd-col-form-label required" for="zonegroup_endpoints" i18n>Endpoints</label> <div class="cd-col-form-input"> <input class="form-control" type="text" placeholder="e.g, http://ceph-node-00.com:80" id="zonegroup_endpoints" name="zonegroup_endpoints" formControlName="zonegroup_endpoints"> <span class="invalid-feedback" *ngIf="multisiteZonegroupForm.showError('zonegroup_endpoints', formDir, 'required')" i18n>This field is required.</span> <span class="invalid-feedback" *ngIf="multisiteZonegroupForm.showError('zonegroup_endpoints', formDir, 'endpoint')" i18n>Please enter a valid IP address.</span> </div> </div> <div class="form-group row" *ngIf="action === 'edit'"> <label i18n for="zones" class="cd-col-form-label">Zones</label> <div class="cd-col-form-input"> <cd-select-badges id="zones" [data]="zonegroupZoneNames" [options]="labelsOption" [customBadges]="true"> </cd-select-badges><br> <span class="invalid-feedback" *ngIf="isRemoveMasterZone" i18n>Cannot remove master zone.</span> </div> </div> <div *ngIf="action === 'edit'"> <legend>Placement targets</legend> <ng-container formArrayName="placementTargets"> <div *ngFor="let item of placementTargets.controls; let index = index; trackBy: trackByFn"> <div class="card" [formGroup]="item"> <div class="card-header"> {{ (index + 1) | ordinal }} <span class="float-end clickable" name="remove_placement_target" (click)="removePlacementTarget(index)" ngbTooltip="Remove">&times;</span> </div> <div class="card-body"> <!-- Placement Id --> <div class="form-group row"> <label i18n class="cd-col-form-label required" for="placement_id">Placement Id</label> <div class="cd-col-form-input"> <input type="text" class="form-control" name="placement_id" id="placement_id" formControlName="placement_id" placeholder="eg. default-placement"> <span class="invalid-feedback"> <span *ngIf="showError(index, 'placement_id', formDir, 'required')" i18n>This field is required.</span> </span> </div> </div> <!-- Tags--> <div class="form-group row"> <label i18n class="cd-col-form-label" for="tags">Tags</label> <div class="cd-col-form-input"> <input type="text" class="form-control" name="tags" id="tags" formControlName="tags" placeholder="comma separated tags, eg. default-placement, ssd"> </div> </div> <!-- Storage Class --> <div class="form-group row"> <label i18n class="cd-col-form-label" for="storage_class">Storage Class</label> <div class="cd-col-form-input"> <input type="text" class="form-control" name="storage_class" id="storage_class" formControlName="storage_class" placeholder="eg. Standard-tier"> </div> </div> </div> </div> </div> </ng-container> <button type="button" id="add-plc" class="btn btn-light float-end my-3" (click)="addPlacementTarget()"> <i [ngClass]="[icons.add]"></i> <ng-container i18n>Add placement target</ng-container> </button> </div> </div> <div class="modal-footer"> <cd-form-button-panel (submitActionEvent)="submit()" [form]="multisiteZonegroupForm" [submitText]="(action | titlecase) + ' ' + (resource | upperFirst)"></cd-form-button-panel> </div> </form> </ng-container> </cd-modal>
9,054
42.956311
198
html