prisme-flow
Version:
prisme platform flow engine
55 lines (49 loc) • 2.22 kB
HTML
<!--
Created by prisme.io on 09/06/2017.
@author <a href="mailto:hello@prisme.io">savane vamara</a> (prisme.io)
-->
<script type="text/javascript">
RED.nodes.registerType('elasticsearch create',{
category: 'storage',
defaults: {
name: {value: ''},
documentIndex: {value: ''},
documentType: {value: ''},
server: {value:"", type:"remote-server"}
},
color:'#C0DEED',
inputs:1,
outputs:1,
icon: 'elasticsearch.png',
align: 'right',
label: function() {
return this.name || 'elasticsearch create doc.';
}
});
</script>
<script type="text/x-red" data-template-name="elasticsearch create">
<div class="form-row">
<label for="node-input-name"><i class="icon-bookmark"></i> Name</label>
<input type="text" id="node-input-name">
</div>
<div class="form-row">
<label for="node-input-index"><i class="icon-book"></i> Index</label>
<input type="text" id="node-input-documentIndex" />
</div>
<div class="form-row">
<label for="node-input-documentType"><i class="fa fa-cube"></i> Type</label>
<input type="text" id="node-input-documentType" />
</div>
<div class="form-row">
<label for="node-input-server"><i class="fa fa-plug"></i> Server</label>
<input type="text" id="node-input-server" />
</div>
</script>
<script type="text/x-red" data-help-name="elasticsearch create">
<p>Adds a document in a specific index, making it searchable.</p>
<p>The <code>msg.payload</code> will be used for the body of the document. The index and type can be configured in the node,
however if left blank, the following should be set in an incoming message:<ul><li><code>msg.documentIndex</code> - the index to use</li><li><code>msg.documentType</code>
- the type to use</li></ul></p>
<p>If <code>msg.documentId</code> is null, then Elasticsearch will generate an ID for the document.</p>
<p>See the <a href="https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-create">Elasticsearch documentation</a> for more information.</p>
</script>