如何创建仅显示当前运行任务的Jenkins 2.x视图?
Got it, let's fix that painful endless-scrolling experience with your running jobs view. Here are three practical ways to build a clean, focused view for only active running jobs in Jenkins 2.x—tailored for your 1000+ job instance and 5-30 concurrent running jobs.
1. Use Jenkins' Built-in List View (No Plugins Needed)
This is the quickest, no-fuss approach since you don't need to install anything extra:
- Head to your Jenkins dashboard, click New View in the left sidebar.
- Name your view (e.g., "Active Running Jobs"), select List View, then hit OK.
- In the view config page, scroll to the Job Filters section:
- Check the box for Include only jobs currently running—this is the core filter you need.
- Optional: Add extra filters if you want (like job name patterns or specific nodes), but stick to the running jobs filter first.
- Trim down the displayed columns to keep things lean:
- Remove unnecessary columns like "Last Success" or "Last Failure". Keep only critical ones: Job Name, Executor (Node), Start Time, Build Progress, Console Output Link.
- Save the view. Now you'll have a clutter-free list of only actively running jobs, no more scrolling through a mile-long sidebar.
2. Enhance with the Build Monitor View Plugin (Better Visualization)
If you want a more intuitive, dashboard-style view (great for quickly spotting running jobs at a glance), use this popular plugin:
- First, install the Build Monitor View plugin via Jenkins' Plugin Manager (Manage Jenkins > Plugins > Available Plugins).
- Create a new view, select Build Monitor View, name it, and click OK.
- In the configuration:
- Under Jobs to display, pick Include only jobs currently running (find this in the filter options).
- Customize the display: Set it to show jobs as cards with progress bars, assign colors by node or job type, and enable auto-refresh so you don't have to manually reload.
- Adjust the layout (grid vs. list) to fit your screen—your 5-30 concurrent jobs will look perfect here.
- Save, and you'll get a dynamic, easy-to-scan view that's way more usable than the cramped node sidebar.
3. Add a Running Jobs Widget to Your Dashboard (Instant Access)
If you prefer having running jobs visible right on your main Jenkins dashboard, use the Dashboard View plugin:
- Install the Dashboard View plugin from the Plugin Manager.
- Go to your main dashboard, click Edit Dashboard (top right corner).
- Click Add Widget, search for Running Jobs and add it to your dashboard.
- Configure the widget:
- Set it to show only running jobs, limit the displayed count if needed, and choose which details to include (node, start time, etc.).
- Resize the widget to take up more space for better visibility.
- Save the dashboard, and you'll have a persistent, at-a-glance view of running jobs without navigating to a separate page.
Performance Tips for Large Jenkins Instances (1000+ Jobs)
Since you have a huge number of jobs, keep these in mind to keep your view responsive:
- Enable Lazy Loading in the view configuration (if available) to load job data incrementally instead of all at once.
- Avoid overloading the view with too many columns or complex filters—stick to the essentials to reduce Jenkins' load.
- For plugin-based views, use the latest plugin versions—they often include performance optimizations for large job counts.
Bonus: Make This View Easy to Access
- Set your new running jobs view as the default dashboard (Manage Jenkins > Configure System > Jenkins Location > Default View).
- Add a direct link to it in the Jenkins sidebar (Manage Jenkins > Configure System > Sidebar Link) so you can jump to it from anywhere.
内容的提问来源于stack exchange,提问作者sorin

