Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
jenkins
提交
8e6a3f7f
J
jenkins
项目概览
xxadev
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jenkins
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8e6a3f7f
编写于
4月 24, 2013
作者:
K
Kohsuke Kawaguchi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Converted the build queue and executors into Widgets.
上级
f1669601
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
52 addition
and
3 deletion
+52
-3
core/src/main/java/hudson/widgets/Widget.java
core/src/main/java/hudson/widgets/Widget.java
+3
-0
core/src/main/java/jenkins/widgets/BuildQueueWidget.java
core/src/main/java/jenkins/widgets/BuildQueueWidget.java
+18
-0
core/src/main/java/jenkins/widgets/ExecutorsWidget.java
core/src/main/java/jenkins/widgets/ExecutorsWidget.java
+17
-0
core/src/main/resources/hudson/model/View/sidepanel.jelly
core/src/main/resources/hudson/model/View/sidepanel.jelly
+1
-2
core/src/main/resources/jenkins/model/Jenkins/sidepanel.jelly
.../src/main/resources/jenkins/model/Jenkins/sidepanel.jelly
+1
-1
core/src/main/resources/jenkins/widgets/BuildQueueWidget/index.groovy
...n/resources/jenkins/widgets/BuildQueueWidget/index.groovy
+7
-0
core/src/main/resources/jenkins/widgets/ExecutorsWidget/index.groovy
...in/resources/jenkins/widgets/ExecutorsWidget/index.groovy
+5
-0
未找到文件。
core/src/main/java/hudson/widgets/Widget.java
浏览文件 @
8e6a3f7f
...
...
@@ -24,6 +24,7 @@
package
hudson.widgets
;
import
hudson.ExtensionPoint
;
import
hudson.model.View
;
/**
* Box to be rendered in the side panel.
...
...
@@ -32,6 +33,8 @@ import hudson.ExtensionPoint;
* <ul>
* <li><b>index.jelly</b> should display the widget. It should have:
* <l:pane width="2" title="..."> ...body... </l:pane> structure.
* In this view, "it" points to the {@link Widget} and "view" points to {@link View}
* that's rendering the widget.
*
* @author Kohsuke Kawaguchi
* @since 1.146
...
...
core/src/main/java/jenkins/widgets/BuildQueueWidget.java
0 → 100644
浏览文件 @
8e6a3f7f
package
jenkins.widgets
;
import
hudson.Extension
;
import
hudson.widgets.Widget
;
import
jenkins.model.Jenkins
;
/**
* Show the default build queue.
*
* A plugin may remove this from {@link Jenkins#getWidgets()} and swap in their own.
*
* @author Kohsuke Kawaguchi
* @sine 1.514
*/
@Extension
(
ordinal
=
200
)
// historically this was the top most widget
public
class
BuildQueueWidget
extends
Widget
{
}
core/src/main/java/jenkins/widgets/ExecutorsWidget.java
0 → 100644
浏览文件 @
8e6a3f7f
package
jenkins.widgets
;
import
hudson.Extension
;
import
hudson.widgets.Widget
;
import
jenkins.model.Jenkins
;
/**
* The default executors widget.
*
* A plugin may remove this from {@link Jenkins#getWidgets()} and swap in their own.
*
* @author Kohsuke Kawaguchi
* @since 1.514
*/
@Extension
(
ordinal
=
100
)
// historically this was above normal widgets and below BuildQueueWidget
public
class
ExecutorsWidget
extends
Widget
{
}
core/src/main/resources/hudson/model/View/sidepanel.jelly
浏览文件 @
8e6a3f7f
...
...
@@ -70,9 +70,8 @@ THE SOFTWARE.
<st:include page="tasks-bottom.jelly" it="${it.owner}" optional="true" />
<t:actions />
</l:tasks>
<t:queue items="${it.approximateQueueItemsQuickly}" />
<t:executors computers="${it.computers}" />
<j:forEach var="w" items="${it.widgets}">
<j:set var="view" value="${it}" /><!-- expose the view that's rendering this sidepanel to the widget -->
<st:include it="${w}" page="index.jelly" />
</j:forEach>
</l:side-panel>
...
...
core/src/main/resources/jenkins/model/Jenkins/sidepanel.jelly
浏览文件 @
8e6a3f7f
...
...
@@ -22,5 +22,5 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<?jelly escape-by-default='true'?>
Li
<?jelly escape-by-default='true'?>
<st:include it="${it.primaryView}" page="sidepanel.jelly" xmlns:st="jelly:stapler" />
\ No newline at end of file
core/src/main/resources/jenkins/widgets/BuildQueueWidget/index.groovy
0 → 100644
浏览文件 @
8e6a3f7f
package
jenkins.widgets.BuildQueueWidget
;
def
t
=
namespace
(
lib
.
JenkinsTagLib
.
class
)
text
(
request
.
ancestors
.
last
().
object
)
t
.
queue
(
items:
view
.
approximateQueueItemsQuickly
)
\ No newline at end of file
core/src/main/resources/jenkins/widgets/ExecutorsWidget/index.groovy
0 → 100644
浏览文件 @
8e6a3f7f
package
jenkins.widgets.ExecutorsWidget
def
t
=
namespace
(
lib
.
JenkinsTagLib
.
class
)
t
.
executors
(
computers:
view
.
computers
)
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录