forked from jenkinsci/build-monitor-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* max number of columns extended from 8 to 12 * Extend 'ByFullName' with OrdinalSet to gain advanced control on job order * Show Ordinal-Set config section only if 'ByFullName' is selected * Show Ordinal-Set config section only if 'ByFullName' is selected * revert: we do not need to extend to 12 columns, but we will introduce another formatting type which will use '.break' class * first implementation of group lanes: refine * revert some changes * improve method name * revert some changes * Bugfix: make sure that multi-hierarchy jobs are picking the top level job as title * Add screenshot to document additional features * increment version and handle review findings * revert version * fix css * clusterTitle with font-size: 100% Co-authored-by: Carlo Giorgetta (tzhgica1) <[email protected]>
- Loading branch information
1 parent
36f8e82
commit d9e6eb4
Showing
16 changed files
with
384 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
...n/java/com/smartcodeltd/jenkinsci/plugins/buildmonitor/viewmodel/ClusterTitleJobView.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package com.smartcodeltd.jenkinsci.plugins.buildmonitor.viewmodel; | ||
|
||
import com.cloudbees.hudson.plugins.folder.Folder; | ||
import com.smartcodeltd.jenkinsci.plugins.buildmonitor.BuildMonitorLogger; | ||
import com.smartcodeltd.jenkinsci.plugins.buildmonitor.facade.RelativeLocation; | ||
import com.smartcodeltd.jenkinsci.plugins.buildmonitor.installation.BuildMonitorBuildProperties; | ||
import hudson.model.FreeStyleProject; | ||
import hudson.model.Item; | ||
import hudson.model.ItemGroup; | ||
import hudson.model.Job; | ||
|
||
import java.util.Collections; | ||
import java.util.Date; | ||
|
||
public class ClusterTitleJobView extends JobView { | ||
|
||
private static final BuildMonitorLogger logger = BuildMonitorLogger.forClass(BuildMonitorBuildProperties.class); | ||
|
||
private String url; | ||
|
||
public static ClusterTitleJobView create(ItemGroup parent) { | ||
ItemGroup topLevelItem = getTopLevelItem(parent); | ||
Job clusterTitle = new FreeStyleProject(topLevelItem, ""); | ||
String url = topLevelItem instanceof Folder ? ((Folder) topLevelItem).getShortUrl() : topLevelItem.getUrl(); | ||
return new ClusterTitleJobView(clusterTitle, url); | ||
} | ||
|
||
private static ItemGroup getTopLevelItem(ItemGroup job) { | ||
ItemGroup ig = job; | ||
while(ig instanceof Item) { | ||
ItemGroup parent = ((Item) ig).getParent(); | ||
if (!(parent instanceof Item)) { // root found | ||
return ig; | ||
} | ||
ig = parent; | ||
} | ||
logger.warning("constructor", "Build Monitor could not find top level item of {0}", job.getFullName()); | ||
return ig; | ||
} | ||
|
||
private ClusterTitleJobView(Job<?, ?> clusterTitle, String url) { | ||
super(clusterTitle, Collections.emptyList(), false, RelativeLocation.of(clusterTitle), new Date(), false); | ||
this.url = url; | ||
} | ||
|
||
@Override | ||
public String url() { | ||
return url; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...martcodeltd/jenkinsci/plugins/buildmonitor/BuildMonitorView/help-displayClusterTitle.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<div> | ||
<p> | ||
If checked, then a title bar is displayed at the top of a job cluster, i.e. jobs sharing same root folder. | ||
The title bar contains the name of the root folder, whereas the jobs would only display their job names, | ||
without any hierarchy. | ||
</p> | ||
</div> |
Oops, something went wrong.