BetterFrame/nodered/src/bf-server-config.html

35 lines
1.2 KiB
HTML
Raw Normal View History

<script type="text/javascript">
RED.nodes.registerType("bf-server-config", {
category: "config",
defaults: {
name: { value: "" },
server_url: { value: "http://localhost", required: true },
},
credentials: {
api_key: { type: "password" },
},
label: function () {
return this.name || this.server_url || "bf-server-config";
},
});
</script>
<script type="text/html" data-template-name="bf-server-config">
<div class="form-row">
<label for="node-config-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-config-input-name" placeholder="BetterFrame" />
</div>
<div class="form-row">
<label for="node-config-input-server_url"><i class="fa fa-globe"></i> Server URL</label>
<input type="text" id="node-config-input-server_url" placeholder="http://localhost" />
</div>
<div class="form-row">
<label for="node-config-input-api_key"><i class="fa fa-key"></i> Admin API key</label>
<input type="password" id="node-config-input-api_key" placeholder="bf-..." />
</div>
<div class="form-tips">
Create an admin-scoped API key in BetterFrame Admin and paste it here.
The key is sent as <code>Authorization: Bearer &lt;key&gt;</code>.
</div>
</script>