James Moger
2012-02-03 7c08c78b0f80609f3ea911b8a3eeb598f99c0fd2
Show HEAD on metrics page if objectid is not specified
2 files modified
9 ■■■■ changed files
resources/bootstrap.gb.css 2 ●●● patch | view | raw | blame | history
src/com/gitblit/wicket/pages/MetricsPage.java 7 ●●●● patch | view | raw | blame | history
resources/bootstrap.gb.css
@@ -713,7 +713,7 @@
    font-style: italic !important;    
}
span.sha1, span.sha1 a, span.sha1 a span {
span.sha1, span.sha1 a, span.sha1 a span, pre.commit_message {
    font-family: monospace;
    font-size: 13px;
}
src/com/gitblit/wicket/pages/MetricsPage.java
@@ -40,6 +40,7 @@
import com.gitblit.models.Metric;
import com.gitblit.utils.MetricUtils;
import com.gitblit.utils.StringUtils;
import com.gitblit.utils.TimeUtils;
import com.gitblit.wicket.WicketUtils;
@@ -48,7 +49,11 @@
    public MetricsPage(PageParameters params) {
        super(params);
        Repository r = getRepository();
        add(new Label("branchTitle", objectId));
        if (StringUtils.isEmpty(objectId)) {
            add(new Label("branchTitle", getRepositoryModel().HEAD));
        } else {
            add(new Label("branchTitle", objectId));
        }
        Metric metricsTotal = null;
        List<Metric> metrics = MetricUtils.getDateMetrics(r, objectId, true, null);
        metricsTotal = metrics.remove(0);