61 lines
1.8 KiB
HTML
61 lines
1.8 KiB
HTML
<!--
|
|
Copyright 2017 Vincent Schoonenburg.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
|
|
|
|
<script type="text/x-red" data-template-name="PG Listen">
|
|
<div class="form-row">
|
|
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
|
<input type="text" id="node-input-name" placeholder="Name">
|
|
</div>
|
|
<div class="form-row">
|
|
<label for="node-input-channel"><i class="fa fa-tag"></i> Channel name</label>
|
|
<input type="text" id="node-input-channel" placeholder="Channel name">
|
|
</div>
|
|
<div class="form-row">
|
|
<label for="node-input-postgresdb"><i class="fa fa-tag"></i> Server</label>
|
|
<input type="text" id="node-input-postgresdb">
|
|
</div>
|
|
</script>
|
|
|
|
<script type="text/x-red" data-help-name="PG Listen">
|
|
<p>A PostgreSql pg_notify LISTEN node. </p>
|
|
<p></p>
|
|
<p></p>
|
|
|
|
</script>
|
|
|
|
<script type="text/javascript">
|
|
(function() {
|
|
RED.nodes.registerType('PG Listen',{
|
|
category: 'storage-input',
|
|
color:"rgb(148, 226, 252)",
|
|
defaults: {
|
|
postgresdb: { type:"postgresdb",required:true},
|
|
name: {value:""},
|
|
channel: { value:"", required : true }
|
|
},
|
|
inputs: 0,
|
|
outputs: 1,
|
|
icon: "postgres.png",
|
|
align: "right",
|
|
label: function() {
|
|
return this.name||(this.sqlquery?this.sqlquery:"postgres");
|
|
}
|
|
});
|
|
})();
|
|
</script>
|
|
|