[CCSDK-28] populated the seed code for dgbuilder
[ccsdk/distribution.git] / dgbuilder / core_nodes / social / 32-feedparse.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="feedparse">
18     <div class="form-row">
19         <label for="node-input-url"><i class="fa fa-globe"></i> Feed url</label>
20         <input type="text" id="node-input-url">
21     </div>
22     <div class="form-row">
23         <label for="node-input-interval"><i class="fa fa-repeat"></i> Repeat <span style="font-size: 0.9em;">(M)</span></label>
24         <input type="text" id="node-input-interval" placeholder="minutes">
25     </div>
26     <div class="form-row">
27         <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
28         <input type="text" id="node-input-name" placeholder="Name">
29     </div>
30     <!-- <div class="form-tips"></div> -->
31 </script>
32
33 <script type="text/x-red" data-help-name="feedparse">
34         <p>Monitors an RSS/atom feed for new entries.</p>
35 </script>
36
37 <script type="text/javascript">
38     RED.nodes.registerType('feedparse',{
39         category: 'advanced-input',
40         color:"#C0DEED",
41         defaults: {
42             name: {value:""},
43             url: {value:"", required:true},
44             interval: { value:15, required: true,validate:RED.validators.number()}
45         },
46         inputs:0,
47         outputs:1,
48         icon: "feed.png",
49         label: function() {
50             return this.name||this.url;
51         },
52         labelStyle: function() {
53             return this.name?"node_label_italic":"";
54         }
55     });
56
57 </script>