Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
<!-- https://www.jenkins.io/doc/developer/plugin-development/choosing-jenkins-baseline/ -->
<jenkins.baseline>2.504</jenkins.baseline>
<jenkins.version>${jenkins.baseline}.1</jenkins.version>
<jenkins.version>2.532-SNAPSHOT</jenkins.version>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change


<hpi.compatibleSinceVersion>2.0.0</hpi.compatibleSinceVersion>
<no-test-jar>false</no-test-jar>
Expand All @@ -81,7 +81,7 @@
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-${jenkins.baseline}.x</artifactId>
<version>5043.v855ff4819a_0f</version>
<version>5422.v0fce72a_b_b_8cf</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -92,6 +92,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>scm-api</artifactId>
<version>999999-SNAPSHOT</version>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert

</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
Expand Down
15 changes: 14 additions & 1 deletion src/main/java/jenkins/branch/BaseView.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import hudson.security.ACL;
import hudson.security.Permission;
import java.io.IOException;

import jenkins.management.Badge;
import jenkins.scm.api.SCMCategory;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
Expand All @@ -27,7 +29,18 @@ public BaseView(ViewGroup owner, @NonNull T category) {
*/
@Override
public String getDisplayName() {
return category.getDisplayName() + " (" + getItems().size() + ")";
return category.getDisplayName().toString();
}

@Override
public Badge getBadge() {
int count = getItems().size();
return new Badge(String.valueOf(count), count + " items", Badge.Severity.INFO);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i18n

}

@Override
public String getIconFileName() {
return category.getIconFileName();
}

/**
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/jenkins/branch/MultiBranchProjectDescriptor.java
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,10 @@ public String itemNameFromItem(@NonNull MultiBranchProject<P,R> parent, @NonNull
return NameEncoder.encode(factory.getBranch(item).getName());
}
String name = item.getName();
if (name != null) {
// if (name != null) {
return NameEncoder.encode(name);
}
return null;
// }
// return null;
}

@Override
Expand All @@ -245,10 +245,10 @@ public String dirNameFromItem(@NonNull MultiBranchProject<P,R> parent, @NonNull
return NameMangler.apply(factory.getBranch(item).getName());
}
String name = item.getName();
if (name != null) {
// if (name != null) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Undo?

return NameMangler.apply(name);
}
return null;
// }
// return null;
}

@Override
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/jenkins/branch/OrganizationFolder.java
Original file line number Diff line number Diff line change
Expand Up @@ -853,10 +853,10 @@ public String itemNameFromItem(@NonNull OrganizationFolder parent, @NonNull Mult
return NameEncoder.encode(property.getName());
}
String name = item.getName();
if (name != null) {
// if (name != null) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Undo?

return NameEncoder.encode(name);
}
return null;
// }
// return null;
}

@Override
Expand All @@ -867,10 +867,10 @@ public String dirNameFromItem(@NonNull OrganizationFolder parent, @NonNull Multi
return NameMangler.apply(property.getName());
}
String name = item.getName();
if (name != null) {
// if (name != null) {
return NameMangler.apply(name);
}
return null;
// }
// return null;
}

@Override
Expand Down
32 changes: 27 additions & 5 deletions src/main/resources/jenkins/branch/BaseView/main.jelly
Original file line number Diff line number Diff line change
@@ -1,14 +1,36 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:t="/lib/hudson" xmlns:st="jelly:stapler">
<j:jelly xmlns:j="jelly:core" xmlns:t="/lib/hudson" xmlns:st="jelly:stapler" xmlns:l="/lib/layout">
<l:userExperimentalFlag var="newDashboardPage" flagClassName="jenkins.model.experimentalflags.NewDashboardPageUserExperimentalFlag" />

<j:set var="views" value="${it.owner.views}"/>
<j:set var="currentView" value="${it}"/>
<j:if test="${items.isEmpty()}">
<st:include it="${it.owner.viewsTabBar}" page="viewTabs"/>
<j:if test="${!newDashboardPage}">
<st:include it="${it.owner.viewsTabBar}" page="viewTabs"/>
</j:if>
<st:include it="${it}" page="noJob.jelly"/>
</j:if>

<j:if test="${!items.isEmpty()}">
<t:projectView jobs="${items}" showViewTabs="true" columnExtensions="${it.columns}" indenter="${it.indenter}" itemGroup="${it.owner.itemGroup}">
<st:include it="${it.owner.viewsTabBar}" page="viewTabs"/>
</t:projectView>
<j:choose>
<j:when test="${newDashboardPage}">
<div class="jenkins-inline-page">
<div class="jenkins-inline-page__side-panel">
<j:if test="${h.hasPermission(app.READ)}">
<j:forEach var="w" items="${it.widgets}">
<j:set var="view" value="${it}" />
<st:include it="${w}" page="index.jelly" />
</j:forEach>
</j:if>
</div>
<t:projectView jobs="${items}" showViewTabs="true" columnExtensions="${it.columns}" indenter="${it.indenter}" itemGroup="${it.owner.itemGroup}" />
</div>
</j:when>
<j:otherwise>
<t:projectView jobs="${items}" showViewTabs="true" columnExtensions="${it.columns}" indenter="${it.indenter}" itemGroup="${it.owner.itemGroup}">
<st:include it="${it.owner.viewsTabBar}" page="viewTabs"/>
</t:projectView>
</j:otherwise>
</j:choose>
</j:if>
</j:jelly>
Loading