Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 211395 Details for
Bug 370255
credentials slideout wants me to type username when it already knows it
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Fix v1
clipboard.txt (text/plain), 15.22 KB, created by
Szymon Brandys
on 2012-02-22 06:48:43 EST
(
hide
)
Description:
Fix v1
Filename:
MIME Type:
Creator:
Szymon Brandys
Created:
2012-02-22 06:48:43 EST
Size:
15.22 KB
patch
obsolete
>diff --git a/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js b/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js >index c32869d..943477c 100644 >--- a/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js >+++ b/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js >@@ -804,6 +804,22 @@ > callback: function(data) { > var item = data.items; > var path = item.Location; >+ >+ var handleResponse = function(jsonData, commandInvocation){ >+ if (jsonData.JsonData.HostKey){ >+ doOperation(commandInvocation, jsonData.JsonData); >+ } else if (commandInvocation){ >+ if (jsonData.JsonData.User) >+ commandInvocation.parameters = new mCommands.ParametersDescription([new mCommands.CommandParameter("sshpassword", "password", "SSH Password:")], true); >+ else >+ commandInvocation.parameters = new mCommands.ParametersDescription([new mCommands.CommandParameter("sshuser", "text", "SSH User Name:"), new mCommands.CommandParameter("sshpassword", "password", "SSH Password:")], true); >+ >+ commandInvocation.parameters.errorData = jsonData.JsonData; >+ commandService._collectParameters(commandInvocation); >+ } else { >+ doOperation(null, jsonData.JsonData); >+ } >+ }; > > var doOperation = function(commandInvocation, errorData){ > exports.gatherSshCredentials(serviceRegistry, commandInvocation, errorData).then( >@@ -830,16 +846,8 @@ > dojo.hitch(explorer, explorer.changedItem)(item); > }, displayErrorOnStatus > ); >- }, function () { >- if (jsonData.JsonData.HostKey){ >- doOperation(commandInvocation, jsonData.JsonData); >- } else if (commandInvocation){ >- commandInvocation.parameters = new mCommands.ParametersDescription([new mCommands.CommandParameter("sshuser", "text", "SSH User Name:"), new mCommands.CommandParameter("sshpassword", "password", "SSH Password:")], true); >- commandInvocation.parameters.errorData = jsonData.JsonData; >- commandService._collectParameters(commandInvocation); >- } else { >- doOperation(null, jsonData.JsonData); >- } >+ }, function (jsonData) { >+ handleResponse(jsonData, commandInvocation); > } > ); > }, function(jsonData, secondArg) { >@@ -847,15 +855,7 @@ > function() { > > }, function (jsonData) { >- if (jsonData.JsonData.HostKey){ >- doOperation(commandInvocation, jsonData.JsonData); >- } else if (commandInvocation){ >- commandInvocation.parameters = new mCommands.ParametersDescription([new mCommands.CommandParameter("sshuser", "text", "SSH User Name:"), new mCommands.CommandParameter("sshpassword", "password", "SSH Password:")], true); >- commandInvocation.parameters.errorData = jsonData.JsonData; >- commandService._collectParameters(commandInvocation); >- } else { >- doOperation(null, jsonData.JsonData); >- } >+ handleResponse(jsonData, commandInvocation); > } > ); > } >@@ -889,6 +889,22 @@ > > var item = data.items; > var path = item.Location; >+ >+ var handleResponse = function(jsonData, commandInvocation){ >+ if (jsonData.JsonData.HostKey){ >+ doOperation(commandInvocation, jsonData.JsonData); >+ } else if (commandInvocation){ >+ if (jsonData.JsonData.User) >+ commandInvocation.parameters = new mCommands.ParametersDescription([new mCommands.CommandParameter("sshpassword", "password", "SSH Password:")], true); >+ else >+ commandInvocation.parameters = new mCommands.ParametersDescription([new mCommands.CommandParameter("sshuser", "text", "SSH User Name:"), new mCommands.CommandParameter("sshpassword", "password", "SSH Password:")], true); >+ >+ commandInvocation.parameters.errorData = jsonData.JsonData; >+ commandService._collectParameters(commandInvocation); >+ } else { >+ doOperation(null, jsonData.JsonData); >+ } >+ }; > > var doOperation = function(commandInvocation, errorData){ > exports.gatherSshCredentials(serviceRegistry, commandInvocation, errorData).then( >@@ -915,16 +931,8 @@ > dojo.hitch(explorer, explorer.changedItem)(item); > }, displayErrorOnStatus > ); >- }, function () { >- if (jsonData.JsonData.HostKey){ >- doOperation(commandInvocation, jsonData.JsonData); >- } else if (commandInvocation){ >- commandInvocation.parameters = new mCommands.ParametersDescription([new mCommands.CommandParameter("sshuser", "text", "SSH User Name:"), new mCommands.CommandParameter("sshpassword", "password", "SSH Password:")], true); >- commandInvocation.parameters.errorData = jsonData.JsonData; >- commandService._collectParameters(commandInvocation); >- } else { >- doOperation(null, jsonData.JsonData); >- } >+ }, function (jsonData) { >+ handleResponse(jsonData, commandInvocation); > } > ); > }, function(jsonData, secondArg) { >@@ -932,15 +940,7 @@ > function() { > > }, function (jsonData) { >- if (jsonData.JsonData.HostKey){ >- doOperation(commandInvocation, jsonData.JsonData); >- } else if (commandInvocation){ >- commandInvocation.parameters = new mCommands.ParametersDescription([new mCommands.CommandParameter("sshuser", "text", "SSH User Name:"), new mCommands.CommandParameter("sshpassword", "password", "SSH Password:")], true); >- commandInvocation.parameters.errorData = jsonData.JsonData; >- commandService._collectParameters(commandInvocation); >- } else { >- doOperation(null, jsonData.JsonData); >- } >+ handleResponse(jsonData, commandInvocation); > } > ); > } >@@ -1122,6 +1122,22 @@ > if (item.toRef) { > item = item.toRef; > } >+ >+ var handleResponse = function(jsonData, commandInvocation){ >+ if (jsonData.JsonData.HostKey){ >+ doOperation(commandInvocation, jsonData.JsonData); >+ } else if (commandInvocation){ >+ if (jsonData.JsonData.User) >+ commandInvocation.parameters = new mCommands.ParametersDescription([new mCommands.CommandParameter("sshpassword", "password", "SSH Password:")], true); >+ else >+ commandInvocation.parameters = new mCommands.ParametersDescription([new mCommands.CommandParameter("sshuser", "text", "SSH User Name:"), new mCommands.CommandParameter("sshpassword", "password", "SSH Password:")], true); >+ >+ commandInvocation.parameters.errorData = jsonData.JsonData; >+ commandService._collectParameters(commandInvocation); >+ } else { >+ doOperation(null, jsonData.JsonData); >+ } >+ }; > > var doOperation = function(commandInvocation, errorData){ > exports.gatherSshCredentials(serviceRegistry, commandInvocation, errorData).then( >@@ -1141,16 +1157,8 @@ > dojo.toggleClass(node, "outgoingCommitsdRow", false); > }); > dojo.hitch(explorer, explorer.changedItem)({}); >- }, function () { >- if (jsonData.JsonData.HostKey){ >- doOperation(commandInvocation, jsonData.JsonData); >- } else if (commandInvocation){ >- commandInvocation.parameters = new mCommands.ParametersDescription([new mCommands.CommandParameter("sshuser", "text", "SSH User Name:"), new mCommands.CommandParameter("sshpassword", "password", "SSH Password:")], true); >- commandInvocation.parameters.errorData = jsonData.JsonData; >- commandService._collectParameters(commandInvocation); >- } else { >- doOperation(null, jsonData.JsonData); >- } >+ }, function (jsonData) { >+ handleResponse(jsonData, commandInvocation); > } > ); > }, function(jsonData, secondArg) { >@@ -1158,15 +1166,7 @@ > function() { > > }, function (jsonData) { >- if (jsonData.JsonData.HostKey){ >- doOperation(commandInvocation, jsonData.JsonData); >- } else if (commandInvocation){ >- commandInvocation.parameters = new mCommands.ParametersDescription([new mCommands.CommandParameter("sshuser", "text", "SSH User Name:"), new mCommands.CommandParameter("sshpassword", "password", "SSH Password:")], true); >- commandInvocation.parameters.errorData = jsonData.JsonData; >- commandService._collectParameters(commandInvocation); >- } else { >- doOperation(null, jsonData.JsonData); >- } >+ handleResponse(jsonData, commandInvocation); > } > ); > } >@@ -1196,16 +1196,8 @@ > dojo.toggleClass(node, "outgoingCommitsdRow", false); > }); > dojo.hitch(explorer, explorer.changedItem)({}); >- }, function () { >- if (jsonData.JsonData.HostKey){ >- doOperation(commandInvocation, jsonData.JsonData); >- } else if (commandInvocation){ >- commandInvocation.parameters = new mCommands.ParametersDescription([new mCommands.CommandParameter("sshuser", "text", "SSH User Name:"), new mCommands.CommandParameter("sshpassword", "password", "SSH Password:")], true); >- commandInvocation.parameters.errorData = jsonData.JsonData; >- commandService._collectParameters(commandInvocation); >- } else { >- doOperation(null, jsonData.JsonData); >- } >+ }, function (jsonData) { >+ handleResponse(jsonData, commandInvocation); > } > ); > }, function(jsonData, secondArg) { >@@ -1213,15 +1205,7 @@ > function() { > > }, function (jsonData) { >- if (jsonData.JsonData.HostKey){ >- doOperation(commandInvocation, jsonData.JsonData); >- } else if (commandInvocation){ >- commandInvocation.parameters = new mCommands.ParametersDescription([new mCommands.CommandParameter("sshuser", "text", "SSH User Name:"), new mCommands.CommandParameter("sshpassword", "password", "SSH Password:")], true); >- commandInvocation.parameters.errorData = jsonData.JsonData; >- commandService._collectParameters(commandInvocation); >- } else { >- doOperation(null, jsonData.JsonData); >- } >+ handleResponse(jsonData, commandInvocation); > } > ); > } >@@ -1271,6 +1255,22 @@ > if (item.toRef) { > item = item.toRef; > } >+ >+ var handleResponse = function(jsonData, commandInvocation){ >+ if (jsonData.JsonData.HostKey){ >+ doOperation(commandInvocation, jsonData.JsonData); >+ } else if (commandInvocation){ >+ if (jsonData.JsonData.User) >+ commandInvocation.parameters = new mCommands.ParametersDescription([new mCommands.CommandParameter("sshpassword", "password", "SSH Password:")], true); >+ else >+ commandInvocation.parameters = new mCommands.ParametersDescription([new mCommands.CommandParameter("sshuser", "text", "SSH User Name:"), new mCommands.CommandParameter("sshpassword", "password", "SSH Password:")], true); >+ >+ commandInvocation.parameters.errorData = jsonData.JsonData; >+ commandService._collectParameters(commandInvocation); >+ } else { >+ doOperation(null, jsonData.JsonData); >+ } >+ }; > > var doOperation = function(commandInvocation, errorData){ > exports.gatherSshCredentials(serviceRegistry, commandInvocation, errorData).then( >@@ -1290,16 +1290,8 @@ > dojo.toggleClass(node, "outgoingCommitsdRow", false); > }); > dojo.hitch(explorer, explorer.changedItem)({}); >- }, function () { >- if (jsonData.JsonData.HostKey){ >- doOperation(commandInvocation, jsonData.JsonData); >- } else if (commandInvocation){ >- commandInvocation.parameters = new mCommands.ParametersDescription([new mCommands.CommandParameter("sshuser", "text", "SSH User Name:"), new mCommands.CommandParameter("sshpassword", "password", "SSH Password:")], true); >- commandInvocation.parameters.errorData = jsonData.JsonData; >- commandService._collectParameters(commandInvocation); >- } else { >- doOperation(null, jsonData.JsonData); >- } >+ }, function (jsonData) { >+ handleResponse(jsonData, commandInvocation); > } > ); > }, function(jsonData, secondArg) { >@@ -1307,15 +1299,7 @@ > function() { > > }, function (jsonData) { >- if (jsonData.JsonData.HostKey){ >- doOperation(commandInvocation, jsonData.JsonData); >- } else if (commandInvocation){ >- commandInvocation.parameters = new mCommands.ParametersDescription([new mCommands.CommandParameter("sshuser", "text", "SSH User Name:"), new mCommands.CommandParameter("sshpassword", "password", "SSH Password:")], true); >- commandInvocation.parameters.errorData = jsonData.JsonData; >- commandService._collectParameters(commandInvocation); >- } else { >- doOperation(null, jsonData.JsonData); >- } >+ handleResponse(jsonData, commandInvocation); > } > ); > } >@@ -1345,16 +1329,8 @@ > dojo.toggleClass(node, "outgoingCommitsdRow", false); > }); > dojo.hitch(explorer, explorer.changedItem)({}); >- }, function () { >- if (jsonData.JsonData.HostKey){ >- doOperation(commandInvocation, jsonData.JsonData); >- } else if (commandInvocation){ >- commandInvocation.parameters = new mCommands.ParametersDescription([new mCommands.CommandParameter("sshuser", "text", "SSH User Name:"), new mCommands.CommandParameter("sshpassword", "password", "SSH Password:")], true); >- commandInvocation.parameters.errorData = jsonData.JsonData; >- commandService._collectParameters(commandInvocation); >- } else { >- doOperation(null, jsonData.JsonData); >- } >+ }, function (jsonData) { >+ handleResponse(jsonData, commandInvocation); > } > ); > }, function(jsonData, secondArg) { >@@ -1362,15 +1338,7 @@ > function() { > > }, function (jsonData) { >- if (jsonData.JsonData.HostKey){ >- doOperation(commandInvocation, jsonData.JsonData); >- } else if (commandInvocation){ >- commandInvocation.parameters = new mCommands.ParametersDescription([new mCommands.CommandParameter("sshuser", "text", "SSH User Name:"), new mCommands.CommandParameter("sshpassword", "password", "SSH Password:")], true); >- commandInvocation.parameters.errorData = jsonData.JsonData; >- commandService._collectParameters(commandInvocation); >- } else { >- doOperation(null, jsonData.JsonData); >- } >+ handleResponse(jsonData, commandInvocation); > } > ); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 370255
: 211395