2019-10-17 18:23:53 +03:00
|
|
|
<!--
|
|
|
|
|
|
2022-01-17 14:07:46 +02:00
|
|
|
Copyright © 2016-2022 The Thingsboard Authors
|
2019-10-17 18:23:53 +03:00
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
|
limitations under the License.
|
|
|
|
|
|
|
|
|
|
-->
|
|
|
|
|
<div class="tb-js-func" style="background: #fff;" [ngClass]="{'tb-disabled': disabled, 'fill-height': fillHeight}"
|
|
|
|
|
tb-fullscreen
|
2019-10-24 19:52:19 +03:00
|
|
|
[fullscreen]="fullscreen" fxLayout="column">
|
2019-10-17 18:23:53 +03:00
|
|
|
<div fxLayout="row" fxLayoutAlign="start center" style="height: 40px;" class="tb-js-func-toolbar">
|
2022-04-01 17:03:57 +03:00
|
|
|
<label *ngIf="functionTitle" class="tb-title no-padding">{{functionTitle + ': f(' + functionArgsString + ')' }}</label>
|
|
|
|
|
<label *ngIf="!functionTitle" class="tb-title no-padding">{{'function ' + (functionName ? functionName : '') + '(' + functionArgsString + ') {'}}</label>
|
2019-10-17 18:23:53 +03:00
|
|
|
<span fxFlex></span>
|
|
|
|
|
<button type='button' *ngIf="!disabled" mat-button class="tidy" (click)="beautifyJs()">
|
|
|
|
|
{{'js-func.tidy' | translate }}
|
|
|
|
|
</button>
|
2021-10-06 21:03:29 +03:00
|
|
|
<div *ngIf="helpId" [tb-help-popup]="helpId"></div>
|
2021-02-17 17:21:50 +02:00
|
|
|
<fieldset style="width: initial">
|
|
|
|
|
<div matTooltip="{{(fullscreen ? 'fullscreen.exit' : 'fullscreen.expand') | translate}}"
|
|
|
|
|
matTooltipPosition="above"
|
|
|
|
|
style="border-radius: 50%"
|
|
|
|
|
(click)="fullscreen = !fullscreen">
|
|
|
|
|
<button type='button' mat-button mat-icon-button class="tb-mat-32">
|
|
|
|
|
<mat-icon class="material-icons">{{ fullscreen ? 'fullscreen_exit' : 'fullscreen' }}</mat-icon>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</fieldset>
|
2019-10-17 18:23:53 +03:00
|
|
|
</div>
|
2022-04-01 17:03:57 +03:00
|
|
|
<div id="tb-javascript-panel" class="tb-js-func-panel" [ngClass]="{'tb-js-func-title': functionTitle}" fxLayout="column" tb-toast toastTarget="{{toastTargetId}}">
|
2019-10-31 18:33:51 +02:00
|
|
|
<div #javascriptEditor id="tb-javascript-input" [ngClass]="{'fill-height': fillHeight}"></div>
|
2019-10-17 18:23:53 +03:00
|
|
|
</div>
|
|
|
|
|
<div fxLayout="row" fxLayoutAlign="start center" style="height: 40px;">
|
2022-04-01 17:03:57 +03:00
|
|
|
<label *ngIf="!functionTitle" class="tb-title no-padding">}</label>
|
2019-10-17 18:23:53 +03:00
|
|
|
</div>
|
|
|
|
|
</div>
|