datakey-config.tpl.html
Home
/
ui /
src /
app /
components /
datakey-config.tpl.html
<md-content class="md-padding" layout="column">
<md-autocomplete ng-if="model.type === types.dataKeyType.timeseries || model.type === types.dataKeyType.attribute"
style="padding-bottom: 8px;"
ng-required="true"
md-no-cache="true"
id="key"
ng-model="model.name"
md-selected-item="model.name"
md-search-text="keySearchText"
md-items="item in keysSearch(keySearchText)"
md-item-text="item"
md-min-length="0"
placeholder="Key name"
md-floating-label="Key">
<span md-highlight-text="keySearchText" md-highlight-flags="^i">{{item}}</span>
</md-autocomplete>
<div layout="row" layout-align="start center">
<md-input-container flex class="md-block">
<label translate>datakey.label</label>
<input ng-required="true" name="label" ng-model="model.label">
</md-input-container>
<div flex md-color-picker
ng-required="true"
ng-model="model.color"
label="{{ 'datakey.color' | translate }}"
icon="format_color_fill"
default="#999"
md-color-clear-button="false"
open-on-input="true"
md-color-generic-palette="false"
md-color-history="false">
</div>
</div>
<section layout="column" ng-if="model.type === types.dataKeyType.function">
<span translate>datakey.data-generation-func</span>
<br/>
<tb-js-func ng-model="model.funcBody"
function-args="{{ ['time', 'prevValue'] }}"
validation-args="{{ [1, 1] }}"
result-type="any">
</tb-js-func>
</section>
<section layout="column" ng-if="model.type === types.dataKeyType.timeseries || model.type === types.dataKeyType.attribute">
<md-checkbox ng-model="model.usePostProcessing" aria-label="{{ 'datakey.use-data-post-processing-func' | translate }}">
{{ 'datakey.use-data-post-processing-func' | translate }}
</md-checkbox>
<tb-js-func ng-if="model.usePostProcessing"
ng-model="model.postFuncBody"
function-args="{{ ['time', 'value', 'prevValue'] }}"
validation-args="{{ [1, 1, 1] }}"
result-type="any">
</tb-js-func>
</section>
</md-content>