~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Run ``npm run doc-build`` to generate code docs in the ``documentation/``
-directory. To make them accesible locally for a web browser, run
+directory. To make them accessible locally for a web browser, run
``npm run doc-serve`` and they will become available at ``http://localhost:8444``.
With ``npm run compodoc -- <opts>`` you may
`fully configure it <https://compodoc.app/guides/usage.html>`_.
To get the current version of Bootstrap used inside Ceph please refer to the ``package.json`` and search for:
-- ``bootstrap``: For the Boostrap version used.
+- ``bootstrap``: For the Bootstrap version used.
- ``@ng-bootstrap``: For the version of the Angular bindings which we are using.
So for the future please do the following when visiting a component:
Angular Unit Tests:
Unit tests, as the name suggests, are tests for smaller units of the code.
-Those tests are designed for testing all kinds of Angulars' components (e.g. services, pipes etc.).
+Those tests are designed for testing all kinds of Angular components (e.g. services, pipes etc.).
They do not require a connection to the backend, hence those tests are independent of it.
The expected data of the backend is mocked in the frontend and by using this data
the functionality of the frontend can be tested without having to have real data from the backend.
``src/pybind/mgr/dashboard/frontend/i18n.config.json``:: and make sure that the
organization is *ceph*, the project is *ceph-dashboard* and the resource is
the one you want to pull from and push to e.g. *Master:master*. To find a list
-of avaiable resources visit `<https://www.transifex.com/ceph/ceph-dashboard/content/>`_.
+of available resources visit `<https://www.transifex.com/ceph/ceph-dashboard/content/>`_.
After you checked the config go to the directory ``src/pybind/mgr/dashboard/frontend`` and run::
function prepareLocales() {
try {
fs.accessSync(backup, fs.constants.F_OK);
- logger(`'${backup}' alread exists, restoring it into '${filename}'}`);
+ logger(`'${backup}' already exists, restoring it into '${filename}'}`);
fs.copyFileSync(backup, filename);
} catch (err) {
fs.copyFileSync(filename, backup);
</div>
<span i18n
class="invalid-feedback"
- *ngIf="form.showError('configuration.' + option.name, cfgFormGroup, 'min')">The mininum value is 0</span>
+ *ngIf="form.showError('configuration.' + option.name, cfgFormGroup, 'min')">The minimum value is 0</span>
</div>
</div>
</div>
const setReload = (sth?: any) => (component['reloadSubscriber'] = sth);
const mockRunOutside = () => {
component['subscribeInterval'] = () => {
- // It's mocked because the rxjs timer subscription ins't called through the use of 'tick'.
+ // It's mocked because the rxjs timer subscription isn't called through the use of 'tick'.
setReload({
unsubscribed: false,
unsubscribe: () => {
class="form-control custom-select"
[(ngModel)]="priority"
(ngModelChange)="filterLogs()">
- <option *ngFor="let prio of prioritys"
+ <option *ngFor="let prio of priorities"
[value]="prio.value">{{ prio.name }}</option>
</select>
</div>
expect(component).toBeTruthy();
});
- describe('abstractfilters', () => {
- it('after initializaed', () => {
- const filters = component.abstractfilters();
+ describe('abstractFilters', () => {
+ it('after initialized', () => {
+ const filters = component.abstractFilters();
expect(filters.priority).toBe('All');
expect(filters.key).toBe('');
expect(filters.yearMonthDay).toBe('');
component.selectedDate = { year: 2019, month: 1, day: 1 };
component.startTime = { hour: 1, minute: 10 };
component.endTime = { hour: 12, minute: 10 };
- const filters = component.abstractfilters();
+ const filters = component.abstractFilters();
expect(filters.yearMonthDay).toBe('2019-01-01');
expect(filters.sTime).toBe(70);
expect(filters.eTime).toBe(730);
icons = Icons;
interval: number;
- prioritys: Array<{ name: string; value: string }> = [
+ priorities: Array<{ name: string; value: string }> = [
{ name: 'Info', value: '[INF]' },
{ name: 'Warning', value: '[WRN]' },
{ name: 'Error', value: '[ERR]' },
});
}
- abstractfilters(): any {
+ abstractFilters(): any {
const priority = this.priority;
const key = this.search.toLowerCase().replace(/,/g, '');
}
filterLogs() {
- const filters = this.abstractfilters();
+ const filters = this.abstractFilters();
this.clog = this.filterExecutor(this.contentData.clog, filters);
this.audit_log = this.filterExecutor(this.contentData.audit_log, filters);
}
</div>
</div>
- <!-- Secutiry Label -->
+ <!-- Security Label -->
<div class="form-group row"
*ngIf="nfsForm.getValue('name') === 'CEPH'">
<label class="cd-col-form-label"
getData(promises: Observable<any>[]) {
forkJoin(promises).subscribe((data: any[]) => {
this.resolveDaemons(data[0]);
- this.resolvefsals(data[1]);
+ this.resolveFsals(data[1]);
this.resolveClients(data[2]);
this.resolveFilesystems(data[3]);
if (data[4]) {
}
}
- resolvefsals(res: string[]) {
+ resolveFsals(res: string[]) {
res.forEach((fsal) => {
const fsalItem = this.nfsService.nfsFsal.find((currentFsalItem) => {
return fsal === currentFsalItem.value;
<label class="cd-col-form-label"
for="user"
i18n>Username</label>
- <div class="cd-col-form-inpu">
+ <div class="cd-col-form-input">
<input id="user"
name="user"
class="form-control"
<label class="cd-col-form-label"
for="secret_key"
i18n>Secret key</label>
- <div class="cd-col-form-inpu">
+ <div class="cd-col-form-input">
<div class="input-group">
<input id="secret_key"
name="secret_key"
onPasswordChange() {
// Logout here because changing the password will change the
// session token which will finally lead to a 401 when calling
- // the REST API the next time. The API HTTP inteceptor will
+ // the REST API the next time. The API HTTP interceptor will
// then also redirect to the login page immediately.
this.authService.logout();
}
export class BreadcrumbsComponent implements OnDestroy {
crumbs: IBreadcrumb[] = [];
/**
- * Usefull for e2e tests.
+ * Useful for e2e tests.
* This allow us to mark the breadcrumb as pending during the navigation from
* one page to another.
* This resolves the problem of validating the breadcrumb of a new page and
/*
* Include here all styles from components that extend from bootstrap.
- * This removes the need to @import bootstrap into those componenet,
+ * This removes the need to @import bootstrap into those component,
* thus reducing the final css size.
*/