mirror of
https://github.com/BetterCorp/BetterFrame.git
synced 2026-05-26 23:26:34 +00:00
35 lines
1.2 KiB
HTML
35 lines
1.2 KiB
HTML
|
|
<script type="text/javascript">
|
||
|
|
RED.nodes.registerType("bf-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-config";
|
||
|
|
},
|
||
|
|
});
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<script type="text/html" data-template-name="bf-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 <key></code>.
|
||
|
|
</div>
|
||
|
|
</script>
|