Initial Upload
This commit is contained in:
1
ui/src/templates/commandInput/freetext.hbs
Normal file
1
ui/src/templates/commandInput/freetext.hbs
Normal file
@@ -0,0 +1 @@
|
||||
<input class="free-text form-control form-control-inline" value="{{ initVal }}">
|
||||
5
ui/src/templates/commandInput/http-key-value.hbs
Normal file
5
ui/src/templates/commandInput/http-key-value.hbs
Normal file
@@ -0,0 +1,5 @@
|
||||
<div class="http-key-value-element mt-1">
|
||||
<input class="form-control validated-element form-control-inline http-key" placeholder="{{trans.key}}" value="{{ key }}">
|
||||
<input class="form-control validated-element form-control-inline http-value" placeholder="{{trans.value}}" value="{{ value }}">
|
||||
<button type="button" class="btn btn-sm btn-warning pull-right http-key-value-remove"><i class="fa fa-minus"></i></button>
|
||||
</div>
|
||||
80
ui/src/templates/commandInput/http.hbs
Normal file
80
ui/src/templates/commandInput/http.hbs
Normal file
@@ -0,0 +1,80 @@
|
||||
{{! URL }}
|
||||
<label for="httpURL{{ unique }}" class="http-url-label form-check-label">{{trans.url}}</label>
|
||||
<input name="httpURL{{ unique }}" id="httpURL{{ unique }}" class="http-url w-100 validated-element form-control form-control-inline" placeholder="{{trans.url}}" value="{{ value.url }}">
|
||||
|
||||
{{! Query params }}
|
||||
<div class="request-params request-section mt-2">
|
||||
<div class="form-check w-100">
|
||||
<input type="checkbox" data-toggle-element=".query-builder-container" data-toggle-class="d-inline-block" class="show-query-builder ignore-change form-check-input" id="queryParamsBuilder{{ unique }}" name="queryParamsBuilder{{ unique }}" title="{{trans.queryParamBuilder}}" checked>
|
||||
<label for="queryParamsBuilder{{ unique }}" class="show-query-builder-label form-check-label">{{trans.queryBuilder}}</label>
|
||||
</div>
|
||||
<div class="form-group-command query-builder-container w-100 bg-white p-2 d-none d-inline-block">
|
||||
<label for="queryBuilderContainer{{ unique }}" class="http-key-value-container-label">{{trans.queryParams}}:</label>
|
||||
<button class="http-key-value-add btn btn-info btn-sm pull-right" type="button">
|
||||
<i class="fa fa-plus"></i>
|
||||
</button>
|
||||
|
||||
<div id="queryBuilderContainer{{ unique }}" class="http-key-value-container"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{! Method }}
|
||||
<div class="form-group-command mt-2">
|
||||
<label for="httpMethod{{ unique }}">{{trans.requestMethod}}:</label>
|
||||
<select name="httpMethod{{ unique }}" id="httpMethod{{ unique }}" class="http-method pl-1 form-control form-control-inline">
|
||||
<option value="GET" {{#eq value.requestOptions.method "GET"}}selected="selected"{{/eq}}>GET</option>
|
||||
<option value="POST" {{#eq value.requestOptions.method "POST"}}selected="selected"{{/eq}}>POST</option>
|
||||
<option value="PUT" {{#eq value.requestOptions.method "PUT"}}selected="selected"{{/eq}}>PUT</option>
|
||||
<option value="DELETE" {{#eq value.requestOptions.method "DELETE"}}selected="selected"{{/eq}}>DELETE</option>
|
||||
<option value="CONNECT" {{#eq value.requestOptions.method "CONNECT"}}selected="selected"{{/eq}}>CONNECT</option>
|
||||
<option value="HEAD" {{#eq value.requestOptions.method "HEAD"}}selected="selected"{{/eq}}>HEAD</option>
|
||||
<option value="OPTIONS" {{#eq value.requestOptions.method "OPTIONS"}}selected="selected"{{/eq}}>OPTIONS</option>
|
||||
<option value="PATCH" {{#eq value.requestOptions.method "PATCH"}}selected="selected"{{/eq}}>PATCH</option>
|
||||
<option value="TRACE" {{#eq value.requestOptions.method "TRACE"}}selected="selected"{{/eq}}>TRACE</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{{! Headers }}
|
||||
<div class="request-headers request-section mt-2">
|
||||
<div class="form-check w-100">
|
||||
<input type="checkbox" data-toggle-element=".http-headers" data-toggle-element-reverse=".http-headers-container" data-toggle-class="d-inline-block" class="show-raw-headers ignore-change form-check-input" id="showRawHeaders{{ unique }}" name="showRawHeaders{{ unique }}" title="{{trans.showRawHeaders}}">
|
||||
<label for="showRawHeaders{{ unique }}" class="show-raw-headers-label form-check-label">{{trans.showRawHeaders}}</label>
|
||||
</div>
|
||||
<textarea name="httpHeaders{{ unique }}" id="httpHeaders{{ unique }}" class="http-headers w-100 d-none form-control validated-element form-control-inline" placeholder="{{trans.headers}}"></textarea>
|
||||
<div class="form-group-command http-headers-container w-100 bg-white p-2 d-none d-inline-block">
|
||||
<label for="httpHeadersContainer{{ unique }}" class="http-key-value-container-label">{{trans.headers}}</label>
|
||||
<button class="http-key-value-add btn btn-info btn-sm pull-right" type="button">
|
||||
<i class="fa fa-plus"></i>
|
||||
</button>
|
||||
|
||||
<div id="httpHeadersContainer{{ unique }}" class="http-key-value-container"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{! Body }}
|
||||
<div class="request-body request-section mt-2">
|
||||
{{! Content type }}
|
||||
<div class="form-group-command">
|
||||
<label for="httpContentType{{ unique }}" class="pl-1">{{trans.contentType}}:</label>
|
||||
<select name="httpContentType{{ unique }}" id="httpContentType{{ unique }}" class="http-contenttype form-control form-control-inline">
|
||||
<option value="application/x-www-form-urlencoded" {{#eq value.contenttype "application/x-www-form-urlencoded"}}selected="selected"{{/eq}}>urlencoded</option>
|
||||
<option value="application/json" {{#eq value.contenttype "application/json"}}selected="selected"{{/eq}}>json</option>
|
||||
<option value="text/plain" {{#eq value.contenttype "text/plain"}}selected="selected"{{/eq}}>textplain</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{{! Body data }}
|
||||
<div class="form-check w-100 mt-2">
|
||||
<input type="checkbox" data-toggle-element=".http-data" data-toggle-element-reverse=".http-data-container" data-toggle-class="d-inline-block" class="show-raw-data ignore-change form-check-input" id="showRawData{{ unique }}" name="showRawData{{ unique }}" title="{{trans.showRawBodyData}}">
|
||||
<label for="showRawData{{ unique }}" class="show-raw-data-label form-check-label">{{trans.showRawData}}</label>
|
||||
</div>
|
||||
<textarea name="httpData{{ unique }}" id="httpData{{ unique }}" class="http-data w-100 validated-element d-none form-control form-control-inline" placeholder="{{trans.bodyData}}"></textarea>
|
||||
<div class="form-group-command http-data-container w-100 bg-white p-2 d-none d-inline-block">
|
||||
<label for="httpDataContainer{{ unique }}" class="http-key-value-container-label">{{trans.bodyData}}</label>
|
||||
<button class="http-key-value-add btn btn-info btn-sm pull-right" type="button">
|
||||
<i class="fa fa-plus"></i>
|
||||
</button>
|
||||
|
||||
<div id="httpDataContainer{{ unique }}" class="http-key-value-container"></div>
|
||||
</div>
|
||||
</div>
|
||||
11
ui/src/templates/commandInput/intent-extra.hbs
Normal file
11
ui/src/templates/commandInput/intent-extra.hbs
Normal file
@@ -0,0 +1,11 @@
|
||||
<div class="intent-extra-element">
|
||||
<input class="form-control form-control-inline validated-element extra-name" placeholder="{{trans.name}}" value="{{ name }}">
|
||||
<select class="form-control form-control-inline extra-type">
|
||||
<option value="string" {{#eq type "string"}}selected="selected"{{/eq}}>string</option>
|
||||
<option value="int" {{#eq type "int"}}selected="selected"{{/eq}}>int</option>
|
||||
<option value="bool" {{#eq type "bool"}}selected="selected"{{/eq}}>bool</option>
|
||||
<option value="intArray" {{#eq type "intArray"}}selected="selected"{{/eq}}>intArray</option
|
||||
</select>
|
||||
<input class="form-control form-control-inline validated-element extra-value" placeholder="{{trans.value}}" value="{{ value }}">
|
||||
<button type="button" class="btn btn-sm btn-warning pull-right intent-remove-extra"><i class="fa fa-minus"></i></button>
|
||||
</div>
|
||||
19
ui/src/templates/commandInput/intent.hbs
Normal file
19
ui/src/templates/commandInput/intent.hbs
Normal file
@@ -0,0 +1,19 @@
|
||||
<div class="form-group-command intent-type-container">
|
||||
<label for="intentType{{ unique }}" class="intent-type-label">{{trans.type}}:</label>
|
||||
<select name="intentType{{ unique }}" id="intentType{{ unique }}" class="intent-type form-control form-control-inline">
|
||||
<option value="activity" {{#eq value.type "activity"}}selected="selected"{{/eq}}>activity</option>
|
||||
<option value="service" {{#eq value.type "service"}}selected="selected"{{/eq}}>service</option>
|
||||
<option value="broadcast" {{#eq value.type "broadcast"}}selected="selected"{{/eq}}>broadcast</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<input name="intentName{{ unique }}" id="intentName{{ unique }}" class="intent-name form-control validated-element form-control-inline" placeholder="{{trans.intent}}" value="{{ value.name }}">
|
||||
|
||||
<div class="form-group-command">
|
||||
<label for="intentExtraContainer{{ unique }}" class="intent-extra-container-label">{{trans.extra}}:</label>
|
||||
<button class="intent-add-extra btn btn-info btn-sm pull-right" type="button">
|
||||
<i class="fa fa-plus"></i>
|
||||
</button>
|
||||
|
||||
<div id="intentExtraContainer{{ unique }}" class="intent-extra-container"></div>
|
||||
</div>
|
||||
15
ui/src/templates/commandInput/main.hbs
Normal file
15
ui/src/templates/commandInput/main.hbs
Normal file
@@ -0,0 +1,15 @@
|
||||
<div class="form-check pull-right">
|
||||
<input type="checkbox" class="show-command-preview form-check-input" id="showCommandPreview{{ unique }}" name="showCommandPreview{{ unique }}" title="{{trans.showCommandPreview}}">
|
||||
<label for="showCommandPreview{{ unique }}" class="show-command-preview-label form-check-label">{{trans.showCommandPreview}}</label>
|
||||
</div>
|
||||
|
||||
<select class="command-type form-control form-control-inline">
|
||||
{{#each types}}
|
||||
<option value="{{ @key }}" {{#eq @key ../type}}selected="selected"{{/eq}}>{{ this }}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
<div class="command-inputs panel panel-default"></div>
|
||||
|
||||
<div disabled="disabled" class="command-preview bg-primary p-2 w-100" data-invalid-message="{{trans.invalidCommand}}">
|
||||
<code class="text-white"></code>
|
||||
</div>
|
||||
49
ui/src/templates/commandInput/rs232.hbs
Normal file
49
ui/src/templates/commandInput/rs232.hbs
Normal file
@@ -0,0 +1,49 @@
|
||||
<div class="form-group-command form-group-device form-group-rs232">
|
||||
<input class="form-control form-control-inline validated-element rs232-text-input rs232-device-name" placeholder="{{trans.deviceNameCOM}}" value="{{ value.cs.deviceName }}">
|
||||
<input class="form-control form-control-inline validated-element rs232-text-input rs232-baud-rate" placeholder="{{trans.baudRate}}" value="{{ value.cs.baudRate }}">
|
||||
<input class="form-control form-control-inline validated-element rs232-text-input rs232-data-bits" placeholder="{{trans.dateBits}}" value="{{ value.cs.dataBits }}">
|
||||
</div>
|
||||
<div class="form-group-command form-group-rs232">
|
||||
<div class="col-12 col-sm-6">
|
||||
<label for="rs232Parity{{ unique }}">{{trans.parity}}:</label>
|
||||
<select name="rs232Parity{{ unique }}" id="rs232Parity{{ unique }}" class="rs232-parity form-control">
|
||||
<option value="None" {{#eq value.cs.parity "None"}}selected="selected"{{/eq}}>None</option>
|
||||
<option value="Odd" {{#eq value.cs.parity "Odd"}}selected="selected"{{/eq}}>Odd</option>
|
||||
<option value="Even" {{#eq value.cs.parity "Even"}}selected="selected"{{/eq}}>Even</option>
|
||||
<option value="Mark" {{#eq value.cs.parity "Mark"}}selected="selected"{{/eq}}>Mark</option>
|
||||
<option value="Space" {{#eq value.cs.parity "Space"}}selected="selected"{{/eq}}>Space</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<label for="rs232StopBits{{ unique }}">{{trans.stopBits}}:</label>
|
||||
<select name="rs232StopBits{{ unique }}" id="rs232StopBits{{ unique }}" class="rs232-stop-bits form-control">
|
||||
<option value="None" {{#eq value.cs.stopBits "None"}}selected="selected"{{/eq}}>None</option>
|
||||
<option value="One" {{#eq value.cs.stopBits "One"}}selected="selected"{{/eq}}>One</option>
|
||||
<option value="Two" {{#eq value.cs.stopBits "Two"}}selected="selected"{{/eq}}>Two</option>
|
||||
<option value="OnePointFive" {{#eq value.cs.stopBits "OnePointFive"}}selected="selected"{{/eq}}>OnePointFive</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<label for="rs232Handshake{{ unique }}">{{trans.handshake}}:</label>
|
||||
<select name="rs232Handshake{{ unique }}" id="rs232Handshake{{ unique }}" class="rs232-handshake form-control">
|
||||
<option value="None" {{#eq value.cs.handshake "None"}}selected="selected"{{/eq}}>None</option>
|
||||
<option value="XOnXOff" {{#eq value.cs.handshake "XOnXOff"}}selected="selected"{{/eq}}>XOnXOff</option>
|
||||
<option value="RequestToSend" {{#eq value.cs.handshake "RequestToSend"}}selected="selected"{{/eq}}>RequestToSend</option>
|
||||
<option value="RequestToSendXOnXOff" {{#eq value.cs.handshake "RequestToSendXOnXOff"}}selected="selected"{{/eq}}>RequestToSendXOnXOff</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<label for="rs232HexSupport{{ unique }}">{{trans.hexSupport}}:</label>
|
||||
<select name="rs232HexSupport{{ unique }}" id="rs232HexSupport{{ unique }}" class="rs232-hex-support form-control">
|
||||
<option value="0" {{#eq value.cs.hexSupport "0"}}selected="selected"{{/eq}}>0</option>
|
||||
<option value="1" {{#eq value.cs.hexSupport "1"}}selected="selected"{{/eq}}>1</option>
|
||||
<option value="default 0" {{#eq value.cs.hexSupport "default 0"}}selected="selected"{{/eq}}>default 0</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group-command form-group-rs232 command-group">
|
||||
<input class="form-control rs232-command" placeholder="{{trans.command}}" value="{{ value.command }}">
|
||||
</div>
|
||||
7
ui/src/templates/commandInput/tpv_led.hbs
Normal file
7
ui/src/templates/commandInput/tpv_led.hbs
Normal file
@@ -0,0 +1,7 @@
|
||||
<select name="tpv_ledCommand{{ unique }}" id="tpv_ledCommand{{ unique }}" class="tpv-led-command form-control form-control-inline" style="width:100%">
|
||||
<option value="off" {{#eq value "off"}}selected="selected"{{/eq}}>{{trans.off}}</option>
|
||||
<option value="red" {{#eq value "red"}}selected="selected"{{/eq}}>{{trans.red}}</option>
|
||||
<option value="green" {{#eq value "green"}}selected="selected"{{/eq}}>{{trans.green}}</option>
|
||||
<option value="blue" {{#eq value "blue"}}selected="selected"{{/eq}}>{{trans.blue}}</option>
|
||||
<option value="white" {{#eq value "white"}}selected="selected"{{/eq}}>{{trans.white}}</option>
|
||||
</select>
|
||||
Reference in New Issue
Block a user