UNPKG

prisme-flow

Version:

prisme platform flow engine

232 lines (218 loc) 9.55 kB
<!-- Created by prisme.io on 09/06/2017. @author <a href="mailto:hello@prisme.io">savane vamara</a> (prisme.io) --> <script type="text/x-red" data-template-name="amazon s3 in"> <div class="form-row"> <label for="node-input-aws"><i class="fa fa-user"></i>AWS</label> <input type="text" id="node-input-aws"> </div> <div class="form-row"> <label for="node-input-bucket"><i class="fa fa-folder"></i>Bucket</label> <input type="text" id="node-input-bucket"> </div> <div class="form-row node-input-filepattern"> <label for="node-input-filepattern"><i class="fa fa-file"></i>Filename Pattern</label> <input type="text" id="node-input-filepattern"> </div> <div class="form-row"> <label for="node-input-region"><i class="fa fa-tag"></i>Region</label> <select type="text" id="node-input-region" style="width:72%;"> <option selected value="us-west-1">us-west-1</option> <option value="us-west-2">us-west-2</option> <option value="us-east-1">us-east-1</option> <option value="eu-west-1">eu-west-1</option> <option value="eu-central-1">eu-central-1</option> <option value="ap-norteast-1">ap-northeast-1</option> <option value="ap-norteast-2">ap-northeast-2</option> <option value="ap-southeast-1">ap-southeast-1</option> <option value="ap-southeast-2">ap-southeast-2</option> <option value="sa-east-1">sa-east-1</option> </select> </div> <div class="form-row"> <label for="node-input-name"><i class="fa fa-tag"></i>AWS</label> <input type="text" id="node-input-name"> </div> </script> <script type="text/x-red" data-help-name="amazon s3 in"> <p>Amazon S3 watch node. Watches for file events on Box. By default all file events are reported, but the filename pattern can be supplied to limit the events to files which have full filenames that match the glob pattern. The event messages consist of the full filename in <b>msg.payload</b> property, the filename in <b>msg.file</b>, the event type in <b>msg.event</b>.</p> </script> <script type="text/javascript"> RED.nodes.registerType('amazon s3 in',{ category: 'storage-input', color:"#C0DEED", defaults: { aws: {type:"aws-config",required:true}, bucket: {required:true}, region: {value:"", required:true}, filepattern: {value:""}, name: {value:""}, }, inputs:0, outputs:1, icon: "amazon.png", label: function() { return this.bucket ? "s3 "+this.bucket : "s3"; } }); </script> <script type="text/x-red" data-template-name="amazon s3"> <div class="form-row"> <label for="node-input-aws"><i class="fa fa-user"></i>AWS</label> <input type="text" id="node-input-aws"> </div> <div class="form-row"> <label for="node-input-bucket"><i class="fa fa-folder"></i>Bucket</label> <input type="text" id="node-input-bucket"> </div> <div class="form-row node-input-filename"> <label for="node-input-filename"><i class="fa fa-file"></i>Filename</label> <input type="text" id="node-input-filename"> </div> <div class="form-row"> <label for="node-input-region"><i class="fa fa-tag"></i>Region</label> <select type="text" id="node-input-region" style="width:72%;"> <option selected value="us-west-1">us-west-1</option> <option value="us-west-2">us-west-2</option> <option value="us-east-1">us-east-1</option> <option value="eu-west-1">eu-west-1</option> <option value="eu-central-1">eu-central-1</option> <option value="ap-norteast-1">ap-northeast-1</option> <option value="ap-norteast-2">ap-northeast-2</option> <option value="ap-southeast-1">ap-southeast-1</option> <option value="ap-southeast-2">ap-southeast-2</option> <option value="sa-east-1">sa-east-1</option> </select> </div> <div class="form-row"> <label for="node-input-name"><i class="fa fa-tag"></i> AWS</label> <input type="text" id="node-input-name"> </div> </script> <script type="text/x-red" data-help-name="amazon s3"> <p>Amazon S3 input node. Downloads content from an Amazon S3 bucket. The bucket name can be specified in the node <b>bucket</b> property or in the <b>msg.bucket</b> property. The name of the file to download is taken from the node <b>filename</b> property or the <b>msg.filename</b> property. The downloaded content is sent as <b>msg.payload</b> property. If the download fails <b>msg.error</b> will contain an error object.</p> </script> <script type="text/javascript"> RED.nodes.registerType('amazon s3',{ category: 'storage-output', color:"#C0DEED", defaults: { aws: {type:"aws-config",required:true}, bucket: {required:true}, filename: {value:""}, region: {value:"", required:true}, name: {value:""}, }, inputs:1, outputs:1, icon: "amazon.png", align: "right", label: function() { return this.bucket ? "s3 "+this.bucket : "s3"; } }); </script> <script type="text/x-red" data-template-name="amazon s3 out"> <div class="form-row"> <label for="node-input-aws"><i class="fa fa-user"></i>AWS</label> <input type="text" id="node-input-aws"> </div> <div class="form-row"> <label for="node-input-bucket"><i class="fa fa-folder"></i>Bucket</label> <input type="text" id="node-input-bucket"> </div> <div class="form-row node-input-filename"> <label for="node-input-filename"><i class="fa fa-file"></i>Filename</label> <input type="text" id="node-input-filename"> </div> <div class="form-row node-input-localFilename"> <label for="node-input-localFilename"><i class="fa fa-file"></i>Local Filename</label> <input type="text" id="node-input-localFilename"> </div> <div class="form-row"> <label for="node-input-region"><i class="fa fa-tag"></i>Region</label> <select type="text" id="node-input-region" style="width:72%;"> <option selected value="us-west-1">us-west-1</option> <option value="us-west-2">us-west-2</option> <option value="us-east-1">us-east-1</option> <option value="eu-west-1">eu-west-1</option> <option value="eu-central-1">eu-central-1</option> <option value="ap-norteast-1">ap-northeast-1</option> <option value="ap-norteast-2">ap-northeast-2</option> <option value="ap-southeast-1">ap-southeast-1</option> <option value="ap-southeast-2">ap-southeast-2</option> <option value="sa-east-1">sa-east-1</option> </select> </div> <div class="form-row"> <label for="node-input-name"><i class="fa fa-tag"></i>AWS</label> <input type="text" id="node-input-name"> </div> </script> <script type="text/x-red" data-help-name="amazon s3 out"> <p>Amazon S3 out node. Uploads content to an Amazon S3 bucket. The bucket name can be specified in the node <b>bucket</b> property or in the <b>msg.bucket</b> property. The filename on Amazon S3 is taken from the node <b>filename</b> property or the <b>msg.filename</b> property. The content is taken from either the node <b>localFilename</b> property, the <b>msg.localFilename</b> property or the <b>msg.payload</b> property.</p> </script> <script type="text/javascript"> RED.nodes.registerType('amazon s3 out',{ category: 'storage-output', color:"#C0DEED", defaults: { aws: {type:"aws-config",required:true}, bucket: {required:true}, filename: {value:""}, localFilename: {value:""}, region: {value:"", required:true}, name: {value:""} }, inputs:1, outputs:0, icon: "amazon.png", align: "right", label: function() { return this.bucket ? "s3 "+this.bucket : "s3"; } }); </script> <script type="text/x-red" data-template-name="aws-config"> <div class="form-row"> <label for="node-config-input-accesskeyid"><i class="fa fa-bookmark"></i>AccessKeyID</label> <input class="input-append-left" type="text" id="node-config-input-accesskeyid" style="width: 40%;" > </div> <div class="form-row"> <label for="node-config-input-secretaccesskey"><i class="fa fa-bookmark"></i>Secret Access Key</label> <input class="input-append-left" type="password" id="node-config-input-secretaccesskey" style="width: 40%;" > </div> <div class="form-tips"> <span data-i18n="[html]aws.tip.config1"></span> <span data-i18n="[html]aws.tip.config2"></span> </div> </script> <script type="text/javascript"> (function() { RED.nodes.registerType('aws-config',{ category: 'config', defaults: { }, credentials: { accesskeyid: {type:"text",required:true}, secretaccesskey: {type: "password",required:true}, }, label: function() { return this.accesskeyid ? "AWS "+this.accesskeyid : "AWS"; }, exportable: false, }); })(); </script>