Externalized a bunch of strings for translation
| | |
| | | - Added *protect-refs.groovy* (Github/plm)
|
| | | - Allow setting default branch (relinking HEAD) to a branch or a tag (Github/plm)
|
| | | - Added Ubuntu service init script (issue 72)
|
| | | - Added partial Japanese translation (Github/zakki)
|
| | |
|
| | | #### fixes
|
| | |
|
| | |
| | | gb.workingCopyWarning = this repository has a working copy and can not receive pushes
|
| | | gb.query = query
|
| | | gb.queryHelp = Standard query syntax is supported.<p/><p/>Please see <a target="_new" href="http://lucene.apache.org/core/old_versioned_docs/versions/3_5_0/queryparsersyntax.html">Lucene Query Parser Syntax</a> for details.
|
| | | gb.queryResults = results {0} - {1} ({2} hits)
|
| | | gb.noHits = no hits
|
| | | gb.authored = authored
|
| | | gb.committed = committed
|
| | | gb.indexedBranches = indexed branches
|
| | |
| | | gb.undefinedQueryWarning = query is undefined!
|
| | | gb.noSelectedRepositoriesWarning = please select one or more repositories!
|
| | | gb.luceneDisabled = Lucene indexing is disabled |
| | | gb.failedtoRead = Failed to read
|
| | | gb.isNotValidFile = is not a valid file
|
| | | gb.failedToReadMessage = Failed to read default message from {0}!
|
| | | gb.passwordsDoNotMatch = Passwords do not match!
|
| | | gb.passwordTooShort = Password is too short. Minimum length is {0} characters.
|
| | | gb.passwordChanged = Password successfully changed.
|
| | | gb.passwordChangeAborted = Password change aborted.
|
| | | gb.pleaseSetRepositoryName = Please set repository name!
|
| | | gb.illegalLeadingSlash = Leading root folder references (/) are prohibited.
|
| | | gb.illegalRelativeSlash = Relative folder references (../) are prohibited.
|
| | | gb.illegalCharacterRepositoryName = Illegal character ''{0}'' in repository name!
|
| | | gb.selectAccessRestriction = Please select access restriction!
|
| | | gb.selectFederationStrategy = Please select federation strategy!
|
| | | gb.pleaseSetTeamName = Please enter a teamname!
|
| | | gb.teamNameUnavailable = Team name ''{0}'' is unavailable.
|
| | | gb.teamMustSpecifyRepository = A team must specify at least one repository.
|
| | | gb.teamCreated = New team ''{0}'' successfully created.
|
| | | gb.pleaseSetUsername = Please enter a username!
|
| | | gb.usernameUnavailable = Username ''{0}'' is unavailable.
|
| | | gb.combinedMd5Rename = Gitblit is configured for combined-md5 password hashing. You must enter a new password on account rename.
|
| | | gb.userCreated = New user ''{0}'' successfully created.
|
| | | gb.couldNotFindFederationRegistration = Could not find federation registration!
|
| | | gb.failedToFindGravatarProfile = Failed to find Gravatar profile for {0}
|
| | | gb.branchStats = {0} commits and {1} tags in {2}
|
| | | gb.repositoryNotSpecified = Repository not specified!
|
| | | gb.repositoryNotSpecifiedFor = Repository not specified for {0}!
|
| | | gb.canNotLoadRepository = Can not load repository
|
| | | gb.commitIsNull = Commit is null
|
| | | gb.unauthorizedAccessForRepository = Unauthorized access for repository
|
| | | gb.failedToFindCommit = Failed to find commit \"{0}\" in {1} for {2} page!
|
| | | gb.couldNotFindFederationProposal = Could not find federation proposal!
|
| | | gb.invalidUsernameOrPassword = Invalid username or password!
|
| | | gb.OneProposalToReview = There is 1 federation proposal awaiting review. |
| | | gb.nFederationProposalsToReview = There are {0} federation proposals awaiting review.
|
| | | gb.couldNotFindTag = Could not find tag {0}
|
| | | gb.couldNotCreateFederationProposal = Could not create federation proposal!
|
| | | gb.pleaseSetGitblitUrl = Please enter your Gitblit url!
|
| | | gb.pleaseSetDestinationUrl = Please enter a destination url for your proposal!
|
| | | gb.proposalReceived = Proposal successfully received by {0}.
|
| | | gb.noGitblitFound = Sorry, {0} could not find a Gitblit instance at {1}.
|
| | | gb.noProposals = Sorry, {0} is not accepting proposals at this time.
|
| | | gb.noFederation = Sorry, {0} is not configured to federate with any Gitblit instances.
|
| | | gb.proposalFailed = Sorry, {0} did not receive any proposal data!
|
| | | gb.proposalError = Sorry, {0} reports that an unexpected error occurred!
|
| | | gb.failedToSendProposal = Failed to send proposal! |
| | |
| | | gb.sendProposal = propose
|
| | | gb.status = status
|
| | | gb.origin = origin
|
| | | gb.headRef = default branch (HEAD) |
| | | gb.headRefDescription = HEAD \u306e\u30ea\u30f3\u30af\u5148 ref \u3092\u5909\u66f4\u3059\u308b e.g. refs/heads/master
|
| | | gb.federationStrategy = federation strategy
|
| | | gb.federationRegistration = federation registration
|
| | |
| | | gb.pages = \u30da\u30fc\u30b8
|
| | | gb.workingCopy = \u4f5c\u696d\u30b3\u30d4\u30fc
|
| | | gb.workingCopyWarning = \u3053\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u306f\u4f5c\u696d\u30b3\u30d4\u30fc\u304c\u3042\u308b\u305f\u3081 push \u3067\u304d\u307e\u305b\u3093
|
| | | gb.query = query
|
| | | gb.queryHelp = Standard query syntax is supported.<p/><p/>Please see <a target="_new" href="http://lucene.apache.org/core/old_versioned_docs/versions/3_5_0/queryparsersyntax.html">Lucene Query Parser Syntax</a> for details.
|
| | | gb.queryResults = results {0} - {1} ({2} hits)
|
| | | gb.noHits = no hits
|
| | | gb.authored = authored
|
| | | gb.committed = committed
|
| | | gb.indexedBranches = indexed branches
|
| | | gb.indexedBranchesDescription = select the branches to include in your Lucene index
|
| | | gb.noIndexedRepositoriesWarning = none of your repositories are configured for Lucene indexing
|
| | | gb.undefinedQueryWarning = query is undefined!
|
| | | gb.noSelectedRepositoriesWarning = please select one or more repositories!
|
| | | gb.luceneDisabled = Lucene indexing is disabled
|
| | | gb.failedtoRead = Failed to read
|
| | | gb.isNotValidFile = is not a valid file
|
| | | gb.failedToReadMessage = Failed to read default message from {0}!
|
| | | gb.passwordsDoNotMatch = Passwords do not match!
|
| | | gb.passwordTooShort = Password is too short. Minimum length is {0} characters.
|
| | | gb.passwordChanged = Password successfully changed.
|
| | | gb.passwordChangeAborted = Password change aborted.
|
| | | gb.pleaseSetRepositoryName = Please set repository name!
|
| | | gb.illegalLeadingSlash = Leading root folder references (/) are prohibited.
|
| | | gb.illegalRelativeSlash = Relative folder references (../) are prohibited.
|
| | | gb.illegalCharacterRepositoryName = Illegal character ''{0}'' in repository name!
|
| | | gb.selectAccessRestriction = Please select access restriction!
|
| | | gb.selectFederationStrategy = Please select federation strategy!
|
| | | gb.pleaseSetTeamName = Please enter a teamname!
|
| | | gb.teamNameUnavailable = Team name ''{0}'' is unavailable.
|
| | | gb.teamMustSpecifyRepository = A team must specify at least one repository.
|
| | | gb.teamCreated = New team ''{0}'' successfully created.
|
| | | gb.pleaseSetUsername = Please enter a username!
|
| | | gb.usernameUnavailable = Username ''{0}'' is unavailable.
|
| | | gb.combinedMd5Rename = Gitblit is configured for combined-md5 password hashing. You must enter a new password on account rename.
|
| | | gb.userCreated = New user ''{0}'' successfully created.
|
| | | gb.couldNotFindFederationRegistration = Could not find federation registration!
|
| | | gb.failedToFindGravatarProfile = Failed to find Gravatar profile for {0}
|
| | | gb.branchStats = {0} commits and {1} tags in {2}
|
| | | gb.repositoryNotSpecified = Repository not specified!
|
| | | gb.repositoryNotSpecifiedFor = Repository not specified for {0}!
|
| | | gb.canNotLoadRepository = Can not load repository
|
| | | gb.commitIsNull = Commit is null
|
| | | gb.unauthorizedAccessForRepository = Unauthorized access for repository
|
| | | gb.failedToFindCommit = Failed to find commit \"{0}\" in {1} for {2} page!
|
| | | gb.couldNotFindFederationProposal = Could not find federation proposal!
|
| | | gb.invalidUsernameOrPassword = Invalid username or password!
|
| | | gb.OneProposalToReview = There is 1 federation proposal awaiting review. |
| | | gb.nFederationProposalsToReview = There are {0} federation proposals awaiting review.
|
| | | gb.couldNotFindTag = Could not find tag {0}
|
| | | gb.couldNotCreateFederationProposal = Could not create federation proposal!
|
| | | gb.pleaseSetGitblitUrl = Please enter your Gitblit url!
|
| | | gb.pleaseSetDestinationUrl = Please enter a destination url for your proposal!
|
| | | gb.proposalReceived = Proposal successfully received by {0}.
|
| | | gb.noGitblitFound = Sorry, {0} could not find a Gitblit instance at {1}.
|
| | | gb.noProposals = Sorry, {0} is not accepting proposals at this time.
|
| | | gb.noFederation = Sorry, {0} is not configured to federate with any Gitblit instances.
|
| | | gb.proposalFailed = Sorry, {0} did not receive any proposal data!
|
| | | gb.proposalError = Sorry, {0} reports that an unexpected error occurred!
|
| | | gb.failedToSendProposal = Failed to send proposal! |
| | |
| | | String confirmPassword = ChangePasswordPage.this.confirmPassword.getObject();
|
| | | // ensure passwords match
|
| | | if (!password.equals(confirmPassword)) {
|
| | | error("Passwords do not match!");
|
| | | error(getString("gb.passwordsDoNotMatch"));
|
| | | return;
|
| | | }
|
| | |
|
| | |
| | | minLength = 4;
|
| | | }
|
| | | if (password.length() < minLength) {
|
| | | error(MessageFormat.format(
|
| | | "Password is too short. Minimum length is {0} characters.", minLength));
|
| | | error(MessageFormat.format(getString("gb.passwordTooShort"), minLength));
|
| | | return;
|
| | | }
|
| | |
|
| | |
| | | return;
|
| | | }
|
| | | setRedirect(false);
|
| | | info("Password successfully changed.");
|
| | | info(getString("gb.passwordChanged"));
|
| | | setResponsePage(RepositoriesPage.class);
|
| | | }
|
| | | };
|
| | |
| | | confirmPasswordField.setResetPassword(false);
|
| | | form.add(confirmPasswordField);
|
| | |
|
| | | form.add(new Button("save"));
|
| | | Button cancel = new Button("cancel") {
|
| | | form.add(new Button(getString("gb.save")));
|
| | | Button cancel = new Button(getString("gb.cancel")) {
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | @Override
|
| | | public void onSubmit() {
|
| | | setRedirect(false);
|
| | | error("Password change aborted.");
|
| | | error(getString("gb.passwordChangeAborted"));
|
| | | setResponsePage(RepositoriesPage.class);
|
| | | }
|
| | | };
|
| | |
| | | try {
|
| | | // confirm a repository name was entered
|
| | | if (StringUtils.isEmpty(repositoryModel.name)) {
|
| | | error("Please set repository name!");
|
| | | error(getString("gb.pleaseSetRepositoryName"));
|
| | | return;
|
| | | }
|
| | |
|
| | |
| | |
|
| | | // prohibit folder paths
|
| | | if (repositoryModel.name.startsWith("/")) {
|
| | | error("Leading root folder references (/) are prohibited.");
|
| | | error(getString("gb.illegalLeadingSlash"));
|
| | | return;
|
| | | }
|
| | | if (repositoryModel.name.startsWith("../")) {
|
| | | error("Relative folder references (../) are prohibited.");
|
| | | error(getString("gb.illegalRelativeSlash"));
|
| | | return;
|
| | | }
|
| | | if (repositoryModel.name.contains("/../")) {
|
| | | error("Relative folder references (../) are prohibited.");
|
| | | error(getString("gb.illegalRelativeSlash"));
|
| | | return;
|
| | | }
|
| | |
|
| | | // confirm valid characters in repository name
|
| | | Character c = StringUtils.findInvalidCharacter(repositoryModel.name);
|
| | | if (c != null) {
|
| | | error(MessageFormat.format("Illegal character ''{0}'' in repository name!",
|
| | | error(MessageFormat.format(getString("gb.illegalCharacterRepositoryName"),
|
| | | c));
|
| | | return;
|
| | | }
|
| | |
|
| | | // confirm access restriction selection
|
| | | if (repositoryModel.accessRestriction == null) {
|
| | | error("Please select access restriction!");
|
| | | error(getString("gb.selectAccessRestriction"));
|
| | | return;
|
| | | }
|
| | |
|
| | | // confirm federation strategy selection
|
| | | if (repositoryModel.federationStrategy == null) {
|
| | | error("Please select federation strategy!");
|
| | | error(getString("gb.selectFederationStrategy"));
|
| | | return;
|
| | | }
|
| | |
|
| | |
| | | form.add(new BulletListPanel("inheritedPostReceive", "inherited", GitBlit.self()
|
| | | .getPostReceiveScriptsInherited(repositoryModel)));
|
| | |
|
| | | form.add(new Button("save"));
|
| | | Button cancel = new Button("cancel") {
|
| | | form.add(new Button(getString("gb.save")));
|
| | | Button cancel = new Button(getString("gb.cancel")) {
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | @Override
|
| | |
| | | protected void onSubmit() {
|
| | | String teamname = teamModel.name;
|
| | | if (StringUtils.isEmpty(teamname)) {
|
| | | error("Please enter a teamname!");
|
| | | error(getString("gb.pleaseSetTeamName"));
|
| | | return;
|
| | | }
|
| | | if (isCreate) {
|
| | | TeamModel model = GitBlit.self().getTeamModel(teamname);
|
| | | if (model != null) {
|
| | | error(MessageFormat.format("Team name ''{0}'' is unavailable.", teamname));
|
| | | error(MessageFormat.format(getString("gb.teamNameUnavailable"), teamname));
|
| | | return;
|
| | | }
|
| | | }
|
| | |
| | | repos.add(selectedRepositories.next().toLowerCase());
|
| | | }
|
| | | if (repos.size() == 0) {
|
| | | error("A team must specify at least one repository.");
|
| | | error(getString("gb.teamMustSpecifyRepository"));
|
| | | return;
|
| | | }
|
| | | teamModel.repositories.clear();
|
| | |
| | | setRedirect(false);
|
| | | if (isCreate) {
|
| | | // create another team
|
| | | info(MessageFormat.format("New team ''{0}'' successfully created.",
|
| | | info(MessageFormat.format(getString("gb.teamCreated"),
|
| | | teamModel.name));
|
| | | }
|
| | | // back to users page
|
| | |
| | | form.add(new BulletListPanel("inheritedPostReceive", "inherited", GitBlit.self()
|
| | | .getPostReceiveScriptsInherited(null)));
|
| | |
|
| | | form.add(new Button("save"));
|
| | | Button cancel = new Button("cancel") {
|
| | | form.add(new Button(getString("gb.save")));
|
| | | Button cancel = new Button(getString("gb.cancel")) {
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | @Override
|
| | |
| | | @Override
|
| | | protected void onSubmit() {
|
| | | if (StringUtils.isEmpty(userModel.username)) {
|
| | | error("Please enter a username!");
|
| | | error(getString("gb.pleaseSetUsername"));
|
| | | return;
|
| | | }
|
| | | // force username to lower-case
|
| | |
| | | if (isCreate) {
|
| | | UserModel model = GitBlit.self().getUserModel(username);
|
| | | if (model != null) {
|
| | | error(MessageFormat.format("Username ''{0}'' is unavailable.", username));
|
| | | error(MessageFormat.format(getString("gb.usernameUnavailable"), username));
|
| | | return;
|
| | | }
|
| | | }
|
| | | boolean rename = !StringUtils.isEmpty(oldName)
|
| | | && !oldName.equalsIgnoreCase(username);
|
| | | if (!userModel.password.equals(confirmPassword.getObject())) {
|
| | | error("Passwords do not match!");
|
| | | error(getString("gb.passwordsDoNotMatch"));
|
| | | return;
|
| | | }
|
| | | String password = userModel.password;
|
| | |
| | | minLength = 4;
|
| | | }
|
| | | if (password.trim().length() < minLength) {
|
| | | error(MessageFormat.format(
|
| | | "Password is too short. Minimum length is {0} characters.",
|
| | | error(MessageFormat.format(getString("gb.passwordTooShort"),
|
| | | minLength));
|
| | | return;
|
| | | }
|
| | |
| | | }
|
| | | } else if (rename
|
| | | && password.toUpperCase().startsWith(StringUtils.COMBINED_MD5_TYPE)) {
|
| | | error("Gitblit is configured for combined-md5 password hashing. You must enter a new password on account rename.");
|
| | | error(getString("gb.combinedMd5Rename"));
|
| | | return;
|
| | | }
|
| | |
|
| | |
| | | setRedirect(false);
|
| | | if (isCreate) {
|
| | | // create another user
|
| | | info(MessageFormat.format("New user ''{0}'' successfully created.",
|
| | | info(MessageFormat.format(getString("gb.userCreated"),
|
| | | userModel.username));
|
| | | setResponsePage(EditUserPage.class);
|
| | | } else {
|
| | |
| | | form.add(repositories);
|
| | | form.add(teams);
|
| | |
|
| | | form.add(new Button("save"));
|
| | | Button cancel = new Button("cancel") {
|
| | | form.add(new Button(getString("gb.save")));
|
| | | Button cancel = new Button(getString("gb.cancel")) {
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | @Override
|
| | |
| | |
|
| | | FederationModel registration = GitBlit.self().getFederationRegistration(url, name);
|
| | | if (registration == null) {
|
| | | error("Could not find federation registration!", true);
|
| | | error(getString("gb.couldNotFindFederationRegistration"), true);
|
| | | }
|
| | |
|
| | | setupPage(registration.isResultData() ? getString("gb.federationResults")
|
| | |
| | | profile = ActivityUtils.getGravatarProfile(object);
|
| | | }
|
| | | } catch (IOException e) {
|
| | | error(MessageFormat.format("Failed to find Gravatar profile for {0}", object), e, true);
|
| | | error(MessageFormat.format(getString("gb.failedToFindGravatarProfile"), object), e, true);
|
| | | }
|
| | |
|
| | | if (profile == null) {
|
| | | error(MessageFormat.format("Failed to find Gravatar profile for {0}", object), true);
|
| | | error(MessageFormat.format(getString("gb.failedToFindGravatarProfile"), object), true);
|
| | | }
|
| | | add(new Label("displayName", profile.displayName));
|
| | | add(new Label("username", profile.preferredUsername));
|
| | |
| | | if (results.size() == 0) {
|
| | | if (!ArrayUtils.isEmpty(searchRepositories) && !StringUtils.isEmpty(query)) {
|
| | | add(new Label("resultsHeader", query).setRenderBodyOnly(true));
|
| | | add(new Label("resultsCount", "0 hits").setRenderBodyOnly(true));
|
| | | add(new Label("resultsCount", getString("gb.noHits")).setRenderBodyOnly(true));
|
| | | } else {
|
| | | add(new Label("resultsHeader").setVisible(false));
|
| | | add(new Label("resultsCount").setVisible(false));
|
| | | }
|
| | | } else {
|
| | | add(new Label("resultsHeader", query).setRenderBodyOnly(true));
|
| | | add(new Label("resultsCount", MessageFormat.format("results {0} - {1} ({2} hits)",
|
| | | add(new Label("resultsCount", MessageFormat.format(getString("gb.queryResults"),
|
| | | results.get(0).hitId, results.get(results.size() - 1).hitId, results.get(0).totalHits)).
|
| | | setRenderBodyOnly(true));
|
| | | }
|
| | |
| | | add(new Label("branchStats", ""));
|
| | | } else {
|
| | | add(new Label("branchStats",
|
| | | MessageFormat.format("{0} commits and {1} tags in {2}", metricsTotal.count,
|
| | | MessageFormat.format(getString("gb.branchStats"), metricsTotal.count,
|
| | | metricsTotal.tag, TimeUtils.duration(metricsTotal.duration))));
|
| | | }
|
| | | insertLinePlot("commitsChart", metrics);
|
| | |
| | | super(params);
|
| | |
|
| | | if (!params.containsKey("r")) {
|
| | | GitBlitWebSession.get().cacheErrorMessage("Repository not specified!");
|
| | | GitBlitWebSession.get().cacheErrorMessage(getString("gb.repositoryNotSpecified"));
|
| | | redirectToInterceptPage(new RepositoriesPage());
|
| | | return;
|
| | | }
|
| | |
| | |
|
| | | Repository r = GitBlit.self().getRepository(repositoryName);
|
| | | if (r == null) {
|
| | | GitBlitWebSession.get().cacheErrorMessage("Can not load repository " + repositoryName);
|
| | | GitBlitWebSession.get().cacheErrorMessage(getString("gb.canNotLoadRepository") + " " + repositoryName);
|
| | | redirectToInterceptPage(new RepositoriesPage());
|
| | | return;
|
| | | }
|
| | |
|
| | | RevCommit commit = JGitUtils.getCommit(r, objectId);
|
| | | if (commit == null) {
|
| | | GitBlitWebSession.get().cacheErrorMessage("Commit is null");
|
| | | GitBlitWebSession.get().cacheErrorMessage(getString("gb.commitIsNull"));
|
| | | redirectToInterceptPage(new RepositoriesPage());
|
| | | return;
|
| | | }
|
| | |
| | | super(params);
|
| | |
|
| | | if (!params.containsKey("r")) {
|
| | | error("Repository not specified!");
|
| | | error(getString("gb.repositoryNotSpecified"));
|
| | | redirectToInterceptPage(new RepositoriesPage());
|
| | | }
|
| | | final String repositoryName = WicketUtils.getRepositoryName(params);
|
| | |
| | |
|
| | | Repository r = GitBlit.self().getRepository(repositoryName);
|
| | | if (r == null) {
|
| | | error("Can not load repository " + repositoryName);
|
| | | error(getString("gb.canNotLoadRepository") + " " + repositoryName);
|
| | | redirectToInterceptPage(new RepositoriesPage());
|
| | | return;
|
| | | }
|
| | |
| | | message = MarkdownUtils.transformMarkdown(reader);
|
| | | reader.close();
|
| | | } catch (Throwable t) {
|
| | | message = "Failed to read " + file;
|
| | | message = getString("gb.failedToRead") + " " + file;
|
| | | warn(message, t);
|
| | | }
|
| | | } else {
|
| | | message = messageSource + " is not a valid file.";
|
| | | message = messageSource + " " + getString("gb.isNotValidFile");
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | message = MarkdownUtils.transformMarkdown(reader);
|
| | | reader.close();
|
| | | } catch (Throwable t) {
|
| | | message = MessageFormat.format("Failed to read default message from {0}!", file);
|
| | | message = MessageFormat.format(getString("gb.failedToReadMessage"), file);
|
| | | error(message, t, false);
|
| | | }
|
| | | return message;
|
| | |
| | | objectId = WicketUtils.getObject(params);
|
| | |
|
| | | if (StringUtils.isEmpty(repositoryName)) {
|
| | | error(MessageFormat.format("Repository not specified for {0}!", getPageName()), true);
|
| | | error(MessageFormat.format(getString("gb.repositoryNotSpecifiedFor"), getPageName()), true);
|
| | | }
|
| | |
|
| | | if (!getRepositoryModel().hasCommits) {
|
| | |
| | | if (r == null) {
|
| | | Repository r = GitBlit.self().getRepository(repositoryName);
|
| | | if (r == null) {
|
| | | error("Can not load repository " + repositoryName, true);
|
| | | error(getString("gb.canNotLoadRepository") + " " + repositoryName, true);
|
| | | return null;
|
| | | }
|
| | | this.r = r;
|
| | |
| | | RepositoryModel model = GitBlit.self().getRepositoryModel(
|
| | | GitBlitWebSession.get().getUser(), repositoryName);
|
| | | if (model == null) {
|
| | | authenticationError("Unauthorized access for repository " + repositoryName);
|
| | | authenticationError(getString("gb.unauthorizedAccessForRepository") + " " + repositoryName);
|
| | | return null;
|
| | | }
|
| | | m = model;
|
| | |
| | | protected RevCommit getCommit() {
|
| | | RevCommit commit = JGitUtils.getCommit(r, objectId);
|
| | | if (commit == null) {
|
| | | error(MessageFormat.format("Failed to find commit \"{0}\" in {1} for {2} page!",
|
| | | error(MessageFormat.format(getString("gb.failedToFindCommit"),
|
| | | objectId, repositoryName, getPageName()), true);
|
| | | }
|
| | | return commit;
|
| | |
| | | Constants.SearchType searchType = searchTypeModel.getObject();
|
| | | String searchString = searchBoxModel.getObject();
|
| | | if (searchString == null) {
|
| | | // FIXME IE intermittently has no searchString. Wicket bug?
|
| | | return;
|
| | | }
|
| | | for (Constants.SearchType type : Constants.SearchType.values()) {
|
| | |
| | |
|
| | | FederationProposal proposal = GitBlit.self().getPendingFederationProposal(token);
|
| | | if (proposal == null) {
|
| | | error("Could not find federation proposal!", true);
|
| | | error(getString("gb.couldNotFindFederationProposal"), true);
|
| | | }
|
| | |
|
| | | setupPage(getString("gb.proposals"), proposal.url);
|
| | |
| | |
|
| | | UserModel user = GitBlit.self().authenticate(username, password);
|
| | | if (user == null) {
|
| | | error("Invalid username or password!");
|
| | | error(getString("gb.invalidUsernameOrPassword"));
|
| | | } else if (user.username.equals(Constants.FEDERATION_USER)) {
|
| | | // disallow the federation user from logging in via the
|
| | | // web ui
|
| | | error("Invalid username or password!");
|
| | | error(getString("gb.invalidUsernameOrPassword"));
|
| | | user = null;
|
| | | } else {
|
| | | loginUser(user);
|
| | |
| | | } else if (showAdmin) {
|
| | | int pendingProposals = GitBlit.self().getPendingFederationProposals().size();
|
| | | if (pendingProposals == 1) {
|
| | | info("There is 1 federation proposal awaiting review.");
|
| | | info(getString("gb.OneProposalToReview"));
|
| | | } else if (pendingProposals > 1) {
|
| | | info(MessageFormat.format("There are {0} federation proposals awaiting review.",
|
| | | info(MessageFormat.format(getString("gb.nFederationProposalsToReview"),
|
| | | pendingProposals));
|
| | | }
|
| | | }
|
| | |
| | | // 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>(
|
| | |
| | | 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;
|
| | | }
|
| | |
|
| | |
| | | .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;
|
| | | }
|
| | |
| | | if (!StringUtils.isEmpty(e.getMessage())) {
|
| | | error(e.getMessage());
|
| | | } else {
|
| | | error("Failed to send proposal!");
|
| | | error(getString("gb.failedToSendProposal"));
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | form.add(new Label("tokenType", proposal.tokenType.name()));
|
| | | form.add(new Label("token", proposal.token));
|
| | |
|
| | | form.add(new Button("save"));
|
| | | Button cancel = new Button("cancel") {
|
| | | form.add(new Button(getString("gb.save")));
|
| | | Button cancel = new Button(getString("gb.cancel")) {
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | @Override
|
| | |
| | | add(new Label("branchStats", ""));
|
| | | } else {
|
| | | add(new Label("branchStats",
|
| | | MessageFormat.format("{0} commits and {1} tags in {2}", metricsTotal.count,
|
| | | MessageFormat.format(getString("gb.branchStats"), metricsTotal.count,
|
| | | metricsTotal.tag, TimeUtils.duration(metricsTotal.duration))));
|
| | | }
|
| | | add(new BookmarkablePageLink<Void>("metrics", MetricsPage.class,
|
| | |
| | |
|
| | | // Failed to find tag!
|
| | | if (tagRef == null) {
|
| | | error(MessageFormat.format("Could not find tag {0}", objectId), true);
|
| | | error(MessageFormat.format(getString("gb.couldNotFindTag"), objectId), true);
|
| | | }
|
| | |
|
| | | // Display tag.
|