mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Delete unnecessary comment & Add a logic of the error case
This commit is contained in:
parent
53e012f296
commit
d35784ec61
@ -417,16 +417,23 @@ RED.projects = (function() {
|
|||||||
var repoUrl = projectRepoInput.val();
|
var repoUrl = projectRepoInput.val();
|
||||||
var metaData = {};
|
var metaData = {};
|
||||||
if (/^(?:ssh|[\d\w\.\-_]+@[\w\.]+):(?:\/\/)?/.test(repoUrl)) {
|
if (/^(?:ssh|[\d\w\.\-_]+@[\w\.]+):(?:\/\/)?/.test(repoUrl)) {
|
||||||
|
var selected = getSelectedSSHKey(projectRepoSSHKeySelect);
|
||||||
|
if ( selected && selected.name ) {
|
||||||
projectData.git = {
|
projectData.git = {
|
||||||
remotes: {
|
remotes: {
|
||||||
'origin': {
|
'origin': {
|
||||||
url: repoUrl,
|
url: repoUrl,
|
||||||
key_file: getSelectedSSHKey(projectRepoSSHKeySelect).name,
|
key_file: selected.name,
|
||||||
passphrase: projectRepoPassphrase.val()
|
passphrase: projectRepoPassphrase.val()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
console.log("Error! Can't get selected SSH key path.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
projectData.git = {
|
projectData.git = {
|
||||||
remotes: {
|
remotes: {
|
||||||
@ -735,10 +742,8 @@ RED.projects = (function() {
|
|||||||
options = options || {};
|
options = options || {};
|
||||||
var minHeight = "33px";
|
var minHeight = "33px";
|
||||||
var maxHeight = options.height || "120px";
|
var maxHeight = options.height || "120px";
|
||||||
// var container = $('<div></div>',{style:"min-height: "+height+"; height: "+height+";"});
|
|
||||||
var container = $('<div></div>',{style:"max-height: "+maxHeight+";"});
|
var container = $('<div></div>',{style:"max-height: "+maxHeight+";"});
|
||||||
|
|
||||||
// var sshkeyList = $('<ol>',{class:"projects-dialog-sshkey-list", style:"height:"+height}).appendTo(container).editableList({
|
|
||||||
var sshkeyList = $('<ol>',{class:"projects-dialog-sshkey-list", style:"max-height:"+maxHeight+";min-height:"+minHeight+";"}).appendTo(container).editableList({
|
var sshkeyList = $('<ol>',{class:"projects-dialog-sshkey-list", style:"max-height:"+maxHeight+";min-height:"+minHeight+";"}).appendTo(container).editableList({
|
||||||
addButton: false,
|
addButton: false,
|
||||||
scrollOnAdd: false,
|
scrollOnAdd: false,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user