[CCSDK-28] populated the seed code for dgbuilder
[ccsdk/distribution.git] / dgbuilder / core_nodes / storage / 28-tail.html
1 <!--
2   Copyright 2013 IBM Corp.
3
4   Licensed under the Apache License, Version 2.0 (the "License");
5   you may not use this file except in compliance with the License.
6   You may obtain a copy of the License at
7
8   http://www.apache.org/licenses/LICENSE-2.0
9
10   Unless required by applicable law or agreed to in writing, software
11   distributed under the License is distributed on an "AS IS" BASIS,
12   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   See the License for the specific language governing permissions and
14   limitations under the License.
15 -->
16
17 <script type="text/x-red" data-template-name="tail">
18     <div class="form-row node-input-filename">
19          <label for="node-input-filename"><i class="fa fa-file"></i> Filename</label>
20          <input type="text" id="node-input-filename" placeholder="Filename">
21     </div>
22     <div class="form-row">
23         <label>&nbsp;</label>
24         <input type="checkbox" id="node-input-split" placeholder="Name" style="display: inline-block; width: auto; vertical-align: top;">
25         <label for="node-input-split" style="width: 70%;">Split lines if we see \n ?</label>
26     </div>
27     <div class="form-row">
28         <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
29         <input type="text" id="node-input-name" placeholder="Name">
30     </div>
31     <!-- <div class="form-tips">WON'T work on Windows.</div> -->
32 </script>
33
34 <script type="text/x-red" data-help-name="tail">
35     <p>Tails (watches for things to be added) to the configured file. (Linux/Mac ONLY)</p>
36     <p>This won't work on Windows filesystems, as it relies on the tail -F command.</p>
37 </script>
38
39 <script type="text/javascript">
40     RED.nodes.registerType('tail',{
41         category: 'storage-input',
42         defaults: {
43             name: {value:""},
44             split: {value:false},
45             filename: {value:"",required:true}
46         },
47         color:"BurlyWood",
48         inputs:0,
49         outputs:1,
50         icon: "file.png",
51         label: function() {
52             return this.name||this.filename;
53         },
54         labelStyle: function() {
55             return this.name?"node_label_italic":"";
56         }
57     });
58 </script>