Skip to content

The Unified and Autonomous Development Platform

Reworking request detail page.

robin shine4a1bb9dd34c9
diff --git a/commons.editable/src/main/java/com/pmease/commons/editable/EditableUtils.java b/commons.editable/src/main/java/com/pmease/commons/editable/EditableUtils.java
index 1d67d036e8..fe56540653 100644
--- a/commons.editable/src/main/java/com/pmease/commons/editable/EditableUtils.java
+++ b/commons.editable/src/main/java/com/pmease/commons/editable/EditableUtils.java
@@ -92,11 +92,21 @@ public class EditableUtils {
*/
public static @Nullable String getDescription(AnnotatedElement element) {
Editable editable = element.getAnnotation(Editable.class);
- if (editable != null && editable.description().trim().length() != 0) {
- return editable.description().trim();
- } else {
- return null;
+ if (editable != null) {
+ if (editable.description().length() != 0)
+ return editable.description();
+ if (editable.descriptionProvider().length() != 0) {
+ Class<?> clazz;
+ if (element instanceof Method)
+ clazz = ((Method) element).getDeclaringClass();
+ else if (element instanceof Class)
+ clazz = (Class<?>) element;
+ else
+ clazz = ((Field) element).getDeclaringClass();
+ return (String) ReflectionUtils.invokeStaticMethod(clazz, editable.descriptionProvider());
+ }
}
+ return null;
}
/**
diff --git a/commons.editable/src/main/java/com/pmease/commons/editable/annotation/Editable.java b/commons.editable/src/main/java/com/pmease/commons/editable/annotation/Editable.java
index e131afe0bb..a706692561 100644
--- a/commons.editable/src/main/java/com/pmease/commons/editable/annotation/Editable.java
+++ b/commons.editable/src/main/java/com/pmease/commons/editable/annotation/Editable.java
@@ -17,4 +17,6 @@ public @interface Editable {
int order() default 0;
String description() default "";
+
+ String descriptionProvider() default "";
}
diff --git a/commons.loader/src/main/java/com/pmease/commons/loader/AppLoaderModule.java b/commons.loader/src/main/java/com/pmease/commons/loader/AppLoaderModule.java
index 9aaf4ddc33..fcb0aa007e 100644
--- a/commons.loader/src/main/java/com/pmease/commons/loader/AppLoaderModule.java
+++ b/commons.loader/src/main/java/com/pmease/commons/loader/AppLoaderModule.java
@@ -1,7 +1,7 @@
package com.pmease.commons.loader;
import java.util.Collection;
-import java.util.concurrent.Executor;
+import java.util.concurrent.ExecutorService;
import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
@@ -42,10 +42,10 @@ public class AppLoaderModule extends AbstractModule {
bind(EventBus.class).toInstance(new EventBus());
- bind(Executor.class).toProvider(new Provider<Executor>() {
+ bind(ExecutorService.class).toProvider(new Provider<ExecutorService>() {
@Override
- public Executor get() {
+ public ExecutorService get() {
return new ThreadPoolExecutor(0, Integer.MAX_VALUE,
300L, TimeUnit.SECONDS,
new SynchronousQueue<Runnable>());
diff --git a/commons.wicket/src/main/java/com/pmease/commons/wicket/CommonPage.html b/commons.wicket/src/main/java/com/pmease/commons/wicket/CommonPage.html
index 07ae747098..deb3f7452d 100644
--- a/commons.wicket/src/main/java/com/pmease/commons/wicket/CommonPage.html
+++ b/commons.wicket/src/main/java/com/pmease/commons/wicket/CommonPage.html
@@ -2,7 +2,7 @@
<html class="no-js" xmlns:wicket="http://wicket.apache.org">
<head>
</head>
-<body wicket:id="htmlBody">
+<body>
<wicket:child></wicket:child>
<div wicket:id="sessionFeedback" id="session-feedback"></div>
<div id="ajax-loading-indicator"><div>Loading...</div></div>
diff --git a/commons.wicket/src/main/java/com/pmease/commons/wicket/CommonPage.java b/commons.wicket/src/main/java/com/pmease/commons/wicket/CommonPage.java
index dc733abc34..dc30e46d2f 100644
--- a/commons.wicket/src/main/java/com/pmease/commons/wicket/CommonPage.java
+++ b/commons.wicket/src/main/java/com/pmease/commons/wicket/CommonPage.java
@@ -1,33 +1,18 @@
package com.pmease.commons.wicket;
-import java.util.Iterator;
-
-import org.apache.wicket.Component;
-import org.apache.wicket.behavior.AttributeAppender;
-import org.apache.wicket.markup.IMarkupFragment;
-import org.apache.wicket.markup.MarkupElement;
-import org.apache.wicket.markup.MarkupResourceStream;
import org.apache.wicket.markup.head.IHeaderResponse;
import org.apache.wicket.markup.head.JavaScriptHeaderItem;
import org.apache.wicket.markup.head.PriorityHeaderItem;
-import org.apache.wicket.markup.html.TransparentWebMarkupContainer;
-import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.panel.FeedbackPanel;
-import org.apache.wicket.model.AbstractReadOnlyModel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.request.mapper.parameter.PageParameters;
-import com.google.common.base.Strings;
-import com.pmease.commons.util.StringUtils;
-
@SuppressWarnings("serial")
public abstract class CommonPage extends WebPage {
private FeedbackPanel sessionFeedback;
- private WebMarkupContainer body;
-
public CommonPage() {
}
@@ -39,81 +24,10 @@ public abstract class CommonPage extends WebPage {
super(params);
}
- @Override
- public IMarkupFragment getMarkup(Component child) {
- if (child != null) {
- IMarkupFragment markup = super.getMarkup(child);
- if (markup != null)
- return markup;
- else if (body != null)
- return body.getMarkup(child);
- else
- return null;
- } else {
- final IMarkupFragment markup = super.getMarkup(child);
- return new IMarkupFragment() {
-
- @Override
- public String toString(boolean markupOnly) {
- return markup.toString();
- }
-
- @Override
- public int size() {
- return markup.size();
- }
-
- @Override
- public MarkupResourceStream getMarkupResourceStream() {
- return markup.getMarkupResourceStream();
- }
-
- @Override
- public MarkupElement get(int index) {
- return markup.get(index);
- }
-
- @Override
- public IMarkupFragment find(String id) {
- IMarkupFragment found = markup.find(id);
- if (found != null)
- return found;
- else if (body != null)
- return body.getMarkup().find(id);
- else
- return null;
- }
-
- @Override
- public Iterator<MarkupElement> iterator() {
- return markup.iterator();
- }
- };
- }
- }
-
- protected String getPageCssClass() {
- String name = getClass().getSimpleName();
- return StringUtils.camelCaseToLowerCaseWithHyphen(name);
- }
-
@Override
protected void onInitialize() {
super.onInitialize();
- body = new TransparentWebMarkupContainer("htmlBody");
- body.setOutputMarkupId(true);
- add(body);
- body.add(AttributeAppender.append("class", new AbstractReadOnlyModel<String>() {
-
- @Override
- public String getObject() {
- String css = getPageCssClass();
- return Strings.isNullOrEmpty(css) ? "" : css;
- }
-
- }));
-
sessionFeedback = new SessionFeedbackPanel("sessionFeedback");
add(sessionFeedback);
sessionFeedback.setOutputMarkupId(true);
diff --git a/commons.wicket/src/main/java/com/pmease/commons/wicket/asset/common.css b/commons.wicket/src/main/java/com/pmease/commons/wicket/asset/common.css
index dbfbd2586a..eb3284d70f 100644
--- a/commons.wicket/src/main/java/com/pmease/commons/wicket/asset/common.css
+++ b/commons.wicket/src/main/java/com/pmease/commons/wicket/asset/common.css
@@ -15,6 +15,14 @@
.bottom-spacing {margin-bottom: 10px;}
.spacing {margin: 10px;}
+/* Cursors */
+.pointer {cursor: pointer;}
+
+/* Tooltips */
+.tooltip-inner {max-width: 400px;}
+.tooltip .tooltip-inner dl {text-align: left;}
+.tooltip .tooltip-inner dl dt {font-size: 15px;}
+
/* Feedback */
#session-feedback {position:absolute; background:#FFFFDE; max-width:75%;
border:1px solid #9C9E9C; border-top:none; padding: 6px; z-index:10000;
diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/branchmatcher/MatchAllAffinalBranches.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/branchmatcher/MatchAllAffinalBranches.java
new file mode 100644
index 0000000000..f4c11c3b1d
--- /dev/null
+++ b/gitplex.core/src/main/java/com/pmease/gitplex/core/branchmatcher/MatchAllAffinalBranches.java
@@ -0,0 +1,20 @@
+package com.pmease.gitplex.core.branchmatcher;
+
+import com.pmease.commons.editable.annotation.Editable;
+import com.pmease.gitplex.core.model.Branch;
+
+@SuppressWarnings("serial")
+@Editable(name="All Branches from All Repositories", order=300)
+public class MatchAllAffinalBranches implements AffinalBranchMatcher {
+
+ @Override
+ public Object trim(Object context) {
+ return this;
+ }
+
+ @Override
+ public boolean matches(Branch branch) {
+ return true;
+ }
+
+}
diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/branchmatcher/MatchAllBranches.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/branchmatcher/MatchAllBranches.java
new file mode 100644
index 0000000000..3f8acfe523
--- /dev/null
+++ b/gitplex.core/src/main/java/com/pmease/gitplex/core/branchmatcher/MatchAllBranches.java
@@ -0,0 +1,20 @@
+package com.pmease.gitplex.core.branchmatcher;
+
+import com.pmease.commons.editable.annotation.Editable;
+import com.pmease.gitplex.core.model.Branch;
+
+@SuppressWarnings("serial")
+@Editable(name="All Branches", order=300)
+public class MatchAllBranches implements BranchMatcher {
+
+ @Override
+ public boolean matches(Branch branch) {
+ return true;
+ }
+
+ @Override
+ public Object trim(Object context) {
+ return this;
+ }
+
+}
diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/gatekeeper/IfSubmitWithGerritStylePatch.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/gatekeeper/IfSubmitWithGerritStylePatch.java
index 3e65af4397..a633e076d4 100644
--- a/gitplex.core/src/main/java/com/pmease/gitplex/core/gatekeeper/IfSubmitWithGerritStylePatch.java
+++ b/gitplex.core/src/main/java/com/pmease/gitplex/core/gatekeeper/IfSubmitWithGerritStylePatch.java
@@ -15,7 +15,7 @@ public class IfSubmitWithGerritStylePatch extends AbstractGateKeeper {
@Override
protected CheckResult doCheckRequest(PullRequest request) {
- String branchHead = request.getTarget().getHeadCommitHash();
+ String branchHead = request.getBaseCommitHash();
String requestHead = request.getLatestUpdate().getHeadCommitHash();
if (request.git().log(branchHead, requestHead, null, 0, 0).size() > 1) {
return disapproved("Please squash/rebase your commits.");
diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/gatekeeper/IfVerifiedByBuilds.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/gatekeeper/IfVerifiedByBuilds.java
index 393274c763..12fcb4c736 100644
--- a/gitplex.core/src/main/java/com/pmease/gitplex/core/gatekeeper/IfVerifiedByBuilds.java
+++ b/gitplex.core/src/main/java/com/pmease/gitplex/core/gatekeeper/IfVerifiedByBuilds.java
@@ -8,8 +8,10 @@ import com.pmease.commons.editable.annotation.Editable;
import com.pmease.gitplex.core.GitPlex;
import com.pmease.gitplex.core.gatekeeper.checkresult.CheckResult;
import com.pmease.gitplex.core.gatekeeper.voteeligibility.NoneCanVote;
+import com.pmease.gitplex.core.manager.PullRequestManager;
import com.pmease.gitplex.core.manager.VerificationManager;
import com.pmease.gitplex.core.model.Branch;
+import com.pmease.gitplex.core.model.IntegrationPreview;
import com.pmease.gitplex.core.model.PullRequest;
import com.pmease.gitplex.core.model.Repository;
import com.pmease.gitplex.core.model.User;
@@ -62,25 +64,33 @@ public class IfVerifiedByBuilds extends AbstractGateKeeper {
@Override
protected CheckResult doCheckRequest(PullRequest request) {
- VerificationManager verificationManager = GitPlex.getInstance(VerificationManager.class);
-
- if (request.getIntegrationInfo() == null) {
- if (blockMode) {
+ if (request.isNew()) {
+ if (blockMode)
return pendingAndBlock("To be verified by build", new NoneCanVote());
- } else {
+ else
return pending("To be verified by build", new NoneCanVote());
- }
}
String commit;
if (isCheckIntegrated()) {
- commit = request.getIntegrationInfo().getIntegrationHead();
+ PullRequestManager pullRequestManager = GitPlex.getInstance(PullRequestManager.class);
+
+ IntegrationPreview preview = pullRequestManager.previewIntegration(request);
+ if (preview == null) {
+ if (blockMode)
+ return pendingAndBlock("To be verified by build", new NoneCanVote());
+ else
+ return pending("To be verified by build", new NoneCanVote());
+ }
+ commit = preview.getIntegrated();
if (commit == null)
return disapproved("Can not build against integration result due to conflicts.");
} else {
commit = request.getLatestUpdate().getHeadCommitHash();
}
+ VerificationManager verificationManager = GitPlex.getInstance(VerificationManager.class);
+
int passedCount = 0;
Collection<Verification> verifications = verificationManager.findBy(request, commit);
for (Verification each: verifications) {
diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/hookcallback/GitPostReceiveCallback.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/hookcallback/GitPostReceiveCallback.java
index d6bee85dda..7ccb080580 100644
--- a/gitplex.core/src/main/java/com/pmease/gitplex/core/hookcallback/GitPostReceiveCallback.java
+++ b/gitplex.core/src/main/java/com/pmease/gitplex/core/hookcallback/GitPostReceiveCallback.java
@@ -123,7 +123,7 @@ public class GitPostReceiveCallback extends HttpServlet {
} else {
logger.debug("Executing post-receive hook against branch {}...", branchName);
- final Branch branch = branchManager.findBy(repository, branchName);
+ Branch branch = branchManager.findBy(repository, branchName);
Preconditions.checkNotNull(branch);
branch.setHeadCommitHash(newCommitHash);
diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/PullRequestManager.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/PullRequestManager.java
index 4ed574d7cf..4eb523f83f 100644
--- a/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/PullRequestManager.java
+++ b/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/PullRequestManager.java
@@ -7,8 +7,9 @@ import javax.annotation.Nullable;
import com.google.inject.ImplementedBy;
import com.pmease.gitplex.core.manager.impl.DefaultPullRequestManager;
import com.pmease.gitplex.core.model.Branch;
-import com.pmease.gitplex.core.model.IntegrationStrategy;
+import com.pmease.gitplex.core.model.IntegrationPreview;
import com.pmease.gitplex.core.model.PullRequest;
+import com.pmease.gitplex.core.model.PullRequest.IntegrationStrategy;
import com.pmease.gitplex.core.model.User;
@ImplementedBy(DefaultPullRequestManager.class)
@@ -16,7 +17,7 @@ public interface PullRequestManager {
@Nullable PullRequest findOpen(Branch target, Branch source);
- void refresh(PullRequest request);
+ boolean canIntegrate(PullRequest request);
/**
* Integrate specified pull request.
@@ -27,20 +28,19 @@ public interface PullRequestManager {
* user initiating the integration, <tt>null</tt> to indicate system user
* @param comment
* comment for the integration
- * @return
- * <tt>true</tt> if integrated successfully, <tt>false</tt> if unable to
- * update relevant refs due to ref lock failure. Ref lock failure can happen
- * either because the ref is currently being updated by some other one, or
- * the ref has been updated since last refresh of the pull request. In these
- * cases, the best bet is to refresh pull request again and retry the
- * integration
- * @throws IllegalArgumentException
- * if <tt>request.canIntegrate()</tt> returns false
*/
- boolean integrate(PullRequest request, @Nullable User user, @Nullable String comment);
+ void integrate(PullRequest request, @Nullable User user, @Nullable String comment);
void discard(PullRequest request, User user, @Nullable String comment);
+ void onTargetBranchUpdate(PullRequest request);
+
+ void onSourceBranchUpdate(PullRequest request);
+
+ void onGateKeeperUpdate(PullRequest request);
+
+ IntegrationPreview previewIntegration(PullRequest request);
+
/**
* Find pull requests whose head commit or merge commit equals to specified commit.
*
@@ -50,7 +50,7 @@ public interface PullRequestManager {
* collection of matching pull requests
*/
List<PullRequest> findByCommit(String commit);
-
+
/**
* Delete git refs of this pull request and all its updates.
*
diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/impl/DefaultBranchManager.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/impl/DefaultBranchManager.java
index d7983a3740..e96119abe6 100644
--- a/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/impl/DefaultBranchManager.java
+++ b/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/impl/DefaultBranchManager.java
@@ -1,20 +1,16 @@
package com.pmease.gitplex.core.manager.impl;
import java.util.Collection;
-import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
-import java.util.concurrent.Executor;
+import java.util.concurrent.ExecutorService;
import javax.inject.Inject;
import javax.inject.Singleton;
import javax.transaction.Status;
import javax.transaction.Synchronization;
-import com.pmease.gitplex.core.manager.BranchManager;
-import com.pmease.gitplex.core.manager.PullRequestManager;
-import com.pmease.gitplex.core.manager.PullRequestUpdateManager;
import org.hibernate.criterion.Restrictions;
import com.pmease.commons.hibernate.Sessional;
@@ -22,9 +18,10 @@ import com.pmease.commons.hibernate.Transactional;
import com.pmease.commons.hibernate.UnitOfWork;
import com.pmease.commons.hibernate.dao.Dao;
import com.pmease.commons.hibernate.dao.EntityCriteria;
+import com.pmease.gitplex.core.manager.BranchManager;
+import com.pmease.gitplex.core.manager.PullRequestManager;
import com.pmease.gitplex.core.model.Branch;
import com.pmease.gitplex.core.model.PullRequest;
-import com.pmease.gitplex.core.model.PullRequestUpdate;
import com.pmease.gitplex.core.model.Repository;
import com.pmease.gitplex.core.model.User;
@@ -35,20 +32,16 @@ public class DefaultBranchManager implements BranchManager {
private final PullRequestManager pullRequestManager;
- private final PullRequestUpdateManager pullRequestUpdateManager;
-
- private final Executor executor;
+ private final ExecutorService executorService;
private final UnitOfWork unitOfWork;
@Inject
public DefaultBranchManager(Dao dao, PullRequestManager pullRequestManager,
- PullRequestUpdateManager pullRequestUpdateManager, Executor executor,
- UnitOfWork unitOfWork) {
+ ExecutorService executorService, UnitOfWork unitOfWork) {
this.dao = dao;
this.pullRequestManager = pullRequestManager;
- this.pullRequestUpdateManager = pullRequestUpdateManager;
- this.executor = executor;
+ this.executorService = executorService;
this.unitOfWork = unitOfWork;
}
@@ -142,9 +135,10 @@ public class DefaultBranchManager implements BranchManager {
@Transactional
@Override
- public void save(final Branch branch) {
+ public void save(Branch branch) {
dao.persist(branch);
+ final Long branchId = branch.getId();
dao.getSession().getTransaction().registerSynchronization(new Synchronization() {
@Override
@@ -154,19 +148,19 @@ public class DefaultBranchManager implements BranchManager {
@Override
public void afterCompletion(int status) {
if (status == Status.STATUS_COMMITTED) {
- final Long branchId = branch.getId();
- executor.execute(new Runnable() {
+ executorService.execute(new Runnable() {
@Override
public void run() {
unitOfWork.begin();
try {
Branch branch = dao.load(Branch.class, branchId);
- for (PullRequest each: branch.getIncomingRequests()) {
- if (each.isOpen())
- pullRequestManager.refresh(each);
- }
+ for (PullRequest request: branch.getIncomingRequests()) {
+ if (request.isOpen())
+ pullRequestManager.onTargetBranchUpdate(request);
+ }
+
// Calculates most recent open pull request for each branch. Note that although
// we do not allow multiple opened requests for a single branch, there still
// exist some chances multiple requests are opening for same branch, so we need
@@ -182,20 +176,8 @@ public class DefaultBranchManager implements BranchManager {
}
}
- for (PullRequest each: branchRequests.values()) {
- PullRequestUpdate update = new PullRequestUpdate();
- update.setRequest(each);
- update.setUser(branch.getUpdater());
- update.setDate(new Date());
- update.setHeadCommitHash(branch.getHeadCommitHash());
-
- each.getUpdates().add(update);
-
- pullRequestUpdateManager.save(update);
-
- each.setUpdateDate(new Date());
- pullRequestManager.refresh(each);
- }
+ for (PullRequest request: branchRequests.values())
+ pullRequestManager.onSourceBranchUpdate(request);
} finally {
unitOfWork.end();
}
diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/impl/DefaultPullRequestManager.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/impl/DefaultPullRequestManager.java
index 6c11a6e152..337f705c33 100644
--- a/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/impl/DefaultPullRequestManager.java
+++ b/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/impl/DefaultPullRequestManager.java
@@ -1,17 +1,21 @@
package com.pmease.gitplex.core.manager.impl;
-import static com.pmease.gitplex.core.model.IntegrationStrategy.MERGE_ALWAYS;
-import static com.pmease.gitplex.core.model.IntegrationStrategy.MERGE_IF_NECESSARY;
-import static com.pmease.gitplex.core.model.IntegrationStrategy.REBASE_SOURCE;
-import static com.pmease.gitplex.core.model.IntegrationStrategy.REBASE_TARGET;
import static com.pmease.gitplex.core.model.PullRequest.CriterionHelper.ofOpen;
import static com.pmease.gitplex.core.model.PullRequest.CriterionHelper.ofSource;
import static com.pmease.gitplex.core.model.PullRequest.CriterionHelper.ofTarget;
+import static com.pmease.gitplex.core.model.PullRequest.IntegrationStrategy.MERGE_ALWAYS;
+import static com.pmease.gitplex.core.model.PullRequest.IntegrationStrategy.MERGE_IF_NECESSARY;
+import static com.pmease.gitplex.core.model.PullRequest.IntegrationStrategy.REBASE_SOURCE_BRANCH;
+import static com.pmease.gitplex.core.model.PullRequest.IntegrationStrategy.REBASE_TARGET_BRANCH;
import java.io.File;
import java.util.Date;
import java.util.List;
+import java.util.Map;
import java.util.concurrent.Callable;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
import javax.inject.Inject;
import javax.inject.Singleton;
@@ -21,32 +25,30 @@ import org.hibernate.criterion.Restrictions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;
import com.pmease.commons.git.Git;
import com.pmease.commons.git.command.MergeCommand.FastForwardMode;
import com.pmease.commons.hibernate.Sessional;
import com.pmease.commons.hibernate.Transactional;
+import com.pmease.commons.hibernate.UnitOfWork;
import com.pmease.commons.hibernate.dao.Dao;
import com.pmease.commons.hibernate.dao.EntityCriteria;
import com.pmease.commons.util.FileUtils;
-import com.pmease.gitplex.core.gatekeeper.checkresult.Approved;
import com.pmease.gitplex.core.manager.BranchManager;
import com.pmease.gitplex.core.manager.PullRequestManager;
import com.pmease.gitplex.core.manager.PullRequestUpdateManager;
import com.pmease.gitplex.core.manager.StorageManager;
import com.pmease.gitplex.core.model.Branch;
-import com.pmease.gitplex.core.model.IntegrationInfo;
import com.pmease.gitplex.core.model.IntegrationPolicy;
-import com.pmease.gitplex.core.model.IntegrationStrategy;
+import com.pmease.gitplex.core.model.IntegrationPreview;
import com.pmease.gitplex.core.model.PullRequest;
import com.pmease.gitplex.core.model.PullRequest.CloseStatus;
-import com.pmease.gitplex.core.model.PullRequestAction;
+import com.pmease.gitplex.core.model.PullRequest.IntegrationStrategy;
import com.pmease.gitplex.core.model.PullRequestAudit;
import com.pmease.gitplex.core.model.PullRequestComment;
+import com.pmease.gitplex.core.model.PullRequestOperation;
import com.pmease.gitplex.core.model.PullRequestUpdate;
import com.pmease.gitplex.core.model.User;
-import com.pmease.gitplex.core.model.VoteInvitation;
@Singleton
public class DefaultPullRequestManager implements PullRequestManager {
@@ -61,13 +63,22 @@ public class DefaultPullRequestManager implements PullRequestManager {
private final StorageManager storageManager;
+ private final ExecutorService executorService;
+
+ private final UnitOfWork unitOfWork;
+
+ private final Map<Long, Future<Void>> integrationFutures = new ConcurrentHashMap<>();
+
@Inject
public DefaultPullRequestManager(Dao dao, PullRequestUpdateManager pullRequestUpdateManager,
- BranchManager branchManager, StorageManager storageManager) {
+ BranchManager branchManager, StorageManager storageManager,
+ ExecutorService executorService, UnitOfWork unitOfWork) {
this.dao = dao;
this.pullRequestUpdateManager = pullRequestUpdateManager;
this.branchManager = branchManager;
this.storageManager = storageManager;
+ this.executorService = executorService;
+ this.unitOfWork = unitOfWork;
}
@Sessional
@@ -96,226 +107,104 @@ public class DefaultPullRequestManager implements PullRequestManager {
request.deleteRefs();
}
-
- /**
- * Refresh internal state of this pull request. Pull request should be refreshed when:
- *
- * <li> It is updated
- * <li> Head of target branch changes
- * <li> Some one vote against it
- * <li> CI system reports completion of build against relevant commits
- */
- @Transactional
- public void refresh(final PullRequest request) {
- request.lockAndCall(new Callable<Void>() {
-
- @Override
- public Void call() throws Exception {
- Git git = request.getTarget().getRepository().git();
- String branchHead = request.getTarget().getHeadCommitHash();
- String requestHead = request.getLatestUpdate().getHeadCommitHash();
-
- String integrateRef = request.getIntegrateRef();
-
- if (git.isAncestor(requestHead, branchHead)) {
- PullRequestAudit audit = new PullRequestAudit();
- audit.setRequest(request);
- audit.setAction(new PullRequestAction.Integrate(
- "Mark as integrated as target branch already contains the head commit."));
- audit.setDate(new Date());
- audit.setUser(request.getTarget().getUpdater());
- dao.persist(audit);
-
- request.setCloseStatus(CloseStatus.INTEGRATED);
- request.setUpdateDate(new Date());
- request.setCheckResult(new Approved("Already integrated."));
- request.setIntegrationInfo(new IntegrationInfo(branchHead, requestHead, branchHead, true));
- } else {
- // Update head ref so that it can be pulled by build system
- git.updateRef(request.getHeadRef(), requestHead, null, null);
-
- IntegrationStrategy strategy = request.getIntegrationStrategy();
-
- if (request.getIntegrationInfo() == null
- || !branchHead.equals(request.getIntegrationInfo().getBranchHead())
- || !requestHead.equals(request.getIntegrationInfo().getRequestHead())
- || request.getIntegrationInfo().getIntegrationHead() != null
- && !request.getIntegrationInfo().getIntegrationHead().equals(git.parseRevision(integrateRef, false))) {
-
- if (strategy == MERGE_IF_NECESSARY && git.isAncestor(branchHead, requestHead)) {
- request.setIntegrationInfo(new IntegrationInfo(branchHead, requestHead, requestHead, false));
- git.updateRef(integrateRef, requestHead, null, null);
- } else {
- File tempDir = FileUtils.createTempDir();
- try {
- Git tempGit = new Git(tempDir);
- tempGit.clone(git.repoDir().getAbsolutePath(), false, true, true,
- request.getTarget().getName());
-
- String integrateHead;
-
- if (strategy == REBASE_TARGET) {
- tempGit.updateRef("HEAD", requestHead, null, null);
- tempGit.reset(null, null);
- integrateHead = tempGit.cherryPick(".." + branchHead);
- } else {
- tempGit.updateRef("HEAD", branchHead, null, null);
- tempGit.reset(null, null);
- if (strategy == REBASE_SOURCE) {
- integrateHead = tempGit.cherryPick(".." + requestHead);
- } else {
- FastForwardMode fastForwardMode;
- if (strategy == MERGE_ALWAYS)
- fastForwardMode = FastForwardMode.NO_FF;
- else
- fastForwardMode = FastForwardMode.FF;
- integrateHead = tempGit.merge(requestHead, fastForwardMode, null, null,
- "Merge pull request: " + request.getTitle());
- }
- }
-
- if (integrateHead != null) {
- request.setIntegrationInfo(new IntegrationInfo(
- branchHead, requestHead, integrateHead,
- !tempGit.listChangedFiles(requestHead, integrateHead, null).isEmpty()));
- git.fetch(tempGit, "+HEAD:" + integrateRef);
- } else {
- request.setIntegrationInfo(new IntegrationInfo(branchHead, requestHead,
- integrateHead, false));
- git.deleteRef(integrateRef, null, null);
- }
- } finally {
- FileUtils.deleteDir(tempDir);
- }
- }
- }
- request.setCheckResult(request.getTarget().getRepository().getGateKeeper().checkRequest(request));
- for (VoteInvitation invitation : request.getVoteInvitations()) {
- if (!request.getCheckResult().canVote(invitation.getVoter(), request))
- dao.remove(invitation);
- else if (invitation.getId() == null)
- dao.persist(invitation);
- }
- }
+ @Transactional
+ @Override
+ public void discard(final PullRequest request, final User user, final String comment) {
+ PullRequestAudit audit = new PullRequestAudit();
+ audit.setRequest(request);
+ audit.setDate(new Date());
+ audit.setOperation(PullRequestOperation.DISCARD);
+ audit.setUser(user);
- dao.persist(request);
-
- if (request.isAutoIntegrate() && request.canIntegrate())
- integrate(request, null, "Integrated automatically by system.");
+ dao.persist(audit);
+
+ if (comment != null) {
+ PullRequestComment requestComment = new PullRequestComment();
+ requestComment.setContent(comment);
+ requestComment.setDate(audit.getDate());
+ requestComment.setRequest(request);
+ requestComment.setUser(user);
+ dao.persist(requestComment);
+ }
- return null;
- }
-
- });
+ request.setCloseStatus(CloseStatus.DISCARDED);
+ request.setUpdateDate(audit.getDate());
+ dao.persist(request);
+
+ deleteRefsUponClose(request);
}
-
+
@Transactional
- public void discard(final PullRequest request, final User user, final String comment) {
- request.lockAndCall(new Callable<Void>() {
-
- @Override
- public Void call() throws Exception {
- PullRequestAudit audit = new PullRequestAudit();
- audit.setRequest(request);
- audit.setDate(new Date());
- audit.setAction(new PullRequestAction.Discard());
- audit.setUser(user);
-
- dao.persist(audit);
-
- if (comment != null) {
- PullRequestComment requestComment = new PullRequestComment();
- requestComment.setContent(comment);
- requestComment.setDate(audit.getDate());
- requestComment.setRequest(request);
- requestComment.setUser(user);
- dao.persist(requestComment);
- }
+ @Override
+ public void integrate(PullRequest request, User user, String comment) {
+ if (request.getStatus() != PullRequest.Status.PENDING_INTEGRATE)
+ throw new IllegalStateException("Gate keeper disallows integration right now.");
+
+ IntegrationPreview preview = previewIntegration(request);
+ if (preview == null)
+ throw new IllegalStateException("Integration preview has not been calculated yet.");
- request.setCloseStatus(CloseStatus.DISCARDED);
- request.setUpdateDate(audit.getDate());
- dao.persist(request);
-
- deleteRefsUponClose(request);
-
- return null;
+ String previewIntegrated = preview.getIntegrated();
+ if (previewIntegrated == null)
+ throw new IllegalStateException("There are integration conflicts.");
+
+ if (request.getIntegrationStrategy() == REBASE_SOURCE_BRANCH) {
+ Git sourceGit = request.getSource().getRepository().git();
+ if (sourceGit.updateRef(request.getSource().getHeadRef(),
+ previewIntegrated, preview.getRequestHead(),
+ "Rebase for pull request: " + request.getId())) {
+
+ request.getSource().setHeadCommitHash(previewIntegrated);
+ request.getSource().setUpdater(user);
+ branchManager.save(request.getSource());
+
+ PullRequestUpdate update = new PullRequestUpdate();
+ update.setRequest(request);
+ update.setUser(user);
+ update.setHeadCommitHash(previewIntegrated);
+ request.getUpdates().add(update);
+
+ pullRequestUpdateManager.save(update);
+ } else {
+ throw new RuntimeException(String.format(
+ "Unable to target branch '%s' due to lock failure.", request.getTarget()));
}
+ }
+ Git git = request.getTarget().getRepository().git();
+ if (git.updateRef(request.getTarget().getHeadRef(), previewIntegrated,
+ preview.getTargetHead(), comment!=null?comment:"Pull request #" + request.getId())) {
+ request.getTarget().setHeadCommitHash(previewIntegrated);
+ request.getTarget().setUpdater(user);
+ branchManager.save(request.getTarget());
- });
- }
-
- @Transactional
- public boolean integrate(final PullRequest request, final User user, final String comment) {
- Preconditions.checkArgument(request.canIntegrate(), "request can not be integrated.");
-
- return request.lockAndCall(new Callable<Boolean>() {
-
- @Override
- public Boolean call() throws Exception {
- if (request.getIntegrationStrategy() == REBASE_SOURCE) {
- Git sourceGit = request.getSource().getRepository().git();
- if (sourceGit.updateRef(request.getSource().getHeadRef(),
- request.getIntegrationInfo().getIntegrationHead(),
- request.getIntegrationInfo().getRequestHead(), "Rebase for pull request: " +request.getId())) {
-
- request.getSource().setHeadCommitHash(request.getIntegrationInfo().getIntegrationHead());
- request.getSource().setUpdater(user);
- branchManager.save(request.getSource());
-
- PullRequestUpdate update = new PullRequestUpdate();
- update.setRequest(request);
- update.setUser(user);
- update.setHeadCommitHash(request.getIntegrationInfo().getIntegrationHead());
- request.getUpdates().add(update);
-
- pullRequestUpdateManager.save(update);
- } else {
- logger.warn("Unable to update source branch '{}' due to lock failure.", request.getSource());
- return false;
- }
- }
- Git git = request.getTarget().getRepository().git();
- if (git.updateRef(request.getTarget().getHeadRef(),
- request.getIntegrationInfo().getIntegrationHead(),
- request.getIntegrationInfo().getBranchHead(),
- comment!=null?comment:"Pull request #" + request.getId())) {
- request.getTarget().setHeadCommitHash(request.getIntegrationInfo().getIntegrationHead());
- request.getTarget().setUpdater(user);
- branchManager.save(request.getTarget());
-
- PullRequestAudit audit = new PullRequestAudit();
- audit.setRequest(request);
- audit.setDate(new Date());
- audit.setAction(new PullRequestAction.Integrate(null));
- audit.setUser(user);
-
- dao.persist(audit);
-
- if (comment != null) {
- PullRequestComment requestComment = new PullRequestComment();
- requestComment.setContent(comment);
- requestComment.setDate(audit.getDate());
- requestComment.setRequest(request);
- requestComment.setUser(user);
- dao.persist(requestComment);
- }
+ PullRequestAudit audit = new PullRequestAudit();
+ audit.setRequest(request);
+ audit.setDate(new Date());
+ audit.setOperation(PullRequestOperation.INTEGRATE);
+ audit.setUser(user);
+
+ dao.persist(audit);
+
+ if (comment != null) {
+ PullRequestComment requestComment = new PullRequestComment();
+ requestComment.setContent(comment);
+ requestComment.setDate(audit.getDate());
+ requestComment.setRequest(request);
+ requestComment.setUser(user);
+ dao.persist(requestComment);
+ }
- request.setCloseStatus(CloseStatus.INTEGRATED);
- request.setUpdateDate(new Date());
+ request.setCloseStatus(CloseStatus.INTEGRATED);
+ request.setUpdateDate(new Date());
- dao.persist(request);
+ dao.persist(request);
- deleteRefsUponClose(request);
-
- return true;
- } else {
- logger.warn("Unable to target branch '{}' due to lock failure.", request.getTarget());
- return false;
- }
- }
-
- });
+ deleteRefsUponClose(request);
+ } else {
+ throw new RuntimeException(String.format(
+ "Unable to target branch '%s' due to lock failure.", request.getTarget()));
+ }
}
@Sessional
@@ -323,8 +212,8 @@ public class DefaultPullRequestManager implements PullRequestManager {
public List<PullRequest> findByCommit(String commit) {
return dao.query(EntityCriteria.of(PullRequest.class)
.add(Restrictions.or(
- Restrictions.eq("integrationInfo.requestHead", commit),
- Restrictions.eq("integrationInfo.integrationHead", commit))), 0, 0);
+ Restrictions.eq("integrationPreview.requestHead", commit),
+ Restrictions.eq("integrationPreview.integrated", commit))), 0, 0);
}
@Transactional
@@ -340,8 +229,6 @@ public class DefaultPullRequestManager implements PullRequestManager {
update.setDate(new Date(System.currentTimeMillis() + 1000));
pullRequestUpdateManager.save(update);
}
-
- refresh(request);
}
@Override
@@ -361,9 +248,145 @@ public class DefaultPullRequestManager implements PullRequestManager {
private void deleteRefsUponClose(PullRequest request) {
Git git = request.getTarget().getRepository().git();
- for (PullRequestUpdate update: request.getUpdates()) {
- git.deleteRef(update.getChangeRef(), null, null);
- }
+ for (PullRequestUpdate update: request.getUpdates())
+ git.deleteRef(update.getReferentialRef(), null, null);
git.deleteRef(request.getIntegrateRef(), null, null);
}
+
+ @Transactional
+ @Override
+ public void onTargetBranchUpdate(PullRequest request) {
+ Git git = request.getTarget().getRepository().git();
+ if (git.isAncestor(request.getLatestUpdate().getHeadCommitHash(), request.getTarget().getHeadCommitHash())) {
+ PullRequestAudit audit = new PullRequestAudit();
+ audit.setRequest(request);
+ audit.setOperation(PullRequestOperation.INTEGRATE);
+ audit.setDate(new Date());
+ audit.setUser(request.getTarget().getUpdater());
+ dao.persist(audit);
+
+ request.setIntegrationPreview(null);
+ request.setCloseStatus(CloseStatus.INTEGRATED);
+ request.setUpdateDate(new Date());
+
+ dao.persist(request);
+ }
+ }
+
+ @Transactional
+ @Override
+ public void onSourceBranchUpdate(PullRequest request) {
+ PullRequestUpdate update = new PullRequestUpdate();
+ update.setRequest(request);
+ update.setUser(request.getSource().getUpdater());
+ update.setDate(new Date());
+ update.setHeadCommitHash(request.getSource().getHeadCommitHash());
+
+ request.getUpdates().add(update);
+ pullRequestUpdateManager.save(update);
+ }
+
+ @Transactional
+ @Override
+ public void onGateKeeperUpdate(PullRequest request) {
+ if (request.isAutoIntegrate() && canIntegrate(request))
+ integrate(request, null, "Integrated automatically by system");
+ }
+
+ @Override
+ public IntegrationPreview previewIntegration(PullRequest request) {
+ IntegrationPreview preview = request.getIntegrationPreview();
+ if (preview != null
+ && preview.getRequestHead().equals(request.getLatestUpdate().getHeadCommitHash())
+ && preview.getTargetHead().equals(request.getTarget().getHeadCommitHash())
+ && preview.getIntegrationStrategy() == request.getIntegrationStrategy()
+ && (preview.getIntegrated() == null || preview.getIntegrated().equals(request.getTarget().getRepository().getRefValue(request.getIntegrateRef())))) {
+ return preview;
+ } else {
+ final Long requestId = request.getId();
+ if (!integrationFutures.containsKey(requestId)) {
+ integrationFutures.put(request.getId(), executorService.submit(new Callable<Void>() {
+
+ @Override
+ public Void call() throws Exception {
+ unitOfWork.begin();
+ try {
+ PullRequest request = dao.load(PullRequest.class, requestId);
+ String requestHead = request.getLatestUpdate().getHeadCommitHash();
+ String targetHead = request.getTarget().getHeadCommitHash();
+ Git git = request.getTarget().getRepository().git();
+ IntegrationPreview preview = new IntegrationPreview(request.getTarget().getHeadCommitHash(),
+ request.getLatestUpdate().getHeadCommitHash(), request.getIntegrationStrategy(), null);
+ request.setIntegrationPreview(preview);
+ String integrateRef = request.getIntegrateRef();
+ if (preview.getIntegrationStrategy() == MERGE_IF_NECESSARY && git.isAncestor(targetHead, requestHead)) {
+ preview.setIntegrated(requestHead);
+ git.updateRef(integrateRef, requestHead, null, null);
+ } else {
+ File tempDir = FileUtils.createTempDir();
+ try {
+ Git tempGit = new Git(tempDir);
+ tempGit.clone(git.repoDir().getAbsolutePath(), false, true, true,
+ request.getTarget().getName());
+
+ String integrated;
+
+ if (preview.getIntegrationStrategy() == REBASE_TARGET_BRANCH) {
+ tempGit.updateRef("HEAD", requestHead, null, null);
+ tempGit.reset(null, null);
+ integrated = tempGit.cherryPick(".." + targetHead);
+ } else {
+ tempGit.updateRef("HEAD", targetHead, null, null);
+ tempGit.reset(null, null);
+ if (preview.getIntegrationStrategy() == REBASE_SOURCE_BRANCH) {
+ integrated = tempGit.cherryPick(".." + requestHead);
+ } else {
+ FastForwardMode fastForwardMode;
+ if (preview.getIntegrationStrategy() == MERGE_ALWAYS)
+ fastForwardMode = FastForwardMode.NO_FF;
+ else
+ fastForwardMode = FastForwardMode.FF;
+ integrated = tempGit.merge(requestHead, fastForwardMode, null, null,
+ "Merge pull request: " + request.getTitle());
+ }
+ }
+
+ if (integrated != null) {
+ preview.setIntegrated(integrated);
+ git.fetch(tempGit, "+HEAD:" + integrateRef);
+ } else {
+ git.deleteRef(integrateRef, null, null);
+ }
+ } finally {
+ FileUtils.deleteDir(tempDir);
+ }
+ }
+ dao.persist(request);
+
+ onGateKeeperUpdate(request);
+ } catch (Exception e) {
+ logger.error("Error previewing integration of pull request #" + requestId, e);
+ } finally {
+ integrationFutures.remove(requestId);
+ unitOfWork.end();
+ }
+ return null;
+ }
+
+ }));
+ }
+ return null;
+ }
+ }
+
+ @Override
+ public boolean canIntegrate(PullRequest request) {
+ if (request.getStatus() != PullRequest.Status.PENDING_INTEGRATE) {
+ return false;
+ } else {
+ IntegrationPreview integrationPreview = previewIntegration(request);
+ return integrationPreview != null && integrationPreview.getIntegrated() != null;
+ }
+ }
+
}
diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/impl/DefaultPullRequestUpdateManager.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/impl/DefaultPullRequestUpdateManager.java
index 2ee864036d..475a3c71e8 100644
--- a/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/impl/DefaultPullRequestUpdateManager.java
+++ b/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/impl/DefaultPullRequestUpdateManager.java
@@ -38,9 +38,10 @@ public class DefaultPullRequestUpdateManager implements PullRequestUpdateManager
request.getTarget().getRepository().git().fetch(
request.getSource().getRepository().git(),
"+" + request.getSource().getHeadRef() + ":" + update.getHeadRef());
+ } else {
+ request.getTarget().getRepository().git().updateRef(update.getHeadRef(),
+ sourceHead, null, null);
}
- request.getTarget().getRepository().git().updateRef(update.getHeadRef(),
- sourceHead, null, null);
}
@Transactional
diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/impl/DefaultVerificationManager.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/impl/DefaultVerificationManager.java
index 0524c8bfb9..462374995d 100644
--- a/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/impl/DefaultVerificationManager.java
+++ b/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/impl/DefaultVerificationManager.java
@@ -5,13 +5,14 @@ import java.util.Collection;
import javax.inject.Inject;
import javax.inject.Singleton;
-import com.pmease.gitplex.core.manager.PullRequestManager;
-import com.pmease.gitplex.core.manager.VerificationManager;
import org.hibernate.criterion.Restrictions;
import com.pmease.commons.hibernate.Sessional;
+import com.pmease.commons.hibernate.Transactional;
import com.pmease.commons.hibernate.dao.Dao;
import com.pmease.commons.hibernate.dao.EntityCriteria;
+import com.pmease.gitplex.core.manager.PullRequestManager;
+import com.pmease.gitplex.core.manager.VerificationManager;
import com.pmease.gitplex.core.model.PullRequest;
import com.pmease.gitplex.core.model.Verification;
import com.pmease.gitplex.core.model.Verification.Status;
@@ -46,25 +47,25 @@ public class DefaultVerificationManager implements VerificationManager {
.add(Restrictions.eq("configuration", configuration)));
}
+ @Transactional
@Override
- public void save(Verification result) {
- dao.persist(result);
-
- for (PullRequest request : pullRequestManager.findByCommit(result.getCommit())) {
- if (request.isOpen())
- pullRequestManager.refresh(request);
- }
+ public void save(Verification verification) {
+ dao.persist(verification);
+ onVerificationChange(verification.getCommit());
}
+ @Transactional
@Override
- public void delete(Verification result) {
- dao.remove(result);
+ public void delete(Verification verification) {
+ dao.remove(verification);
- for (PullRequest request : pullRequestManager.findByCommit(result.getCommit())) {
- if (request.isOpen())
- pullRequestManager.refresh(request);
- }
+ onVerificationChange(verification.getCommit());
+ }
+
+ private void onVerificationChange(String commit) {
+ for (PullRequest request : pullRequestManager.findByCommit(commit))
+ pullRequestManager.onGateKeeperUpdate(request);
}
@Override
diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/impl/DefaultVoteManager.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/impl/DefaultVoteManager.java
index 0c3f502fac..8d00a26bfa 100644
--- a/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/impl/DefaultVoteManager.java
+++ b/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/impl/DefaultVoteManager.java
@@ -14,9 +14,9 @@ import com.pmease.commons.hibernate.dao.EntityCriteria;
import com.pmease.gitplex.core.manager.PullRequestManager;
import com.pmease.gitplex.core.manager.VoteManager;
import com.pmease.gitplex.core.model.PullRequest;
-import com.pmease.gitplex.core.model.PullRequestAction;
import com.pmease.gitplex.core.model.PullRequestAudit;
import com.pmease.gitplex.core.model.PullRequestComment;
+import com.pmease.gitplex.core.model.PullRequestOperation;
import com.pmease.gitplex.core.model.PullRequestUpdate;
import com.pmease.gitplex.core.model.User;
import com.pmease.gitplex.core.model.Vote;
@@ -57,9 +57,9 @@ public class DefaultVoteManager implements VoteManager {
PullRequestAudit audit = new PullRequestAudit();
if (result == Vote.Result.APPROVE)
- audit.setAction(new PullRequestAction.Approve());
+ audit.setOperation(PullRequestOperation.APPROVE);
else
- audit.setAction(new PullRequestAction.Disapprove());
+ audit.setOperation(PullRequestOperation.DISAPPROVE);
audit.setDate(new Date());
audit.setRequest(request);
audit.setUser(user);
@@ -74,7 +74,7 @@ public class DefaultVoteManager implements VoteManager {
dao.persist(requestComment);
}
- pullRequestManager.refresh(request);
+ pullRequestManager.onGateKeeperUpdate(request);
}
}
diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/model/IntegrationInfo.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/model/IntegrationInfo.java
deleted file mode 100644
index 3e739783ba..0000000000
--- a/gitplex.core/src/main/java/com/pmease/gitplex/core/model/IntegrationInfo.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package com.pmease.gitplex.core.model;
-
-import java.io.Serializable;
-
-import javax.annotation.Nullable;
-import javax.persistence.Embeddable;
-
-@SuppressWarnings("serial")
-@Embeddable
-public class IntegrationInfo implements Serializable {
-
- private String branchHead;
-
- private String requestHead;
-
- private String integrationHead;
-
- // Use Boolean instead of boolean to avoid Hibernate limitation
- // on embedded property
- private Boolean hasChanges;
-
- @SuppressWarnings("unused")
- private IntegrationInfo() {
- }
-
- public IntegrationInfo(String branchHead, String requestHead, @Nullable String integrationHead, boolean hasChanges) {
- this.branchHead = branchHead;
- this.requestHead = requestHead;
- this.integrationHead = integrationHead;
- this.hasChanges = hasChanges;
- }
-
- public String getBranchHead() {
- return branchHead;
- }
-
- public String getRequestHead() {
- return requestHead;
- }
-
- /**
- * Get integration commit.
- *
- * @return
- * integration commit. <tt>null</tt> will be returned if there are integration conflicts
- */
- public @Nullable String getIntegrationHead() {
- return integrationHead;
- }
-
- public boolean hasChanges() {
- return hasChanges != null && hasChanges;
- }
-
-}
\ No newline at end of file
diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/model/IntegrationPolicy.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/model/IntegrationPolicy.java
index d5fa23a500..708827e96b 100644
--- a/gitplex.core/src/main/java/com/pmease/gitplex/core/model/IntegrationPolicy.java
+++ b/gitplex.core/src/main/java/com/pmease/gitplex/core/model/IntegrationPolicy.java
@@ -12,6 +12,7 @@ import com.pmease.commons.editable.annotation.Editable;
import com.pmease.commons.editable.annotation.Horizontal;
import com.pmease.gitplex.core.branchmatcher.AffinalBranchMatcher;
import com.pmease.gitplex.core.branchmatcher.BranchMatcher;
+import com.pmease.gitplex.core.model.PullRequest.IntegrationStrategy;
@SuppressWarnings("serial")
@Editable
@@ -48,23 +49,7 @@ public class IntegrationPolicy implements Serializable {
this.sourceBranches = sourceBranches;
}
- @Editable(order=300, description="<p>Choose one or more integration strategies applicable for pull requests "
- + "matching branch criterias specified above. User can decide to use one of the applicable "
- + "strategy to integrate pull request into target branch. Note that the first selected strategy "
- + "here will appear as default strategy of the pull request. GitPlex for now provides below "
- + "integration strategies:</p>"
- + "<dl>"
- + "<dt>Merge always</dt>"
- + "<dd>Always create merge commit when integrate into target branch</dd>"
- + "<dt>Merge if necessary</dt>"
- + "<dd>Create merge commit only if target branch can not be fast-forwarded to the pull request</dd>"
- + "<dt>Merge with squash</dt>"
- + "<dd>Squash all commits in the pull request and then merge with target branch</dd>"
- + "<dt>Rebase source on top of target</dt>"
- + "<dd>Rebase source branch on top of target branch and then fast-forward target branch to source branch</dd>"
- + "<dt>Rebase target on top of source</dt>"
- + "<dd>Rebase target branch on top of source branch</dd>"
- + "</dl>")
+ @Editable(order=300, descriptionProvider="getIntegrationStrategyHelp")
@Size(min=1, message="At least one integration strategy should be specified")
public List<IntegrationStrategy> getIntegrationStrategies() {
return integrationStrategies;
@@ -74,4 +59,23 @@ public class IntegrationPolicy implements Serializable {
this.integrationStrategies = integrationStrategies;
}
+ @SuppressWarnings("unused")
+ private static String getIntegrationStrategyHelp() {
+ StringBuilder help = new StringBuilder("<p>Choose one or more integration strategies applicable for pull requests "
+ + "matching branch criterias specified above. User can decide to use one of the applicable "
+ + "strategy to integrate pull request into target branch. Note that the first selected strategy "
+ + "here will appear as default strategy of the pull request. GitPlex for now provides below "
+ + "integration strategies:</p>");
+
+ help.append("<dl>");
+
+ for (IntegrationStrategy strategy: IntegrationStrategy.values()) {
+ help.append("<dt>").append(strategy.toString()).append("</dt>");
+ help.append("<dd>").append(strategy.getDescription()).append("</dd>");
+ }
+
+ help.append("</dl>");
+
+ return help.toString();
+ }
}
diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/model/IntegrationPreview.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/model/IntegrationPreview.java
new file mode 100644
index 0000000000..93ccc1ba4d
--- /dev/null
+++ b/gitplex.core/src/main/java/com/pmease/gitplex/core/model/IntegrationPreview.java
@@ -0,0 +1,59 @@
+package com.pmease.gitplex.core.model;
+
+import java.io.Serializable;
+
+import javax.annotation.Nullable;
+import javax.persistence.Column;
+import javax.persistence.Embeddable;
+
+import com.pmease.gitplex.core.model.PullRequest.IntegrationStrategy;
+
+@SuppressWarnings("serial")
+@Embeddable
+public class IntegrationPreview implements Serializable {
+
+ @Column(name="G_PV_TARGET_HEAD")
+ private String targetHead;
+
+ @Column(name="G_PV_REQUEST_HEAD")
+ private String requestHead;
+
+ @Column(name="G_PV_INT_STRATEGY")
+ private IntegrationStrategy integrationStrategy;
+
+ @Column(name="G_PV_INTEGRATED")
+ private String integrated;
+
+ @SuppressWarnings("unused")
+ private IntegrationPreview() {
+ }
+
+ public IntegrationPreview(String targetHead, String requestHead, IntegrationStrategy integrationStrategy,
+ @Nullable String previewIntegrated) {
+ this.targetHead = targetHead;
+ this.requestHead = requestHead;
+ this.integrationStrategy = integrationStrategy;
+ this.integrated = previewIntegrated;
+ }
+
+ public String getTargetHead() {
+ return targetHead;
+ }
+
+ public String getRequestHead() {
+ return requestHead;
+ }
+
+ public IntegrationStrategy getIntegrationStrategy() {
+ return integrationStrategy;
+ }
+
+ public String getIntegrated() {
+ return integrated;
+ }
+
+ public void setIntegrated(String integrated) {
+ this.integrated = integrated;
+ }
+
+}
\ No newline at end of file
diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/model/IntegrationSetting.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/model/IntegrationSetting.java
index 0410486c54..eddd38fc84 100644
--- a/gitplex.core/src/main/java/com/pmease/gitplex/core/model/IntegrationSetting.java
+++ b/gitplex.core/src/main/java/com/pmease/gitplex/core/model/IntegrationSetting.java
@@ -8,6 +8,7 @@ import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import com.pmease.commons.editable.annotation.Editable;
+import com.pmease.gitplex.core.model.PullRequest.IntegrationStrategy;
@SuppressWarnings("serial")
@Editable
diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/model/IntegrationStrategy.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/model/IntegrationStrategy.java
deleted file mode 100644
index a3c3ed420b..0000000000
--- a/gitplex.core/src/main/java/com/pmease/gitplex/core/model/IntegrationStrategy.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.pmease.gitplex.core.model;
-
-public enum IntegrationStrategy {
- MERGE_ALWAYS("Merge always"),
- MERGE_IF_NECESSARY("Merge if necessary"),
- MERGE_WITH_SQUASH("Merge with squash"),
- REBASE_SOURCE("Rebase source on top of target"),
- REBASE_TARGET("Rebase target on top of source");
-
- private String displayName;
-
- IntegrationStrategy(String displayName) {
- this.displayName = displayName;
- }
-
- @Override
- public String toString() {
- return displayName;
- }
-}
diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/model/PullRequest.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/model/PullRequest.java
index 775d8253bd..b0cff47172 100644
--- a/gitplex.core/src/main/java/com/pmease/gitplex/core/model/PullRequest.java
+++ b/gitplex.core/src/main/java/com/pmease/gitplex/core/model/PullRequest.java
@@ -18,7 +18,6 @@ import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
-import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Transient;
@@ -34,10 +33,8 @@ import com.pmease.commons.hibernate.AbstractEntity;
import com.pmease.commons.util.LockUtils;
import com.pmease.commons.util.Triple;
import com.pmease.gitplex.core.comment.ChangeComments;
-import com.pmease.gitplex.core.gatekeeper.checkresult.Approved;
import com.pmease.gitplex.core.gatekeeper.checkresult.CheckResult;
import com.pmease.gitplex.core.gatekeeper.checkresult.Disapproved;
-import com.pmease.gitplex.core.gatekeeper.checkresult.Ignored;
import com.pmease.gitplex.core.gatekeeper.checkresult.Pending;
import com.pmease.gitplex.core.gatekeeper.checkresult.PendingAndBlock;
@@ -48,7 +45,7 @@ public class PullRequest extends AbstractEntity {
public enum CloseStatus {INTEGRATED, DISCARDED};
public enum Status {
- PENDING_REFRESH("Pending Check"), PENDING_APPROVAL("Pending Approval"),
+ PENDING_APPROVAL("Pending Approval"),
PENDING_UPDATE("Pending Update"), PENDING_INTEGRATE("Pending Integration"),
INTEGRATED("Integrated"), DISCARDED("Discarded");
@@ -65,6 +62,37 @@ public class PullRequest extends AbstractEntity {
}
+ public enum IntegrationStrategy {
+ MERGE_ALWAYS("Merge always", "Always create merge commit when integrate into target branch"),
+ MERGE_IF_NECESSARY("Merge if necessary", "Create merge commit only if target branch can not be fast-forwarded to the pull request"),
+ MERGE_WITH_SQUASH("Merge with squash", "Squash all commits in the pull request and then merge with target branch"),
+ REBASE_SOURCE_BRANCH("Rebase source branch", "Rebase source branch on top of target branch and then fast-forward target branch to source branch"),
+ REBASE_TARGET_BRANCH("Rebase target branch", "Rebase target branch on top of source branch");
+
+ private final String displayName;
+
+ private final String description;
+
+ IntegrationStrategy(String displayName, String description) {
+ this.displayName = displayName;
+ this.description = description;
+ }
+
+ public String getDisplayName() {
+ return displayName;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ @Override
+ public String toString() {
+ return displayName;
+ }
+
+ }
+
@Column
private CloseStatus closeStatus;
@@ -91,11 +119,8 @@ public class PullRequest extends AbstractEntity {
@Transient
private Git sandbox;
- @Lob
- private CheckResult checkResult;
-
@Embedded
- private IntegrationInfo integrationInfo;
+ private IntegrationPreview integrationPreview;
@Column(nullable=false)
private Date createDate = new Date();
@@ -120,6 +145,8 @@ public class PullRequest extends AbstractEntity {
@OneToMany(mappedBy = "request", cascade = CascadeType.REMOVE)
private Collection<PullRequestAudit> audits = new ArrayList<>();
+
+ private transient CheckResult checkResult;
private transient List<PullRequestUpdate> sortedUpdates;
@@ -283,14 +310,12 @@ public class PullRequest extends AbstractEntity {
return Status.INTEGRATED;
else if (closeStatus == CloseStatus.DISCARDED)
return Status.DISCARDED;
- else if (checkResult instanceof Pending || checkResult instanceof PendingAndBlock)
+ else if (getCheckResult() instanceof Pending || getCheckResult() instanceof PendingAndBlock)
return Status.PENDING_APPROVAL;
- else if (checkResult instanceof Disapproved)
+ else if (getCheckResult() instanceof Disapproved)
return Status.PENDING_UPDATE;
- else if (checkResult instanceof Ignored || checkResult instanceof Approved)
+ else
return Status.PENDING_INTEGRATE;
- else
- return Status.PENDING_REFRESH;
}
@Nullable
@@ -325,28 +350,26 @@ public class PullRequest extends AbstractEntity {
* check result of this pull request has not been refreshed yet
*/
public CheckResult getCheckResult() {
+ if (checkResult == null)
+ checkResult = getTarget().getRepository().getGateKeeper().checkRequest(this);
return checkResult;
}
- public void setCheckResult(CheckResult checkResult) {
- this.checkResult = checkResult;
- }
-
/**
- * Get integration info of this pull request.
+ * Get integration preview of this pull request.
*
* @return
- * integration info of this pull request, or <tt>null</tt> if integration
- * info has not been calculated yet
+ * integration preview of this pull request, or <tt>null</tt> if integration
+ * preview has not been calculated yet
*/
- public @Nullable IntegrationInfo getIntegrationInfo() {
- return integrationInfo;
+ public @Nullable IntegrationPreview getIntegrationPreview() {
+ return integrationPreview;
}
- public void setIntegrationInfo(IntegrationInfo integrationInfo) {
- this.integrationInfo = integrationInfo;
+ public void setIntegrationPreview(IntegrationPreview integrationPreview) {
+ this.integrationPreview = integrationPreview;
}
-
+
/**
* Get list of sorted updates.
*
@@ -541,12 +564,6 @@ public class PullRequest extends AbstractEntity {
return pendingCommits;
}
- public boolean canIntegrate() {
- return getStatus() == Status.PENDING_INTEGRATE
- && getIntegrationInfo() != null
- && getIntegrationInfo().getIntegrationHead() != null;
- }
-
public ChangeComments getComments(RevAwareChange change) {
ChangeKey key = new ChangeKey(change.getOldRevision(), change.getNewRevision(), change.getPath());
ChangeComments comments = commentsCache.get(key);
@@ -574,7 +591,7 @@ public class PullRequest extends AbstractEntity {
}
return mergedCommits;
}
-
+
private static class ChangeKey extends Triple<String, String, String> {
public ChangeKey(String oldCommit, String newCommit, String file) {
diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/model/PullRequestAction.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/model/PullRequestAction.java
deleted file mode 100644
index 3a241a67fc..0000000000
--- a/gitplex.core/src/main/java/com/pmease/gitplex/core/model/PullRequestAction.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.pmease.gitplex.core.model;
-
-import java.io.Serializable;
-
-import javax.annotation.Nullable;
-
-@SuppressWarnings("serial")
-public interface PullRequestAction extends Serializable {
-
- public static class Integrate implements PullRequestAction {
-
- private final String reason;
-
- public Integrate(@Nullable String reason) {
- this.reason = reason;
- }
-
- @Nullable
- public String getReason() {
- return reason;
- }
-
- }
-
- public static class Discard implements PullRequestAction {
-
- }
-
- public static class Approve implements PullRequestAction {
-
- }
-
- public static class Disapprove implements PullRequestAction {
-
- }
-
-}
diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/model/PullRequestAudit.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/model/PullRequestAudit.java
index e72276fb97..f08e1fd573 100644
--- a/gitplex.core/src/main/java/com/pmease/gitplex/core/model/PullRequestAudit.java
+++ b/gitplex.core/src/main/java/com/pmease/gitplex/core/model/PullRequestAudit.java
@@ -21,7 +21,7 @@ public class PullRequestAudit extends AbstractEntity {
@Lob
@Column(nullable=false)
- private PullRequestAction action;
+ private PullRequestOperation operation;
@ManyToOne
private User user;
@@ -37,12 +37,12 @@ public class PullRequestAudit extends AbstractEntity {
this.request = request;
}
- public PullRequestAction getAction() {
- return action;
+ public PullRequestOperation getOperation() {
+ return operation;
}
- public void setAction(PullRequestAction action) {
- this.action = action;
+ public void setOperation(PullRequestOperation operation) {
+ this.operation = operation;
}
@Nullable
diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/pullrequest/RequestOperation.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/model/PullRequestOperation.java
similarity index 51%
rename from gitplex.core/src/main/java/com/pmease/gitplex/core/pullrequest/RequestOperation.java
rename to gitplex.core/src/main/java/com/pmease/gitplex/core/model/PullRequestOperation.java
index d7389e10d9..63837bac73 100644
--- a/gitplex.core/src/main/java/com/pmease/gitplex/core/pullrequest/RequestOperation.java
+++ b/gitplex.core/src/main/java/com/pmease/gitplex/core/model/PullRequestOperation.java
@@ -1,56 +1,46 @@
-package com.pmease.gitplex.core.pullrequest;
+package com.pmease.gitplex.core.model;
import javax.annotation.Nullable;
-import com.pmease.gitplex.core.GitPlex;
-
import org.apache.shiro.SecurityUtils;
-import org.apache.shiro.authz.UnauthorizedException;
+import com.pmease.gitplex.core.GitPlex;
import com.pmease.gitplex.core.gatekeeper.voteeligibility.VoteEligibility;
import com.pmease.gitplex.core.manager.AuthorizationManager;
import com.pmease.gitplex.core.manager.PullRequestManager;
import com.pmease.gitplex.core.manager.UserManager;
import com.pmease.gitplex.core.manager.VoteManager;
-import com.pmease.gitplex.core.model.PullRequest;
-import com.pmease.gitplex.core.model.User;
-import com.pmease.gitplex.core.model.Vote;
import com.pmease.gitplex.core.model.PullRequest.Status;
import com.pmease.gitplex.core.permission.ObjectPermission;
-public enum RequestOperation {
+public enum PullRequestOperation {
INTEGRATE {
@Override
- public void checkOperate(PullRequest request) {
- if (!SecurityUtils.getSubject().isPermitted(ObjectPermission.ofRepositoryWrite(request.getTarget().getRepository())))
- throw new UnauthorizedException();
- if (request.getStatus() != Status.PENDING_INTEGRATE)
- throw new RequestOperateException("Request is not pending integrate.");
- if (request.getIntegrationInfo() == null)
- throw new RequestOperateException("Request is not refreshed yet.");
- if (request.getIntegrationInfo().getIntegrationHead() == null)
- throw new RequestOperateException("There are integrate conflicts.");
+ public boolean canOperate(PullRequest request) {
+ if (!SecurityUtils.getSubject().isPermitted(
+ ObjectPermission.ofRepositoryWrite(request.getTarget().getRepository()))) {
+ return false;
+ } else {
+ return GitPlex.getInstance(PullRequestManager.class).canIntegrate(request);
+ }
}
@Override
public void operate(PullRequest request, String comment) {
User user = GitPlex.getInstance(UserManager.class).getCurrent();
- if (!GitPlex.getInstance(PullRequestManager.class).integrate(request, user, comment)) {
- throw new RequestOperateException("Unable to update relevant branches due to lock failure, "
- + "please try again later.");
- }
+ GitPlex.getInstance(PullRequestManager.class).integrate(request, user, comment);
}
},
DISCARD {
@Override
- public void checkOperate(PullRequest request) {
+ public boolean canOperate(PullRequest request) {
if (!GitPlex.getInstance(AuthorizationManager.class).canModify(request))
- throw new UnauthorizedException();
- if (!request.isOpen())
- throw new RequestOperateException("Request is already closed.");
+ return false;
+ else
+ return request.isOpen();
}
@Override
@@ -63,8 +53,8 @@ public enum RequestOperation {
APPROVE {
@Override
- public void checkOperate(PullRequest request) {
- checkVote(request);
+ public boolean canOperate(PullRequest request) {
+ return canVote(request);
}
@Override
@@ -77,8 +67,8 @@ public enum RequestOperation {
DISAPPROVE {
@Override
- public void checkOperate(PullRequest request) {
- checkVote(request);
+ public boolean canOperate(PullRequest request) {
+ return canVote(request);
}
@Override
@@ -89,16 +79,16 @@ public enum RequestOperation {
};
- private static void checkVote(PullRequest request) {
+ private static boolean canVote(PullRequest request) {
User user = GitPlex.getInstance(UserManager.class).getCurrent();
if (user == null)
- throw new UnauthorizedException();
+ return false;
if (request.getStatus() != Status.PENDING_APPROVAL)
- throw new RequestOperateException("Request is not pending approval.");
+ return false;
if (GitPlex.getInstance(VoteManager.class).find(user, request.getLatestUpdate()) != null)
- throw new RequestOperateException("Current user has already voted for latest update of request.");
+ return false;
boolean canVote = false;
for (VoteEligibility each: request.getCheckResult().getVoteEligibilities()) {
@@ -107,21 +97,10 @@ public enum RequestOperation {
break;
}
}
- if (!canVote)
- throw new RequestOperateException("Current user is not eligible to vote the request");
+ return canVote;
}
public abstract void operate(PullRequest request, @Nullable String comment);
- public abstract void checkOperate(PullRequest request);
-
- public boolean canOperate(PullRequest request) {
- try {
- checkOperate(request);
- return true;
- } catch (UnauthorizedException | RequestOperateException e) {
- return false;
- }
- }
-
+ public abstract boolean canOperate(PullRequest request);
}
diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/model/PullRequestUpdate.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/model/PullRequestUpdate.java
index 8256f1c8e9..376f0d8648 100644
--- a/gitplex.core/src/main/java/com/pmease/gitplex/core/model/PullRequestUpdate.java
+++ b/gitplex.core/src/main/java/com/pmease/gitplex/core/model/PullRequestUpdate.java
@@ -101,9 +101,9 @@ public class PullRequestUpdate extends AbstractEntity {
this.votes = votes;
}
- public String getChangeRef() {
+ public String getReferentialRef() {
Preconditions.checkNotNull(getId());
- return Repository.REFS_GITPLEX + "updates/" + getId() + "/change";
+ return Repository.REFS_GITPLEX + "updates/" + getId() + "/referential";
}
public String getHeadRef() {
@@ -138,7 +138,7 @@ public class PullRequestUpdate extends AbstractEntity {
Lock lock = LockUtils.getLock("update.getReferentialCommit." + getId());
try {
lock.lockInterruptibly();
- String changeRef = getChangeRef();
+ String changeRef = getReferentialRef();
referentialCommitHash = git.parseRevision(changeRef, false);
if (referentialCommitHash != null) {
@@ -201,7 +201,7 @@ public class PullRequestUpdate extends AbstractEntity {
public void deleteRefs() {
Git git = getRequest().getTarget().getRepository().git();
git.deleteRef(getHeadRef(), null, null);
- git.deleteRef(getChangeRef(), null, null);
+ git.deleteRef(getReferentialRef(), null, null);
}
public Collection<String> getChangedFiles() {
diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/model/Repository.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/model/Repository.java
index 07f8d6f5c2..683972a339 100644
--- a/gitplex.core/src/main/java/com/pmease/gitplex/core/model/Repository.java
+++ b/gitplex.core/src/main/java/com/pmease/gitplex/core/model/Repository.java
@@ -104,6 +104,8 @@ public class Repository extends AbstractEntity implements UserBelonging {
private transient Map<String, Commit> commitCache = new HashMap<>();
+ private transient Map<String, Optional<String>> refValueCache = new HashMap<>();
+
public User getOwner() {
return owner;
}
@@ -391,6 +393,16 @@ public class Repository extends AbstractEntity implements UserBelonging {
return optional.orNull();
}
+ @Nullable
+ public String getRefValue(String refName) {
+ Optional<String> optional = refValueCache.get(refName);
+ if (optional == null) {
+ optional = Optional.fromNullable(git().parseRevision(refName, false));
+ refValueCache.put(refName, optional);
+ }
+ return optional.orNull();
+ }
+
public List<Change> getChanges(String fromCommit, String toCommit) {
CommitRange range = new CommitRange(fromCommit, toCommit);
List<Change> changes = changesCache.get(range);
diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/pullrequest/RequestOperateException.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/pullrequest/RequestOperateException.java
deleted file mode 100644
index acf0c50e3a..0000000000
--- a/gitplex.core/src/main/java/com/pmease/gitplex/core/pullrequest/RequestOperateException.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.pmease.gitplex.core.pullrequest;
-
-import com.pmease.commons.util.GeneralException;
-
-@SuppressWarnings("serial")
-public class RequestOperateException extends GeneralException {
-
- public RequestOperateException(String message) {
- super(message);
- }
-
-}
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/css/page.css b/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/css/page.css
index 8026998fe4..417ef0fd9c 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/css/page.css
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/css/page.css
@@ -859,30 +859,27 @@ ul.status-help li:last-child .description {border-bottom: none;}
.request-detail>div:last-child {margin-bottom: 0;}
.request-detail table {width: 100%;}
.request-detail td {vertical-align: top;}
-.request-detail td.actions {width: 120px;}
.request-detail .verification-status {cursor: pointer;}
-.request-detail>.head {font-size: 24px; font-weight: bold; padding: 0;}
-.request-detail>.head input[type="text"] {width: 600px;}
-.request-detail>.head>.actions a {color: #999; font-size: 19px;}
-.request-detail>.head>div {margin-right: 8px;}
-.request-detail>.head>.id {color: #999;}
-
-.request-detail>.status .summary .message {font-size: 20px;}
-.request-detail>.status .summary .fa {font-size: 24px;}
-.request-detail>.status .detail {margin-top: 8px;}
-.request-detail>.status>div.open {margin: -16px;}
-.request-detail>.status div.table {border-collapse: separate; border-spacing: 16px;}
-.request-detail>.status div.td {width: 50%;}
-.request-detail>.status .confirm, .request-detail>.status .confirm .actions {margin-top: 16px;}
-.request-detail>.status .check-result .fa {display:none;}
-.request-detail>.status .check-result.alert-warning .fa.fa-warning {display: inline;}
-.request-detail>.status .check-result.alert-info .fa.fa-info-circle {display: inline;}
-
-.request-detail>.actions>div {margin-bottom: 20px;}
-.request-detail>.actions .btn {margin-right: 8px;}
-
-.request-detail>.tabs {background: white; z-index: 100;}
+.request-detail>.overview {margin-bottom: 20px;}
+.request-detail>.overview>div {margin-bottom: 20px;}
+.request-detail>.overview>div:last-child {margin-bottom: 0;}
+.request-detail>.overview>.title {font-size: 24px; font-weight: bold; padding: 0;}
+.request-detail>.overview>.title input[type="text"] {width: 600px;}
+.request-detail>.overview>.title a i {color: #999; font-size: 19px;}
+.request-detail>.overview>.title>div {margin-right: 8px;}
+.request-detail>.overview>.title {margin-bottom: 12px;}
+.request-detail>.overview>.title>.id {color: #999;}
+
+.request-detail>.overview>.status {font-size: 18px;}
+
+.request-detail>.overview>.integration .preview>div:FIRST-CHILD:BEFORE {font-family: "ponticons";
+ margin-right: 4px; font-size: 16px;}
+.request-detail>.overview>.integration .preview.alert-success>div:FIRST-CHILD:BEFORE {content: "\f250";}
+.request-detail>.overview>.integration .preview.alert-warning>div:FIRST-CHILD:BEFORE {content: "\f260";}
+
+.request-detail>.overview>.operations a {margin-right: 8px;}
+.request-detail>.overview>.operations .confirm {margin-top: 12px;}
.request-detail>.activities {margin-bottom: 20px; border-bottom: 1px solid #DDD;}
.request-detail>.activities>tbody>tr.discussion>td {border-top: 1px solid #DDD; padding: 12px 0;}
@@ -952,7 +949,6 @@ ul.status-help li:last-child .description {border-bottom: none;}
border: 1px solid #DDD;}
.request-detail .compare>.head>.pull-left:FIRST-CHILD {margin-right: 16px;}
.request-detail .compare>.head>.pull-left:LAST-CHILD {margin-top: 3px;}
-.request-detail .compare>.head .tooltip-inner {max-width: 500px;}
.content>.commit-choice {max-height: 600px; padding: 8px 0; overflow-y: scroll;}
.content>.commit-choice a {text-decoration: none; color: #333; display: block; padding: 8px;}
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/img/ajax-loader.gif b/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/img/ajax-loader.gif
new file mode 100644
index 0000000000..2498ff53c1
Binary files /dev/null and b/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/img/ajax-loader.gif differ
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/img/commits.png b/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/img/commits.png
deleted file mode 100644
index d54eb198bb..0000000000
Binary files a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/img/commits.png and /dev/null differ
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/img/gitop.png b/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/img/gitop.png
deleted file mode 100644
index 60815ad9ae..0000000000
Binary files a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/img/gitop.png and /dev/null differ
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/img/gitplex.png b/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/img/gitplex.png
deleted file mode 100644
index 60815ad9ae..0000000000
Binary files a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/img/gitplex.png and /dev/null differ
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/img/image-hash.gif b/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/img/image-hash.gif
deleted file mode 100644
index 4ed7920b00..0000000000
Binary files a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/img/image-hash.gif and /dev/null differ
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/img/logo-333.png b/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/img/logo-333.png
deleted file mode 100644
index 2ece56d404..0000000000
Binary files a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/img/logo-333.png and /dev/null differ
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/img/logo-white.png b/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/img/logo-white.png
deleted file mode 100644
index 4d7ff40db0..0000000000
Binary files a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/img/logo-white.png and /dev/null differ
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/img/transparent.gif b/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/img/transparent.gif
deleted file mode 100644
index c7e98e044f..0000000000
Binary files a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/img/transparent.gif and /dev/null differ
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/img/twitter.png b/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/img/twitter.png
deleted file mode 100644
index 7d76578761..0000000000
Binary files a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/img/twitter.png and /dev/null differ
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/pontfonts/cheatsheet.html b/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/pontfonts/cheatsheet.html
index 2348a226f7..08a3c82031 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/pontfonts/cheatsheet.html
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/pontfonts/cheatsheet.html
@@ -2,7 +2,7 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <title>ponticons v1.0.9 Cheatsheet</title>
+ <title>ponticons v1.0.13 Cheatsheet</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
<style>
@@ -74,7 +74,7 @@
</span>
</div>
<div id="meta" class="pull-right">
- <small>version: 1.0.9 | 303 icons</small>
+ <small>version: 1.0.13 | 304 icons</small>
</div>
</div>
</header>
@@ -87,7 +87,7 @@
<section>
<h2 id="basic">Basic Shapes <small>81 icons</small></h2>
<ul class="icon-list">
- <li class="icon-list-item"><a><i class="fa fa-logo-gitplex"></i> <b>logo-gitplex</b> <b>F000</b></a></li>
+ <li class="icon-list-item"><a><i class="fa fa-logo-gitplex"></i> <b>logo-gitplex</b> <b>F100</b></a></li>
<li class="icon-list-item"><a><i class="fa fa-calendar-month"></i> <b>calendar-month</b> <b>F110</b></a></li>
@@ -255,47 +255,47 @@
<section>
<h2 id="arrows">Arrows <small>21 icons</small></h2>
<ul class="icon-list">
- <li class="icon-list-item"><a><i class="fa fa-arrow-up"></i> <b>arrow-up</b> <b>F250</b></a></li>
+ <li class="icon-list-item"><a><i class="fa fa-arrow-up"></i> <b>arrow-up</b> <b>F200</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-arrow-down"></i> <b>arrow-down</b> <b>F251</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-arrow-down"></i> <b>arrow-down</b> <b>F201</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-arrow-left"></i> <b>arrow-left</b> <b>F252</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-arrow-left"></i> <b>arrow-left</b> <b>F202</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-arrow-right"></i> <b>arrow-right</b> <b>F253</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-arrow-right"></i> <b>arrow-right</b> <b>F203</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-arrow-small-up"></i> <b>arrow-small-up</b> <b>F254</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-arrow-small-up"></i> <b>arrow-small-up</b> <b>F204</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-arrow-small-down"></i> <b>arrow-small-down</b> <b>F255</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-arrow-small-down"></i> <b>arrow-small-down</b> <b>F205</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-arrow-small-left"></i> <b>arrow-small-left</b> <b>F256</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-arrow-small-left"></i> <b>arrow-small-left</b> <b>F206</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-arrow-small-right"></i> <b>arrow-small-right</b> <b>F257</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-arrow-small-right"></i> <b>arrow-small-right</b> <b>F207</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-arrow-slim-up"></i> <b>arrow-slim-up</b> <b>F258</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-arrow-slim-up"></i> <b>arrow-slim-up</b> <b>F208</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-arrow-slim-down"></i> <b>arrow-slim-down</b> <b>F259</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-arrow-slim-down"></i> <b>arrow-slim-down</b> <b>F209</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-arrow-slim-left"></i> <b>arrow-slim-left</b> <b>F25A</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-arrow-slim-left"></i> <b>arrow-slim-left</b> <b>F20A</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-arrow-slim-right"></i> <b>arrow-slim-right</b> <b>F25B</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-arrow-slim-right"></i> <b>arrow-slim-right</b> <b>F20B</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-chevron-up"></i> <b>chevron-up</b> <b>F25C</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-chevron-up"></i> <b>chevron-up</b> <b>F20C</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-chevron-down"></i> <b>chevron-down</b> <b>F25D</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-chevron-down"></i> <b>chevron-down</b> <b>F20D</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-chevron-left"></i> <b>chevron-left</b> <b>F25E</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-chevron-left"></i> <b>chevron-left</b> <b>F20E</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-chevron-right"></i> <b>chevron-right</b> <b>F25F</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-chevron-right"></i> <b>chevron-right</b> <b>F20F</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-triangle-up"></i> <b>triangle-up</b> <b>F260</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-triangle-up"></i> <b>triangle-up</b> <b>F210</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-triangle-down"></i> <b>triangle-down</b> <b>F261</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-triangle-down"></i> <b>triangle-down</b> <b>F211</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-triangle-left"></i> <b>triangle-left</b> <b>F262</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-triangle-left"></i> <b>triangle-left</b> <b>F212</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-triangle-right"></i> <b>triangle-right</b> <b>F263</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-triangle-right"></i> <b>triangle-right</b> <b>F213</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-arrow-back"></i> <b>arrow-back</b> <b>F264</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-arrow-back"></i> <b>arrow-back</b> <b>F214</b></a></li>
</ul>
</section>
@@ -303,45 +303,45 @@
<section>
<h2 id="signs">Signs <small>20 icons</small></h2>
<ul class="icon-list">
- <li class="icon-list-item"><a><i class="fa fa-tick-round"></i> <b>tick-round</b> <b>F300</b></a></li>
+ <li class="icon-list-item"><a><i class="fa fa-tick-round"></i> <b>tick-round</b> <b>F250</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-times-round"></i> <b>times-round</b> <b>F301</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-times-round"></i> <b>times-round</b> <b>F251</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-question-round"></i> <b>question-round</b> <b>F302</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-question-round"></i> <b>question-round</b> <b>F252</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-plus-round"></i> <b>plus-round</b> <b>F303</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-plus-round"></i> <b>plus-round</b> <b>F253</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-minus-round"></i> <b>minus-round</b> <b>F304</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-minus-round"></i> <b>minus-round</b> <b>F254</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-info-round"></i> <b>info-round</b> <b>F305</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-info-round"></i> <b>info-round</b> <b>F255</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-warning-round"></i> <b>warning-round</b> <b>F306</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-warning-round"></i> <b>warning-round</b> <b>F256</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-tick-circle"></i> <b>tick-circle</b> <b>F307</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-tick-circle"></i> <b>tick-circle</b> <b>F257</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-times-circle"></i> <b>times-circle</b> <b>F308</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-times-circle"></i> <b>times-circle</b> <b>F258</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-question-circle"></i> <b>question-circle</b> <b>F309</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-question-circle"></i> <b>question-circle</b> <b>F259</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-plus-circle"></i> <b>plus-circle</b> <b>F30A</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-plus-circle"></i> <b>plus-circle</b> <b>F25A</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-minus-circle"></i> <b>minus-circle</b> <b>F30B</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-minus-circle"></i> <b>minus-circle</b> <b>F25B</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-info-circle"></i> <b>info-circle</b> <b>F30C</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-info-circle"></i> <b>info-circle</b> <b>F25C</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-warning-circle"></i> <b>warning-circle</b> <b>F30D</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-warning-circle"></i> <b>warning-circle</b> <b>F25D</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-warning-block"></i> <b>warning-block</b> <b>F30E</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-warning-block"></i> <b>warning-block</b> <b>F25E</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-warning-block-o"></i> <b>warning-block-o</b> <b>F30F</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-warning-block-o"></i> <b>warning-block-o</b> <b>F25F</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-alert"></i> <b>alert</b> <b>F310</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-alert"></i> <b>alert</b> <b>F260</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-alert-o"></i> <b>alert-o</b> <b>F311</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-alert-o"></i> <b>alert-o</b> <b>F261</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-plus-square-o"></i> <b>plus-square-o</b> <b>F312</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-plus-square-o"></i> <b>plus-square-o</b> <b>F262</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-minus-square-o"></i> <b>minus-square-o</b> <b>F313</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-minus-square-o"></i> <b>minus-square-o</b> <b>F263</b></a></li>
</ul>
</section>
@@ -485,11 +485,11 @@
<li class="icon-list-item"><a><i class="fa fa-expand"></i> <b>expand</b> <b>F42B</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-collapse"></i> <b>collapse</b> <b>F42D</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-collapse"></i> <b>collapse</b> <b>F42C</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-fold"></i> <b>fold</b> <b>F42F</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-fold"></i> <b>fold</b> <b>F42D</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-unfold"></i> <b>unfold</b> <b>F430</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-unfold"></i> <b>unfold</b> <b>F42E</b></a></li>
<li class="icon-list-item"><a><i class="fa fa-contrast"></i> <b>contrast</b> <b>F431</b></a></li>
@@ -505,7 +505,7 @@
</section>
<section>
- <h2 id="files">File Related Icons <small>43 icons</small></h2>
+ <h2 id="files">File Related Icons <small>30 icons</small></h2>
<ul class="icon-list">
<li class="icon-list-item"><a><i class="fa fa-file-pdf"></i> <b>file-pdf</b> <b>F451</b></a></li>
@@ -567,32 +567,6 @@
<li class="icon-list-item"><a><i class="fa fa-folder-renamed-o"></i> <b>folder-renamed-o</b> <b>F48B</b></a></li>
-<li class="icon-list-item"><a><i class="fa fa-tag"></i> <b>tag</b> <b>F490</b></a></li>
-
-<li class="icon-list-item"><a><i class="fa fa-tag-o"></i> <b>tag-o</b> <b>F491</b></a></li>
-
-<li class="icon-list-item"><a><i class="fa fa-tag-add"></i> <b>tag-add</b> <b>F492</b></a></li>
-
-<li class="icon-list-item"><a><i class="fa fa-tag-remove"></i> <b>tag-remove</b> <b>F493</b></a></li>
-
-<li class="icon-list-item"><a><i class="fa fa-tag-alt"></i> <b>tag-alt</b> <b>F494</b></a></li>
-
-<li class="icon-list-item"><a><i class="fa fa-tags"></i> <b>tags</b> <b>F495</b></a></li>
-
-<li class="icon-list-item"><a><i class="fa fa-comment"></i> <b>comment</b> <b>F496</b></a></li>
-
-<li class="icon-list-item"><a><i class="fa fa-comments"></i> <b>comments</b> <b>F497</b></a></li>
-
-<li class="icon-list-item"><a><i class="fa fa-comment-add"></i> <b>comment-add</b> <b>F498</b></a></li>
-
-<li class="icon-list-item"><a><i class="fa fa-eye-open"></i> <b>eye-open</b> <b>F499</b></a></li>
-
-<li class="icon-list-item"><a><i class="fa fa-eye-plus"></i> <b>eye-plus</b> <b>F49A</b></a></li>
-
-<li class="icon-list-item"><a><i class="fa fa-eye-times"></i> <b>eye-times</b> <b>F49B</b></a></li>
-
-<li class="icon-list-item"><a><i class="fa fa-eye-slash"></i> <b>eye-slash</b> <b>F49C</b></a></li>
-
</ul>
</section>
@@ -665,7 +639,7 @@
</section>
<section>
- <h2 id="issue">Issue Related Icons <small>5 icons</small></h2>
+ <h2 id="issue">Issue Related Icons <small>18 icons</small></h2>
<ul class="icon-list">
<li class="icon-list-item"><a><i class="fa fa-bug"></i> <b>bug</b> <b>F550</b></a></li>
@@ -677,6 +651,32 @@
<li class="icon-list-item"><a><i class="fa fa-issue-closed"></i> <b>issue-closed</b> <b>F554</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-tag"></i> <b>tag</b> <b>F560</b></a></li>
+
+<li class="icon-list-item"><a><i class="fa fa-tag-o"></i> <b>tag-o</b> <b>F561</b></a></li>
+
+<li class="icon-list-item"><a><i class="fa fa-tag-add"></i> <b>tag-add</b> <b>F562</b></a></li>
+
+<li class="icon-list-item"><a><i class="fa fa-tag-remove"></i> <b>tag-remove</b> <b>F563</b></a></li>
+
+<li class="icon-list-item"><a><i class="fa fa-tag-alt"></i> <b>tag-alt</b> <b>F564</b></a></li>
+
+<li class="icon-list-item"><a><i class="fa fa-tags"></i> <b>tags</b> <b>F565</b></a></li>
+
+<li class="icon-list-item"><a><i class="fa fa-comment"></i> <b>comment</b> <b>F566</b></a></li>
+
+<li class="icon-list-item"><a><i class="fa fa-comments"></i> <b>comments</b> <b>F567</b></a></li>
+
+<li class="icon-list-item"><a><i class="fa fa-comment-add"></i> <b>comment-add</b> <b>F568</b></a></li>
+
+<li class="icon-list-item"><a><i class="fa fa-eye-open"></i> <b>eye-open</b> <b>F569</b></a></li>
+
+<li class="icon-list-item"><a><i class="fa fa-eye-plus"></i> <b>eye-plus</b> <b>F56A</b></a></li>
+
+<li class="icon-list-item"><a><i class="fa fa-eye-times"></i> <b>eye-times</b> <b>F56B</b></a></li>
+
+<li class="icon-list-item"><a><i class="fa fa-eye-slash"></i> <b>eye-slash</b> <b>F56C</b></a></li>
+
</ul>
</section>
@@ -733,7 +733,7 @@
</section>
<section>
- <h2 id="misc">Misc <small>12 icons</small></h2>
+ <h2 id="misc">Misc <small>13 icons</small></h2>
<ul class="icon-list">
<li class="icon-list-item"><a><i class="fa fa-primitive-dot"></i> <b>primitive-dot</b> <b>F650</b></a></li>
@@ -759,6 +759,8 @@
<li class="icon-list-item"><a><i class="fa fa-bars-three"></i> <b>bars-three</b> <b>F65B</b></a></li>
+<li class="icon-list-item"><a><i class="fa fa-grip"></i> <b>grip</b> <b>F660</b></a></li>
+
</ul>
</section>
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/pontfonts/css/ponticons.css b/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/pontfonts/css/ponticons.css
index 62284cf9a6..1d4ab2fbff 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/pontfonts/css/ponticons.css
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/pontfonts/css/ponticons.css
@@ -1,4 +1,4 @@
-@font-face { font-family: "ponticons"; src: url("../fonts/ponticons.eot?v=1.0.9"); src: url("../fonts/ponticons.eot?v=1.0.9#iefix") format("embedded-opentype"), url("../fonts/ponticons.ttf?v=1.0.9") format("truetype"), url("../fonts/ponticons.woff?v=1.0.9") format("woff"), url("../fonts/ponticons.svg?v=1.0.9#ponticons") format("svg"); font-weight: normal; font-style: normal; }
+@font-face { font-family: "ponticons"; src: url("../fonts/ponticons.eot?v=1.0.13"); src: url("../fonts/ponticons.eot?v=1.0.13#iefix") format("embedded-opentype"), url("../fonts/ponticons.ttf?v=1.0.13") format("truetype"), url("../fonts/ponticons.woff?v=1.0.13") format("woff"), url("../fonts/ponticons.svg?v=1.0.13#ponticons") format("svg"); font-weight: normal; font-style: normal; }
.fa { font: normal normal 16px "ponticons"; display: inline-block; speak: none; text-transform: none; text-rendering: auto; line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }
/* makes the font 33% larger relative to the icon container */
@@ -62,7 +62,7 @@
.fa-inverse { color: #ffffff; }
-.fa-logo-gitplex:before { content: "\f000"; }
+.fa-logo-gitplex:before { content: "\f100"; }
.fa-calendar-month:before { content: "\f110"; }
@@ -224,87 +224,87 @@
.fa-os-android:before { content: "\f183"; }
-.fa-arrow-up:before { content: "\f250"; }
+.fa-arrow-up:before { content: "\f200"; }
-.fa-arrow-down:before { content: "\f251"; }
+.fa-arrow-down:before { content: "\f201"; }
-.fa-arrow-left:before { content: "\f252"; }
+.fa-arrow-left:before { content: "\f202"; }
-.fa-arrow-right:before { content: "\f253"; }
+.fa-arrow-right:before { content: "\f203"; }
-.fa-arrow-small-up:before { content: "\f254"; }
+.fa-arrow-small-up:before { content: "\f204"; }
-.fa-arrow-small-down:before { content: "\f255"; }
+.fa-arrow-small-down:before { content: "\f205"; }
-.fa-arrow-small-left:before { content: "\f256"; }
+.fa-arrow-small-left:before { content: "\f206"; }
-.fa-arrow-small-right:before { content: "\f257"; }
+.fa-arrow-small-right:before { content: "\f207"; }
-.fa-arrow-slim-up:before { content: "\f258"; }
+.fa-arrow-slim-up:before { content: "\f208"; }
-.fa-arrow-slim-down:before { content: "\f259"; }
+.fa-arrow-slim-down:before { content: "\f209"; }
-.fa-arrow-slim-left:before { content: "\f25a"; }
+.fa-arrow-slim-left:before { content: "\f20a"; }
-.fa-arrow-slim-right:before { content: "\f25b"; }
+.fa-arrow-slim-right:before { content: "\f20b"; }
-.fa-chevron-up:before { content: "\f25c"; }
+.fa-chevron-up:before { content: "\f20c"; }
-.fa-chevron-down:before { content: "\f25d"; }
+.fa-chevron-down:before { content: "\f20d"; }
-.fa-chevron-left:before { content: "\f25e"; }
+.fa-chevron-left:before { content: "\f20e"; }
-.fa-chevron-right:before { content: "\f25f"; }
+.fa-chevron-right:before { content: "\f20f"; }
-.fa-triangle-up:before { content: "\f260"; }
+.fa-triangle-up:before { content: "\f210"; }
-.fa-triangle-down:before { content: "\f261"; }
+.fa-triangle-down:before { content: "\f211"; }
-.fa-triangle-left:before { content: "\f262"; }
+.fa-triangle-left:before { content: "\f212"; }
-.fa-triangle-right:before { content: "\f263"; }
+.fa-triangle-right:before { content: "\f213"; }
-.fa-arrow-back:before { content: "\f264"; }
+.fa-arrow-back:before { content: "\f214"; }
-.fa-tick-round:before { content: "\f300"; }
+.fa-tick-round:before { content: "\f250"; }
-.fa-times-round:before { content: "\f301"; }
+.fa-times-round:before { content: "\f251"; }
-.fa-question-round:before { content: "\f302"; }
+.fa-question-round:before { content: "\f252"; }
-.fa-plus-round:before { content: "\f303"; }
+.fa-plus-round:before { content: "\f253"; }
-.fa-minus-round:before { content: "\f304"; }
+.fa-minus-round:before { content: "\f254"; }
-.fa-info-round:before { content: "\f305"; }
+.fa-info-round:before { content: "\f255"; }
-.fa-warning-round:before { content: "\f306"; }
+.fa-warning-round:before { content: "\f256"; }
-.fa-tick-circle:before { content: "\f307"; }
+.fa-tick-circle:before { content: "\f257"; }
-.fa-times-circle:before { content: "\f308"; }
+.fa-times-circle:before { content: "\f258"; }
-.fa-question-circle:before { content: "\f309"; }
+.fa-question-circle:before { content: "\f259"; }
-.fa-plus-circle:before { content: "\f30a"; }
+.fa-plus-circle:before { content: "\f25a"; }
-.fa-minus-circle:before { content: "\f30b"; }
+.fa-minus-circle:before { content: "\f25b"; }
-.fa-info-circle:before { content: "\f30c"; }
+.fa-info-circle:before { content: "\f25c"; }
-.fa-warning-circle:before { content: "\f30d"; }
+.fa-warning-circle:before { content: "\f25d"; }
-.fa-warning-block:before { content: "\f30e"; }
+.fa-warning-block:before { content: "\f25e"; }
-.fa-warning-block-o:before { content: "\f30f"; }
+.fa-warning-block-o:before { content: "\f25f"; }
-.fa-alert:before { content: "\f310"; }
+.fa-alert:before { content: "\f260"; }
-.fa-alert-o:before { content: "\f311"; }
+.fa-alert-o:before { content: "\f261"; }
-.fa-plus-square-o:before { content: "\f312"; }
+.fa-plus-square-o:before { content: "\f262"; }
-.fa-minus-square-o:before { content: "\f313"; }
+.fa-minus-square-o:before { content: "\f263"; }
.fa-mail:before { content: "\f340"; }
@@ -424,11 +424,11 @@
.fa-expand:before { content: "\f42b"; }
-.fa-collapse:before { content: "\f42d"; }
+.fa-collapse:before { content: "\f42c"; }
-.fa-fold:before { content: "\f42f"; }
+.fa-fold:before { content: "\f42d"; }
-.fa-unfold:before { content: "\f430"; }
+.fa-unfold:before { content: "\f42e"; }
.fa-contrast:before { content: "\f431"; }
@@ -500,32 +500,6 @@
.fa-folder-renamed-o:before { content: "\f48b"; }
-.fa-tag:before { content: "\f490"; }
-
-.fa-tag-o:before { content: "\f491"; }
-
-.fa-tag-add:before { content: "\f492"; }
-
-.fa-tag-remove:before { content: "\f493"; }
-
-.fa-tag-alt:before { content: "\f494"; }
-
-.fa-tags:before { content: "\f495"; }
-
-.fa-comment:before { content: "\f496"; }
-
-.fa-comments:before { content: "\f497"; }
-
-.fa-comment-add:before { content: "\f498"; }
-
-.fa-eye-open:before { content: "\f499"; }
-
-.fa-eye-plus:before { content: "\f49a"; }
-
-.fa-eye-times:before { content: "\f49b"; }
-
-.fa-eye-slash:before { content: "\f49c"; }
-
.fa-commit:before { content: "\f500"; }
.fa-diff:before { content: "\f501"; }
@@ -598,6 +572,32 @@
.fa-issue-closed:before { content: "\f554"; }
+.fa-tag:before { content: "\f560"; }
+
+.fa-tag-o:before { content: "\f561"; }
+
+.fa-tag-add:before { content: "\f562"; }
+
+.fa-tag-remove:before { content: "\f563"; }
+
+.fa-tag-alt:before { content: "\f564"; }
+
+.fa-tags:before { content: "\f565"; }
+
+.fa-comment:before { content: "\f566"; }
+
+.fa-comments:before { content: "\f567"; }
+
+.fa-comment-add:before { content: "\f568"; }
+
+.fa-eye-open:before { content: "\f569"; }
+
+.fa-eye-plus:before { content: "\f56a"; }
+
+.fa-eye-times:before { content: "\f56b"; }
+
+.fa-eye-slash:before { content: "\f56c"; }
+
.fa-font:before { content: "\f600"; }
.fa-font-bold:before { content: "\f601"; }
@@ -667,3 +667,5 @@
.fa-bars-two:before { content: "\f65a"; }
.fa-bars-three:before { content: "\f65b"; }
+
+.fa-grip:before { content: "\f660"; }
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/pontfonts/css/ponticons.min.css b/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/pontfonts/css/ponticons.min.css
index 6c1840fcad..a4fa3eee4e 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/pontfonts/css/ponticons.min.css
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/pontfonts/css/ponticons.min.css
@@ -1 +1 @@
-@font-face{font-family:"ponticons";src:url("../fonts/ponticons.eot?v=1.0.9");src:url("../fonts/ponticons.eot?v=1.0.9#iefix") format("embedded-opentype"),url("../fonts/ponticons.ttf?v=1.0.9") format("truetype"),url("../fonts/ponticons.woff?v=1.0.9") format("woff"),url("../fonts/ponticons.svg?v=1.0.9#ponticons") format("svg");font-weight:normal;font-style:normal}.fa{font:normal normal 16px "ponticons";display:inline-block;speak:none;text-transform:none;text-rendering:auto;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fa-lg{font-size:1.33333333em;line-height:0.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:0.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eeeeee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-moz-transform:scale(-1, 1);-ms-transform:scale(-1, 1);-o-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-moz-transform:scale(1, -1);-ms-transform:scale(1, -1);-o-transform:scale(1, -1);transform:scale(1, -1)}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#ffffff}.fa-logo-gitplex:before{content:"\f000"}.fa-calendar-month:before{content:"\f110"}.fa-calendar-day:before{content:"\f111"}.fa-database:before{content:"\f115"}.fa-book:before{content:"\f116"}.fa-user:before{content:"\f117"}.fa-user-o:before{content:"\f118"}.fa-group:before{content:"\f119"}.fa-group-o:before{content:"\f11a"}.fa-tools:before{content:"\f11b"}.fa-wrench:before{content:"\f11c"}.fa-gear:before{content:"\f11d"}.fa-gears:before{content:"\f11e"}.fa-gears-alt:before{content:"\f11f"}.fa-settings:before{content:"\f120"}.fa-settings-alt:before{content:"\f121"}.fa-settings-alt-v:before{content:"\f122"}.fa-lock:before{content:"\f123"}.fa-unlock:before{content:"\f124"}.fa-unlock-alt:before{content:"\f125"}.fa-rss:before{content:"\f126"}.fa-key:before{content:"\f127"}.fa-key-alt:before{content:"\f128"}.fa-flag:before{content:"\f129"}.fa-buoy:before{content:"\f130"}.fa-puzzle:before{content:"\f131"}.fa-plug:before{content:"\f132"}.fa-dashboard:before{content:"\f133"}.fa-dashboard-alt:before{content:"\f134"}.fa-versions:before{content:"\f135"}.fa-package:before{content:"\f136"}.fa-steps:before{content:"\f137"}.fa-terminal:before{content:"\f138"}.fa-credit-card:before{content:"\f139"}.fa-globe:before{content:"\f13a"}.fa-globe-alt:before{content:"\f13b"}.fa-keyboard:before{content:"\f13c"}.fa-keyboard-alt:before{content:"\f13d"}.fa-key-tab:before{content:"\f13e"}.fa-location:before{content:"\f140"}.fa-markdown:before{content:"\f141"}.fa-pulse:before{content:"\f142"}.fa-servers:before{content:"\f143"}.fa-trash:before{content:"\f144"}.fa-trashcan:before{content:"\f145"}.fa-browser:before{content:"\f146"}.fa-clock:before{content:"\f147"}.fa-history:before{content:"\f148"}.fa-color-mode:before{content:"\f149"}.fa-ellipsis:before{content:"\f14a"}.fa-ellipsis-alt:before{content:"\f14b"}.fa-no-newline:before{content:"\f14c"}.fa-flame:before{content:"\f14d"}.fa-milestone:before{content:"\f14e"}.fa-rocket:before{content:"\f14f"}.fa-rocket-alt:before{content:"\f150"}.fa-beer:before{content:"\f151"}.fa-circuit-board:before{content:"\f152"}.fa-paintcan:before{content:"\f153"}.fa-microscope:before{content:"\f154"}.fa-telescope:before{content:"\f155"}.fa-law:before{content:"\f156"}.fa-megaphone:before{content:"\f157"}.fa-mortar-board:before{content:"\f158"}.fa-zap:before{content:"\f159"}.fa-squirrel:before{content:"\f15a"}.fa-light-bulb:before{content:"\f15b"}.fa-podium:before{content:"\f15c"}.fa-jersey:before{content:"\f15d"}.fa-briefcase:before{content:"\f15e"}.fa-gift:before{content:"\f15f"}.fa-ruby:before{content:"\f160"}.fa-bell:before{content:"\f161"}.fa-device-camera:before{content:"\f170"}.fa-device-video:before{content:"\f171"}.fa-device-desktop:before{content:"\f172"}.fa-device-mobile:before{content:"\f173"}.fa-os-apple:before{content:"\f180"}.fa-os-linux:before{content:"\f181"}.fa-os-windows:before{content:"\f182"}.fa-os-android:before{content:"\f183"}.fa-arrow-up:before{content:"\f250"}.fa-arrow-down:before{content:"\f251"}.fa-arrow-left:before{content:"\f252"}.fa-arrow-right:before{content:"\f253"}.fa-arrow-small-up:before{content:"\f254"}.fa-arrow-small-down:before{content:"\f255"}.fa-arrow-small-left:before{content:"\f256"}.fa-arrow-small-right:before{content:"\f257"}.fa-arrow-slim-up:before{content:"\f258"}.fa-arrow-slim-down:before{content:"\f259"}.fa-arrow-slim-left:before{content:"\f25a"}.fa-arrow-slim-right:before{content:"\f25b"}.fa-chevron-up:before{content:"\f25c"}.fa-chevron-down:before{content:"\f25d"}.fa-chevron-left:before{content:"\f25e"}.fa-chevron-right:before{content:"\f25f"}.fa-triangle-up:before{content:"\f260"}.fa-triangle-down:before{content:"\f261"}.fa-triangle-left:before{content:"\f262"}.fa-triangle-right:before{content:"\f263"}.fa-arrow-back:before{content:"\f264"}.fa-tick-round:before{content:"\f300"}.fa-times-round:before{content:"\f301"}.fa-question-round:before{content:"\f302"}.fa-plus-round:before{content:"\f303"}.fa-minus-round:before{content:"\f304"}.fa-info-round:before{content:"\f305"}.fa-warning-round:before{content:"\f306"}.fa-tick-circle:before{content:"\f307"}.fa-times-circle:before{content:"\f308"}.fa-question-circle:before{content:"\f309"}.fa-plus-circle:before{content:"\f30a"}.fa-minus-circle:before{content:"\f30b"}.fa-info-circle:before{content:"\f30c"}.fa-warning-circle:before{content:"\f30d"}.fa-warning-block:before{content:"\f30e"}.fa-warning-block-o:before{content:"\f30f"}.fa-alert:before{content:"\f310"}.fa-alert-o:before{content:"\f311"}.fa-plus-square-o:before{content:"\f312"}.fa-minus-square-o:before{content:"\f313"}.fa-mail:before{content:"\f340"}.fa-mail-alt:before{content:"\f341"}.fa-mail-read:before{content:"\f342"}.fa-mail-reply:before{content:"\f343"}.fa-mail-forward:before{content:"\f344"}.fa-mail-inbox:before{content:"\f345"}.fa-notification-center:before{content:"\f346"}.fa-mail-archive:before{content:"\f347"}.fa-playback-play:before{content:"\f380"}.fa-playback-pause:before{content:"\f381"}.fa-playback-fast-forward:before{content:"\f382"}.fa-playback-rewind:before{content:"\f383"}.fa-play-circle:before{content:"\f384"}.fa-stop-circle:before{content:"\f385"}.fa-pause-circle:before{content:"\f386"}.fa-fast-forward-circle:before{content:"\f387"}.fa-rewind-circle:before{content:"\f388"}.fa-jump-up:before{content:"\f390"}.fa-jump-down:before{content:"\f391"}.fa-jump-left:before{content:"\f392"}.fa-jump-right:before{content:"\f393"}.fa-move-left:before{content:"\f394"}.fa-move-right:before{content:"\f395"}.fa-volume-low:before{content:"\f396"}.fa-volume-medium:before{content:"\f397"}.fa-volume-high:before{content:"\f398"}.fa-volume-mute:before{content:"\f399"}.fa-chart-line:before{content:"\f400"}.fa-chart-pie:before{content:"\f401"}.fa-chart-area:before{content:"\f402"}.fa-chart-bar:before{content:"\f403"}.fa-heart:before{content:"\f410"}.fa-heart-o:before{content:"\f411"}.fa-bookmark:before{content:"\f412"}.fa-bookmark-alt:before{content:"\f413"}.fa-bookmarks:before{content:"\f414"}.fa-sign-out:before{content:"\f415"}.fa-sign-in:before{content:"\f416"}.fa-shutdown:before{content:"\f417"}.fa-plus:before{content:"\f418"}.fa-times:before{content:"\f419"}.fa-minus:before{content:"\f41a"}.fa-pencil:before{content:"\f41b"}.fa-circle-slash:before{content:"\f41c"}.fa-star:before{content:"\f41d"}.fa-star-o:before{content:"\f41e"}.fa-thumb-up:before{content:"\f41f"}.fa-thumb-down:before{content:"\f420"}.fa-thumb-up-o:before{content:"\f421"}.fa-thumb-down-o:before{content:"\f422"}.fa-sync:before{content:"\f423"}.fa-search:before{content:"\f424"}.fa-download:before{content:"\f425"}.fa-upload:before{content:"\f426"}.fa-pin:before{content:"\f427"}.fa-pushpin:before{content:"\f428"}.fa-pushpin-o:before{content:"\f429"}.fa-clippy:before{content:"\f42a"}.fa-expand:before{content:"\f42b"}.fa-collapse:before{content:"\f42d"}.fa-fold:before{content:"\f42f"}.fa-unfold:before{content:"\f430"}.fa-contrast:before{content:"\f431"}.fa-redo:before{content:"\f432"}.fa-undo:before{content:"\f433"}.fa-share:before{content:"\f434"}.fa-share-alt:before{content:"\f435"}.fa-file-pdf:before{content:"\f451"}.fa-file-audio:before{content:"\f452"}.fa-file-binary:before{content:"\f453"}.fa-file-code:before{content:"\f455"}.fa-file-code-alt:before{content:"\f456"}.fa-file-image:before{content:"\f457"}.fa-file-symlink:before{content:"\f458"}.fa-file-media:before{content:"\f459"}.fa-file-txt:before{content:"\f45a"}.fa-file-video:before{content:"\f45b"}.fa-file-word:before{content:"\f45c"}.fa-file-excel:before{content:"\f45d"}.fa-file-ppt:before{content:"\f45e"}.fa-file-zip:before{content:"\f45f"}.fa-file-added:before{content:"\f460"}.fa-file-modified:before{content:"\f461"}.fa-file-removed:before{content:"\f462"}.fa-file-renamed:before{content:"\f463"}.fa-folder:before{content:"\f480"}.fa-folder-link:before{content:"\f481"}.fa-folder-added:before{content:"\f482"}.fa-folder-modified:before{content:"\f483"}.fa-folder-removed:before{content:"\f484"}.fa-folder-submodule:before{content:"\f485"}.fa-folder-o:before{content:"\f486"}.fa-folder-link-o:before{content:"\f487"}.fa-folder-added-o:before{content:"\f488"}.fa-folder-modified-o:before{content:"\f489"}.fa-folder-removed-o:before{content:"\f48a"}.fa-folder-renamed-o:before{content:"\f48b"}.fa-tag:before{content:"\f490"}.fa-tag-o:before{content:"\f491"}.fa-tag-add:before{content:"\f492"}.fa-tag-remove:before{content:"\f493"}.fa-tag-alt:before{content:"\f494"}.fa-tags:before{content:"\f495"}.fa-comment:before{content:"\f496"}.fa-comments:before{content:"\f497"}.fa-comment-add:before{content:"\f498"}.fa-eye-open:before{content:"\f499"}.fa-eye-plus:before{content:"\f49a"}.fa-eye-times:before{content:"\f49b"}.fa-eye-slash:before{content:"\f49c"}.fa-commit:before{content:"\f500"}.fa-diff:before{content:"\f501"}.fa-diff-added:before{content:"\f502"}.fa-diff-ignored:before{content:"\f503"}.fa-diff-modified:before{content:"\f504"}.fa-diff-removed:before{content:"\f505"}.fa-diff-renamed:before{content:"\f506"}.fa-repo:before{content:"\f510"}.fa-repo-add:before{content:"\f511"}.fa-repo-remove:before{content:"\f512"}.fa-repo-cloned:before{content:"\f513"}.fa-repo-forked:before{content:"\f514"}.fa-repo-locked:before{content:"\f515"}.fa-repo-unlocked:before{content:"\f516"}.fa-repo-pull:before{content:"\f517"}.fa-repo-push:before{content:"\f518"}.fa-repo-force-push:before{content:"\f519"}.fa-repo-sync:before{content:"\f51a"}.fa-repo-mirror:before{content:"\f51b"}.fa-branch:before{content:"\f520"}.fa-branch-add:before{content:"\f521"}.fa-branch-remove:before{content:"\f522"}.fa-branch-branch:before{content:"\f523"}.fa-branch-pattern:before{content:"\f524"}.fa-branch-lock:before{content:"\f525"}.fa-branch-merge:before{content:"\f526"}.fa-branch-compare:before{content:"\f527"}.fa-pull-request-add:before{content:"\f528"}.fa-pull-request-reject:before{content:"\f529"}.fa-pull-request-accept:before{content:"\f52a"}.fa-pull-request-close:before{content:"\f52b"}.fa-bug:before{content:"\f550"}.fa-checklist:before{content:"\f551"}.fa-issue-opened:before{content:"\f552"}.fa-issue-reopened:before{content:"\f553"}.fa-issue-closed:before{content:"\f554"}.fa-font:before{content:"\f600"}.fa-font-bold:before{content:"\f601"}.fa-font-italic:before{content:"\f602"}.fa-table:before{content:"\f603"}.fa-align-center:before{content:"\f604"}.fa-align-left:before{content:"\f605"}.fa-align-right:before{content:"\f606"}.fa-align-justify:before{content:"\f607"}.fa-list-unordered:before{content:"\f608"}.fa-list-ordered:before{content:"\f609"}.fa-indent-left:before{content:"\f60a"}.fa-indent-right:before{content:"\f60b"}.fa-mention:before{content:"\f60c"}.fa-horizontal-rule:before{content:"\f60d"}.fa-image:before{content:"\f60e"}.fa-quote:before{content:"\f60f"}.fa-screen-full:before{content:"\f610"}.fa-screen-normal:before{content:"\f611"}.fa-link:before{content:"\f612"}.fa-link-alt:before{content:"\f613"}.fa-link-external:before{content:"\f614"}.fa-unlink:before{content:"\f615"}.fa-attachment:before{content:"\f616"}.fa-primitive-dot:before{content:"\f650"}.fa-primitive-square:before{content:"\f651"}.fa-tick:before{content:"\f652"}.fa-tick-o:before{content:"\f653"}.fa-checkbox-unchecked:before{content:"\f654"}.fa-checkbox-checked:before{content:"\f655"}.fa-checkbox-selected:before{content:"\f656"}.fa-radio-unchecked:before{content:"\f657"}.fa-radio-checked:before{content:"\f658"}.fa-bars-one:before{content:"\f659"}.fa-bars-two:before{content:"\f65a"}.fa-bars-three:before{content:"\f65b"}
+@font-face{font-family:"ponticons";src:url("../fonts/ponticons.eot?v=1.0.13");src:url("../fonts/ponticons.eot?v=1.0.13#iefix") format("embedded-opentype"),url("../fonts/ponticons.ttf?v=1.0.13") format("truetype"),url("../fonts/ponticons.woff?v=1.0.13") format("woff"),url("../fonts/ponticons.svg?v=1.0.13#ponticons") format("svg");font-weight:normal;font-style:normal}.fa{font:normal normal 16px "ponticons";display:inline-block;speak:none;text-transform:none;text-rendering:auto;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fa-lg{font-size:1.33333333em;line-height:0.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:0.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eeeeee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-moz-transform:scale(-1, 1);-ms-transform:scale(-1, 1);-o-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-moz-transform:scale(1, -1);-ms-transform:scale(1, -1);-o-transform:scale(1, -1);transform:scale(1, -1)}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#ffffff}.fa-logo-gitplex:before{content:"\f100"}.fa-calendar-month:before{content:"\f110"}.fa-calendar-day:before{content:"\f111"}.fa-database:before{content:"\f115"}.fa-book:before{content:"\f116"}.fa-user:before{content:"\f117"}.fa-user-o:before{content:"\f118"}.fa-group:before{content:"\f119"}.fa-group-o:before{content:"\f11a"}.fa-tools:before{content:"\f11b"}.fa-wrench:before{content:"\f11c"}.fa-gear:before{content:"\f11d"}.fa-gears:before{content:"\f11e"}.fa-gears-alt:before{content:"\f11f"}.fa-settings:before{content:"\f120"}.fa-settings-alt:before{content:"\f121"}.fa-settings-alt-v:before{content:"\f122"}.fa-lock:before{content:"\f123"}.fa-unlock:before{content:"\f124"}.fa-unlock-alt:before{content:"\f125"}.fa-rss:before{content:"\f126"}.fa-key:before{content:"\f127"}.fa-key-alt:before{content:"\f128"}.fa-flag:before{content:"\f129"}.fa-buoy:before{content:"\f130"}.fa-puzzle:before{content:"\f131"}.fa-plug:before{content:"\f132"}.fa-dashboard:before{content:"\f133"}.fa-dashboard-alt:before{content:"\f134"}.fa-versions:before{content:"\f135"}.fa-package:before{content:"\f136"}.fa-steps:before{content:"\f137"}.fa-terminal:before{content:"\f138"}.fa-credit-card:before{content:"\f139"}.fa-globe:before{content:"\f13a"}.fa-globe-alt:before{content:"\f13b"}.fa-keyboard:before{content:"\f13c"}.fa-keyboard-alt:before{content:"\f13d"}.fa-key-tab:before{content:"\f13e"}.fa-location:before{content:"\f140"}.fa-markdown:before{content:"\f141"}.fa-pulse:before{content:"\f142"}.fa-servers:before{content:"\f143"}.fa-trash:before{content:"\f144"}.fa-trashcan:before{content:"\f145"}.fa-browser:before{content:"\f146"}.fa-clock:before{content:"\f147"}.fa-history:before{content:"\f148"}.fa-color-mode:before{content:"\f149"}.fa-ellipsis:before{content:"\f14a"}.fa-ellipsis-alt:before{content:"\f14b"}.fa-no-newline:before{content:"\f14c"}.fa-flame:before{content:"\f14d"}.fa-milestone:before{content:"\f14e"}.fa-rocket:before{content:"\f14f"}.fa-rocket-alt:before{content:"\f150"}.fa-beer:before{content:"\f151"}.fa-circuit-board:before{content:"\f152"}.fa-paintcan:before{content:"\f153"}.fa-microscope:before{content:"\f154"}.fa-telescope:before{content:"\f155"}.fa-law:before{content:"\f156"}.fa-megaphone:before{content:"\f157"}.fa-mortar-board:before{content:"\f158"}.fa-zap:before{content:"\f159"}.fa-squirrel:before{content:"\f15a"}.fa-light-bulb:before{content:"\f15b"}.fa-podium:before{content:"\f15c"}.fa-jersey:before{content:"\f15d"}.fa-briefcase:before{content:"\f15e"}.fa-gift:before{content:"\f15f"}.fa-ruby:before{content:"\f160"}.fa-bell:before{content:"\f161"}.fa-device-camera:before{content:"\f170"}.fa-device-video:before{content:"\f171"}.fa-device-desktop:before{content:"\f172"}.fa-device-mobile:before{content:"\f173"}.fa-os-apple:before{content:"\f180"}.fa-os-linux:before{content:"\f181"}.fa-os-windows:before{content:"\f182"}.fa-os-android:before{content:"\f183"}.fa-arrow-up:before{content:"\f200"}.fa-arrow-down:before{content:"\f201"}.fa-arrow-left:before{content:"\f202"}.fa-arrow-right:before{content:"\f203"}.fa-arrow-small-up:before{content:"\f204"}.fa-arrow-small-down:before{content:"\f205"}.fa-arrow-small-left:before{content:"\f206"}.fa-arrow-small-right:before{content:"\f207"}.fa-arrow-slim-up:before{content:"\f208"}.fa-arrow-slim-down:before{content:"\f209"}.fa-arrow-slim-left:before{content:"\f20a"}.fa-arrow-slim-right:before{content:"\f20b"}.fa-chevron-up:before{content:"\f20c"}.fa-chevron-down:before{content:"\f20d"}.fa-chevron-left:before{content:"\f20e"}.fa-chevron-right:before{content:"\f20f"}.fa-triangle-up:before{content:"\f210"}.fa-triangle-down:before{content:"\f211"}.fa-triangle-left:before{content:"\f212"}.fa-triangle-right:before{content:"\f213"}.fa-arrow-back:before{content:"\f214"}.fa-tick-round:before{content:"\f250"}.fa-times-round:before{content:"\f251"}.fa-question-round:before{content:"\f252"}.fa-plus-round:before{content:"\f253"}.fa-minus-round:before{content:"\f254"}.fa-info-round:before{content:"\f255"}.fa-warning-round:before{content:"\f256"}.fa-tick-circle:before{content:"\f257"}.fa-times-circle:before{content:"\f258"}.fa-question-circle:before{content:"\f259"}.fa-plus-circle:before{content:"\f25a"}.fa-minus-circle:before{content:"\f25b"}.fa-info-circle:before{content:"\f25c"}.fa-warning-circle:before{content:"\f25d"}.fa-warning-block:before{content:"\f25e"}.fa-warning-block-o:before{content:"\f25f"}.fa-alert:before{content:"\f260"}.fa-alert-o:before{content:"\f261"}.fa-plus-square-o:before{content:"\f262"}.fa-minus-square-o:before{content:"\f263"}.fa-mail:before{content:"\f340"}.fa-mail-alt:before{content:"\f341"}.fa-mail-read:before{content:"\f342"}.fa-mail-reply:before{content:"\f343"}.fa-mail-forward:before{content:"\f344"}.fa-mail-inbox:before{content:"\f345"}.fa-notification-center:before{content:"\f346"}.fa-mail-archive:before{content:"\f347"}.fa-playback-play:before{content:"\f380"}.fa-playback-pause:before{content:"\f381"}.fa-playback-fast-forward:before{content:"\f382"}.fa-playback-rewind:before{content:"\f383"}.fa-play-circle:before{content:"\f384"}.fa-stop-circle:before{content:"\f385"}.fa-pause-circle:before{content:"\f386"}.fa-fast-forward-circle:before{content:"\f387"}.fa-rewind-circle:before{content:"\f388"}.fa-jump-up:before{content:"\f390"}.fa-jump-down:before{content:"\f391"}.fa-jump-left:before{content:"\f392"}.fa-jump-right:before{content:"\f393"}.fa-move-left:before{content:"\f394"}.fa-move-right:before{content:"\f395"}.fa-volume-low:before{content:"\f396"}.fa-volume-medium:before{content:"\f397"}.fa-volume-high:before{content:"\f398"}.fa-volume-mute:before{content:"\f399"}.fa-chart-line:before{content:"\f400"}.fa-chart-pie:before{content:"\f401"}.fa-chart-area:before{content:"\f402"}.fa-chart-bar:before{content:"\f403"}.fa-heart:before{content:"\f410"}.fa-heart-o:before{content:"\f411"}.fa-bookmark:before{content:"\f412"}.fa-bookmark-alt:before{content:"\f413"}.fa-bookmarks:before{content:"\f414"}.fa-sign-out:before{content:"\f415"}.fa-sign-in:before{content:"\f416"}.fa-shutdown:before{content:"\f417"}.fa-plus:before{content:"\f418"}.fa-times:before{content:"\f419"}.fa-minus:before{content:"\f41a"}.fa-pencil:before{content:"\f41b"}.fa-circle-slash:before{content:"\f41c"}.fa-star:before{content:"\f41d"}.fa-star-o:before{content:"\f41e"}.fa-thumb-up:before{content:"\f41f"}.fa-thumb-down:before{content:"\f420"}.fa-thumb-up-o:before{content:"\f421"}.fa-thumb-down-o:before{content:"\f422"}.fa-sync:before{content:"\f423"}.fa-search:before{content:"\f424"}.fa-download:before{content:"\f425"}.fa-upload:before{content:"\f426"}.fa-pin:before{content:"\f427"}.fa-pushpin:before{content:"\f428"}.fa-pushpin-o:before{content:"\f429"}.fa-clippy:before{content:"\f42a"}.fa-expand:before{content:"\f42b"}.fa-collapse:before{content:"\f42c"}.fa-fold:before{content:"\f42d"}.fa-unfold:before{content:"\f42e"}.fa-contrast:before{content:"\f431"}.fa-redo:before{content:"\f432"}.fa-undo:before{content:"\f433"}.fa-share:before{content:"\f434"}.fa-share-alt:before{content:"\f435"}.fa-file-pdf:before{content:"\f451"}.fa-file-audio:before{content:"\f452"}.fa-file-binary:before{content:"\f453"}.fa-file-code:before{content:"\f455"}.fa-file-code-alt:before{content:"\f456"}.fa-file-image:before{content:"\f457"}.fa-file-symlink:before{content:"\f458"}.fa-file-media:before{content:"\f459"}.fa-file-txt:before{content:"\f45a"}.fa-file-video:before{content:"\f45b"}.fa-file-word:before{content:"\f45c"}.fa-file-excel:before{content:"\f45d"}.fa-file-ppt:before{content:"\f45e"}.fa-file-zip:before{content:"\f45f"}.fa-file-added:before{content:"\f460"}.fa-file-modified:before{content:"\f461"}.fa-file-removed:before{content:"\f462"}.fa-file-renamed:before{content:"\f463"}.fa-folder:before{content:"\f480"}.fa-folder-link:before{content:"\f481"}.fa-folder-added:before{content:"\f482"}.fa-folder-modified:before{content:"\f483"}.fa-folder-removed:before{content:"\f484"}.fa-folder-submodule:before{content:"\f485"}.fa-folder-o:before{content:"\f486"}.fa-folder-link-o:before{content:"\f487"}.fa-folder-added-o:before{content:"\f488"}.fa-folder-modified-o:before{content:"\f489"}.fa-folder-removed-o:before{content:"\f48a"}.fa-folder-renamed-o:before{content:"\f48b"}.fa-commit:before{content:"\f500"}.fa-diff:before{content:"\f501"}.fa-diff-added:before{content:"\f502"}.fa-diff-ignored:before{content:"\f503"}.fa-diff-modified:before{content:"\f504"}.fa-diff-removed:before{content:"\f505"}.fa-diff-renamed:before{content:"\f506"}.fa-repo:before{content:"\f510"}.fa-repo-add:before{content:"\f511"}.fa-repo-remove:before{content:"\f512"}.fa-repo-cloned:before{content:"\f513"}.fa-repo-forked:before{content:"\f514"}.fa-repo-locked:before{content:"\f515"}.fa-repo-unlocked:before{content:"\f516"}.fa-repo-pull:before{content:"\f517"}.fa-repo-push:before{content:"\f518"}.fa-repo-force-push:before{content:"\f519"}.fa-repo-sync:before{content:"\f51a"}.fa-repo-mirror:before{content:"\f51b"}.fa-branch:before{content:"\f520"}.fa-branch-add:before{content:"\f521"}.fa-branch-remove:before{content:"\f522"}.fa-branch-branch:before{content:"\f523"}.fa-branch-pattern:before{content:"\f524"}.fa-branch-lock:before{content:"\f525"}.fa-branch-merge:before{content:"\f526"}.fa-branch-compare:before{content:"\f527"}.fa-pull-request-add:before{content:"\f528"}.fa-pull-request-reject:before{content:"\f529"}.fa-pull-request-accept:before{content:"\f52a"}.fa-pull-request-close:before{content:"\f52b"}.fa-bug:before{content:"\f550"}.fa-checklist:before{content:"\f551"}.fa-issue-opened:before{content:"\f552"}.fa-issue-reopened:before{content:"\f553"}.fa-issue-closed:before{content:"\f554"}.fa-tag:before{content:"\f560"}.fa-tag-o:before{content:"\f561"}.fa-tag-add:before{content:"\f562"}.fa-tag-remove:before{content:"\f563"}.fa-tag-alt:before{content:"\f564"}.fa-tags:before{content:"\f565"}.fa-comment:before{content:"\f566"}.fa-comments:before{content:"\f567"}.fa-comment-add:before{content:"\f568"}.fa-eye-open:before{content:"\f569"}.fa-eye-plus:before{content:"\f56a"}.fa-eye-times:before{content:"\f56b"}.fa-eye-slash:before{content:"\f56c"}.fa-font:before{content:"\f600"}.fa-font-bold:before{content:"\f601"}.fa-font-italic:before{content:"\f602"}.fa-table:before{content:"\f603"}.fa-align-center:before{content:"\f604"}.fa-align-left:before{content:"\f605"}.fa-align-right:before{content:"\f606"}.fa-align-justify:before{content:"\f607"}.fa-list-unordered:before{content:"\f608"}.fa-list-ordered:before{content:"\f609"}.fa-indent-left:before{content:"\f60a"}.fa-indent-right:before{content:"\f60b"}.fa-mention:before{content:"\f60c"}.fa-horizontal-rule:before{content:"\f60d"}.fa-image:before{content:"\f60e"}.fa-quote:before{content:"\f60f"}.fa-screen-full:before{content:"\f610"}.fa-screen-normal:before{content:"\f611"}.fa-link:before{content:"\f612"}.fa-link-alt:before{content:"\f613"}.fa-link-external:before{content:"\f614"}.fa-unlink:before{content:"\f615"}.fa-attachment:before{content:"\f616"}.fa-primitive-dot:before{content:"\f650"}.fa-primitive-square:before{content:"\f651"}.fa-tick:before{content:"\f652"}.fa-tick-o:before{content:"\f653"}.fa-checkbox-unchecked:before{content:"\f654"}.fa-checkbox-checked:before{content:"\f655"}.fa-checkbox-selected:before{content:"\f656"}.fa-radio-unchecked:before{content:"\f657"}.fa-radio-checked:before{content:"\f658"}.fa-bars-one:before{content:"\f659"}.fa-bars-two:before{content:"\f65a"}.fa-bars-three:before{content:"\f65b"}.fa-grip:before{content:"\f660"}
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/pontfonts/fonts/ponticons.eot b/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/pontfonts/fonts/ponticons.eot
index 2fbed96e07..160fc45d7b 100644
Binary files a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/pontfonts/fonts/ponticons.eot and b/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/pontfonts/fonts/ponticons.eot differ
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/pontfonts/fonts/ponticons.svg b/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/pontfonts/fonts/ponticons.svg
index 8bd0fb19a6..34384a1f55 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/pontfonts/fonts/ponticons.svg
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/pontfonts/fonts/ponticons.svg
@@ -1,11 +1,11 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<!--
-2014-8-20: Created.
+2014-9-29: Created.
-->
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
-Created by FontForge 20120731 at Wed Aug 20 19:30:44 2014
+Created by FontForge 20120731 at Mon Sep 29 16:04:08 2014
By Luo Zhenyu
Created by Luo Zhenyu with FontForge 2.0 (http://fontforge.sf.net)
</metadata>
@@ -22,50 +22,50 @@ Created by Luo Zhenyu with FontForge 2.0 (http://fontforge.sf.net)
bbox="-0.5 -193 1028 835"
underline-thickness="51.2"
underline-position="-102.4"
- unicode-range="U+F000-F65B"
+ unicode-range="U+F100-F660"
/>
<missing-glyph />
- <glyph glyph-name="fa-alert-o" unicode="&#xf311;" horiz-adv-x="969"
+ <glyph glyph-name="fa-alert-o" unicode="&#xf261;" horiz-adv-x="969"
d="M420 83h128v-64h-128v64zM420 467h128v-320h-128v320zM448 593l-316 -580c-16 -28 2 -58 35 -58h634c33 0 51 30 35 58l-316 580c-17 31 -55 31 -72 0zM927 -109h-886c-34 0 -52 31 -35 60l443 775c17 30 53 30 70 0l443 -775c16 -29 -1 -60 -35 -60z" />
- <glyph glyph-name="fa-alert" unicode="&#xf310;" horiz-adv-x="965"
+ <glyph glyph-name="fa-alert" unicode="&#xf260;" horiz-adv-x="965"
d="M419 66v-64h128v64h-128zM419 450v-320h128v320h-128zM924 -94h-882c-35 0 -52 31 -35 61l442 746c17 28 51 28 68 0l442 -746c17 -30 0 -61 -35 -61z" />
<glyph glyph-name="fa-align-center" unicode="&#xf604;" horiz-adv-x="896"
-d="M0 -128v128h896v-128h-896zM192 128v128h512v-128h-512zM0 384v128h896v-128h-896zM192 640v128h512v-128h-512z" />
+d="M192 0v128h512v-128h-512zM0 256v128h896v-128h-896zM192 512v128h512v-128h-512z" />
<glyph glyph-name="fa-align-justify" unicode="&#xf607;" horiz-adv-x="896"
-d="M0 -128v128h896v-128h-896zM0 128v128h896v-128h-896zM0 384v128h896v-128h-896zM0 640v128h896v-128h-896z" />
+d="M0 0v128h896v-128h-896zM0 256v128h896v-128h-896zM0 512v128h896v-128h-896z" />
<glyph glyph-name="fa-align-left" unicode="&#xf605;" horiz-adv-x="896"
-d="M0 -128v128h896v-128h-896zM0 128v128h640v-128h-640zM0 384v128h768v-128h-768zM0 640v128h512v-128h-512z" />
+d="M0 0v128h896v-128h-896zM0 256v128h768v-128h-768zM0 512v128h512v-128h-512z" />
<glyph glyph-name="fa-align-right" unicode="&#xf606;" horiz-adv-x="896"
-d="M0 -128v128h896v-128h-896zM256 128v128h640v-128h-640zM128 384v128h768v-128h-768zM384 640v128h512v-128h-512z" />
- <glyph glyph-name="fa-arrow-back" unicode="&#xf264;" horiz-adv-x="960"
+d="M0 0v128h896v-128h-896zM128 256v128h768v-128h-768zM384 512v128h512v-128h-512z" />
+ <glyph glyph-name="fa-arrow-back" unicode="&#xf214;" horiz-adv-x="960"
d="M960 400v-320h-96v224h-544v-160l-320 208l320 208v-160h640z" />
- <glyph glyph-name="fa-arrow-down" unicode="&#xf251;" horiz-adv-x="640"
+ <glyph glyph-name="fa-arrow-down" unicode="&#xf201;" horiz-adv-x="640"
d="M640 384l-320 -384l-320 384h192v256h256v-256h192z" />
- <glyph glyph-name="fa-arrow-left" unicode="&#xf252;" horiz-adv-x="640"
+ <glyph glyph-name="fa-arrow-left" unicode="&#xf202;" horiz-adv-x="640"
d="M640 448v-256h-256v-192l-384 320l384 320v-192h256z" />
- <glyph glyph-name="fa-arrow-right" unicode="&#xf253;" horiz-adv-x="640"
+ <glyph glyph-name="fa-arrow-right" unicode="&#xf203;" horiz-adv-x="640"
d="M0 448h256v192l384 -320l-384 -320v192h-256v256z" />
- <glyph glyph-name="fa-arrow-slim-down" unicode="&#xf259;" horiz-adv-x="768"
+ <glyph glyph-name="fa-arrow-slim-down" unicode="&#xf209;" horiz-adv-x="768"
d="M749 365c13 -12 19 -27 19 -45s-6 -33 -19 -45l-320 -320c-12 -13 -27 -19 -45 -19s-33 6 -45 19l-320 320c-13 12 -19 27 -19 45s6 33 19 45c9 13 24 19 45 19s36 -6 45 -19l211 -210v485c0 36 28 64 64 64c19 0 34 -6 45 -19c13 -11 19 -26 19 -45v-485l211 210
c12 13 27 19 45 19s33 -6 45 -19z" />
- <glyph glyph-name="fa-arrow-slim-left" unicode="&#xf25a;" horiz-adv-x="768"
+ <glyph glyph-name="fa-arrow-slim-left" unicode="&#xf20a;" horiz-adv-x="768"
d="M429 -45c-12 -13 -27 -19 -45 -19s-33 6 -45 19l-320 320c-13 12 -19 27 -19 45s6 33 19 45l320 320c12 13 27 19 45 19s33 -6 45 -19c13 -9 19 -24 19 -45s-6 -36 -19 -45l-210 -211h485c36 0 64 -28 64 -64c0 -19 -6 -34 -19 -45c-11 -13 -26 -19 -45 -19h-485
l210 -211c13 -12 19 -27 19 -45s-6 -33 -19 -45z" />
- <glyph glyph-name="fa-arrow-slim-right" unicode="&#xf25b;" horiz-adv-x="768"
+ <glyph glyph-name="fa-arrow-slim-right" unicode="&#xf20b;" horiz-adv-x="768"
d="M339 -45c-13 12 -19 27 -19 45s6 33 19 45l210 211h-485c-19 0 -34 6 -45 19c-13 11 -19 26 -19 45c0 36 28 64 64 64h485l-210 211c-13 9 -19 24 -19 45s6 36 19 45c12 13 27 19 45 19s33 -6 45 -19l320 -320c13 -12 19 -27 19 -45s-6 -33 -19 -45l-320 -320
c-12 -13 -27 -19 -45 -19s-33 6 -45 19z" />
- <glyph glyph-name="fa-arrow-slim-up" unicode="&#xf258;" horiz-adv-x="768"
+ <glyph glyph-name="fa-arrow-slim-up" unicode="&#xf208;" horiz-adv-x="768"
d="M749 275c-12 -13 -27 -19 -45 -19s-33 6 -45 19l-211 210v-485c0 -19 -6 -34 -19 -45c-11 -13 -26 -19 -45 -19c-36 0 -64 28 -64 64v485l-211 -210c-9 -13 -24 -19 -45 -19s-36 6 -45 19c-13 12 -19 27 -19 45s6 33 19 45l320 320c12 13 27 19 45 19s33 -6 45 -19
l320 -320c13 -12 19 -27 19 -45s-6 -33 -19 -45z" />
- <glyph glyph-name="fa-arrow-small-down" unicode="&#xf255;" horiz-adv-x="384"
+ <glyph glyph-name="fa-arrow-small-down" unicode="&#xf205;" horiz-adv-x="384"
d="M384 384l-192 -256l-192 256h128v128h128v-128h128z" />
- <glyph glyph-name="fa-arrow-small-left" unicode="&#xf256;" horiz-adv-x="384"
+ <glyph glyph-name="fa-arrow-small-left" unicode="&#xf206;" horiz-adv-x="384"
d="M256 512v-128h128v-128h-128v-128l-256 192z" />
- <glyph glyph-name="fa-arrow-small-right" unicode="&#xf257;" horiz-adv-x="384"
+ <glyph glyph-name="fa-arrow-small-right" unicode="&#xf207;" horiz-adv-x="384"
d="M128 512l256 -192l-256 -192v128h-128v128h128v128z" />
- <glyph glyph-name="fa-arrow-small-up" unicode="&#xf254;" horiz-adv-x="384"
+ <glyph glyph-name="fa-arrow-small-up" unicode="&#xf204;" horiz-adv-x="384"
d="M384 256h-128v-128h-128v128h-128l192 256z" />
- <glyph glyph-name="fa-arrow-up" unicode="&#xf250;" horiz-adv-x="640"
+ <glyph glyph-name="fa-arrow-up" unicode="&#xf200;" horiz-adv-x="640"
d="M640 256h-192v-256h-256v256h-192l320 384z" />
<glyph glyph-name="fa-attachment" unicode="&#xf616;" horiz-adv-x="920"
d="M351 -117c-16 -16 -40 -36 -67 -49s-58 -26 -87 -26c-27 -1 -48 6 -70 15s-41 26 -61 43c-19 21 -38 43 -49 71c-12 27 -19 55 -16 90c1 23 10 47 21 68c11 20 28 43 47 62l394 394c27 27 64 54 101 63c36 9 78 6 115 -29c36 -35 42 -74 32 -110
@@ -168,13 +168,13 @@ d="M768 608c-1 17 -16 32 -32 32h-576c-16 0 -31 -15 -32 -32v-576c0 -20 13 -32 32
<glyph glyph-name="fa-checklist" unicode="&#xf551;" horiz-adv-x="766"
d="M192 288h64v64h-64v-64zM128 608h-64v-64h64v64zM128 480h-64v-64h64v64zM128 352h-64v-64h64v64zM192 416h320v64h-320v-64zM192 544h320v64h-320v-64zM228 219c-21 -23 -32 -49 -32 -79s11 -57 32 -80l92 -92h-320v704h576v-320l-114 -108l-25 25c-23 21 -49 32 -79 32
c-31 0 -57 -11 -80 -32zM761 284c3 -3 5 -7 5 -12s-2 -9 -5 -12l-287 -287c-3 -3 -7 -4 -11 -4c-5 0 -9 1 -12 4l-155 155c-3 3 -5 7 -5 12c0 4 2 8 5 12l50 49c3 3 7 5 12 5c4 0 8 -2 11 -5l93 -93l226 225c3 3 7 5 12 5c4 0 8 -2 11 -5z" />
- <glyph glyph-name="fa-chevron-down" unicode="&#xf25d;" horiz-adv-x="640"
+ <glyph glyph-name="fa-chevron-down" unicode="&#xf20d;" horiz-adv-x="640"
d="M640 416l-320 -320l-320 320l128 128l192 -192l192 192z" />
- <glyph glyph-name="fa-chevron-left" unicode="&#xf25e;" horiz-adv-x="448"
+ <glyph glyph-name="fa-chevron-left" unicode="&#xf20e;" horiz-adv-x="448"
d="M256 320l192 -192l-128 -128l-320 320l320 320l128 -128z" />
- <glyph glyph-name="fa-chevron-right" unicode="&#xf25f;" horiz-adv-x="448"
+ <glyph glyph-name="fa-chevron-right" unicode="&#xf20f;" horiz-adv-x="448"
d="M192 320l-192 192l128 128l320 -320l-320 -320l-128 128z" />
- <glyph glyph-name="fa-chevron-up" unicode="&#xf25c;" horiz-adv-x="640"
+ <glyph glyph-name="fa-chevron-up" unicode="&#xf20c;" horiz-adv-x="640"
d="M640 224l-128 -128l-192 192l-192 -192l-128 128l320 320z" />
<glyph glyph-name="fa-circle-slash" unicode="&#xf41c;" horiz-adv-x="640"
d="M320 128c109 3 189 83 192 192c0 28 -6 54 -17 78l-254 -253c25 -11 51 -16 79 -17zM320 512c-109 -3 -189 -83 -192 -192c0 -28 6 -54 17 -77l252 252c-23 11 -49 17 -77 17zM320 640c181 -4 316 -139 320 -320c-4 -181 -139 -316 -320 -320c-181 4 -316 139 -320 320
@@ -189,15 +189,15 @@ s-63 -27 -64 -63s-28 -63 -64 -64h-34h-30zM704 32h64v-128c-1 -36 -28 -63 -64 -64h
<glyph glyph-name="fa-clock" unicode="&#xf147;" horiz-adv-x="896"
d="M448 0c181 4 316 139 320 320c-5 180 -140 315 -320 320c-180 -5 -315 -140 -320 -320c4 -181 139 -316 320 -320zM448 768c253 -7 441 -195 448 -448c-7 -253 -195 -441 -448 -448c-253 7 -441 195 -448 448c7 253 195 441 448 448zM384 576l64 64l64 -64v-192h128
l64 -64l-64 -64h-256v320z" />
- <glyph glyph-name="fa-collapse" unicode="&#xf42d;" horiz-adv-x="768"
+ <glyph glyph-name="fa-collapse" unicode="&#xf42c;" horiz-adv-x="768"
d="M192 704h384l-192 -192zM0 256h768v-64h-768v64zM0 384h768v-64h-768v64zM192 -128l192 192l192 -192h-384z" />
<glyph glyph-name="fa-color-mode" unicode="&#xf149;" horiz-adv-x="768"
d="M704 640h-640v-640zM768 704v-768h-768v768h768z" />
- <glyph glyph-name="fa-comment-add" unicode="&#xf498;" horiz-adv-x="896"
+ <glyph glyph-name="fa-comment-add" unicode="&#xf568;" horiz-adv-x="896"
d="M0 640c0 64 65 128 128 128h640c64 0 128 -65 128 -128v-384c0 -60 -67 -128 -128 -128h-64v-256l-256 256h-327c-75 5 -121 56 -121 128v384zM384 384v-128h128v128h128v128h-128v128h-128v-128h-128v-128h128z" />
- <glyph glyph-name="fa-comment" unicode="&#xf496;" horiz-adv-x="896"
+ <glyph glyph-name="fa-comment" unicode="&#xf566;" horiz-adv-x="896"
d="M0 640c0 64 65 128 128 128h640c64 0 128 -65 128 -128v-384c0 -60 -67 -128 -128 -128h-320l-256 -256v256h-71c-75 5 -121 56 -121 128v384z" />
- <glyph glyph-name="fa-comments" unicode="&#xf497;" horiz-adv-x="896"
+ <glyph glyph-name="fa-comments" unicode="&#xf567;" horiz-adv-x="896"
d="M2 496c4 25 31 48 62 48h192v-199c5 -75 56 -121 128 -121h192v-64c0 -28 -23 -57 -44 -61c-7 -2 -13 -3 -18 -3h-192l-194 -192v192h-64l-16 2c-25 4 -48 31 -48 62v320zM322 688c4 25 31 48 62 48h448l16 -2c25 -4 48 -31 48 -62v-320c0 -36 -28 -63 -57 -63
c-1 -1 -3 -1 -7 -1h-64v-192l-194 192h-192l-16 2c-25 4 -46 31 -46 62v320z" />
<glyph glyph-name="fa-commit" unicode="&#xf500;" horiz-adv-x="960"
@@ -260,19 +260,19 @@ c64 0 64 0 64 64s0 64 -64 64s-64 0 -64 -64s0 -64 64 -64z" />
d="M448 256c-35 0 -64 29 -64 64s29 64 64 64s64 -29 64 -64s-29 -64 -64 -64zM256 256c-35 0 -64 29 -64 64s29 64 64 64s64 -29 64 -64s-29 -64 -64 -64zM64 256c-35 0 -64 29 -64 64s29 64 64 64s64 -29 64 -64s-29 -64 -64 -64z" />
<glyph glyph-name="fa-expand" unicode="&#xf42b;" horiz-adv-x="768"
d="M192 64h384l-192 -192zM0 256h768v-64h-768v64zM0 384h768v-64h-768v64zM192 512l192 192l192 -192h-384z" />
- <glyph glyph-name="fa-eye-open" unicode="&#xf499;"
+ <glyph glyph-name="fa-eye-open" unicode="&#xf569;"
d="M73 320c105 -161 266 -256 439 -256c172 0 334 95 438 256c-57 89 -129 156 -217 202c23 -41 35 -84 35 -129c0 -141 -115 -256 -256 -256s-256 115 -256 256c0 47 11 90 34 129c-88 -46 -160 -113 -217 -202zM338 393c0 -15 12 -27 27 -27c16 0 28 12 28 27
c0 67 52 119 119 119c15 0 27 12 27 27c0 16 -12 28 -27 28c-96 0 -174 -78 -174 -174zM11 359c108 177 302 290 501 290s392 -113 500 -290c8 -13 12 -26 12 -39s-4 -26 -12 -39c-108 -177 -301 -290 -500 -290s-393 113 -501 290c-7 13 -11 26 -11 39s4 26 11 39z" />
- <glyph glyph-name="fa-eye-plus" unicode="&#xf49a;"
+ <glyph glyph-name="fa-eye-plus" unicode="&#xf56a;"
d="M0 256c0 13 4 26 11 39c108 177 302 290 501 290v-82c-95 0 -174 -79 -174 -174c0 -15 12 -27 28 -27c15 0 27 12 27 27c0 67 52 119 119 119v-82h146v-147h85c-52 -97 -129 -146 -231 -146c-141 0 -256 115 -256 256c0 47 12 90 35 129c-88 -45 -161 -112 -218 -202
c104 -160 267 -256 439 -256c167 0 312 78 413 219h26v147l10 1c16 -18 33 -42 52 -72c7 -13 11 -26 11 -39c0 -10 -4 -23 -11 -40c-108 -176 -302 -289 -501 -289s-393 113 -501 289c-7 17 -11 30 -11 40zM768 457h-128v128h128v128h128v-128h128v-128h-128v-128h-128v128z
" />
- <glyph glyph-name="fa-eye-slash" unicode="&#xf49c;"
+ <glyph glyph-name="fa-eye-slash" unicode="&#xf56c;"
d="M763 442c3 -23 5 -39 5 -48c0 -105 -66 -201 -165 -240zM73 320c63 -98 145 -169 244 -214l45 80c-67 48 -106 125 -106 208c0 46 12 89 35 128c-86 -43 -159 -111 -218 -202zM554 66c159 13 304 106 397 254c-44 67 -98 123 -161 168l36 64c80 -55 142 -118 187 -192
c7 -13 11 -27 11 -40s-4 -27 -11 -40c-11 -19 -32 -45 -63 -82c-116 -133 -271 -208 -438 -208zM338 394c0 -16 12 -28 28 -28c15 0 27 12 27 28c0 65 54 118 119 118c16 0 27 12 27 28c0 15 -12 26 -27 26c-95 0 -174 -77 -174 -172zM0 320c0 13 4 27 11 40
c120 184 302 290 501 290c33 0 68 -3 103 -10l31 54c4 7 9 10 16 10h2l3 -2c2 0 4 -1 5 -2c15 -6 27 -11 37 -18l10 -6l8 -6c1 -1 3 -1 6 -2c9 -5 14 -13 14 -20c0 -3 0 -3 -1 -4c-18 -31 -78 -139 -180 -324l-180 -324l-28 -50c-4 -7 -9 -10 -16 -10c-5 0 -30 13 -77 40
c-6 4 -9 9 -9 16c0 5 8 21 25 50c-111 51 -201 129 -270 238c-7 13 -11 27 -11 40z" />
- <glyph glyph-name="fa-eye-times" unicode="&#xf49b;"
+ <glyph glyph-name="fa-eye-times" unicode="&#xf56b;"
d="M338 312c0 -15 12 -26 28 -26c15 0 27 11 27 26c0 65 52 120 119 120c16 0 27 12 27 28c0 15 -12 26 -27 26c-95 0 -174 -78 -174 -174zM0 240c0 13 4 27 11 40c108 176 302 288 501 288c29 0 58 -3 89 -8l27 -28l-110 -110l177 -176l65 64c0 -143 -108 -254 -248 -254
c-141 0 -256 115 -256 256c0 47 12 91 35 130c-88 -45 -161 -112 -218 -202c104 -160 267 -256 439 -256s335 96 439 256c-11 17 -18 27 -21 30l58 46c24 -30 36 -55 36 -76c0 -13 -4 -27 -11 -40c-108 -177 -301 -290 -501 -290c-199 0 -393 114 -501 290
c-7 13 -11 27 -11 40zM736 346l-96 96l96 96l-96 96l96 96l96 -96l96 96l96 -96l-96 -96l96 -96l-96 -96l-96 96z" />
@@ -330,7 +330,7 @@ v-960h-128z" />
<glyph glyph-name="fa-flame" unicode="&#xf14d;" horiz-adv-x="739"
d="M313 791c213 -137 200 -301 115 -382c-18 -19 -27 -38 -27 -58c0 -21 10 -38 31 -51c55 -28 117 13 114 81c-9 100 24 161 116 169c-31 -67 -27 -121 10 -161c37 -41 59 -102 67 -183c1 -140 -86 -298 -293 -342c48 24 69 64 69 112c1 73 -52 127 -139 102
c-91 -27 -154 48 -119 176c-143 -137 -119 -326 18 -406c-311 87 -317 332 -217 472c35 46 73 84 114 115c41 30 77 60 109 91c57 56 80 133 32 265z" />
- <glyph glyph-name="fa-fold" unicode="&#xf42f;" horiz-adv-x="896"
+ <glyph glyph-name="fa-fold" unicode="&#xf42d;" horiz-adv-x="896"
d="M896 576v-64l-160 -160l160 -160v-64h-224l-64 64h192l-128 128h-448l-128 -128h192l-64 -64h-224v64l160 160l-160 160v64h224l64 -64h-192l128 -128h448l128 128h-192l64 64h224zM640 640l-192 -192l-192 192h128v192h128v-192h128zM256 64l192 192l192 -192h-128v-192
h-128v192h-128z" />
<glyph glyph-name="fa-folder-added-o" unicode="&#xf488;" horiz-adv-x="896"
@@ -415,6 +415,8 @@ c-5 3 3 11 24 23l-20 16c-11 9 -21 15 -29 18c-6 1 -10 1 -12 0c-3 -2 -8 0 -16 5c-1
c-4 -1 -4 -4 0 -7c3 -4 4 -6 3 -7c-2 -1 -8 1 -18 5c-21 8 -39 18 -64 2l-42 -28c-13 -9 -21 -16 -22 -22c3 3 39 23 50 14c3 -7 4 -17 3 -29c-1 -13 0 -23 4 -32c4 -6 4 -6 -1 0c-5 5 -8 3 -9 -7c-3 -12 -7 -25 -14 -39c-7 -15 -6 -33 5 -56s15 -36 14 -41s-1 -9 2 -12
c3 -5 6 -10 9 -14c3 -5 5 -7 6 -6c1 2 -1 9 -5 21s-6 20 -5 23c1 1 2 -1 3 -6s4 -11 8 -17l14 -18c5 -7 8 -13 8 -18c0 -11 4 -25 29 -36l70 -27c5 -1 9 -2 11 -1c4 0 11 -8 15 -15c2 -4 4 -7 7 -9c5 -5 26 -17 32 -17c3 0 5 1 6 3s3 3 6 3c4 -1 17 -9 18 -13v-9
c0 -4 0 -7 -1 -9l-12 -19c-7 -11 -10 -22 -9 -32v-10c0 -4 5 -11 14 -21c9 -11 15 -19 18 -26s12 -15 27 -24c29 -23 4 -74 -11 -99c-11 -23 -10 -54 1 -61c-25 -5 -50 -7 -76 -7c-217 5 -379 167 -384 384c5 217 167 379 384 384z" />
+ <glyph glyph-name="fa-grip" unicode="&#xf660;" horiz-adv-x="704"
+d="M512 160h192v-192h-192v192zM512 416h192v-192h-192v192zM512 672h192v-192h-192v192zM0 160h192v-192h-192v192zM0 416h192v-192h-192v192zM0 672h192v-192h-192v192zM256 160h192v-192h-192v192zM256 416h192v-192h-192v192zM256 672h192v-192h-192v192z" />
<glyph glyph-name="fa-group-o" unicode="&#xf11a;"
d="M358 -80h564c-25 112 -108 212 -200 231c-25 8 -38 24 -38 48v34c0 19 8 33 24 42c59 35 98 110 98 190c0 115 -74 207 -166 207s-166 -92 -166 -207c0 -80 39 -155 98 -190c17 -9 25 -23 25 -42v-34c0 -24 -13 -40 -38 -48c-92 -19 -176 -119 -201 -231zM256 -128
c0 34 8 74 24 119c40 110 106 188 199 234c-67 60 -101 140 -101 240c0 165 118 303 262 303s262 -138 262 -303c0 -100 -34 -180 -101 -240c119 -56 223 -216 223 -353c0 -25 -21 -47 -48 -47h-672c-27 0 -48 20 -48 47zM0 -64c0 140 106 299 223 352
@@ -442,11 +444,11 @@ l160 -320v-192h-768v192z" />
d="M256 512v-384l-256 192zM0 -128v128h896v-128h-896zM384 128v128h512v-128h-512zM384 384v128h512v-128h-512zM0 640v128h896v-128h-896z" />
<glyph glyph-name="fa-indent-right" unicode="&#xf60b;" horiz-adv-x="896"
d="M0 512l256 -192l-256 -192v384zM0 -128v128h896v-128h-896zM384 128v128h512v-128h-512zM384 384v128h512v-128h-512zM0 640v128h896v-128h-896z" />
- <glyph glyph-name="fa-info-circle" unicode="&#xf30c;"
+ <glyph glyph-name="fa-info-circle" unicode="&#xf25c;"
d="M512 -64c212 0 384 172 384 384s-172 384 -384 384s-384 -172 -384 -384s172 -384 384 -384zM40 518c26 63 63 118 110 165c95 95 226 149 362 149s267 -54 363 -149c95 -96 149 -227 149 -363c0 -137 -54 -267 -149 -362c-100 -100 -221 -150 -363 -150
c-139 0 -269 54 -362 150c-96 93 -150 223 -150 362c0 71 13 137 40 198zM345 320c77 63 168 105 211 104c14 1 24 -7 29 -26c3 -20 1 -44 -8 -71l-43 -164c-4 -11 -5 -21 -3 -29c0 -5 3 -9 7 -8c2 -1 6 0 11 2c13 4 26 10 39 18l23 15l19 -23c-59 -61 -144 -106 -195 -109
c-19 1 -32 9 -37 22c-8 17 -7 46 3 87l38 153c0 3 1 9 4 17c1 1 1 5 1 11c0 4 -2 7 -5 8c-26 -5 -52 -17 -78 -35zM468 562c0 41 37 76 90 77c41 -1 62 -22 62 -61c0 -43 -39 -76 -86 -75c-41 -1 -66 19 -66 59z" />
- <glyph glyph-name="fa-info-round" unicode="&#xf305;"
+ <glyph glyph-name="fa-info-round" unicode="&#xf255;"
d="M361 292c26 18 52 30 78 35c3 -1 5 -4 5 -8c0 -6 0 -10 -1 -11c-3 -8 -4 -14 -4 -17l-38 -153c-10 -41 -11 -70 -3 -87c5 -13 18 -21 37 -22c51 3 136 48 195 109l-19 23l-23 -15c-13 -8 -26 -14 -39 -18c-5 -2 -9 -3 -11 -2c-4 -1 -7 3 -7 8c-2 8 -1 18 3 29l43 164
c9 27 11 51 8 71c-5 19 -15 27 -29 26c-43 1 -134 -41 -211 -104zM468 562c0 -40 25 -60 66 -59c47 -1 86 32 86 75c0 39 -21 60 -62 61c-53 -1 -90 -36 -90 -77zM40 518c26 63 63 118 110 165c95 95 226 149 362 149s267 -54 363 -149c95 -96 149 -227 149 -363
c0 -137 -54 -267 -149 -362c-100 -100 -221 -150 -363 -150c-139 0 -269 54 -362 150c-96 93 -150 223 -150 362c0 71 13 137 40 198z" />
@@ -505,21 +507,18 @@ d="M640 64v192h128v-320h-768v768h256v-128l-128 -2v-510h512zM384 704h384v-384l-12
<glyph glyph-name="fa-link" unicode="&#xf612;"
d="M768 576c128 0 256 -128 256 -256s-128 -256 -256 -256h-193s-255 128 -255 256c0 22 3 43 8 64h137c-11 -19 -18 -41 -18 -64c0 -64 65 -128 128 -128h192c63 0 128 64 128 128s-63 128 -128 128h-30c-14 39 -59 96 -107 128h138zM287 192c14 -39 59 -96 107 -128h-138
c-128 0 -256 128 -256 256s128 256 256 256h193s255 -128 255 -256c0 -22 -3 -43 -8 -64h-137c11 19 18 41 18 64c0 64 -65 128 -128 128h-192c-63 0 -128 -64 -128 -128s63 -128 128 -128h30z" />
- <glyph glyph-name="fa-list-ordered" unicode="&#xf609;" horiz-adv-x="954"
-d="M477 320v0v0v0v0zM477 320v0v0v0v0v0v0v0v0v0zM477 320v0v0v0v0v0v0v0v0zM477 320v0v0v0v0v0v0v0v0v0v0v0v0v0v0v0v0zM477 320v0v0v0v0v0v0v0v0v0v0v0v0zM78 36l-73 14c6 23 18 39 35 52c17 12 41 18 73 18c36 0 62 -7 78 -20s24 -29 24 -50c0 -12 -3 -22 -10 -32
-c-6 -10 -16 -18 -29 -26c10 -2 19 -6 24 -10c9 -5 17 -13 22 -22s7 -19 7 -32c0 -16 -4 -32 -12 -46c-9 -15 -21 -28 -37 -36c-15 -8 -36 -10 -62 -10c-25 0 -45 2 -59 8c-15 6 -27 15 -36 26c-10 12 -17 25 -22 42l77 10c3 -15 8 -26 14 -32s14 -8 24 -8s19 4 26 12
-c7 7 10 17 10 30c0 12 -3 21 -10 28c-6 7 -15 12 -27 12c-6 0 -14 -3 -25 -6l4 56c5 0 8 -2 10 -2c10 0 19 4 26 10c6 6 10 15 10 24c0 8 -3 15 -8 20s-12 6 -21 6s-16 -2 -22 -8c-5 -5 -9 -15 -11 -28zM230 180h-230c3 23 11 44 24 64c14 20 39 45 75 72c23 17 37 30 44 38
-c6 9 9 16 9 24s-3 16 -9 22c-7 6 -14 8 -24 8s-18 -2 -24 -8s-10 -17 -12 -32l-77 6c3 21 8 38 16 50s20 22 34 28c15 7 35 10 61 10c27 0 48 -4 63 -10s27 -15 36 -28c8 -12 12 -28 12 -44s-4 -32 -14 -48c-10 -15 -28 -32 -54 -50c-16 -11 -26 -17 -31 -22
-c-5 -4 -11 -10 -18 -16h119v-64zM169 804v-280h-78v184c-12 -9 -24 -18 -36 -24s-27 -10 -44 -16v62c26 8 46 19 60 30c15 12 26 27 34 44h64zM314 -130v128h640v-128h-640zM314 126v128h640v-128h-640zM314 382v128h640v-128h-640zM314 638v128h640v-128h-640z" />
+ <glyph glyph-name="fa-list-ordered" unicode="&#xf609;" horiz-adv-x="965"
+d="M0 214c0 36 19 68 43 86c11 10 23 18 35 26c24 15 43 31 43 47c0 18 -11 28 -29 28c-17 0 -31 -10 -44 -31l-45 32c17 36 54 58 95 58c52 0 93 -32 93 -83c0 -36 -29 -67 -59 -84c-29 -16 -59 -37 -59 -55h68v32h56v-85h-194c-2 13 -3 22 -3 29zM2 -123l30 47
+c18 -16 37 -24 57 -24c21 0 39 10 39 30c0 23 -19 33 -56 30l-14 30c2 4 8 12 17 24c18 24 29 37 43 50h-26c-12 -1 -20 -1 -26 -1v-28h-57v81h179v-47l-51 -62c36 -8 59 -37 59 -73c0 -58 -44 -93 -102 -93c-38 0 -69 12 -92 36zM48 690l-38 41l73 68h57v-217h58v-53h-180
+v53h57c0 14 0 36 1 65v65v7h-1c-3 -6 -12 -16 -27 -29zM325 5v128h640v-128h-640zM325 261v128h640v-128h-640zM325 517v128h640v-128h-640z" />
<glyph glyph-name="fa-list-unordered" unicode="&#xf608;" horiz-adv-x="960"
-d="M480 320v0v0v0v0zM480 320v0v0v0v0v0v0v0v0v0zM480 320v0v0v0v0v0v0v0v0zM480 320v0v0v0v0v0v0v0v0v0v0v0v0v0v0v0v0zM480 320v0v0v0v0v0v0v0v0v0v0v0v0zM0 0h128v-128h-128v128zM0 256h128v-128h-128v128zM0 512h128v-128h-128v128zM0 768h128v-128h-128v128zM256 -128
-v128h704v-128h-704zM256 128v128h704v-128h-704zM256 384v128h704v-128h-704zM256 640v128h704v-128h-704z" />
+d="M0 128h128v-128h-128v128zM0 384h128v-128h-128v128zM0 640h128v-128h-128v128zM256 0v128h704v-128h-704zM256 256v128h704v-128h-704zM256 512v128h704v-128h-704z" />
<glyph glyph-name="fa-location" unicode="&#xf140;" horiz-adv-x="640"
d="M320 384c73 1 127 55 128 128c-1 73 -55 127 -128 128c-73 -1 -127 -55 -128 -128c1 -73 55 -127 128 -128zM320 832c181 -4 316 -139 320 -320c-7 -177 -153 -416 -320 -704c-167 288 -313 527 -320 704c4 181 139 316 320 320z" />
<glyph glyph-name="fa-lock" unicode="&#xf123;" horiz-adv-x="768"
d="M512 576c-3 67 -61 125 -128 128c-67 -3 -125 -61 -128 -128v-192h256v192zM512 320h-448v-448h448v64h-384v64h384v64h-384v64h384v64h-384v64h384v64zM704 384c33 -1 63 -31 64 -64v-448c-1 -33 -31 -63 -64 -64h-640c-33 1 -63 31 -64 64v448c1 33 31 63 64 64h64v192
c5 133 123 251 256 256c133 -5 251 -123 256 -256v-192h20h44z" />
- <glyph glyph-name="fa-logo-gitplex" unicode="&#xf000;" horiz-adv-x="960"
+ <glyph glyph-name="fa-logo-gitplex" unicode="&#xf100;" horiz-adv-x="960"
d="M512 128c-106 0 -192 86 -192 192s86 192 192 192s192 -86 192 -192s-86 -192 -192 -192zM832 191c0 38 -27 65 -65 65h-191v128h253c76 0 131 -55 131 -131v-314c0 -76 -55 -131 -131 -131h-698c-76 0 -131 55 -131 131v762c0 76 55 131 131 131h698
c76 0 131 -54 131 -128h-701c-76 0 -131 -55 -131 -131v-506c0 -76 55 -131 131 -131h573v255z" />
<glyph glyph-name="fa-mail-alt" unicode="&#xf341;" horiz-adv-x="896"
@@ -552,12 +551,12 @@ d="M512 128c1 -36 28 -63 64 -63s63 27 63 63s-27 63 -63 63s-63 -27 -64 -63zM640 -
l64 -64l-64 -64v-64l-64 -64c79 -59 127 -151 128 -256c0 -16 -1 -32 -4 -47c41 -35 68 -86 68 -145c-1 -95 -63 -171 -151 -192h23z" />
<glyph glyph-name="fa-milestone" unicode="&#xf14e;" horiz-adv-x="832"
d="M320 320h128v-512h-128v512zM448 704h-128v128h128v-128zM448 576h-128v-128h128v128zM832 512l-128 -128h-704v256h704z" />
- <glyph glyph-name="fa-minus-circle" unicode="&#xf30b;"
+ <glyph glyph-name="fa-minus-circle" unicode="&#xf25b;"
d="M512 -64c212 0 384 172 384 384s-172 384 -384 384s-384 -172 -384 -384s172 -384 384 -384zM40 518c26 63 63 118 110 165c95 95 226 149 362 149s267 -54 363 -149c95 -96 149 -227 149 -363c0 -137 -54 -267 -149 -362c-100 -100 -221 -150 -363 -150
c-139 0 -269 54 -362 150c-96 93 -150 223 -150 362c0 71 13 137 40 198zM256 384h512v-128h-512v128z" />
- <glyph glyph-name="fa-minus-round" unicode="&#xf304;"
+ <glyph glyph-name="fa-minus-round" unicode="&#xf254;"
d="M768 256v128h-512v-128h512zM40 518c26 63 63 118 110 165c95 95 226 149 362 149s267 -54 363 -149c95 -96 149 -227 149 -363c0 -137 -54 -267 -149 -362c-100 -100 -221 -150 -363 -150c-139 0 -269 54 -362 150c-96 93 -150 223 -150 362c0 71 13 137 40 198z" />
- <glyph glyph-name="fa-minus-square-o" unicode="&#xf313;" horiz-adv-x="896"
+ <glyph glyph-name="fa-minus-square-o" unicode="&#xf263;" horiz-adv-x="896"
d="M704 256h-512v128h512v-128zM97 704c-19 0 -33 -14 -33 -33v-702c0 -19 14 -33 33 -33h702c19 0 33 14 33 33v702c0 19 -14 33 -33 33h-702zM0 703c0 38 27 65 65 65h766c38 0 65 -27 65 -65v-766c0 -38 -27 -65 -65 -65h-766c-38 0 -65 27 -65 65v766z" />
<glyph glyph-name="fa-minus" unicode="&#xf41a;" horiz-adv-x="512"
d="M0 256v128h512v-128h-512z" />
@@ -629,13 +628,13 @@ d="M384 320l384 256v-512zM0 320l384 256v-256v-256z" />
<glyph glyph-name="fa-plug" unicode="&#xf132;"
d="M192 130l128 -127l-192 -193l-128 129zM209 357c23 83 70 165 141 247l444 -443c-61 -51 -119 -90 -175 -117c-111 -59 -252 -50 -344 41v1c-75 73 -97 163 -66 271zM873 172l-512 511l87 88l115 -116l178 180l91 -91l-179 -178l102 -102l178 179l91 -90l-179 -179
l115 -116z" />
- <glyph glyph-name="fa-plus-circle" unicode="&#xf30a;"
+ <glyph glyph-name="fa-plus-circle" unicode="&#xf25a;"
d="M512 -64c212 0 384 172 384 384s-172 384 -384 384s-384 -172 -384 -384s172 -384 384 -384zM40 518c26 63 63 118 110 165c95 95 226 149 362 149s267 -54 363 -149c95 -96 149 -227 149 -363c0 -137 -54 -267 -149 -362c-100 -100 -221 -150 -363 -150
c-139 0 -269 54 -362 150c-96 93 -150 223 -150 362c0 71 13 137 40 198zM256 384h192v192h128v-192h192v-128h-192v-192h-128v192h-192v128z" />
- <glyph glyph-name="fa-plus-round" unicode="&#xf303;"
+ <glyph glyph-name="fa-plus-round" unicode="&#xf253;"
d="M448 256v-192h128v192h192v128h-192v192h-128v-192h-192v-128h192zM40 518c26 63 63 118 110 165c95 95 226 149 362 149s267 -54 363 -149c95 -96 149 -227 149 -363c0 -137 -54 -267 -149 -362c-100 -100 -221 -150 -363 -150c-139 0 -269 54 -362 150
c-96 93 -150 223 -150 362c0 71 13 137 40 198z" />
- <glyph glyph-name="fa-plus-square-o" unicode="&#xf312;" horiz-adv-x="896"
+ <glyph glyph-name="fa-plus-square-o" unicode="&#xf262;" horiz-adv-x="896"
d="M512 256v-192h-128v192h-192v128h192v192h128v-192h192v-128h-192zM97 704c-19 0 -33 -14 -33 -33v-702c0 -19 14 -33 33 -33h702c19 0 33 14 33 33v702c0 19 -14 33 -33 33h-702zM0 703c0 38 27 65 65 65h766c38 0 65 -27 65 -65v-766c0 -38 -27 -65 -65 -65h-766
c-38 0 -65 27 -65 65v766z" />
<glyph glyph-name="fa-plus" unicode="&#xf418;" horiz-adv-x="640"
@@ -674,12 +673,12 @@ d="M0 503c1 -1 5 -2 11 -2l21 -3c7 -1 10 -2 11 -2l2 -1c61 -10 111 -15 151 -15c59
c26 0 63 3 111 9c37 6 71 10 100 11v-1l-2 -11c0 -3 0 -5 -1 -6c-1 -9 -2 -14 -2 -15l-2 -13c-10 -62 -15 -112 -15 -151c0 -59 33 -100 76 -100c18 0 39 10 64 30c27 19 58 29 91 29c64 0 106 -51 106 -124c0 -69 -40 -116 -103 -116c-33 0 -61 11 -84 34
c-25 23 -51 34 -79 34c-45 0 -68 -25 -68 -76c0 -16 3 -40 10 -71c7 -26 10 -50 10 -71v-3c-13 0 -20 0 -21 -1c-14 -1 -34 -3 -59 -6c-53 -8 -97 -12 -132 -12c-56 0 -89 24 -89 68c0 29 11 55 34 78c23 25 34 53 34 84c0 63 -47 104 -116 104c-72 0 -125 -43 -125 -107
c0 -35 10 -65 30 -90c20 -28 30 -49 30 -64c0 -44 -41 -77 -100 -77c-39 0 -90 5 -151 15l-17 3c-2 0 -8 1 -17 2l-8 1c-1 0 -2 0 -3 1v631z" />
- <glyph glyph-name="fa-question-circle" unicode="&#xf309;"
+ <glyph glyph-name="fa-question-circle" unicode="&#xf259;"
d="M512 -64c212 0 384 172 384 384s-172 384 -384 384s-384 -172 -384 -384s172 -384 384 -384zM40 518c26 63 63 118 110 165c95 95 226 149 362 149s267 -54 363 -149c95 -96 149 -227 149 -363c0 -137 -54 -267 -149 -362c-100 -100 -221 -150 -363 -150
c-139 0 -269 54 -362 150c-96 93 -150 223 -150 362c0 71 13 137 40 198zM435 106c0 37 32 67 68 66l3 1c43 -3 68 -31 68 -72c-3 -39 -33 -66 -70 -65l-2 -1c-46 7 -68 30 -67 71zM327 428v4c1 67 25 117 74 150c35 19 71 28 106 27c51 1 97 -12 138 -39
c40 -36 55 -67 55 -119c0 -30 -9 -57 -27 -80v-1c-5 -5 -8 -9 -9 -10c-4 -5 -8 -9 -13 -12l-16 -13l-18 -15l-29 -21c-16 -9 -26 -21 -29 -34l-2 -6c-1 -7 -2 -11 -2 -12v-12l-1 -4l-109 -1v10c0 8 1 17 2 26c0 14 2 27 7 39c2 5 5 10 9 14c7 8 24 22 50 43c6 5 13 11 22 16
l10 7l2 1c3 4 6 6 7 6l2 2l4 4l1 2l4 4l7 12c4 6 7 13 8 20c1 1 1 4 1 10c0 11 -1 19 -4 24c0 1 0 2 -1 3l-3 9c-6 9 -11 16 -16 20c-12 6 -21 9 -27 10c-10 0 -16 0 -18 1c-29 -3 -48 -12 -55 -26c-11 -17 -17 -35 -17 -54v-6z" />
- <glyph glyph-name="fa-question-round" unicode="&#xf302;"
+ <glyph glyph-name="fa-question-round" unicode="&#xf252;"
d="M435 106c-1 -41 21 -64 67 -71l2 1c37 -1 67 26 70 65c0 41 -25 69 -68 72l-3 -1c-36 1 -68 -29 -68 -66zM440 427v6c0 19 6 37 17 54c7 14 26 23 55 26c2 -1 8 -1 18 -1c6 -1 15 -4 27 -10c5 -4 10 -11 16 -20l3 -9c1 -1 1 -2 1 -3c3 -5 4 -13 4 -24c0 -6 0 -9 -1 -10
c-1 -7 -4 -14 -8 -20l-7 -12l-4 -4l-1 -2l-4 -4l-2 -2l-2 -1c0 -1 0 -1 -1 -1l-4 -4l-2 -1l-10 -7c-9 -5 -16 -11 -22 -16c-26 -21 -43 -35 -50 -43c-4 -4 -7 -9 -9 -14c-5 -12 -7 -25 -7 -39c-1 -9 -2 -18 -2 -26v-10l109 1l1 4v12c0 1 1 5 2 12l2 6c3 13 13 25 29 34
l29 21l18 15l16 13c5 3 9 7 13 12c1 1 4 5 9 10v1c18 23 27 50 27 80c0 52 -15 83 -55 119c-41 27 -87 40 -138 39c-35 1 -71 -8 -106 -27c-49 -33 -73 -83 -74 -150v-4zM40 518c26 63 63 118 110 165c95 95 226 149 362 149s267 -54 363 -149c95 -96 149 -227 149 -363
@@ -687,7 +686,7 @@ c0 -137 -54 -267 -149 -362c-100 -100 -221 -150 -363 -150c-139 0 -269 54 -362 150
<glyph glyph-name="fa-quote" unicode="&#xf60f;" horiz-adv-x="640"
d="M0 320c0 256 256 256 256 256v-128c-128 0 -128 -128 -128 -128h128v-256h-256v256zM640 448c-128 0 -128 -128 -128 -128h128v-256h-256v256c0 256 256 256 256 256v-128z" />
<glyph glyph-name="fa-radio-checked" unicode="&#xf658;" horiz-adv-x="896"
-d="M448 160c-88 0 -160 72 -160 160s72 160 160 160s160 -72 160 -160s-72 -160 -160 -160zM448 0c177 0 320 143 320 320s-143 320 -320 320s-320 -143 -320 -320s143 -320 320 -320zM448 -128c-247 0 -448 201 -448 448s201 448 448 448s448 -201 448 -448
+d="M448 128c-106 0 -192 86 -192 192s86 192 192 192s192 -86 192 -192s-86 -192 -192 -192zM448 0c177 0 320 143 320 320s-143 320 -320 320s-320 -143 -320 -320s143 -320 320 -320zM448 -128c-247 0 -448 201 -448 448s201 448 448 448s448 -201 448 -448
s-201 -448 -448 -448z" />
<glyph glyph-name="fa-radio-unchecked" unicode="&#xf657;" horiz-adv-x="896"
d="M448 0c177 0 320 143 320 320s-143 320 -320 320s-320 -143 -320 -320s143 -320 320 -320zM448 -128c-247 0 -448 201 -448 448s201 448 448 448s448 -201 448 -448s-201 -448 -448 -448z" />
@@ -796,20 +795,20 @@ c111 -69 248 -58 347 35c63 64 88 147 76 231z" />
<glyph glyph-name="fa-table" unicode="&#xf603;"
d="M704 128v-192h256v192h-256zM384 128v-192h256v192h-256zM64 128v-192h256v192h-256zM704 384v-192h256v192h-256zM384 384v-192h256v192h-256zM64 384v-192h256v192h-256zM704 640v-192h256v192h-256zM384 640v-192h256v192h-256zM64 640v-192h256v192h-256zM1024 -128
h-1024v896h1024v-896z" />
- <glyph glyph-name="fa-tag-add" unicode="&#xf492;"
+ <glyph glyph-name="fa-tag-add" unicode="&#xf562;"
d="M640 127h128v128h128v-128h128v-128h-128v-128h-128v128h-128v128zM598 500c0 47 49 94 96 94s94 -47 94 -94c0 -48 -47 -95 -94 -95s-96 47 -96 95zM424 -177l-408 407c-22 22 -22 44 0 66l510 511c17 16 38 24 60 24h392c31 0 46 -16 46 -47v-401h-96v352h-320
l-480 -480l320 -320l32 32l10 -144c-9 -17 -45 -20 -66 0z" />
- <glyph glyph-name="fa-tag-alt" unicode="&#xf494;" horiz-adv-x="896"
+ <glyph glyph-name="fa-tag-alt" unicode="&#xf564;" horiz-adv-x="896"
d="M384 768l512 -512l-384 -384l-512 512v256l128 128h256zM64 416l448 -448l288 288l-448 448h-192l-96 -96v-192zM448 512l256 -256l-192 -192l-256 256zM352 320l160 -160l96 96l-160 160zM320 544c0 -53 -43 -96 -96 -96s-96 43 -96 96s43 96 96 96s96 -43 96 -96z
M224 512c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32z" />
- <glyph glyph-name="fa-tag-o" unicode="&#xf491;"
+ <glyph glyph-name="fa-tag-o" unicode="&#xf561;"
d="M598 501c0 47 49 94 96 94s94 -47 94 -94c0 -48 -47 -95 -94 -95s-96 47 -96 95zM456 -67l474 473v331h-332l-472 -473zM16 231c-22 22 -22 44 0 66l510 511c17 16 38 24 60 24h392c31 0 46 -16 46 -47v-392c0 -22 -8 -42 -24 -59l-510 -510c-22 -22 -44 -22 -66 0z" />
- <glyph glyph-name="fa-tag-remove" unicode="&#xf493;"
+ <glyph glyph-name="fa-tag-remove" unicode="&#xf563;"
d="M736 -129l-96 96l96 96l-96 96l96 96l96 -96l96 96l96 -96l-96 -96l96 -96l-96 -96l-96 96zM598 500c0 47 49 94 96 94s94 -47 94 -94c0 -48 -47 -95 -94 -95s-96 47 -96 95zM424 -177l-408 407c-22 22 -22 44 0 66l510 511c17 16 38 24 60 24h392c31 0 46 -16 46 -47
v-401l-96 32v320h-320l-480 -480l320 -320l42 -112c-9 -17 -45 -20 -66 0z" />
- <glyph glyph-name="fa-tag" unicode="&#xf490;" horiz-adv-x="998"
+ <glyph glyph-name="fa-tag" unicode="&#xf560;" horiz-adv-x="998"
d="M572 488c0 -48 48 -95 95 -95s95 47 95 95c0 47 -48 94 -95 94s-95 -47 -95 -94zM20 197c-27 27 -27 65 0 92l514 514c11 11 24 16 38 16h361c38 0 65 -27 65 -65v-361c0 -14 -5 -27 -16 -38l-514 -514c-27 -27 -65 -27 -92 0z" />
- <glyph glyph-name="fa-tags" unicode="&#xf495;" horiz-adv-x="1011"
+ <glyph glyph-name="fa-tags" unicode="&#xf565;" horiz-adv-x="1011"
d="M687 412c-19 19 -28 41 -28 68c0 53 43 96 96 96s96 -43 96 -96s-43 -96 -96 -96c-27 0 -49 9 -68 28zM659 672l-384 -384l288 -288l384 384v288h-288zM467 672l-384 -384l288 -288v-96l-361 361c-7 7 -10 14 -10 23s3 16 10 23l361 361h96zM540 -73l-338 338
c-7 7 -10 14 -10 23s3 16 10 23l417 417c5 5 12 8 19 8h340c19 0 33 -14 33 -33v-340c0 -7 -3 -14 -8 -19l-417 -417c-7 -7 -14 -10 -23 -10s-16 3 -23 10z" />
<glyph glyph-name="fa-telescope" unicode="&#xf155;" horiz-adv-x="929"
@@ -837,20 +836,20 @@ c0 40 -36 75 -75 75h-205c0 23 9 54 28 93c18 40 28 71 28 94c0 76 -19 112 -94 112c
d="M0 -20v378c0 20 17 38 38 38h170c21 0 38 -18 38 -38v-378c0 -21 -17 -38 -38 -38h-170c-21 0 -38 17 -38 38zM76 54c0 -21 16 -36 38 -36c20 0 38 15 38 36s-18 38 -38 38c-22 0 -38 -17 -38 -38zM284 -20v378c0 20 17 36 36 38s66 57 105 108c27 34 47 57 60 70
c14 14 25 43 29 58c2 7 4 18 7 34c6 31 8 45 19 68c12 24 26 40 47 40c36 0 66 -8 85 -20c18 -13 32 -36 38 -52s9 -44 10 -56v-22c0 -30 -10 -65 -17 -82c-4 -9 -9 -18 -16 -32c-2 -2 -3 -7 -6 -12c-6 -9 -9 -15 -12 -26h164c62 0 114 -53 114 -114c0 -34 -11 -63 -33 -88
c6 -17 9 -33 9 -46c1 -30 -7 -55 -25 -80c13 -44 -1 -97 -32 -126c7 -88 -41 -150 -146 -152h-21h-45h-10c-52 0 -123 15 -157 26c-17 5 -41 14 -72 24c-48 17 -79 25 -93 26c-21 0 -38 17 -38 38z" />
- <glyph glyph-name="fa-tick-circle" unicode="&#xf307;"
+ <glyph glyph-name="fa-tick-circle" unicode="&#xf257;"
d="M512 -64c212 0 384 172 384 384s-172 384 -384 384s-384 -172 -384 -384s172 -384 384 -384zM288 384l128 -128l320 320l96 -96l-416 -416l-224 224zM40 518c26 63 63 118 110 165c95 95 226 149 362 149s267 -54 363 -149c95 -96 149 -227 149 -363
c0 -137 -54 -267 -149 -362c-100 -100 -221 -150 -363 -150c-139 0 -269 54 -362 150c-96 93 -150 223 -150 362c0 71 13 137 40 198z" />
<glyph glyph-name="fa-tick-o" unicode="&#xf653;" horiz-adv-x="768"
d="M80 256l176 -176l432 432l-48 48l-384 -384l-128 128zM768 512l-512 -512l-256 256l128 128l128 -128l384 384z" />
- <glyph glyph-name="fa-tick-round" unicode="&#xf300;"
+ <glyph glyph-name="fa-tick-round" unicode="&#xf250;"
d="M416 64l416 416l-96 96l-320 -320l-128 128l-96 -96zM40 518c26 63 63 118 110 165c95 95 226 149 362 149s267 -54 363 -149c95 -96 149 -227 149 -363c0 -137 -54 -267 -149 -362c-100 -100 -221 -150 -363 -150c-139 0 -269 54 -362 150c-96 93 -150 223 -150 362
c0 71 13 137 40 198z" />
<glyph glyph-name="fa-tick" unicode="&#xf652;" horiz-adv-x="768"
d="M768 512l-512 -512l-256 256l128 128l128 -128l384 384z" />
- <glyph glyph-name="fa-times-circle" unicode="&#xf308;"
+ <glyph glyph-name="fa-times-circle" unicode="&#xf258;"
d="M512 -64c212 0 384 172 384 384s-172 384 -384 384s-384 -172 -384 -384s172 -384 384 -384zM40 518c26 63 63 118 110 165c95 95 226 149 362 149s267 -54 363 -149c95 -96 149 -227 149 -363c0 -137 -54 -267 -149 -362c-100 -100 -221 -150 -363 -150
c-139 0 -269 54 -362 150c-96 93 -150 223 -150 362c0 71 13 137 40 198zM423 329l-156 156l88 89l157 -157l157 157l88 -88l-156 -157l156 -157l-88 -88l-157 156l-157 -156l-88 88z" />
- <glyph glyph-name="fa-times-round" unicode="&#xf301;"
+ <glyph glyph-name="fa-times-round" unicode="&#xf251;"
d="M355 84l157 156l157 -156l88 88l-156 157l156 157l-88 88l-157 -157l-157 157l-88 -89l156 -156l-156 -157zM40 518c26 63 63 118 110 165c95 95 226 149 362 149s267 -54 363 -149c95 -96 149 -227 149 -363c0 -137 -54 -267 -149 -362c-100 -100 -221 -150 -363 -150
c-139 0 -269 54 -362 150c-96 93 -150 223 -150 362c0 71 13 137 40 198z" />
<glyph glyph-name="fa-times" unicode="&#xf419;" horiz-adv-x="640"
@@ -864,17 +863,17 @@ c37 0 65 27 65 64s28 64 65 64h254c37 0 65 -27 65 -64s28 -64 65 -64h128c73 0 127
<glyph glyph-name="fa-trashcan" unicode="&#xf145;" horiz-adv-x="704"
d="M640 704c35 0 64 -29 64 -64v-64c0 -35 -29 -64 -64 -64v-576c0 -35 -29 -64 -64 -64h-448c-35 0 -64 29 -64 64v576c-35 0 -64 29 -64 64v64c0 35 29 64 64 64h256v32s14 32 32 32s32 -14 32 -32v-32h256zM576 -32v544h-64v-480c0 -18 -14 -32 -32 -32s-32 14 -32 32
v480h-64v-480c0 -18 -14 -32 -32 -32s-32 14 -32 32v480h-64v-480c0 -18 -14 -32 -32 -32s-32 14 -32 32v480h-64v-544c0 -18 14 -32 32 -32h384c18 0 32 14 32 32zM640 592v32c0 9 -7 16 -16 16h-544c-9 0 -16 -7 -16 -16v-32c0 -9 7 -16 16 -16h544c9 0 16 7 16 16z" />
- <glyph glyph-name="fa-triangle-down" unicode="&#xf261;" horiz-adv-x="768"
+ <glyph glyph-name="fa-triangle-down" unicode="&#xf211;" horiz-adv-x="768"
d="M768 512l-384 -384l-384 384h768z" />
- <glyph glyph-name="fa-triangle-left" unicode="&#xf262;" horiz-adv-x="384"
+ <glyph glyph-name="fa-triangle-left" unicode="&#xf212;" horiz-adv-x="384"
d="M384 704v-768l-384 384z" />
- <glyph glyph-name="fa-triangle-right" unicode="&#xf263;" horiz-adv-x="384"
+ <glyph glyph-name="fa-triangle-right" unicode="&#xf213;" horiz-adv-x="384"
d="M0 704l384 -384l-384 -384v768z" />
- <glyph glyph-name="fa-triangle-up" unicode="&#xf260;" horiz-adv-x="768"
+ <glyph glyph-name="fa-triangle-up" unicode="&#xf210;" horiz-adv-x="768"
d="M768 128h-768l384 384z" />
<glyph glyph-name="fa-undo" unicode="&#xf433;" horiz-adv-x="896"
d="M156 651c76 80 188 117 292 117c247 0 448 -201 448 -448s-201 -448 -448 -448c-166 0 -311 90 -388 224l110 64c65 -95 159 -160 278 -160c177 0 320 143 320 320s-143 320 -320 320c-71 0 -129 -25 -182 -64l168 -136l-434 -120v448z" />
- <glyph glyph-name="fa-unfold" unicode="&#xf430;" horiz-adv-x="896"
+ <glyph glyph-name="fa-unfold" unicode="&#xf42e;" horiz-adv-x="896"
d="M384 448v192h-128l192 192l192 -192h-128v-192h-128zM576 576h320v-64l-160 -160l160 -160v-64h-320v64h224l-128 128h-448l-128 -128h224v-64h-320v64l160 160l-160 160v64h320v-64h-224l128 -128h448l128 128h-224v64zM512 256v-192h128l-192 -192l-192 192h128v192
h128z" />
<glyph glyph-name="fa-unlink" unicode="&#xf615;" horiz-adv-x="960"
@@ -909,14 +908,14 @@ d="M629 501c50 -53 75 -113 75 -181s-25 -128 -75 -181c-7 -6 -14 -9 -22 -9c-17 0 -
c-7 -6 -14 -9 -23 -9c-17 0 -32 15 -32 32c0 9 3 16 9 23c13 13 19 28 19 45s-6 32 -19 45c-6 7 -9 14 -9 23c0 17 15 32 32 32c9 0 16 -3 23 -9zM384 640h64v-640h-64l-256 192h-128v256h128z" />
<glyph glyph-name="fa-volume-mute" unicode="&#xf399;" horiz-adv-x="864"
d="M128 448l256 192h64v-640h-64l-256 192h-128v256h128zM864 416l-96 -96l96 -96l-64 -64l-96 96l-96 -96l-64 64l96 96l-95 96l63 64l96 -96l96 96z" />
- <glyph glyph-name="fa-warning-block-o" unicode="&#xf30f;"
+ <glyph glyph-name="fa-warning-block-o" unicode="&#xf25f;"
d="M576 64h-128v128h128v-128zM576 256h-128v320h128v-320zM128 448v-256l256 -256h256l256 256v256l-256 256h-256zM320 -192l-320 320v384l320 320h384l320 -320v-384l-320 -320h-384z" />
- <glyph glyph-name="fa-warning-block" unicode="&#xf30e;"
+ <glyph glyph-name="fa-warning-block" unicode="&#xf25e;"
d="M448 192v-128h128v128h-128zM448 576v-320h128v320h-128zM320 -192l-320 320v384l320 320h384l320 -320v-384l-320 -320h-384z" />
- <glyph glyph-name="fa-warning-circle" unicode="&#xf30d;"
+ <glyph glyph-name="fa-warning-circle" unicode="&#xf25d;"
d="M512 -64c212 0 384 172 384 384s-172 384 -384 384s-384 -172 -384 -384s172 -384 384 -384zM40 518c26 63 63 118 110 165c95 95 226 149 362 149s267 -54 363 -149c95 -96 149 -227 149 -363c0 -137 -54 -267 -149 -362c-100 -100 -221 -150 -363 -150
c-139 0 -269 54 -362 150c-96 93 -150 223 -150 362c0 71 13 137 40 198zM448 192h128v-128h-128v128zM448 576h128v-320h-128v320z" />
- <glyph glyph-name="fa-warning-round" unicode="&#xf306;"
+ <glyph glyph-name="fa-warning-round" unicode="&#xf256;"
d="M576 64v128h-128v-128h128zM576 256v320h-128v-320h128zM40 518c26 63 63 118 110 165c95 95 226 149 362 149s267 -54 363 -149c95 -96 149 -227 149 -363c0 -137 -54 -267 -149 -362c-100 -100 -221 -150 -363 -150c-139 0 -269 54 -362 150c-96 93 -150 223 -150 362
c0 71 13 137 40 198z" />
<glyph glyph-name="fa-wrench" unicode="&#xf11c;" horiz-adv-x="996"
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/pontfonts/fonts/ponticons.ttf b/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/pontfonts/fonts/ponticons.ttf
index 0d7a1cc2a5..d093409689 100644
Binary files a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/pontfonts/fonts/ponticons.ttf and b/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/pontfonts/fonts/ponticons.ttf differ
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/pontfonts/fonts/ponticons.woff b/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/pontfonts/fonts/ponticons.woff
index ff2c88ea8d..9694eb8a90 100644
Binary files a/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/pontfonts/fonts/ponticons.woff and b/gitplex.web/src/main/java/com/pmease/gitplex/web/assets/pontfonts/fonts/ponticons.woff differ
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/RepositoryPage.html b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/RepositoryPage.html
index cb47053be5..a6487cc394 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/RepositoryPage.html
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/RepositoryPage.html
@@ -33,7 +33,7 @@
<label class="group">CODE</label>
<wicket:container wicket:id="codeTabs"></wicket:container>
<label class="group">PULL REQUESTS</label>
- <wicket:container wicket:id="requestTabs"></wicket:container>
+ <wicket:container wicket:id="requestsTabs"></wicket:container>
<wicket:enclosure child="adminTabs">
<label class="group">ADMINISTRATION</label>
<wicket:container wicket:id="adminTabs"></wicket:container>
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/RepositoryPage.java b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/RepositoryPage.java
index e09d1059e3..2a964b3974 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/RepositoryPage.java
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/RepositoryPage.java
@@ -209,8 +209,8 @@ public abstract class RepositoryPage extends AccountBasePage {
add(new Tabbable("codeTabs", codeTabs));
- List<Tab> requestTabs = new ArrayList<>();
- requestTabs.add(new RepositoryTab(Model.of("Open"), "fa fa-branch-merge", OpenRequestsPage.class) {
+ List<Tab> requestsTabs = new ArrayList<>();
+ requestsTabs.add(new RepositoryTab(Model.of("Open"), "fa fa-branch-merge", OpenRequestsPage.class) {
@Override
public boolean isActive(Page currentPage) {
@@ -223,7 +223,7 @@ public abstract class RepositoryPage extends AccountBasePage {
}
});
- requestTabs.add(new RepositoryTab(Model.of("Closed"), "fa fa-pull-request-close", ClosedRequestsPage.class) {
+ requestsTabs.add(new RepositoryTab(Model.of("Closed"), "fa fa-pull-request-close", ClosedRequestsPage.class) {
@Override
public boolean isActive(Page currentPage) {
@@ -236,9 +236,9 @@ public abstract class RepositoryPage extends AccountBasePage {
}
});
- requestTabs.add(new RepositoryTab(Model.of("Create"), "fa fa-pull-request-add", NewRequestPage.class));
+ requestsTabs.add(new RepositoryTab(Model.of("Create"), "fa fa-pull-request-add", NewRequestPage.class));
- add(new Tabbable("requestTabs", requestTabs));
+ add(new Tabbable("requestsTabs", requestsTabs));
List<Tab> adminTabs = Lists.newArrayList();
adminTabs.add(new RepositoryTab(Model.of("General Settings"), "fa fa-tools", GeneralSettingPage.class));
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/admin/integrationpolicy/IntegrationPolicyPanel.html b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/admin/integrationpolicy/IntegrationPolicyPanel.html
index c5afe1e5a0..762e991b1e 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/admin/integrationpolicy/IntegrationPolicyPanel.html
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/admin/integrationpolicy/IntegrationPolicyPanel.html
@@ -1,9 +1,9 @@
<wicket:panel>
<div class="policy panel panel-default">
<div class="panel-heading">
- <span class="handle" title="Drag to reorder policies"><i class="fa fa-table"></i></span>
- <a wicket:id="edit" title="Edit this policy"><i class="fa fa-pencil"></i></a>
- <a wicket:id="delete" title="Delete this policy"><i class="fa fa-times"></i></a>
+ <span class="handle" title="Drag to reorder policies"><i class="fa fa-grip fa-lg"></i></span>
+ <a wicket:id="edit" title="Edit this policy"><i class="fa fa-pencil fa"></i></a>
+ <a wicket:id="delete" title="Delete this policy"><i class="fa fa-times fa-lg"></i></a>
</div>
<div class="panel-body">
<div wicket:id="policy"></div>
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/NewRequestPage.java b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/NewRequestPage.java
index 2622885a7a..8eda0a06b3 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/NewRequestPage.java
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/NewRequestPage.java
@@ -39,15 +39,14 @@ import com.pmease.commons.wicket.component.tabbable.Tab;
import com.pmease.commons.wicket.component.tabbable.Tabbable;
import com.pmease.gitplex.core.GitPlex;
import com.pmease.gitplex.core.comment.InlineCommentSupport;
-import com.pmease.gitplex.core.gatekeeper.checkresult.Approved;
import com.pmease.gitplex.core.manager.BranchManager;
import com.pmease.gitplex.core.manager.PullRequestManager;
import com.pmease.gitplex.core.manager.UserManager;
import com.pmease.gitplex.core.model.Branch;
-import com.pmease.gitplex.core.model.IntegrationStrategy;
import com.pmease.gitplex.core.model.OldCommitComment;
import com.pmease.gitplex.core.model.PullRequest;
import com.pmease.gitplex.core.model.PullRequest.CloseStatus;
+import com.pmease.gitplex.core.model.PullRequest.IntegrationStrategy;
import com.pmease.gitplex.core.model.PullRequestUpdate;
import com.pmease.gitplex.core.model.Repository;
import com.pmease.gitplex.core.model.User;
@@ -136,13 +135,10 @@ public class NewRequestPage extends RepositoryPage implements CommitCommentsAwar
pullRequest.setIntegrationStrategy(strategies.get(0));
if (target.getRepository().equals(source.getRepository())) {
- pullRequest.setBaseCommitHash(pullRequest.git().calcMergeBase(target.getHeadCommitHash(), source.getHeadCommitHash()));
- if (target.getRepository().git().isAncestor(source.getHeadCommitHash(), target.getHeadCommitHash())) {
+ pullRequest.setBaseCommitHash(pullRequest.git().calcMergeBase(
+ target.getHeadCommitHash(), source.getHeadCommitHash()));
+ if (target.getRepository().git().isAncestor(source.getHeadCommitHash(), target.getHeadCommitHash()))
pullRequest.setCloseStatus(CloseStatus.INTEGRATED);
- pullRequest.setCheckResult(new Approved("Already integrated."));
- } else {
- pullRequest.setCheckResult(target.getRepository().getGateKeeper().checkRequest(pullRequest));
- }
} else {
Git sandbox = new Git(FileUtils.createTempDir());
pullRequest.setSandbox(sandbox);
@@ -153,12 +149,8 @@ public class NewRequestPage extends RepositoryPage implements CommitCommentsAwar
pullRequest.setBaseCommitHash(pullRequest.git().calcMergeBase(target.getHeadCommitHash(), source.getHeadCommitHash()));
- if (sandbox.isAncestor(source.getHeadCommitHash(), target.getHeadCommitHash())) {
+ if (sandbox.isAncestor(source.getHeadCommitHash(), target.getHeadCommitHash()))
pullRequest.setCloseStatus(CloseStatus.INTEGRATED);
- pullRequest.setCheckResult(new Approved("Already integrated."));
- } else {
- pullRequest.setCheckResult(target.getRepository().getGateKeeper().checkRequest(pullRequest));
- }
}
}
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/RequestActivitiesPage.html b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/RequestActivitiesPage.html
index c484deb826..8480ff4ff9 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/RequestActivitiesPage.html
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/RequestActivitiesPage.html
@@ -1,6 +1,6 @@
<wicket:extend>
<table class="activities">
- <tr wicket:id="activities" class="activity">
+ <tr wicket:id="requestActivities" class="activity">
<td wicket:id="avatar" class="avatar"></td>
<td wicket:id="activity" class="activity"></td>
</tr>
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/RequestActivitiesPage.java b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/RequestActivitiesPage.java
index 893213c2a7..738ae62acd 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/RequestActivitiesPage.java
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/RequestActivitiesPage.java
@@ -26,10 +26,7 @@ import com.pmease.commons.wicket.component.markdown.MarkdownInput;
import com.pmease.gitplex.core.GitPlex;
import com.pmease.gitplex.core.manager.UserManager;
import com.pmease.gitplex.core.model.PullRequest;
-import com.pmease.gitplex.core.model.PullRequestAction.Approve;
-import com.pmease.gitplex.core.model.PullRequestAction.Disapprove;
-import com.pmease.gitplex.core.model.PullRequestAction.Discard;
-import com.pmease.gitplex.core.model.PullRequestAction.Integrate;
+import static com.pmease.gitplex.core.model.PullRequestOperation.*;
import com.pmease.gitplex.core.model.PullRequestAudit;
import com.pmease.gitplex.core.model.PullRequestComment;
import com.pmease.gitplex.core.model.PullRequestUpdate;
@@ -146,7 +143,7 @@ public class RequestActivitiesPage extends RequestDetailPage {
}
private Component newActivitiesView() {
- activitiesView = new RepeatingView("activities");
+ activitiesView = new RepeatingView("requestActivities");
activitiesView.setOutputMarkupId(true);
PullRequest request = getPullRequest();
@@ -161,18 +158,16 @@ public class RequestActivitiesPage extends RequestDetailPage {
activities.add(new CommentPullRequest(comment));
for (PullRequestAudit audit: request.getAudits()) {
- if (audit.getAction() instanceof Integrate) {
- Integrate integrate = (Integrate) audit.getAction();
- activities.add(new IntegratePullRequest(audit.getUser(), audit.getDate(),
- integrate.getReason()));
- } else if (audit.getAction() instanceof Discard) {
+ if (audit.getOperation() == INTEGRATE) {
+ activities.add(new IntegratePullRequest(audit.getUser(), audit.getDate()));
+ } else if (audit.getOperation() == DISCARD) {
activities.add(new DiscardPullRequest(audit.getUser(), audit.getDate()));
- } else if (audit.getAction() instanceof Approve) {
+ } else if (audit.getOperation() == APPROVE) {
activities.add(new ApprovePullRequest(audit.getRequest(), audit.getUser(), audit.getDate()));
- } else if (audit.getAction() instanceof Disapprove) {
+ } else if (audit.getOperation() == DISAPPROVE) {
activities.add(new DisapprovePullRequest(audit.getRequest(), audit.getUser(), audit.getDate()));
} else {
- throw new IllegalStateException("Unexpected audit action: " + audit.getAction());
+ throw new IllegalStateException("Unexpected audit operation: " + audit.getOperation());
}
}
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/RequestComparePage.java b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/RequestComparePage.java
index af5278458d..625df33713 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/RequestComparePage.java
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/RequestComparePage.java
@@ -45,9 +45,10 @@ import com.pmease.gitplex.core.GitPlex;
import com.pmease.gitplex.core.comment.InlineComment;
import com.pmease.gitplex.core.comment.InlineCommentSupport;
import com.pmease.gitplex.core.comment.InlineContext;
+import com.pmease.gitplex.core.manager.PullRequestManager;
import com.pmease.gitplex.core.manager.UserManager;
import com.pmease.gitplex.core.model.InlineInfo;
-import com.pmease.gitplex.core.model.IntegrationInfo;
+import com.pmease.gitplex.core.model.IntegrationPreview;
import com.pmease.gitplex.core.model.PullRequest;
import com.pmease.gitplex.core.model.PullRequestComment;
import com.pmease.gitplex.core.model.PullRequestUpdate;
@@ -114,13 +115,13 @@ public class RequestComparePage extends RequestDetailPage {
choices.put(targetHead, description);
}
- IntegrationInfo integrationInfo = request.getIntegrationInfo();
- if (request.isOpen()
- && integrationInfo.getIntegrationHead() != null
- && !integrationInfo.getIntegrationHead().equals(integrationInfo.getRequestHead())) {
- Commit commit = getRepository().getCommit(request.getIntegrationInfo().getIntegrationHead());
- choices.put(request.getIntegrationInfo().getIntegrationHead(),
- new CommitDescription(INTEGRATION_PREVIEW, commit.getSubject()));
+ if (request.isOpen()) {
+ IntegrationPreview preview = GitPlex.getInstance(PullRequestManager.class).previewIntegration(request);
+ if (preview != null && preview.getIntegrated() != null
+ && !getRepository().getChanges(preview.getRequestHead(), preview.getIntegrated()).isEmpty()) {
+ Commit commit = getRepository().getCommit(preview.getIntegrated());
+ choices.put(commit.getHash(), new CommitDescription(INTEGRATION_PREVIEW, commit.getSubject()));
+ }
}
return choices;
@@ -185,13 +186,13 @@ public class RequestComparePage extends RequestDetailPage {
protected void onInitialize() {
super.onInitialize();
- WebMarkupContainer options = new WebMarkupContainer("compareOptions");
- options.add(new StickyBehavior());
+ WebMarkupContainer optionsContainer = new WebMarkupContainer("compareOptions");
+ optionsContainer.add(new StickyBehavior());
- add(options);
+ add(optionsContainer);
WebMarkupContainer oldSelector = new WebMarkupContainer("oldSelector");
- options.add(oldSelector);
+ optionsContainer.add(oldSelector);
oldSelector.add(new Label("label", new LoadableDetachableModel<String>() {
@Override
@@ -223,11 +224,11 @@ public class RequestComparePage extends RequestDetailPage {
}
};
- options.add(oldChoicesDropdown);
+ optionsContainer.add(oldChoicesDropdown);
oldSelector.add(new DropdownBehavior(oldChoicesDropdown).alignWithTrigger(0, 0, 0, 100));
WebMarkupContainer newSelector = new WebMarkupContainer("newSelector");
- options.add(newSelector);
+ optionsContainer.add(newSelector);
newSelector.add(new Label("label", new LoadableDetachableModel<String>() {
@Override
@@ -260,7 +261,7 @@ public class RequestComparePage extends RequestDetailPage {
}
};
- options.add(newChoicesDropdown);
+ optionsContainer.add(newChoicesDropdown);
newSelector.add(new DropdownBehavior(newChoicesDropdown).alignWithTrigger(0, 0, 0, 100));
MenuPanel commonComparisons = new MenuPanel("comparisonChoices") {
@@ -305,26 +306,27 @@ public class RequestComparePage extends RequestDetailPage {
}
});
-
- final IntegrationInfo integrationInfo = getPullRequest().getIntegrationInfo();
- if (getPullRequest().isOpen()
- && integrationInfo.getIntegrationHead() != null
- && !integrationInfo.getIntegrationHead().equals(integrationInfo.getRequestHead())
- && integrationInfo.hasChanges()) {
- items.add(new ComparisonChoiceItem("Latest Update", "Integration Preview") {
- @Override
- protected void onSelect() {
- PageParameters params = paramsOf(getPullRequest(),
- getPullRequest().getLatestUpdate().getHeadCommitHash(),
- integrationInfo.getIntegrationHead(),
- file, getConcernedComment());
- setResponsePage(RequestComparePage.class, params);
- }
-
- });
+ PullRequest request = getPullRequest();
+ if (request.isOpen()) {
+ final IntegrationPreview preview = GitPlex.getInstance(PullRequestManager.class).previewIntegration(request);
+ if (preview != null && preview.getIntegrated() != null
+ && !getRepository().getChanges(preview.getRequestHead(), preview.getIntegrated()).isEmpty()) {
+ items.add(new ComparisonChoiceItem("Latest Update", "Integration Preview") {
+
+ @Override
+ protected void onSelect() {
+ PageParameters params = paramsOf(getPullRequest(),
+ getPullRequest().getLatestUpdate().getHeadCommitHash(),
+ preview.getIntegrated(),
+ file, getConcernedComment());
+ setResponsePage(RequestComparePage.class, params);
+ }
+
+ });
+ }
}
-
+
for (int i=0; i<getPullRequest().getSortedUpdates().size(); i++) {
PullRequestUpdate update = getPullRequest().getSortedUpdates().get(i);
final String baseCommit = update.getBaseCommitHash();
@@ -353,12 +355,12 @@ public class RequestComparePage extends RequestDetailPage {
};
- options.add(commonComparisons);
- options.add(new WebMarkupContainer("comparisonSelector")
+ optionsContainer.add(commonComparisons);
+ optionsContainer.add(new WebMarkupContainer("comparisonSelector")
.add(new MenuBehavior(commonComparisons)
.alignWithTrigger(50, 100, 50, 0)));
- options.add(new CheckBox("changedOnly", new LoadableDetachableModel<Boolean>() {
+ optionsContainer.add(new CheckBox("changedOnly", new LoadableDetachableModel<Boolean>() {
@Override
protected Boolean load() {
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/RequestDetailPage.html b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/RequestDetailPage.html
index 7f3afe51f3..a20b071786 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/RequestDetailPage.html
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/RequestDetailPage.html
@@ -1,42 +1,101 @@
<wicket:extend>
<div class="request-detail">
- <div wicket:id="head" class="head clearfix">
- <div wicket:id="title" class="pull-left"></div>
- <div wicket:id="id" class="id pull-left"></div>
- <wicket:enclosure child="editTitle">
- <div class="pull-left actions">
- <a wicket:id="editTitle" title="Edit title" class="fa fa-pencil" href="javascript:void(0);"></a>
+ <div class="overview">
+ <div wicket:id="requestTitle" class="title clearfix">
+ <div wicket:id="title" class="title pull-left"></div>
+ <div wicket:id="id" class="id pull-left"></div>
+ <a wicket:id="editLink" title="Edit title" class="edit"><i class="fa fa-pencil"></i></a>
+ <form wicket:id="editForm" class="pull-left form-inline">
+ <input wicket:id="title" type="text" placeholder="Input title" class="form-control input-sm"></input>
+ <input wicket:id="save" type="submit" value="Save" class="btn btn-sm btn-primary"/>
+ <input wicket:id="cancel" type="button" value="Cancel" class="btn btn-sm btn-default"/>
+ </form>
</div>
- </wicket:enclosure>
- <form wicket:id="titleEditor" class="pull-left form-inline">
- <input wicket:id="title" type="text" placeholder="Input title" class="form-control input-sm"></input>
- <input wicket:id="save" type="submit" value="Save" class="btn btn-sm btn-primary"/>
- <input wicket:id="cancel" type="button" value="Cancel" class="btn btn-sm btn-default"/>
- </form>
- </div>
- <div class="summary">
- <span wicket:id="user"></span>
- wants to pull into
- <span wicket:id="targetBranch"></span>
- <wicket:enclosure child="sourceBranch">
- from
- <span wicket:id="sourceBranch"></span>
- </wicket:enclosure>
- <span wicket:id="date"></span>
- </div>
- <div wicket:id="status" class="status"></div>
- <!-- separate actions from status component as status component will be recreated
- upon page refreshing, and this will cause confirm comments and action feedbacks not
- being displayed in case there are errors carrying out some actions. -->
- <div wicket:id="actions" class="actions">
- <div class="buttons">
- <a wicket:id="approve" class="btn btn-primary" href="javascript:void(0);">Approve</a>
- <a wicket:id="disapprove" class="btn btn-primary" href="javascript:void(0);">Disapprove</a>
- <a wicket:id="integrate" class="btn btn-success">Integrate</a>
- <a wicket:id="discard" class="btn btn-danger">Discard</a>
+ <div class="origin">
+ <span wicket:id="requestSubmitter"></span>
+ wants to pull into
+ <span wicket:id="targetBranch"></span>
+ <wicket:enclosure child="sourceBranch">
+ from
+ <span wicket:id="sourceBranch"></span>
+ </wicket:enclosure>
+ <span wicket:id="requestDate"></span>
+ </div>
+ <div wicket:id="requestStatus" class="status">
+ <div wicket:id="summary" class="summary"></div>
+ <div class="detail">
+ <div wicket:id="fastForwarded">
+ Target branch was fast forwarded to this request.
+ </div>
+ <div wicket:id="merged">
+ Target branch was merged with this request.
+ </div>
+ <div wicket:id="mergedOutside">
+ Head commit of this request was merged into target branch outside of this pull request.
+ </div>
+ <div wicket:id="sourceRebased">
+ <p>Source branch <span wicket:id="source"></span> was rebased on top
+ of target branch <span wicket:id="target"></span>, and then target
+ branch was fast forwarded to rebased result per the integration
+ strategy.</p>
+ <p>If you have a local branch whose upstream tracking branch
+ points to source branch, please run this command to do the sync:
+ <kbd>git fetch origin && git rebase</kbd>
+ </p>
+ </div>
+ <div wicket:id="targetRebased">
+ <p>Target branch <span wicket:id="target"></span> was rebased on top of
+ this request per the integration strategy.</p>
+ <p>If you have a local branch whose upstream tracking
+ branch points to target branch, please run this command to do the sync:
+ <kbd>git fetch origin && git rebase</kbd>
+ </p>
+ </div>
+ <div wicket:id="discarded"></div>
+ <wicket:enclosure child="reasons">
+ <div class="reasons">
+ <div wicket:id="reasons" class="reason"><span wicket:id="reason"></span></div>
+ </div>
+ </wicket:enclosure>
+ </div>
+ </div>
+ <div wicket:id="requestIntegration" class="integration">
+ <div class="strategy clearfix">
+ <div class="pull-left">Integration Strategy:</div>
+ <div class="pull-left"><select wicket:id="strategySelect" class="form-control input-sm"></select></div>
+ <div wicket:id="strategyLabel" class="pull-left"></div>
+ <div wicket:id="strategyHelp" class="pull-left fa fa-question-circle pointer"></div>
+ </div>
+ <div class="preview">
+ <div wicket:id="calculating" class="well">
+ <img src="/assets/img/ajax-loader.gif"></img> Calculating integration preview...
+ </div>
+ <div wicket:id="noConflict" class="alert alert-success">
+ <span>Able to integrate without conflicts.</span>
+ <wicket:enclosure child="preview">
+ <span class="fa fa-arrow-right"></span> <a wicket:id="preview">Preview</a> the integration result.
+ </wicket:enclosure>
+ <wicket:enclosure child="verification">
+ <span class="fa fa-arrow-right"></span> Build of the integration is <span wicket:id="verification"></span>
+ </wicket:enclosure>
+ </div>
+ <div wicket:id="conflict" class="alert alert-warning">
+ <span>There are integration conflicts.</span>
+ <wicket:enclosure child="resolveInstructionsTrigger">
+ Please follow <a wicket:id="resolveInstructionsTrigger" href="javascript:void(0);">this instruction</a> to resolve the conflicts.
+ <div wicket:id="resolveInstructions"></div>
+ </wicket:enclosure>
+ </div>
+ </div>
</div>
- <div class="confirm">
- <form wicket:id="confirm">
+ <div wicket:id="requestOperations" class="operations">
+ <div class="buttons">
+ <a wicket:id="approve" class="btn btn-primary" href="javascript:void(0);">Approve</a>
+ <a wicket:id="disapprove" class="btn btn-primary" href="javascript:void(0);">Disapprove</a>
+ <a wicket:id="integrate" class="btn btn-success">Integrate</a>
+ <a wicket:id="discard" class="btn btn-danger">Discard</a>
+ </div>
+ <form wicket:id="confirm" class="confirm">
<div wicket:id="comment"></div>
<div wicket:id="feedback"></div>
<input wicket:id="submit" type="submit" value="Confirm" class="btn"></input>
@@ -44,91 +103,8 @@
</form>
</div>
</div>
- <div wicket:id="tabs" class="tabs"></div>
+ <div wicket:id="requestTabs" class="tabs"></div>
<wicket:child></wicket:child>
<div wicket:id="backToTop"></div>
</div>
- <wicket:fragment wicket:id="integratedFrag">
- <div class="integrated alert alert-success">
- <div class="summary">
- <span class="fa fa-2x fa-check-circle"></span>
- <span class="message">This request has been integrated.</span>
- </div>
- <div wicket:id="detail" class="detail"></div>
- </div>
- </wicket:fragment>
- <wicket:fragment wicket:id="sourceRebasedFrag">
- <p>Source branch <span wicket:id="source"></span> was rebased on top
- of target branch <span wicket:id="target"></span>, and then target
- branch was fast forwarded to rebased result per the integration
- strategy.</p>
- <p>If you have a local branch whose upstream tracking branch
- points to source branch, please run this command to do the sync:
- <kbd>git fetch origin && git rebase</kbd>
- </p>
- </wicket:fragment>
- <wicket:fragment wicket:id="targetRebasedFrag">
- <p>Target branch <span wicket:id="target"></span> was rebased on top of
- this request per the integration strategy.</p>
- <p>If you have a local branch whose upstream tracking
- branch points to target branch, please run this command to do the sync:
- <kbd>git fetch origin && git rebase</kbd>
- </p>
- </wicket:fragment>
- <wicket:fragment wicket:id="discardedFrag">
- <div class="discarded alert alert-danger">
- <div class="summary">
- <span class="fa fa-2x fa-times-circle"></span>
- <span class="message">This request has been discarded.</span>
- </div>
- </div>
- </wicket:fragment>
- <wicket:fragment wicket:id="openFrag">
- <div class="open">
- <div class="table">
- <div class="tr">
- <div wicket:id="checkResult" class="td check-result">
- <div class="summary">
- <span class="fa fa-2x fa-warning"></span>
- <span class="fa fa-2x fa-info-circle"></span>
- <span wicket:id="message" class="message"></span>
- </div>
- <wicket:enclosure child="reasons">
- <ul class="detail">
- <li wicket:id="reasons"><span wicket:id="reason"></span></li>
- </ul>
- </wicket:enclosure>
- </div>
- <div wicket:id="integrationInfo" class="td integration-info"></div>
- </div>
- </div>
- </div>
- </wicket:fragment>
- <wicket:fragment wicket:id="canIntegrateFrag">
- <div class="summary">
- <span class="fa fa-2x fa-check-circle"></span>
- <span class="message">Able to integrate.</span>
- </div>
- <div class="detail">
- <span wicket:id="message"></span>
- <wicket:enclosure child="preview">
- <span class="fa fa-hand-o-right"></span> <a wicket:id="preview">Preview</a> the integration result.
- </wicket:enclosure>
- <wicket:enclosure child="verification">
- <span class="fa fa-hand-o-right"></span> Build of the integration is <span wicket:id="verification"></span>
- </wicket:enclosure>
- </div>
- </wicket:fragment>
- <wicket:fragment wicket:id="integrateConflictFrag">
- <div class="summary">
- <span class="fa fa-2x fa-exclamation-triangle pull-left"></span>
- <span class="message">Integration conflicts detected.</span>
- </div>
- <div class="detail">
- <span wicket:id="message"></span> Please follow
- <a wicket:id="resolveInstructionsTrigger" href="javascript:void(0);">this instruction</a>
- to resolve the conflicts.
- <div wicket:id="resolveInstructions"></div>
- </div>
- </wicket:fragment>
</wicket:extend>
\ No newline at end of file
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/RequestDetailPage.java b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/RequestDetailPage.java
index 064003a165..efc6c3730d 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/RequestDetailPage.java
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/RequestDetailPage.java
@@ -1,9 +1,17 @@
package com.pmease.gitplex.web.page.repository.pullrequest;
-import static com.pmease.gitplex.core.model.IntegrationStrategy.MERGE_ALWAYS;
-import static com.pmease.gitplex.core.model.IntegrationStrategy.MERGE_IF_NECESSARY;
-import static com.pmease.gitplex.core.model.IntegrationStrategy.REBASE_SOURCE;
-import static com.pmease.gitplex.core.model.IntegrationStrategy.REBASE_TARGET;
+import static com.pmease.gitplex.core.model.PullRequest.IntegrationStrategy.MERGE_ALWAYS;
+import static com.pmease.gitplex.core.model.PullRequest.IntegrationStrategy.MERGE_IF_NECESSARY;
+import static com.pmease.gitplex.core.model.PullRequest.IntegrationStrategy.REBASE_SOURCE_BRANCH;
+import static com.pmease.gitplex.core.model.PullRequest.IntegrationStrategy.REBASE_TARGET_BRANCH;
+import static com.pmease.gitplex.core.model.PullRequest.Status.DISCARDED;
+import static com.pmease.gitplex.core.model.PullRequest.Status.INTEGRATED;
+import static com.pmease.gitplex.core.model.PullRequest.Status.PENDING_INTEGRATE;
+import static com.pmease.gitplex.core.model.PullRequest.Status.PENDING_UPDATE;
+import static com.pmease.gitplex.core.model.PullRequestOperation.APPROVE;
+import static com.pmease.gitplex.core.model.PullRequestOperation.DISAPPROVE;
+import static com.pmease.gitplex.core.model.PullRequestOperation.DISCARD;
+import static com.pmease.gitplex.core.model.PullRequestOperation.INTEGRATE;
import java.util.ArrayList;
import java.util.Date;
@@ -11,25 +19,27 @@ import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.text.WordUtils;
-import org.apache.shiro.authz.UnauthorizedException;
+import org.apache.shiro.SecurityUtils;
import org.apache.wicket.AttributeModifier;
import org.apache.wicket.Component;
import org.apache.wicket.Page;
import org.apache.wicket.RestartResponseException;
import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.OnChangeAjaxBehavior;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.ajax.markup.html.form.AjaxButton;
import org.apache.wicket.behavior.AttributeAppender;
+import org.apache.wicket.markup.ComponentTag;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
-import org.apache.wicket.markup.html.form.Button;
+import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.FormComponent;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;
-import org.apache.wicket.markup.html.panel.Fragment;
import org.apache.wicket.model.AbstractReadOnlyModel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.LoadableDetachableModel;
@@ -38,6 +48,7 @@ import org.apache.wicket.request.mapper.parameter.PageParameters;
import org.eclipse.jgit.lib.PersonIdent;
import com.pmease.commons.hibernate.dao.Dao;
+import com.pmease.commons.wicket.behavior.TooltipBehavior;
import com.pmease.commons.wicket.behavior.dropdown.DropdownBehavior;
import com.pmease.commons.wicket.behavior.dropdown.DropdownPanel;
import com.pmease.commons.wicket.component.backtotop.BackToTop;
@@ -49,16 +60,15 @@ import com.pmease.commons.wicket.component.tabbable.Tab;
import com.pmease.commons.wicket.component.tabbable.Tabbable;
import com.pmease.gitplex.core.GitPlex;
import com.pmease.gitplex.core.manager.AuthorizationManager;
+import com.pmease.gitplex.core.manager.PullRequestManager;
import com.pmease.gitplex.core.model.Branch;
-import com.pmease.gitplex.core.model.IntegrationInfo;
-import com.pmease.gitplex.core.model.IntegrationStrategy;
-import com.pmease.gitplex.core.model.OldCommitComment;
+import com.pmease.gitplex.core.model.IntegrationPreview;
import com.pmease.gitplex.core.model.PullRequest;
-import com.pmease.gitplex.core.model.PullRequest.Status;
+import com.pmease.gitplex.core.model.PullRequest.IntegrationStrategy;
+import com.pmease.gitplex.core.model.PullRequestOperation;
import com.pmease.gitplex.core.model.User;
import com.pmease.gitplex.core.model.Verification;
-import com.pmease.gitplex.core.pullrequest.RequestOperateException;
-import com.pmease.gitplex.core.pullrequest.RequestOperation;
+import com.pmease.gitplex.core.permission.ObjectPermission;
import com.pmease.gitplex.web.component.branch.BranchLink;
import com.pmease.gitplex.web.component.label.AgeLabel;
import com.pmease.gitplex.web.component.user.AvatarMode;
@@ -66,16 +76,18 @@ import com.pmease.gitplex.web.component.user.PersonLink;
import com.pmease.gitplex.web.model.EntityModel;
import com.pmease.gitplex.web.page.repository.NoCommitsPage;
import com.pmease.gitplex.web.page.repository.RepositoryPage;
-import com.pmease.gitplex.web.page.repository.code.commit.diff.CommitCommentsAware;
+
+import de.agilecoders.wicket.core.markup.html.bootstrap.components.TooltipConfig;
+import de.agilecoders.wicket.core.markup.html.bootstrap.components.TooltipConfig.Placement;
@SuppressWarnings("serial")
-public abstract class RequestDetailPage extends RepositoryPage implements CommitCommentsAware {
+public abstract class RequestDetailPage extends RepositoryPage {
protected IModel<PullRequest> requestModel;
private boolean editingTitle;
- private RequestOperation actionToConfirm;
+ private PullRequestOperation operationToConfirm;
public RequestDetailPage(final PageParameters params) {
super(params);
@@ -100,11 +112,11 @@ public abstract class RequestDetailPage extends RepositoryPage implements Commit
PullRequest request = getPullRequest();
- final WebMarkupContainer head = new WebMarkupContainer("head");
- head.setOutputMarkupId(true);
- add(head);
+ final WebMarkupContainer requestTitle = new WebMarkupContainer("requestTitle");
+ requestTitle.setOutputMarkupId(true);
+ add(requestTitle);
- head.add(new Label("title", new AbstractReadOnlyModel<String>() {
+ requestTitle.add(new Label("title", new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
@@ -121,7 +133,7 @@ public abstract class RequestDetailPage extends RepositoryPage implements Commit
});
- head.add(new Label("id", "#" + request.getId()) {
+ requestTitle.add(new Label("id", "#" + request.getId()) {
@Override
protected void onConfigure() {
@@ -131,13 +143,13 @@ public abstract class RequestDetailPage extends RepositoryPage implements Commit
});
- head.add(new AjaxLink<Void>("editTitle") {
+ requestTitle.add(new AjaxLink<Void>("editLink") {
@Override
public void onClick(AjaxRequestTarget target) {
editingTitle = true;
- target.add(head);
+ target.add(requestTitle);
}
@Override
@@ -150,7 +162,7 @@ public abstract class RequestDetailPage extends RepositoryPage implements Commit
});
- Form<?> form = new Form<Void>("titleEditor") {
+ Form<?> form = new Form<Void>("editForm") {
@Override
protected void onConfigure() {
@@ -159,7 +171,7 @@ public abstract class RequestDetailPage extends RepositoryPage implements Commit
}
};
- head.add(form);
+ requestTitle.add(form);
form.add(new TextField<String>("title", new IModel<String>() {
@@ -193,7 +205,7 @@ public abstract class RequestDetailPage extends RepositoryPage implements Commit
editingTitle = false;
}
- target.add(head);
+ target.add(requestTitle);
}
});
@@ -204,7 +216,7 @@ public abstract class RequestDetailPage extends RepositoryPage implements Commit
public void onClick(AjaxRequestTarget target) {
editingTitle = false;
- target.add(head);
+ target.add(requestTitle);
}
});
@@ -212,9 +224,9 @@ public abstract class RequestDetailPage extends RepositoryPage implements Commit
User submitter = request.getSubmitter();
if (submitter != null) {
PersonIdent person = new PersonIdent(submitter.getName(), submitter.getEmail());
- add(new PersonLink("user", Model.of(person), AvatarMode.NAME_AND_AVATAR));
+ add(new PersonLink("requestSubmitter", Model.of(person), AvatarMode.NAME_AND_AVATAR));
} else {
- add(new Label("<i>System</i>").setEscapeModelStrings(false));
+ add(new Label("requestSubmitter", "<i>System</i>").setEscapeModelStrings(false));
}
add(new BranchLink("targetBranch", new EntityModel<Branch>(request.getTarget())));
@@ -223,7 +235,7 @@ public abstract class RequestDetailPage extends RepositoryPage implements Commit
branchLink.setVisible(request.getSource() != null);
add(branchLink);
- add(new AgeLabel("date", new AbstractReadOnlyModel<Date>() {
+ add(new AgeLabel("requestDate", new AbstractReadOnlyModel<Date>() {
@Override
public Date getObject() {
@@ -232,73 +244,95 @@ public abstract class RequestDetailPage extends RepositoryPage implements Commit
}));
- final WebMarkupContainer actionsContainer = new WebMarkupContainer("actions");
- actionsContainer.setOutputMarkupId(true);
- add(actionsContainer);
+ add(newStatusContainer());
+ add(newIntegrationContainer());
+ add(newOperationsContainer());
+
+ List<Tab> tabs = new ArrayList<>();
+
+ tabs.add(new RequestTab("Discussions", RequestActivitiesPage.class));
+ tabs.add(new RequestTab("Updates", RequestUpdatesPage.class));
+ tabs.add(new RequestTab("Compare", RequestComparePage.class));
+
+ add(new Tabbable("requestTabs", tabs) {
+
+ @Override
+ protected String getCssClasses() {
+ return "nav nav-tabs";
+ }
+
+ }.setOutputMarkupId(true));
+
+ add(new BackToTop("backToTop"));
+ }
+
+ private WebMarkupContainer newOperationsContainer() {
+ final WebMarkupContainer operationsContainer = new WebMarkupContainer("requestOperations");
+ operationsContainer.setOutputMarkupId(true);
- actionsContainer.add(new AjaxLink<Void>("approve") {
+ operationsContainer.add(new AjaxLink<Void>("approve") {
@Override
public void onClick(AjaxRequestTarget target) {
- actionToConfirm = RequestOperation.APPROVE;
- target.add(actionsContainer);
+ operationToConfirm = APPROVE;
+ target.add(operationsContainer);
}
@Override
protected void onConfigure() {
super.onConfigure();
- setVisible(RequestOperation.APPROVE.canOperate(getPullRequest()));
+ setVisible(APPROVE.canOperate(getPullRequest()) && operationToConfirm == null);
}
});
- actionsContainer.add(new AjaxLink<Void>("disapprove") {
+ operationsContainer.add(new AjaxLink<Void>("disapprove") {
@Override
public void onClick(AjaxRequestTarget target) {
- actionToConfirm = RequestOperation.DISAPPROVE;
- target.add(actionsContainer);
+ operationToConfirm = DISAPPROVE;
+ target.add(operationsContainer);
}
@Override
protected void onConfigure() {
super.onConfigure();
- setVisible(RequestOperation.DISAPPROVE.canOperate(getPullRequest()));
+ setVisible(DISAPPROVE.canOperate(getPullRequest()) && operationToConfirm == null);
}
});
- actionsContainer.add(new AjaxLink<Void>("integrate") {
+ operationsContainer.add(new AjaxLink<Void>("integrate") {
@Override
public void onClick(AjaxRequestTarget target) {
- actionToConfirm = RequestOperation.INTEGRATE;
- target.add(actionsContainer);
+ operationToConfirm = INTEGRATE;
+ target.add(operationsContainer);
}
@Override
protected void onConfigure() {
super.onConfigure();
- setVisible(RequestOperation.INTEGRATE.canOperate(getPullRequest()));
+ setVisible(INTEGRATE.canOperate(getPullRequest()) && operationToConfirm == null);
}
});
- actionsContainer.add(new AjaxLink<Void>("discard") {
+ operationsContainer.add(new AjaxLink<Void>("discard") {
@Override
public void onClick(AjaxRequestTarget target) {
- actionToConfirm = RequestOperation.DISCARD;
- target.add(actionsContainer);
+ operationToConfirm = DISCARD;
+ target.add(operationsContainer);
}
@Override
protected void onConfigure() {
super.onConfigure();
- setVisible(RequestOperation.DISCARD.canOperate(getPullRequest()));
+ setVisible(DISCARD.canOperate(getPullRequest()) && operationToConfirm == null);
}
});
@@ -308,52 +342,52 @@ public abstract class RequestDetailPage extends RepositoryPage implements Commit
@Override
protected void onConfigure() {
super.onConfigure();
- setVisible(actionToConfirm != null);
+ setVisible(operationToConfirm != null);
}
};
- actionsContainer.add(confirmForm);
+ operationsContainer.add(confirmForm);
- final MarkdownInput commentInput = new MarkdownInput("comment", Model.of(""));
+ final FormComponent<String> commentInput = new MarkdownInput("comment", Model.of(""));
confirmForm.add(commentInput);
confirmForm.add(new FeedbackPanel("feedback", confirmForm));
- confirmForm.add(new Button("submit") {
+ confirmForm.add(new AjaxButton("submit") {
@Override
- public void onSubmit() {
- super.onSubmit();
+ protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
+ super.onSubmit(target, form);
- String actionName = actionToConfirm.name().toLowerCase();
+ String actionName = operationToConfirm.name().toLowerCase();
PullRequest request = getPullRequest();
try {
- actionToConfirm.checkOperate(request);
- actionToConfirm.operate(request, commentInput.getModelObject());
- actionToConfirm = null;
+ operationToConfirm.operate(request, commentInput.getModelObject());
+ operationToConfirm = null;
commentInput.setModelObject(null);
- } catch (UnauthorizedException e) {
- error("Unable to " + actionName + ": Permission denied.");
- } catch (RequestOperateException e) {
+
+ setResponsePage(getPage().getClass(), paramsOf(getPullRequest()));
+ } catch (Exception e) {
error("Unable to " + actionName + ": " + e.getMessage());
+ target.add(operationsContainer);
}
}
-
+
}.add(AttributeModifier.replace("value", new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
- return "Confirm " + WordUtils.capitalizeFully(actionToConfirm.name());
+ return "Confirm " + WordUtils.capitalizeFully(operationToConfirm.name());
}
})).add(AttributeAppender.append("class", new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
- if (actionToConfirm == RequestOperation.APPROVE)
+ if (operationToConfirm == APPROVE)
return "btn-primary";
- else if (actionToConfirm == RequestOperation.DISAPPROVE)
+ else if (operationToConfirm == DISAPPROVE)
return "btn-primary";
- else if (actionToConfirm == RequestOperation.INTEGRATE)
+ else if (operationToConfirm == INTEGRATE)
return "btn-success";
else
return "btn-danger";
@@ -364,221 +398,416 @@ public abstract class RequestDetailPage extends RepositoryPage implements Commit
@Override
public void onClick(AjaxRequestTarget target) {
- actionToConfirm = null;
+ operationToConfirm = null;
commentInput.setModelObject(null);
- target.add(actionsContainer);
+ target.add(operationsContainer);
}
});
- List<Tab> tabs = new ArrayList<>();
+ return operationsContainer;
+ }
+
+ private WebMarkupContainer newIntegrationContainer() {
+ final WebMarkupContainer integrationContainer = new WebMarkupContainer("requestIntegration") {
+
+ @Override
+ protected void onConfigure() {
+ super.onConfigure();
+ setVisible(getPullRequest().isOpen());
+ }
+
+ };
+ integrationContainer.setOutputMarkupId(true);
- tabs.add(new RequestTab("Discussions", RequestActivitiesPage.class));
- tabs.add(new RequestTab("Updates", RequestUpdatesPage.class));
- tabs.add(new RequestTab("Compare", RequestComparePage.class));
- add(new Tabbable("tabs", tabs) {
+ PullRequest request = getPullRequest();
+
+ final List<IntegrationStrategy> strategies =
+ GitPlex.getInstance(PullRequestManager.class).getApplicableIntegrationStrategies(request);
+ IModel<IntegrationStrategy> strategyModel = new IModel<IntegrationStrategy>() {
@Override
- protected String getCssClasses() {
- return "nav nav-tabs";
+ public void detach() {
+ }
+
+ @Override
+ public IntegrationStrategy getObject() {
+ return getPullRequest().getIntegrationStrategy();
+ }
+
+ @Override
+ public void setObject(IntegrationStrategy object) {
+ getPullRequest().setIntegrationStrategy(object);
+ }
+
+ };
+
+ DropDownChoice<IntegrationStrategy> strategySelect =
+ new DropDownChoice<IntegrationStrategy>("strategySelect", strategyModel, strategies) {
+
+ @Override
+ protected void onConfigure() {
+ super.onConfigure();
+
+ ObjectPermission writePermission = ObjectPermission.ofRepositoryWrite(getRepository());
+ setVisible(SecurityUtils.getSubject().isPermitted(writePermission) && strategies.size() > 1);
+ }
+
+ };
+ strategySelect.add(new OnChangeAjaxBehavior() {
+
+ @Override
+ protected void onUpdate(AjaxRequestTarget target) {
+ GitPlex.getInstance(Dao.class).persist(getPullRequest());
+ target.add(integrationContainer);
}
});
+ integrationContainer.add(strategySelect);
- add(new BackToTop("backToTop"));
- }
-
- private Component newStatusComponent(String id) {
- PullRequest request = getPullRequest();
- Fragment fragment;
- if (request.getStatus() == Status.INTEGRATED) {
- fragment = new Fragment(id, "integratedFrag", this);
- IntegrationInfo integrationInfo = request.getIntegrationInfo();
- if (integrationInfo.getIntegrationHead().equals(integrationInfo.getRequestHead())) {
- fragment.add(new Label("detail",
- "Target branch was fast forwarded to this request per the integration strategy."));
- } else {
- IntegrationStrategy strategy = request.getIntegrationStrategy();
- if (strategy == MERGE_ALWAYS || strategy == MERGE_IF_NECESSARY) {
- fragment.add(new Label("detail",
- "Target branch was merged with this request per the integration strategy."));
- } else if (strategy == REBASE_SOURCE) {
- if (request.getSource() != null) {
- Fragment detailFrag = new Fragment("detail", "sourceRebasedFrag", this);
- fragment.add(detailFrag);
- detailFrag.add(new BranchLink("target", new EntityModel<Branch>(request.getTarget())));
- detailFrag.add(new BranchLink("source", new EntityModel<Branch>(request.getSource())));
- } else {
- fragment.add(new Label("detail",
- "Request was rebased on top of target branch and then target branch was fast "
- + "forwarded to rebased result per the integration strategy."));
- }
- } else if (strategy == REBASE_TARGET){
- Fragment detailFrag = new Fragment("detail", "targetRebasedFrag", this);
- fragment.add(detailFrag);
- detailFrag.add(new BranchLink("target", new EntityModel<Branch>(request.getTarget())));
- } else {
- fragment.add(new Label("detail",
- "Head commit of the request was merged into target branch by some other party."));
- }
+ integrationContainer.add(new Label("strategyLabel", request.getIntegrationStrategy()) {
+
+ @Override
+ protected void onConfigure() {
+ super.onConfigure();
+
+ ObjectPermission writePermission = ObjectPermission.ofRepositoryWrite(getRepository());
+ setVisible(!SecurityUtils.getSubject().isPermitted(writePermission) || strategies.size() == 1);
}
- } else if (request.getStatus() == Status.DISCARDED) {
- fragment = new Fragment(id, "discardedFrag", this);
+
+ });
+
+ ObjectPermission writePermission = ObjectPermission.ofRepositoryWrite(getRepository());
+
+ if (!SecurityUtils.getSubject().isPermitted(writePermission) || strategies.size() == 1) {
+ integrationContainer.add(new WebMarkupContainer("strategyHelp").add(
+ new TooltipBehavior(Model.of(getPullRequest().getIntegrationStrategy().getDescription()))));
} else {
- fragment = new Fragment(id, "openFrag", this);
- populateOpenFrag(fragment);
+ StringBuilder strategyHelp = new StringBuilder("<dl class='integration-strategy-help'>");
+
+ for (IntegrationStrategy strategy: strategies) {
+ strategyHelp.append("<dt>").append(strategy.toString()).append("</dt>");
+ strategyHelp.append("<dd>").append(strategy.getDescription()).append("</dd>");
+ }
+
+ strategyHelp.append("</dl>");
+
+ integrationContainer.add(new WebMarkupContainer("strategyHelp")
+ .add(AttributeAppender.append("data-html", "true"))
+ .add(new TooltipBehavior(Model.of(strategyHelp.toString()), new TooltipConfig().withPlacement(Placement.right))));
}
- return fragment;
- }
-
- private void populateOpenFrag(Fragment fragment) {
- WebMarkupContainer checkResultContainer = new WebMarkupContainer("checkResult");
- fragment.add(checkResultContainer);
- PullRequest request = getPullRequest();
- if (request.getStatus() == Status.PENDING_INTEGRATE)
- checkResultContainer.add(AttributeAppender.append("class", " alert alert-info"));
- else
- checkResultContainer.add(AttributeAppender.append("class", " alert alert-warning"));
-
- checkResultContainer.add(new Label("message",
- "This request is " + request.getStatus().toString().toLowerCase() + ""));
-
- checkResultContainer.add(new ListView<String>("reasons", request.getCheckResult().getReasons()) {
+
+ integrationContainer.add(new WebMarkupContainer("calculating") {
@Override
- protected void populateItem(ListItem<String> item) {
- item.add(new Label("reason", item.getModelObject()));
+ protected void onConfigure() {
+ super.onConfigure();
+ PullRequestManager manager = GitPlex.getInstance(PullRequestManager.class);
+ setVisible(manager.previewIntegration(getPullRequest()) == null);
}
+
+ });
+ integrationContainer.add(new WebMarkupContainer("conflict") {
+
+ @Override
+ protected void onInitialize() {
+ super.onInitialize();
+
+ DropdownPanel resolveInstructions = new DropdownPanel("resolveInstructions", true) {
- }.setVisible(!request.getCheckResult().getReasons().isEmpty()));
-
- fragment.add(newIntegrationInfoComponent("integrationInfo"));
-
+ @Override
+ protected Component newContent(String id) {
+ return new ResolveConflictInstructionPanel(id, new EntityModel<PullRequest>(getPullRequest()));
+ }
+
+ };
+ add(resolveInstructions);
+ WebMarkupContainer resolveInstructionsTrigger = new WebMarkupContainer("resolveInstructionsTrigger") {
+
+ @Override
+ protected void onConfigure() {
+ super.onConfigure();
+ setVisible(getPullRequest().getSource() != null);
+ }
+
+ };
+ resolveInstructionsTrigger.add(new DropdownBehavior(resolveInstructions));
+ add(resolveInstructionsTrigger);
+ }
+
+ @Override
+ protected void onConfigure() {
+ super.onConfigure();
+ PullRequestManager manager = GitPlex.getInstance(PullRequestManager.class);
+ IntegrationPreview preview = manager.previewIntegration(getPullRequest());
+ setVisible(preview != null && preview.getIntegrated() == null);
+ }
+
+ });
+ integrationContainer.add(new WebMarkupContainer("noConflict") {
+
+ @Override
+ protected void onInitialize() {
+ super.onInitialize();
+
+ PullRequest request = getPullRequest();
+ PullRequestManager manager = GitPlex.getInstance(PullRequestManager.class);
+ IntegrationPreview preview = manager.previewIntegration(request);
+
+ PageParameters params = RequestComparePage.paramsOf(
+ request, request.getLatestUpdate().getHeadCommitHash(),
+ preview!=null?preview.getIntegrated():null, null, null);
+
+ Link<Void> link = new BookmarkablePageLink<Void>("preview", RequestComparePage.class, params) {
+
+ @Override
+ protected void onConfigure() {
+ super.onConfigure();
+
+ PullRequest request = getPullRequest();
+ PullRequestManager manager = GitPlex.getInstance(PullRequestManager.class);
+ IntegrationPreview preview = manager.previewIntegration(request);
+ setVisible(!preview.getIntegrated().equals(preview.getRequestHead())
+ && !getRepository().getChanges(preview.getRequestHead(), preview.getIntegrated()).isEmpty());
+ }
+
+ };
+ add(link);
+
+ add(new VerificationStatusPanel("verification", requestModel, new AbstractReadOnlyModel<String>() {
+
+ @Override
+ public String getObject() {
+ PullRequest request = getPullRequest();
+ PullRequestManager manager = GitPlex.getInstance(PullRequestManager.class);
+ IntegrationPreview preview = manager.previewIntegration(request);
+ if (preview != null)
+ return preview.getIntegrated();
+ else
+ return null;
+ }
+
+ }) {
+
+ @Override
+ protected Component newStatusComponent(String id, final IModel<Verification.Status> statusModel) {
+ return new Label(id, new AbstractReadOnlyModel<String>() {
+
+ @Override
+ public String getObject() {
+ if (statusModel.getObject() == Verification.Status.PASSED)
+ return "successful <i class='caret'></i>";
+ else if (statusModel.getObject() == Verification.Status.ONGOING)
+ return "running <i class='caret'></i>";
+ else if (statusModel.getObject() == Verification.Status.NOT_PASSED)
+ return "failed <i class='caret'></i>";
+ else
+ return "";
+ }
+
+ }) {
+
+ @Override
+ protected void onComponentTag(ComponentTag tag) {
+ super.onComponentTag(tag);
+
+ if (statusModel.getObject() == Verification.Status.PASSED)
+ tag.put("class", "label label-success");
+ else if (statusModel.getObject() == Verification.Status.ONGOING)
+ tag.put("class", "label label-warning");
+ else if (statusModel.getObject() == Verification.Status.NOT_PASSED)
+ tag.put("class", "label label-danger");
+ }
+
+ @Override
+ protected void onDetach() {
+ statusModel.detach();
+
+ super.onDetach();
+ }
+
+ }.setEscapeModelStrings(false);
+ }
+
+ });
+ }
+
+ @Override
+ protected void onConfigure() {
+ super.onConfigure();
+ PullRequestManager manager = GitPlex.getInstance(PullRequestManager.class);
+ IntegrationPreview preview = manager.previewIntegration(getPullRequest());
+ setVisible(preview != null && preview.getIntegrated() != null);
+ }
+ });
+
+ return integrationContainer;
}
- private Component newIntegrationInfoComponent(String id) {
- Fragment fragment;
- PullRequest request = getPullRequest();
- IntegrationInfo integrationInfo = request.getIntegrationInfo();
- if (integrationInfo.getIntegrationHead() == null) {
- fragment = new Fragment(id, "integrateConflictFrag", this);
- fragment.add(AttributeAppender.append("class", " alert alert-warning"));
-
- String message;
- IntegrationStrategy strategy = request.getIntegrationStrategy();
- if (strategy == MERGE_ALWAYS || strategy == MERGE_IF_NECESSARY) {
- message = "Per the integration strategy, this request will be merged with target branch. "
- + "However there are merge conflicts.";
- } else if (strategy == REBASE_SOURCE) {
- if (request.getSource() == null) {
- message = "Per the integration strategy, this request will be rebased on top of target "
- + "branch before fast forwarding target branch to rebased result. However there "
- + "are rebase conflicts.";
- } else {
- message = "Per the integration strategy, source branch will be rebased on top of target "
- + "branch before fast forwarding target branch to rebased result. However there "
- + "are rebase conflicts.";
- }
- } else {
- message = "Per the integration strategy, target branch will be rebased on top of this "
- + "request. However there are rebase conflicts.";
+ private WebMarkupContainer newStatusContainer() {
+ WebMarkupContainer statusContainer = new WebMarkupContainer("requestStatus");
+ statusContainer.setOutputMarkupId(true);
+ statusContainer.add(AttributeAppender.append("class", new AbstractReadOnlyModel<String>() {
+
+ @Override
+ public String getObject() {
+ if (getPullRequest().getStatus() == DISCARDED)
+ return " alert alert-danger";
+ else if (getPullRequest().getStatus() == INTEGRATED)
+ return " alert alert-success";
+ else
+ return " well";
}
- fragment.add(new Label("message", message));
- DropdownPanel resolveInstructions = new DropdownPanel("resolveInstructions") {
+ }));
+ statusContainer.add(new Label("summary", new AbstractReadOnlyModel<String>() {
- @Override
- protected Component newContent(String id) {
- return new ResolveConflictInstructionPanel(id, new EntityModel<PullRequest>(getPullRequest()));
- }
+ @Override
+ public String getObject() {
+ if (getPullRequest().getStatus() == DISCARDED)
+ return "This request is discarded";
+ else if (getPullRequest().getStatus() == INTEGRATED)
+ return "This request is integrated";
+ else if (getPullRequest().getStatus() == PENDING_INTEGRATE)
+ return "This request is pending integrate";
+ else if (getPullRequest().getStatus() == PENDING_UPDATE)
+ return "This request is pending update";
+ else
+ return "This request is pending approval";
+ }
+
+ }));
+ statusContainer.add(new WebMarkupContainer("fastForwarded") {
+
+ @Override
+ protected void onConfigure() {
+ super.onConfigure();
- };
- fragment.add(resolveInstructions);
- WebMarkupContainer resolveInstructionsTrigger = new WebMarkupContainer("resolveInstructionsTrigger");
- resolveInstructionsTrigger.add(new DropdownBehavior(resolveInstructions));
- fragment.add(resolveInstructionsTrigger);
- } else {
- fragment = new Fragment(id, "canIntegrateFrag", this);
- fragment.add(AttributeAppender.append("class", " alert alert-success"));
-
- String message;
- if (integrationInfo.getIntegrationHead().equals(integrationInfo.getRequestHead())) {
- message = "Per the integration strategy, target branch will be fast forwarded to this request.";
- } else {
- IntegrationStrategy strategy = request.getIntegrationStrategy();
- if (strategy == MERGE_ALWAYS || strategy == MERGE_IF_NECESSARY) {
- message = "Per the integration strategy, target branch will be merged with this request.";
- } else if (strategy == REBASE_SOURCE) {
- if (request.getSource() == null) {
- message = "Per the integration strategy, this request will be rebased on top of target branch, "
- + "and then target branch will be fast forwarded to rebased result.";
- } else {
- message = "Per the integration strategy, source branch will be rebased on top of target branch, "
- + "and then target branch will be fast forwarded to rebased result.";
- }
- } else {
- message = "Per the integration strategy, target branch will be rebased on top of this request.";
- }
+ PullRequest request = getPullRequest();
+ IntegrationPreview preview = request.getIntegrationPreview();
+ setVisible(request.getStatus() == INTEGRATED && preview != null
+ && preview.getRequestHead().equals(preview.getIntegrated()));
}
- fragment.add(new Label("message", message));
- PageParameters params = RequestComparePage.paramsOf(
- request,
- request.getLatestUpdate().getHeadCommitHash(),
- request.getIntegrationInfo().getIntegrationHead(),
- null, null);
+ });
+ statusContainer.add(new WebMarkupContainer("merged") {
+
+ @Override
+ protected void onConfigure() {
+ super.onConfigure();
+
+ PullRequest request = getPullRequest();
+ IntegrationPreview preview = request.getIntegrationPreview();
+ setVisible(request.getStatus() == INTEGRATED && preview != null
+ && !preview.getRequestHead().equals(preview.getIntegrated())
+ && (preview.getIntegrationStrategy() == MERGE_ALWAYS || preview.getIntegrationStrategy() == MERGE_IF_NECESSARY));
+ }
- Link<Void> link = new BookmarkablePageLink<Void>("preview", RequestComparePage.class, params);
- link.setVisible(!integrationInfo.getIntegrationHead().equals(integrationInfo.getRequestHead())
- && integrationInfo.hasChanges());
- fragment.add(link);
+ });
+ statusContainer.add(new WebMarkupContainer("mergedOutside") {
- String integrationHead = getPullRequest().getIntegrationInfo().getIntegrationHead();
- fragment.add(new VerificationStatusPanel("verification", requestModel, integrationHead) {
+ @Override
+ protected void onConfigure() {
+ super.onConfigure();
+
+ PullRequest request = getPullRequest();
+ IntegrationPreview preview = request.getIntegrationPreview();
+ setVisible(request.getStatus() == INTEGRATED && preview == null);
+ }
+
+ });
+ WebMarkupContainer sourceRebasedContainer = new WebMarkupContainer("sourceRebased") {
- @Override
- protected Component newStatusComponent(String id,
- com.pmease.gitplex.core.model.Verification.Status status) {
- if (status == Verification.Status.PASSED) {
- return new Label(id, "successful <i class='caret'></i>")
- .setEscapeModelStrings(false)
- .add(AttributeAppender.append("class", " label label-success"));
- } else if (status == Verification.Status.ONGOING) {
- return new Label(id, "running <i class='caret'></i>")
- .setEscapeModelStrings(false)
- .add(AttributeAppender.append("class", " label label-warning"));
- } else {
- return new Label(id, "failed <i class='caret'></i>")
- .setEscapeModelStrings(false)
- .add(AttributeAppender.append("class", " label label-danger"));
- }
- }
+ @Override
+ protected void onConfigure() {
+ super.onConfigure();
- });
- }
- return fragment;
- }
-
- @Override
- protected void onDetach() {
- requestModel.detach();
- super.onDetach();
- }
+ PullRequest request = getPullRequest();
+ IntegrationPreview preview = request.getIntegrationPreview();
+ setVisible(request.getStatus() == INTEGRATED && preview != null
+ && !preview.getRequestHead().equals(preview.getIntegrated())
+ && preview.getIntegrationStrategy() == REBASE_SOURCE_BRANCH);
+ }
+
+ };
+ statusContainer.add(sourceRebasedContainer);
+ sourceRebasedContainer.add(new BranchLink("target", new EntityModel<Branch>(getPullRequest().getTarget())));
+ sourceRebasedContainer.add(new BranchLink("source", new AbstractReadOnlyModel<Branch>() {
- @Override
- public List<OldCommitComment> getCommitComments() {
- return new ArrayList<>();
- }
+ @Override
+ public Branch getObject() {
+ return getPullRequest().getSource();
+ }
+
+ }) {
- @Override
- public boolean isShowInlineComments() {
- return false;
+ @Override
+ protected void onConfigure() {
+ super.onConfigure();
+ setVisible(getPullRequest().getSource() != null);
+ }
+
+ });
+
+ WebMarkupContainer targetRebasedContainer = new WebMarkupContainer("targetRebased") {
+
+ @Override
+ protected void onConfigure() {
+ super.onConfigure();
+
+ PullRequest request = getPullRequest();
+ IntegrationPreview preview = request.getIntegrationPreview();
+ setVisible(request.getStatus() == INTEGRATED && preview != null
+ && !preview.getRequestHead().equals(preview.getIntegrated())
+ && preview.getIntegrationStrategy() == REBASE_TARGET_BRANCH);
+ }
+
+ };
+ statusContainer.add(targetRebasedContainer);
+ targetRebasedContainer.add(new BranchLink("target", new EntityModel<Branch>(getPullRequest().getTarget())));
+
+ statusContainer.add(new WebMarkupContainer("discarded") {
+
+ @Override
+ protected void onConfigure() {
+ super.onConfigure();
+
+ setVisible(getPullRequest().getStatus() == DISCARDED);
+ }
+
+ });
+
+ statusContainer.add(new ListView<String>("reasons", new AbstractReadOnlyModel<List<String>>() {
+
+ @Override
+ public List<String> getObject() {
+ return getPullRequest().getCheckResult().getReasons();
+ }
+
+ }) {
+
+ @Override
+ protected void populateItem(ListItem<String> item) {
+ item.add(new Label("reason", item.getModelObject()));
+ }
+
+ @Override
+ protected void onConfigure() {
+ super.onConfigure();
+ PullRequest request = getPullRequest();
+ setVisible(request.isOpen() && !request.getCheckResult().getReasons().isEmpty());
+ }
+
+ });
+
+ return statusContainer;
}
@Override
- public boolean canAddComments() {
- return false;
+ protected void onDetach() {
+ requestModel.detach();
+ super.onDetach();
}
public static PageParameters paramsOf(PullRequest request) {
@@ -611,11 +840,4 @@ public abstract class RequestDetailPage extends RepositoryPage implements Commit
return requestModel.getObject();
}
- @Override
- protected void onBeforeRender() {
- addOrReplace(newStatusComponent("status"));
-
- super.onBeforeRender();
- }
-
}
\ No newline at end of file
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/RequestUpdatesPage.html b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/RequestUpdatesPage.html
index 45354d734d..975616fe6f 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/RequestUpdatesPage.html
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/RequestUpdatesPage.html
@@ -1,6 +1,6 @@
<wicket:extend>
<ul class="updates list-unstyled">
- <li wicket:id="updates" class="update activity">
+ <li wicket:id="requestUpdates" class="update activity">
<div class="summary">
<span wicket:id="name" class="user"></span> pushed update #<span wicket:id="updateNo"></span> <span wicket:id="age"></span>
<span class="actions">
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/RequestUpdatesPage.java b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/RequestUpdatesPage.java
index f53317e335..dbef74d5b9 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/RequestUpdatesPage.java
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/RequestUpdatesPage.java
@@ -10,6 +10,7 @@ import java.util.Set;
import org.apache.wicket.AttributeModifier;
import org.apache.wicket.Component;
import org.apache.wicket.behavior.AttributeAppender;
+import org.apache.wicket.markup.ComponentTag;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
@@ -26,7 +27,6 @@ import com.pmease.commons.git.Commit;
import com.pmease.gitplex.core.model.PullRequestUpdate;
import com.pmease.gitplex.core.model.Repository;
import com.pmease.gitplex.core.model.Verification;
-import com.pmease.gitplex.core.model.Verification.Status;
import com.pmease.gitplex.core.model.Vote;
import com.pmease.gitplex.web.component.commit.CommitHashLink;
import com.pmease.gitplex.web.component.commit.CommitMessagePanel;
@@ -50,7 +50,7 @@ public class RequestUpdatesPage extends RequestDetailPage {
protected void onInitialize() {
super.onInitialize();
- add(new ListView<PullRequestUpdate>("updates", new LoadableDetachableModel<List<PullRequestUpdate>>() {
+ add(new ListView<PullRequestUpdate>("requestUpdates", new LoadableDetachableModel<List<PullRequestUpdate>>() {
@Override
public List<PullRequestUpdate> load() {
@@ -167,23 +167,46 @@ public class RequestUpdatesPage extends RequestDetailPage {
commitItem.add(new BookmarkablePageLink<Void>("treeLink", RepoTreePage.class,
RepoTreePage.paramsOf(repoModel.getObject(), commit.getHash())));
- commitItem.add(new VerificationStatusPanel("verification", requestModel, commit.getHash()) {
+ commitItem.add(new VerificationStatusPanel("verification", requestModel, Model.of(commit.getHash())) {
@Override
- protected Component newStatusComponent(String id, Status status) {
- if (status == Verification.Status.PASSED) {
- return new Label(id, "build successful <i class='caret'></i>")
- .setEscapeModelStrings(false)
- .add(AttributeAppender.append("class", " label label-success"));
- } else if (status == Verification.Status.ONGOING) {
- return new Label(id, "build running <i class='caret'></i>")
- .setEscapeModelStrings(false)
- .add(AttributeAppender.append("class", " label label-warning"));
- } else {
- return new Label(id, "build failed <i class='caret'></i>")
- .setEscapeModelStrings(false)
- .add(AttributeAppender.append("class", " label label-danger"));
- }
+ protected Component newStatusComponent(String id, final IModel<Verification.Status> statusModel) {
+ return new Label(id, new AbstractReadOnlyModel<String>() {
+
+ @Override
+ public String getObject() {
+ if (statusModel.getObject() == Verification.Status.PASSED)
+ return "build successful <i class='caret'></i>";
+ else if (statusModel.getObject() == Verification.Status.ONGOING)
+ return "build running <i class='caret'></i>";
+ else if (statusModel.getObject() == Verification.Status.NOT_PASSED)
+ return "build failed <i class='caret'></i>";
+ else
+ return "";
+ }
+
+ }) {
+
+ @Override
+ protected void onComponentTag(ComponentTag tag) {
+ super.onComponentTag(tag);
+
+ if (statusModel.getObject() == Verification.Status.PASSED)
+ tag.put("class", "label label-success");
+ else if (statusModel.getObject() == Verification.Status.ONGOING)
+ tag.put("class", "label label-warning");
+ else if (statusModel.getObject() == Verification.Status.NOT_PASSED)
+ tag.put("class", "label label-danger");
+ }
+
+ @Override
+ protected void onDetach() {
+ statusModel.detach();
+
+ super.onDetach();
+ }
+
+ }.setEscapeModelStrings(false);
}
});
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/ResolveConflictInstructionPanel.java b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/ResolveConflictInstructionPanel.java
index 3cc3578fd1..7a38ada420 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/ResolveConflictInstructionPanel.java
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/ResolveConflictInstructionPanel.java
@@ -1,8 +1,6 @@
package com.pmease.gitplex.web.page.repository.pullrequest;
-import static com.pmease.gitplex.core.model.IntegrationStrategy.*;
-
-import com.pmease.gitplex.core.GitPlex;
+import static com.pmease.gitplex.core.model.PullRequest.IntegrationStrategy.*;
import org.apache.shiro.SecurityUtils;
import org.apache.wicket.markup.html.WebMarkupContainer;
@@ -11,16 +9,18 @@ import org.apache.wicket.markup.html.panel.Fragment;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.IModel;
+import com.pmease.gitplex.core.GitPlex;
+import com.pmease.gitplex.core.manager.PullRequestManager;
import com.pmease.gitplex.core.manager.UserManager;
-import com.pmease.gitplex.core.model.IntegrationInfo;
-import com.pmease.gitplex.core.model.IntegrationStrategy;
+import com.pmease.gitplex.core.model.IntegrationPreview;
import com.pmease.gitplex.core.model.PullRequest;
+import com.pmease.gitplex.core.model.PullRequest.IntegrationStrategy;
import com.pmease.gitplex.core.model.Repository;
import com.pmease.gitplex.core.model.User;
import com.pmease.gitplex.core.permission.ObjectPermission;
@SuppressWarnings("serial")
-public class ResolveConflictInstructionPanel extends Panel {
+class ResolveConflictInstructionPanel extends Panel {
public ResolveConflictInstructionPanel(String id, IModel<PullRequest> model) {
super(id, model);
@@ -34,11 +34,11 @@ public class ResolveConflictInstructionPanel extends Panel {
Fragment fragment;
Repository targetRepo = request.getTarget().getRepository();
User user = GitPlex.getInstance(UserManager.class).getCurrent();
- IntegrationInfo integrationInfo = request.getIntegrationInfo();
- String requestHead = integrationInfo.getRequestHead();
+ IntegrationPreview preview = GitPlex.getInstance(PullRequestManager.class).previewIntegration(request);
+ String sourceHead = preview.getRequestHead();
IntegrationStrategy strategy = request.getIntegrationStrategy();
boolean sameRepo = request.getTarget().getRepository().equals(request.getSource().getRepository());
- if (strategy == REBASE_SOURCE) {
+ if (strategy == REBASE_SOURCE_BRANCH) {
fragment = new Fragment("content", "rebaseInSourceFrag", this);
fragment.add(new Label("srcRepoName", request.getSource().getRepository()));
fragment.add(new Label("srcBranchNameForCheckout", request.getSource().getName()));
@@ -52,7 +52,7 @@ public class ResolveConflictInstructionPanel extends Panel {
differentRepoContainer.add(new Label("destBranchName", request.getTarget().getName()));
differentRepoContainer.setVisible(!sameRepo);
fragment.add(differentRepoContainer);
- } else if (strategy == REBASE_TARGET) {
+ } else if (strategy == REBASE_TARGET_BRANCH) {
fragment = new Fragment("content", "rebaseInTargetFrag", this);
fragment.add(new Label("destRepoName", request.getTarget().getRepository()));
fragment.add(new Label("destBranchNameForCheckout", request.getTarget().getName()));
@@ -68,7 +68,7 @@ public class ResolveConflictInstructionPanel extends Panel {
fragment.add(differentRepoContainer);
} else if (user != null
&& SecurityUtils.getSubject().isPermitted(ObjectPermission.ofRepositoryWrite(targetRepo))
- && targetRepo.getGateKeeper().checkCommit(user, request.getTarget(), requestHead).allowIntegration()) {
+ && targetRepo.getGateKeeper().checkCommit(user, request.getTarget(), sourceHead).allowIntegration()) {
fragment = new Fragment("content", "mergeInTargetFrag", this);
fragment.add(new Label("destRepoName", request.getTarget().getRepository()));
fragment.add(new Label("destBranchNameForCheckout", request.getTarget().getName()));
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/VerificationDetailPanel.java b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/VerificationDetailPanel.java
index e2ad0c0cd9..ba28eebcbb 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/VerificationDetailPanel.java
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/VerificationDetailPanel.java
@@ -12,7 +12,7 @@ import org.apache.wicket.model.IModel;
import com.pmease.gitplex.core.model.Verification;
@SuppressWarnings("serial")
-public class VerificationDetailPanel extends Panel {
+class VerificationDetailPanel extends Panel {
private IModel<List<Verification>> model;
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/VerificationStatusPanel.java b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/VerificationStatusPanel.java
index 3d78de50f0..781ee46081 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/VerificationStatusPanel.java
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/VerificationStatusPanel.java
@@ -4,52 +4,44 @@ import java.util.ArrayList;
import java.util.List;
import org.apache.wicket.Component;
-import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.AbstractReadOnlyModel;
import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.LoadableDetachableModel;
import com.pmease.commons.wicket.behavior.dropdown.DropdownBehavior;
import com.pmease.commons.wicket.behavior.dropdown.DropdownPanel;
import com.pmease.gitplex.core.model.PullRequest;
import com.pmease.gitplex.core.model.Verification;
+import com.pmease.gitplex.core.model.Verification.Status;
@SuppressWarnings("serial")
public abstract class VerificationStatusPanel extends Panel {
private final IModel<PullRequest> requestModel;
- private final String commitHash;
+ private final IModel<String> commitHashModel;
- public VerificationStatusPanel(String id, IModel<PullRequest> requestModel, String commitHash) {
+ public VerificationStatusPanel(String id, IModel<PullRequest> requestModel, IModel<String> commitHashModel) {
super(id);
this.requestModel = requestModel;
- this.commitHash = commitHash;
+ this.commitHashModel = commitHashModel;
}
-
+
+ private List<Verification> getVerifications() {
+ List<Verification> verifications = new ArrayList<>();
+ for (Verification verification: requestModel.getObject().getVerifications()) {
+ if (verification.getCommit().equals(commitHashModel.getObject()))
+ verifications.add(verification);
+ }
+ return verifications;
+ }
+
@Override
protected void onInitialize() {
super.onInitialize();
- final List<Verification> verifications = new ArrayList<>();
- for (Verification verification: requestModel.getObject().getVerifications()) {
- if (verification.getCommit().equals(commitHash))
- verifications.add(verification);
- }
-
- Verification.Status overallStatus = null;
- for (Verification verification: verifications) {
- if (verification.getStatus() == Verification.Status.NOT_PASSED) {
- overallStatus = Verification.Status.NOT_PASSED;
- break;
- } else if (verification.getStatus() == Verification.Status.ONGOING) {
- overallStatus = Verification.Status.ONGOING;
- } else if (overallStatus == null) {
- overallStatus = Verification.Status.PASSED;
- }
- }
-
DropdownPanel dropdown = new DropdownPanel("details", true) {
@Override
@@ -58,7 +50,7 @@ public abstract class VerificationStatusPanel extends Panel {
@Override
public List<Verification> getObject() {
- return verifications;
+ return getVerifications();
}
});
@@ -67,21 +59,42 @@ public abstract class VerificationStatusPanel extends Panel {
};
add(dropdown);
- if (overallStatus != null) {
- Component statusComponent = newStatusComponent("overall", overallStatus);
- statusComponent.add(new DropdownBehavior(dropdown));
- add(statusComponent);
- } else {
- add(new WebMarkupContainer("overall").setVisible(false));
- }
+ Component statusComponent = newStatusComponent("overall", new LoadableDetachableModel<Verification.Status>() {
+
+ @Override
+ protected Status load() {
+ Verification.Status overallStatus = null;
+ for (Verification verification: getVerifications()) {
+ if (verification.getStatus() == Verification.Status.NOT_PASSED) {
+ overallStatus = Verification.Status.NOT_PASSED;
+ break;
+ } else if (verification.getStatus() == Verification.Status.ONGOING) {
+ overallStatus = Verification.Status.ONGOING;
+ } else if (overallStatus == null) {
+ overallStatus = Verification.Status.PASSED;
+ }
+ }
+ return overallStatus;
+ }
+
+ });
+ statusComponent.add(new DropdownBehavior(dropdown));
+ add(statusComponent);
}
- protected abstract Component newStatusComponent(String id, Verification.Status status);
+ protected abstract Component newStatusComponent(String id, IModel<Verification.Status> statusModel);
@Override
protected void onDetach() {
requestModel.detach();
+ commitHashModel.detach();
super.onDetach();
}
+ @Override
+ protected void onConfigure() {
+ super.onConfigure();
+ setVisible(!getVerifications().isEmpty());
+ }
+
}
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/activity/IntegrateActivityPanel.html b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/activity/IntegrateActivityPanel.html
index d3c6a41fb0..70bd7c268a 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/activity/IntegrateActivityPanel.html
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/activity/IntegrateActivityPanel.html
@@ -1,6 +1,5 @@
<wicket:panel>
<div class="integrate summary">
<span class="fa fa-tick-round"></span> <span wicket:id="user" class="user"></span> integrated pull request <span wicket:id="age"></span>
- <wicket:enclosure child="reason">. Reason: <span wicket:id="reason"></span></wicket:enclosure>
</div>
</wicket:panel>
\ No newline at end of file
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/activity/IntegrateActivityPanel.java b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/activity/IntegrateActivityPanel.java
index d9171ae16c..298ab6cf8b 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/activity/IntegrateActivityPanel.java
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/activity/IntegrateActivityPanel.java
@@ -17,13 +17,10 @@ public class IntegrateActivityPanel extends Panel {
private final Date date;
- private final String reason;
-
- public IntegrateActivityPanel(String id, IModel<User> userModel, Date date, String reason) {
+ public IntegrateActivityPanel(String id, IModel<User> userModel, Date date) {
super(id);
this.userModel = userModel;
this.date = date;
- this.reason = reason;
}
@Override
@@ -32,8 +29,6 @@ public class IntegrateActivityPanel extends Panel {
add(new UserLink("user", userModel));
add(new Label("age", Model.of(date)));
-
- add(new Label("reason", reason).setVisible(reason != null));
}
@Override
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/activity/IntegratePullRequest.java b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/activity/IntegratePullRequest.java
index 3859e059db..43d09975fe 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/activity/IntegratePullRequest.java
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/activity/IntegratePullRequest.java
@@ -16,12 +16,9 @@ public class IntegratePullRequest implements PullRequestActivity {
private final Date date;
- private final String reason;
-
- public IntegratePullRequest(User user, Date date, String reason) {
+ public IntegratePullRequest(User user, Date date) {
this.userId = user.getId();
this.date = date;
- this.reason = reason;
}
@Override
@@ -34,10 +31,6 @@ public class IntegratePullRequest implements PullRequestActivity {
return GitPlex.getInstance(Dao.class).load(User.class, userId);
}
- public String getReason() {
- return reason;
- }
-
@Override
public Panel render(String panelId) {
return new IntegrateActivityPanel(panelId, new LoadableDetachableModel<User>() {
@@ -47,7 +40,7 @@ public class IntegratePullRequest implements PullRequestActivity {
return getUser();
}
- }, date, reason);
+ }, date);
}
}
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/activity/UpdateActivityPanel.java b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/activity/UpdateActivityPanel.java
index 4e58abf16f..b51a23fe62 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/activity/UpdateActivityPanel.java
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/activity/UpdateActivityPanel.java
@@ -6,6 +6,7 @@ import java.util.Set;
import org.apache.wicket.Component;
import org.apache.wicket.behavior.AttributeAppender;
+import org.apache.wicket.markup.ComponentTag;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;
@@ -20,7 +21,6 @@ import com.pmease.gitplex.core.model.PullRequest;
import com.pmease.gitplex.core.model.PullRequestUpdate;
import com.pmease.gitplex.core.model.Repository;
import com.pmease.gitplex.core.model.Verification;
-import com.pmease.gitplex.core.model.Verification.Status;
import com.pmease.gitplex.web.component.commit.CommitHashLink;
import com.pmease.gitplex.web.component.commit.CommitMessagePanel;
import com.pmease.gitplex.web.component.user.AvatarMode;
@@ -98,28 +98,52 @@ public class UpdateActivityPanel extends Panel {
}
};
- item.add(new VerificationStatusPanel("verification", requestModel, commit.getHash()) {
+ item.add(new VerificationStatusPanel("verification", requestModel, Model.of(commit.getHash())) {
@Override
- protected Component newStatusComponent(String id, Status status) {
- if (status == Verification.Status.PASSED) {
- return new Label(id, "<i class='fa fa-tick'></i><i class='caret'></i> ")
- .setEscapeModelStrings(false)
- .add(AttributeAppender.append("class", " successful"))
- .add(AttributeAppender.append("title", "Build is successful"));
- } else if (status == Verification.Status.ONGOING) {
- return new Label(id, "<i class='fa fa-clock'></i><i class='caret'></i> ")
- .setEscapeModelStrings(false)
- .add(AttributeAppender.append("class", " running"))
- .add(AttributeAppender.append("title", "Build is running"));
- } else {
- return new Label(id, "<i class='fa fa-times'></i><i class='caret'></i>")
- .setEscapeModelStrings(false)
- .add(AttributeAppender.append("class", " failed"))
- .add(AttributeAppender.append("title", "Build is failed"));
- }
+ protected Component newStatusComponent(String id, final IModel<Verification.Status> statusModel) {
+ return new Label(id, new AbstractReadOnlyModel<String>() {
+
+ @Override
+ public String getObject() {
+ if (statusModel.getObject() == Verification.Status.PASSED)
+ return "<i class='fa fa-tick'></i><i class='caret'></i> ";
+ else if (statusModel.getObject() == Verification.Status.ONGOING)
+ return "<i class='fa fa-clock'></i><i class='caret'></i> ";
+ else if (statusModel.getObject() == Verification.Status.NOT_PASSED)
+ return "<i class='fa fa-times'></i><i class='caret'></i>";
+ else
+ return "";
+ }
+
+ }) {
+
+ @Override
+ protected void onComponentTag(ComponentTag tag) {
+ super.onComponentTag(tag);
+
+ if (statusModel.getObject() == Verification.Status.PASSED) {
+ tag.put("class", "successful");
+ tag.put("title", "Build is successful");
+ } else if (statusModel.getObject() == Verification.Status.ONGOING) {
+ tag.put("class", "running");
+ tag.put("title", "Build is running");
+ } else if (statusModel.getObject() == Verification.Status.NOT_PASSED) {
+ tag.put("class", "failed");
+ tag.put("title", "Build is failed");
+ }
+ }
+
+ @Override
+ protected void onDetach() {
+ statusModel.detach();
+
+ super.onDetach();
+ }
+
+ }.setEscapeModelStrings(false);
}
-
+
});
CommitHashLink link = new CommitHashLink("hashLink", repoModel, commit.getHash());