File
Implements
Metadata
selector |
cd-configuration-details |
styleUrls |
./configuration-details.component.scss |
templateUrl |
./configuration-details.component.html |
Index
Properties
|
|
Methods
|
|
Inputs
|
|
Constructor
constructor(i18n: I18n)
|
|
Parameters :
Name |
Type |
Optional |
i18n |
I18n
|
No
|
|
Methods
ngOnChanges
|
ngOnChanges()
|
|
|
flags
|
Type : object
|
Default value : {
runtime: this.i18n('The value can be updated at runtime.'),
no_mon_update: this.i18n(`Daemons/clients do not pull this value from the
monitor config database. We disallow setting this option via 'ceph config
set ...'. This option should be configured via ceph.conf or via the
command line.`),
startup: this.i18n('Option takes effect only during daemon startup.'),
cluster_create: this.i18n('Option only affects cluster creation.'),
create: this.i18n('Option only affects daemon creation.')
}
|
|
import { Component, Input, OnChanges } from '@angular/core';
import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { CdTableSelection } from '../../../../shared/models/cd-table-selection';
@Component({
selector: 'cd-configuration-details',
templateUrl: './configuration-details.component.html',
styleUrls: ['./configuration-details.component.scss']
})
export class ConfigurationDetailsComponent implements OnChanges {
@Input()
selection: CdTableSelection;
selectedItem: any;
flags = {
runtime: this.i18n('The value can be updated at runtime.'),
no_mon_update: this.i18n(`Daemons/clients do not pull this value from the
monitor config database. We disallow setting this option via 'ceph config
set ...'. This option should be configured via ceph.conf or via the
command line.`),
startup: this.i18n('Option takes effect only during daemon startup.'),
cluster_create: this.i18n('Option only affects cluster creation.'),
create: this.i18n('Option only affects daemon creation.')
};
constructor(private i18n: I18n) {}
ngOnChanges() {
if (this.selection.hasSelection) {
this.selectedItem = this.selection.first();
this.selectedItem.services = _.split(this.selectedItem.services, ',');
}
}
}
<tabset *ngIf="selection?.hasSingleSelection">
<tab i18n-heading
heading="Details">
<table class="table table-striped table-bordered">
<tbody>
<tr>
<td i18n
class="bold col-sm-1">Name</td>
<td class="col-sm-3">{{ selectedItem.name }}</td>
</tr>
<tr>
<td i18n
class="bold col-sm-1">Description</td>
<td class="col-sm-3">{{ selectedItem.desc }}</td>
</tr>
<tr>
<td i18n
class="bold col-sm-1">Long description</td>
<td class="col-sm-3">{{ selectedItem.long_desc }}</td>
</tr>
<tr>
<td i18n
class="bold col-sm-1">Current values</td>
<td class="col-sm-3">
<span *ngFor="let conf of selectedItem.value; last as isLast">
{{ conf.section }}: {{ conf.value }}{{ !isLast ? "," : "" }}<br/>
</span>
</td>
</tr>
<tr>
<td i18n
class="bold col-sm-1">Default</td>
<td class="col-sm-3">{{ selectedItem.default }}</td>
</tr>
<tr>
<td i18n
class="bold col-sm-1">Daemon default</td>
<td class="col-sm-3">{{ selectedItem.daemon_default }}</td>
</tr>
<tr>
<td i18n
class="bold col-sm-1">Type</td>
<td class="col-sm-3">{{ selectedItem.type }}</td>
</tr>
<tr>
<td i18n
class="bold col-sm-1">Min</td>
<td class="col-sm-3">{{ selectedItem.min }}</td>
</tr>
<tr>
<td i18n
class="bold col-sm-1">Max</td>
<td class="col-sm-3">{{ selectedItem.max }}</td>
</tr>
<tr>
<td i18n
class="bold col-sm-1">Flags</td>
<td class="col-sm-3">
<span *ngFor="let flag of selectedItem.flags">
<span title="{{ flags[flag] }}">
<span class="badge badge-pill badge-primary margin-right-sm">{{ flag | uppercase }}</span>
</span>
</span>
</td>
</tr>
<tr>
<td i18n
class="bold col-sm-1">Services</td>
<td class="col-sm-3">
<span *ngFor="let service of selectedItem.services">
<span class="badge badge-pill badge-primary margin-right-sm">{{ service }}</span>
</span>
</td>
</tr>
<tr>
<td i18n
class="bold col-sm-1">Source</td>
<td class="col-sm-3">{{ selectedItem.source }}</td>
</tr>
<tr>
<td i18n
class="bold col-sm-1">Level</td>
<td class="col-sm-3">{{ selectedItem.level }}</td>
</tr>
<tr>
<td i18n
class="bold col-sm-1">Can be updated at runtime (editable)</td>
<td class="col-sm-3">{{ selectedItem.can_update_at_runtime | booleanText }}</td>
</tr>
<tr>
<td i18n
class="bold col-sm-1">Tags</td>
<td class="col-sm-3">{{ selectedItem.tags }}</td>
</tr>
<tr>
<td i18n
class="bold col-sm-1">Enum values</td>
<td class="col-sm-3">{{ selectedItem.enum_values }}</td>
</tr>
<tr>
<td i18n
class="bold col-sm-1">See also</td>
<td class="col-sm-3">{{ selectedItem.see_also }}</td>
</tr>
</tbody>
</table>
</tab>
</tabset>
Legend
Html element with directive