-
Notifications
You must be signed in to change notification settings - Fork 149
Adjust for experimental dashboard UI #560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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> | ||
|
|
||
| <hpi.compatibleSinceVersion>2.0.0</hpi.compatibleSinceVersion> | ||
| <no-test-jar>false</no-test-jar> | ||
|
|
@@ -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> | ||
|
|
@@ -92,6 +92,7 @@ | |
| <dependency> | ||
| <groupId>org.jenkins-ci.plugins</groupId> | ||
| <artifactId>scm-api</artifactId> | ||
| <version>999999-SNAPSHOT</version> | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Revert |
||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.jenkins-ci.plugins</groupId> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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; | ||
|
|
@@ -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); | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i18n |
||
| } | ||
|
|
||
| @Override | ||
| public String getIconFileName() { | ||
| return category.getIconFileName(); | ||
| } | ||
|
|
||
| /** | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
|
@@ -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) { | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Undo? |
||
| return NameMangler.apply(name); | ||
| } | ||
| return null; | ||
| // } | ||
| // return null; | ||
| } | ||
|
|
||
| @Override | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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) { | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Undo? |
||
| return NameEncoder.encode(name); | ||
| } | ||
| return null; | ||
| // } | ||
| // return null; | ||
| } | ||
|
|
||
| @Override | ||
|
|
@@ -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 | ||
|
|
||
| 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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change