cloud-red
Version:
Serverless Node-RED for your cloud integration needs
35 lines (33 loc) • 985 B
HTML
<script type="text/x-red" data-template-name="aws-config">
<div class="form-row">
<label for="node-config-input-stage"><i class="fa fa-tag"></i> Stage</label>
<input id="node-config-input-stage" type="text">
</div>
<div class="form-row">
<label for="node-config-input-profile"><i class="fa fa-tag"></i> AWS Profile</label>
<select id="node-config-input-profile">
</div>
</script>
<script type="text/javascript">
RED.nodes.registerType('aws-config', {
category: 'config',
defaults: {
stage: { required: true },
profile: { required: true }
},
label: function() {
return this.stage || 'local';
},
oneditprepare: function() {
$.getJSON('stages', function(data) {
$.each(data, function(name, profile) {
$('#node-config-input-profile').append(
$('<option></option>')
.val(name)
.text(profile)
);
});
});
}
});
</script>