mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
fixed credentials to never show up in the flow
removed credentials from the defaults section in pusher.html, added oneditprepare to read them back from credentials.json when edited
This commit is contained in:
parent
f831f0f502
commit
81f59a853d
@ -51,7 +51,6 @@
|
||||
color:"#A9D0F5",
|
||||
defaults: { // defines the editable properties of the node
|
||||
name: {value:""}, // along with default values.
|
||||
appkey_sub: {value:"", required:true},
|
||||
channel: {value:"", required:true},
|
||||
eventname: {value:"", required:true}
|
||||
},
|
||||
@ -77,6 +76,13 @@
|
||||
success: function(result){}
|
||||
});
|
||||
},
|
||||
oneditprepare: function() {
|
||||
$.getJSON('pusher/'+this.id,function(data) {
|
||||
if (data.pusherappkey_sub) {
|
||||
$('#node-input-appkey_sub').val(data.pusherappkey_sub);
|
||||
}
|
||||
});
|
||||
},
|
||||
ondelete: function() {
|
||||
$.ajax({
|
||||
url: 'pusher/'+this.id,
|
||||
@ -132,11 +138,9 @@
|
||||
color:"#A9D0F5",
|
||||
defaults: { // defines the editable properties of the node
|
||||
name: {value:""}, // along with default values.
|
||||
appid: {value:"", required:true},
|
||||
appkey: {value:"", required:true},
|
||||
appsecret: {value:"", required:true},
|
||||
channel: {value:"", required:true},
|
||||
eventname: {value:"", required:true}
|
||||
eventname: {value:"", required:true},
|
||||
appid: {value:"", required:true}
|
||||
},
|
||||
inputs:1, // set the number of inputs - only 0 or 1
|
||||
outputs:0, // set the number of outputs - 0 to n
|
||||
@ -165,6 +169,21 @@
|
||||
success: function(result){}
|
||||
});
|
||||
},
|
||||
oneditprepare: function() {
|
||||
$.getJSON('pusher/'+this.id,function(data) {
|
||||
if (data.pusherappid) {
|
||||
$('#node-input-appid').val(data.pusherappid);
|
||||
}
|
||||
if (data.pusherappkey) {
|
||||
$('#node-input-appkey').val(data.pusherappkey);
|
||||
}
|
||||
|
||||
if (data.pusherappsecret) {
|
||||
$('#node-input-appsecret').val(data.pusherappsecret);
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
ondelete: function() {
|
||||
$.ajax({
|
||||
url: 'pusher/'+this.id,
|
||||
|
Loading…
Reference in New Issue
Block a user