From 0e44acbb2fec928a1606dc60f427a148fff405c9 Mon Sep 17 00:00:00 2001
From: Mohamed Ragab <moragab@gmail.com>
Date: Wed, 02 May 2012 11:15:01 -0400
Subject: [PATCH] Added a script to facilitate setting the proxy host and port and no proxy hosts, and then it concatenates all the java system properties for setting the java proxy configurations and puts the resulting string in an environment variable JAVA_PROXY_CONFIG, modified the scirpts gitblit, gitblit-ubuntu, and gitblit-centos to source the java-proxy-config.sh script and then include the resulting java proxy configuration in the java command
---
src/com/gitblit/wicket/pages/SendProposalPage.java | 31 ++++++++++++++-----------------
1 files changed, 14 insertions(+), 17 deletions(-)
diff --git a/src/com/gitblit/wicket/pages/SendProposalPage.java b/src/com/gitblit/wicket/pages/SendProposalPage.java
index 11f97a0..aa9c03a 100644
--- a/src/com/gitblit/wicket/pages/SendProposalPage.java
+++ b/src/com/gitblit/wicket/pages/SendProposalPage.java
@@ -37,7 +37,7 @@
import com.gitblit.wicket.panels.RepositoriesPanel;
@RequiresAdminRole
-public class SendProposalPage extends StandardPage {
+public class SendProposalPage extends RootSubPage {
public String myUrl;
@@ -59,7 +59,7 @@
// temporary proposal
FederationProposal proposal = GitBlit.self().createFederationProposal(myUrl, token);
if (proposal == null) {
- error("Could not create federation proposal!", true);
+ error(getString("gb.couldNotCreateFederationProposal"), true);
}
CompoundPropertyModel<SendProposalPage> model = new CompoundPropertyModel<SendProposalPage>(
@@ -72,11 +72,11 @@
protected void onSubmit() {
// confirm a repository name was entered
if (StringUtils.isEmpty(myUrl)) {
- error("Please enter your Gitblit url!");
+ error(getString("gb.pleaseSetGitblitUrl"));
return;
}
if (StringUtils.isEmpty(destinationUrl)) {
- error("Please enter a destination url for your proposal!");
+ error(getString("gb.pleaseSetDestinationUrl"));
return;
}
@@ -89,32 +89,29 @@
.propose(destinationUrl, proposal);
switch (res) {
case ACCEPTED:
- info(MessageFormat.format("Proposal successfully received by {0}.",
+ info(MessageFormat.format(getString("gb.proposalReceived"),
destinationUrl));
setResponsePage(RepositoriesPage.class);
break;
case NO_POKE:
- error(MessageFormat.format(
- "Sorry, {0} could not find a Gitblit instance at {1}.",
+ error(MessageFormat.format(getString("noGitblitFound"),
destinationUrl, myUrl));
break;
case NO_PROPOSALS:
- error(MessageFormat.format(
- "Sorry, {0} is not accepting proposals at this time.",
+ error(MessageFormat.format(getString("gb.noProposals"),
destinationUrl));
break;
case FEDERATION_DISABLED:
error(MessageFormat
- .format("Sorry, {0} is not configured to federate with any Gitblit instances.",
+ .format(getString("gb.noFederation"),
destinationUrl));
break;
case MISSING_DATA:
- error(MessageFormat.format("Sorry, {0} did not receive any proposal data!",
+ error(MessageFormat.format(getString("gb.proposalFailed"),
destinationUrl));
break;
case ERROR:
- error(MessageFormat.format(
- "Sorry, {0} reports that an unexpected error occurred!",
+ error(MessageFormat.format(getString("gb.proposalError"),
destinationUrl));
break;
}
@@ -122,7 +119,7 @@
if (!StringUtils.isEmpty(e.getMessage())) {
error(e.getMessage());
} else {
- error("Failed to send proposal!");
+ error(getString("gb.failedToSendProposal"));
}
}
}
@@ -139,7 +136,7 @@
@Override
public void onSubmit() {
- setResponsePage(RepositoriesPage.class);
+ setResponsePage(FederationPage.class);
}
};
cancel.setDefaultFormProcessing(false);
@@ -148,8 +145,8 @@
List<RepositoryModel> repositories = new ArrayList<RepositoryModel>(
proposal.repositories.values());
- RepositoriesPanel repositoriesPanel = new RepositoriesPanel("repositories", false,
- repositories, getAccessRestrictions());
+ RepositoriesPanel repositoriesPanel = new RepositoriesPanel("repositoriesPanel", false,
+ repositories, false, getAccessRestrictions());
add(repositoriesPanel);
}
}
--
Gitblit v1.9.1