better build pipeline

This commit is contained in:
2021-04-23 13:01:16 +02:00
parent 8b86e8ea40
commit 288927e74c
14 changed files with 134 additions and 83 deletions

View File

@@ -1,45 +0,0 @@
<script type="text/javascript">
RED.nodes.registerType('ts3-config',{
category: 'config',
color: '#a6bbcf',
defaults: {
host: { value: ""},
nickname: {value: "ServerQuery"},
name: {value: ""}
},
credentials: {
username: {type: "text"},
password: {type: "password"}
},
label: function() {
return this.name || "Ts3 Config";
}
});
</script>
<script type="text/html" data-template-name="ts3-config">
<div class="form-row">
<label for="node-input-host"><i class="fa fa-globe"></i> Name</label>
<input type="text" id="node-config-input-name">
</div>
<div class="form-row">
<label for="node-input-host"><i class="fa fa-globe"></i> Hostname</label>
<input type="text" id="node-config-input-host">
</div>
<div class="form-row">
<label for="node-input-nickname"><i class="fa fa-comment"></i> Nickname</label>
<input type="text" id="node-config-input-nickname">
</div>
<div class="form-row">
<label for="node-input-username"><i class="fa fa-user"></i> Username</label>
<input type="text" id="node-config-input-username">
</div>
<div class="form-row">
<label for="node-input-password"><i class="fa fa-key"></i> Password</label>
<input type="password" id="node-config-input-password">
</div>
</script>
<script type="text/html" data-help-name="ts3-config">
<p>Connection config for a Teamspeak 3 server.</p>
</script>

View File

@@ -1,10 +1,9 @@
import { NodeDef, Node } from "node-red";
import { NodeDef, Node, EditorNodeProperties } from "node-red";
import { TeamSpeak } from "ts3-nodejs-library"
export interface Ts3ConfigProps{
host: string
nickname: string
name: string
}
export interface Ts3ConfigCreds {
@@ -16,7 +15,8 @@ export interface Ts3ConfigData {
getConnection(): Promise<TeamSpeak>
}
export interface Ts3ConfigConfig extends NodeDef, Ts3ConfigProps, Ts3ConfigCreds { }
export interface Ts3ConfigNode extends Node<Ts3ConfigCreds>, Ts3ConfigData {}
export interface Ts3ConfigEditorNodeProperties extends EditorNodeProperties,Ts3ConfigProps {}

View File

@@ -0,0 +1,20 @@
<div class="form-row">
<label for="node-input-name"><i class="fa fa-globe"></i> Name</label>
<input type="text" id="node-config-input-name">
</div>
<div class="form-row">
<label for="node-input-host"><i class="fa fa-globe"></i> Hostname</label>
<input type="text" id="node-config-input-host">
</div>
<div class="form-row">
<label for="node-input-nickname"><i class="fa fa-comment"></i> Nickname</label>
<input type="text" id="node-config-input-nickname">
</div>
<div class="form-row">
<label for="node-input-username"><i class="fa fa-user"></i> Username</label>
<input type="text" id="node-config-input-username">
</div>
<div class="form-row">
<label for="node-input-password"><i class="fa fa-key"></i> Password</label>
<input type="password" id="node-config-input-password">
</div>

View File

@@ -0,0 +1 @@
<p>Connection config for a Teamspeak 3 server.</p>

View File

@@ -0,0 +1,20 @@
import { EditorRED } from "node-red";
import { Ts3ConfigCreds, Ts3ConfigEditorNodeProperties } from "../types";
declare const RED: EditorRED;
RED.nodes.registerType<Ts3ConfigEditorNodeProperties,Ts3ConfigCreds>('ts3-config',{
category: 'config',
color: '#a6bbcf',
defaults: {
host: { value: ""},
nickname: {value: "ServerQuery"}
},
credentials: {
username: {type: "text"},
password: {type: "password"}
},
label: function() {
return this.name || "Ts3 Config";
}
});

View File

@@ -1,32 +0,0 @@
<script type="text/javascript">
RED.nodes.registerType('ts3-get',{
category: 'function',
color: '#a6bbcf',
defaults: {
configid: {type:"ts3-config"},
selection: {default: ""}
},
inputs: 1,
outputs: 1,
label: function() {
return this.name || "Ts3 Get";
}
});
</script>
<script type="text/html" data-template-name="ts3-get">
<div class="form-row">
<label for="node-input-configid"><i class="fa fa-database"></i> Connection</label>
<input type="text" id="node-input-configid">
</div>
<div class="form-row">
<label for="node-input-configid"><i class="fa fa-database"></i> Connection</label>
<select class="form-select" id="node-input-selection">
<option selected>Open this select menu</option>
</select>
</div>
</script>
<script type="text/html" data-help-name="ts3-get">
<p>Get information from a Teamspeak 3 server.</p>
</script>

View File

@@ -1,4 +1,4 @@
import { NodeDef, Node } from "node-red";
import { NodeDef, Node, EditorNodeProperties } from "node-red";
import { Ts3ConfigNode } from "../ts3-config/types";
export interface Ts3GetProps {
@@ -13,6 +13,8 @@ export interface Ts3GetConfig extends NodeDef, Ts3GetProps { }
export interface Ts3GetNode extends Node, Ts3GetData {}
export interface Ts3GetEditorNodeProperties extends EditorNodeProperties,Ts3GetProps {}
export enum GetFunctions {
CLIENTS_LIST,
}

View File

@@ -0,0 +1,14 @@
<div class="form-row">
<label for="node-input-name"><i class="fa fa-globe"></i> Name</label>
<input type="text" id="node-input-name">
</div>
<div class="form-row">
<label for="node-input-configid"><i class="fa fa-database"></i> Connection</label>
<input type="text" id="node-input-configid">
</div>
<div class="form-row">
<label for="node-input-configid"><i class="fa fa-database"></i> Connection</label>
<select class="form-select" id="node-input-selection">
<option selected>Open this select menu</option>
</select>
</div>

View File

@@ -0,0 +1 @@
<p>Get information from a Teamspeak 3 server.</p>

View File

@@ -0,0 +1,18 @@
import { EditorRED } from "node-red";
import { Ts3GetEditorNodeProperties } from "../types";
declare const RED: EditorRED;
RED.nodes.registerType<Ts3GetEditorNodeProperties>('ts3-get',{
category: 'function',
color: '#a6bbcf',
defaults: {
configid: { type:"ts3-config", value: "" },
selection: { value:"" }
},
inputs: 1,
outputs: 1,
label: function() {
return this.name || "Ts3 Get";
}
});