File tree Expand file tree Collapse file tree
java/com/jenkinsci/plugins/badge
resources/com/jenkinsci/plugins/badge Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,7 +72,12 @@ public Class<Run> type() {
7272 @ NonNull
7373 @ Override
7474 public List <? extends Detail > createFor (@ NonNull Run target ) {
75- return List .of (new BadgeDetail (target ));
75+ BadgeDetail detail = new BadgeDetail (target );
76+ if (detail .getActions ().isEmpty ()) {
77+ return List .of ();
78+ } else {
79+ return List .of (detail );
80+ }
7681 }
7782 }
7883}
Original file line number Diff line number Diff line change 2828import hudson .Extension ;
2929import hudson .model .Run ;
3030import java .util .Collection ;
31- import java .util .Collections ;
3231import java .util .List ;
3332import jenkins .model .Tab ;
3433import jenkins .model .TransientActionFactory ;
@@ -77,7 +76,12 @@ public Class<Run> type() {
7776 @ NonNull
7877 @ Override
7978 public Collection <SummaryTab > createFor (@ NonNull Run target ) {
80- return Collections .singleton (new SummaryTab (target ));
79+ SummaryTab tab = new SummaryTab (target );
80+ if (tab .getActions ().isEmpty ()) {
81+ return List .of ();
82+ } else {
83+ return List .of (tab );
84+ }
8185 }
8286 }
8387}
Original file line number Diff line number Diff line change @@ -26,6 +26,6 @@ THE SOFTWARE.
2626<?jelly escape-by-default =' true' ?>
2727<j : jelly xmlns : j =" jelly:core" xmlns : st =" jelly:stapler" >
2828 <j : forEach var =" action" items =" ${it.actions}" >
29- <st : include page =" ../../ action/BadgeAction/badge.jelly" it =" ${action}" />
29+ <st : include page =" /com/jenkinsci/plugins/badge/ action/BadgeAction/badge.jelly" it =" ${action}" />
3030 </j : forEach >
3131</j : jelly >
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ THE SOFTWARE.
2929 <div >
3030 <table >
3131 <j : forEach var =" action" items =" ${it.actions}" >
32- <st : include page =" ../../ action/BadgeSummaryAction/summary-entry.jelly" it =" ${action}" optional = " true " />
32+ <st : include page =" /com/jenkinsci/plugins/badge/ action/BadgeSummaryAction/summary-entry.jelly" it =" ${action}" />
3333 </j : forEach >
3434 </table >
3535 </div >
You can’t perform that action at this time.
0 commit comments