Hello.
Nodered 3.1.6
When we are on a server (in a not local configuration) trying to deploy a code, there is no alert sent to notify a potential risk.
I think it can be benefical to add such a feature (to avoid creating important mistakes).
For exemple, i tried on /package/node_modules/@node-red/editor-client/src/js/ui/deploy.js to modify arround line 440 with the following code :
And it result in a pop up when deploying in a no local disposition
....
let notificationButtons = [];
let notification;
if (!window.location.href.includes("localhost") && !window.location.href.includes("127.0.0.1")) {
showWarning = true;
notificationMessage = "<p>" + RED._("You are not in localhost. Do not deploy unvalidated flow") + "</p>" +
"<p>" +
RED._('deploy.confirm.confirm') +
"</p>";
notificationButtons = [
{
id: "red-ui-deploy-dialog-confirm-deploy-deploy",
text: RED._("deploy.confirm.button.confirm"),
class: "primary",
click: function () {
save(true);
notification.close();
}
}
];
} else if (hasUnknown && !ignoreDeployWarnings.unknown) {
showWarning = true;
notificationMessage = "<p>" + RED._('deploy.confirm.unknown') + "</p>" +
'<ul class="red-ui-deploy-dialog-confirm-list"><li>' + cropList(unknownNodes).map(function (n) { return sanitize(n) }).join("</li><li>") + "</li></ul><p>" +
RED._('deploy.confirm.confirm') +
"</p>";
notificationButtons = [
{
text: RED._("deploy.unknownNodesButton"),
class: "pull-left",
click: function() {
notification.close();
RED.actions.invoke("core:search","type:unknown ");
}
},
{
id: "red-ui-deploy-dialog-confirm-deploy-deploy",
text: RED._("deploy.confirm.button.confirm"),
class: "primary",
click: function () {
save(true);
notification.close();
}
}
];
}
.......