1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Add credentialSecret to clone pane

This commit is contained in:
Nick O'Leary 2018-02-18 17:09:19 +00:00
parent d6fc258485
commit ec5d7c2e5c
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -654,6 +654,7 @@ RED.projects = (function() {
var projectSecretSelect; var projectSecretSelect;
var copyProject; var copyProject;
var projectRepoInput; var projectRepoInput;
var projectCloneSecret;
var emptyProjectCredentialInput; var emptyProjectCredentialInput;
var projectRepoUserInput; var projectRepoUserInput;
var projectRepoPasswordInput; var projectRepoPasswordInput;
@ -1019,10 +1020,12 @@ RED.projects = (function() {
// ----------------------------------------------------- // -----------------------------------------------------
// // Secret - clone // Secret - clone
// row = $('<div class="hide form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-clone"></div>').appendTo(container); row = $('<div class="hide form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-clone"></div>').appendTo(container);
// $('<label>Credentials encryption key</label>').appendTo(row); $('<label>Credentials encryption key</label>').appendTo(row);
// projectSecretInput = $('<input type="text"></input>').appendTo(row); projectSecretInput = $('<input type="password"></input>').appendTo(row);
switch(options.screen||"empty") { switch(options.screen||"empty") {
case "empty": createAsEmpty.click(); break; case "empty": createAsEmpty.click(); break;
case "open": openProject.click(); break; case "open": openProject.click(); break;
@ -1080,7 +1083,7 @@ RED.projects = (function() {
} else if (projectType === 'copy') { } else if (projectType === 'copy') {
projectData.copy = copyProject.name; projectData.copy = copyProject.name;
} else if (projectType === 'clone') { } else if (projectType === 'clone') {
// projectData.credentialSecret = projectSecretInput.val(); projectData.credentialSecret = projectSecretInput.val();
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)) {
@ -1130,7 +1133,6 @@ RED.projects = (function() {
projectRepoSSHKeySelect.removeClass("input-error"); projectRepoSSHKeySelect.removeClass("input-error");
projectRepoPassphrase.removeClass("input-error"); projectRepoPassphrase.removeClass("input-error");
RED.deploy.setDeployInflight(true); RED.deploy.setDeployInflight(true);
RED.projects.settings.switchProject(projectData.name); RED.projects.settings.switchProject(projectData.name);