widgets/implementations/datapoints-table/datapoints-table-config/datapoints-table-config.component.ts
OnInit
OnBeforeSave
OnDestroy
| selector | c8y-datapoints-table-view-config |
| standalone | true |
| imports |
CoreModule
DatapointSelectorModule
DatapointsTableViewWidgetComponent
GlobalContextWidgetWrapperComponent
PopoverModule
ReactiveFormsModule
|
| templateUrl | ./datapoints-table-config.component.html |
Properties |
|
Methods |
Inputs |
Accessors |
| config |
Type : DatapointsTableConfig
|
| ngOnDestroy |
ngOnDestroy()
|
|
Returns :
void
|
| ngOnInit |
ngOnInit()
|
|
Returns :
void
|
| onBeforeSave | ||||||
onBeforeSave(config?: DatapointsTableConfig)
|
||||||
|
Parameters :
Returns :
boolean
|
| Readonly AGGREGATION_LABELS |
Type : unknown
|
Default value : AGGREGATION_LABELS
|
| Readonly AGGREGATION_VALUES_ARR |
Type : unknown
|
Default value : AGGREGATION_VALUES_ARR
|
| datapointSelectionConfig |
Type : Partial<DatapointSelectorModalOptions>
|
Default value : {}
|
| Readonly DATE_SELECTION_LABELS |
Type : unknown
|
Default value : DATE_SELECTION_LABELS
|
| Readonly DATE_SELECTION_VALUES_ARR |
Type : unknown
|
Default value : DATE_SELECTION_VALUES_ARR
|
| Readonly DEFAULT_DATE_SELECTOR_VALUE |
Type : unknown
|
Default value : DATE_SELECTION_VALUES.dashboard_context
|
| Readonly DEFAULT_INTERVAL_VALUE |
Type : unknown
|
Default value : INTERVAL_VALUES.hours
|
| defaultFormOptions |
Type : Partial<DatapointAttributesFormConfig>
|
Default value : {
selectableChartLineTypes: [],
selectableAxisTypes: [],
showRedRange: true,
showYellowRange: true
}
|
| disabledAggregationOptions |
Type : AggregationOptionStatus
|
Default value : {}
|
| formGroup |
Type : ReturnType<unknown>
|
| Readonly INTERVAL_VALUES_ARR |
Type : unknown
|
Default value : INTERVAL_VALUES_ARR
|
| Readonly REFRESH_INTERVAL_VALUES_ARR |
Type : unknown
|
Default value : REFRESH_INTERVAL_VALUES_ARR
|
| Readonly TIME_RANGE_INTERVAL_LABELS |
Type : unknown
|
Default value : TIME_RANGE_INTERVAL_LABELS
|
| Readonly widgetConfigService |
Type : unknown
|
Default value : inject(WidgetConfigService)
|
| widgetControls |
Type : WidgetControlsPresetConfig
|
Default value : {
presets: ['defaultWithAggregation']
}
|
| previewMapSet | ||||||
setpreviewMapSet(template: TemplateRef
|
||||||
|
Parameters :
Returns :
void
|
<div class="p-l-24 p-r-24">
@if (formGroup) {
<form [formGroup]="formGroup">
<fieldset class="c8y-fieldset">
<legend>
{{ 'Decimal places' | translate }}
</legend>
<c8y-form-group class="p-t-8">
<input
class="form-control"
name="decimalPlaces"
type="number"
formControlName="decimalPlaces"
step="1"
/>
</c8y-form-group>
</fieldset>
</form>
}
</div>
<ng-template #datapointsTablePreview>
@let previewConfig = previewConfig$ | async;
@if (previewConfig?.datapoints?.length > 0) {
<c8y-global-context-widget-wrapper
[widgetControls]="widgetControls"
[displayMode]="'preview'"
[config]="previewConfig"
></c8y-global-context-widget-wrapper>
<c8y-datapoints-table-view
[config]="previewConfig"
[isInPreviewMode]="true"
></c8y-datapoints-table-view>
} @else {
<div class="col-md-6 d-col a-i-start j-c-center">
<c8y-ui-empty-state
[icon]="'c8y-data-points'"
[title]="'No data points selected' | translate"
[subtitle]="'Select data point to render content' | translate"
[horizontal]="false"
data-cy="datapoints-table-list--empty-state-no-data-point-selected"
>
<p c8y-guide-docs>
<small
translate
ngNonBindable
>
Find out more in the
<a c8y-guide-href="/docs/cockpit/widgets-collection/#data-point-table">
user documentation</a
>.
</small>
</p>
</c8y-ui-empty-state>
</div>
}
</ng-template>