Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FIY695
jenkins
提交
42dbb2d0
J
jenkins
项目概览
FIY695
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
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,发现更多精彩内容 >>
提交
42dbb2d0
编写于
2月 18, 2012
作者:
C
Christoph Kutzinski
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Display total time for which item has been queued in tooltip
上级
fd0d1cbe
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
29 addition
and
2 deletion
+29
-2
core/src/main/java/hudson/model/Queue.java
core/src/main/java/hudson/model/Queue.java
+26
-1
core/src/main/resources/lib/hudson/queue.jelly
core/src/main/resources/lib/hudson/queue.jelly
+1
-1
core/src/main/resources/lib/hudson/queue.properties
core/src/main/resources/lib/hudson/queue.properties
+1
-0
core/src/main/resources/lib/hudson/queue_de.properties
core/src/main/resources/lib/hudson/queue_de.properties
+1
-0
未找到文件。
core/src/main/java/hudson/model/Queue.java
浏览文件 @
42dbb2d0
...
@@ -1211,6 +1211,8 @@ public class Queue extends ResourceController implements Saveable {
...
@@ -1211,6 +1211,8 @@ public class Queue extends ResourceController implements Saveable {
private
/*almost final*/
transient
FutureImpl
future
;
private
/*almost final*/
transient
FutureImpl
future
;
private
final
long
inQueueSince
;
/**
/**
* Build is blocked because another build is in progress,
* Build is blocked because another build is in progress,
* required {@link Resource}s are not available, or otherwise blocked
* required {@link Resource}s are not available, or otherwise blocked
...
@@ -1233,6 +1235,20 @@ public class Queue extends ResourceController implements Saveable {
...
@@ -1233,6 +1235,20 @@ public class Queue extends ResourceController implements Saveable {
@Exported
@Exported
public
boolean
isStuck
()
{
return
false
;
}
public
boolean
isStuck
()
{
return
false
;
}
/**
* Since when is this item in the queue.
* @return Unix timestamp
*/
@Exported
public
long
getInQueueSince
()
{
return
this
.
inQueueSince
;
}
public
String
getInQueueSinceString
()
{
long
duration
=
System
.
currentTimeMillis
()
-
this
.
inQueueSince
;
return
Util
.
getTimeSpanString
(
duration
);
}
/**
/**
* Can be used to wait for the completion (either normal, abnormal, or cancellation) of the {@link Task}.
* Can be used to wait for the completion (either normal, abnormal, or cancellation) of the {@link Task}.
* <p>
* <p>
...
@@ -1265,11 +1281,20 @@ public class Queue extends ResourceController implements Saveable {
...
@@ -1265,11 +1281,20 @@ public class Queue extends ResourceController implements Saveable {
this
.
task
=
task
;
this
.
task
=
task
;
this
.
id
=
id
;
this
.
id
=
id
;
this
.
future
=
future
;
this
.
future
=
future
;
this
.
inQueueSince
=
System
.
currentTimeMillis
();
for
(
Action
action:
actions
)
addAction
(
action
);
}
protected
Item
(
Task
task
,
List
<
Action
>
actions
,
int
id
,
FutureImpl
future
,
long
inQueueSince
)
{
this
.
task
=
task
;
this
.
id
=
id
;
this
.
future
=
future
;
this
.
inQueueSince
=
inQueueSince
;
for
(
Action
action:
actions
)
addAction
(
action
);
for
(
Action
action:
actions
)
addAction
(
action
);
}
}
protected
Item
(
Item
item
)
{
protected
Item
(
Item
item
)
{
this
(
item
.
task
,
item
.
getActions
(),
item
.
id
,
item
.
future
);
this
(
item
.
task
,
item
.
getActions
(),
item
.
id
,
item
.
future
,
item
.
inQueueSince
);
}
}
/**
/**
...
...
core/src/main/resources/lib/hudson/queue.jelly
浏览文件 @
42dbb2d0
...
@@ -58,7 +58,7 @@ THE SOFTWARE.
...
@@ -58,7 +58,7 @@ THE SOFTWARE.
<j:otherwise>
<j:otherwise>
<j:forEach var="item" items="${items}">
<j:forEach var="item" items="${items}">
<tr>
<tr>
<td class="pane" width="100%" tooltip="${item.why}${h.escape(item.params)}" style="white-space: normal;">
<td class="pane" width="100%" tooltip="${item.why}${h.escape(item.params)}
<br>${%WaitingSince(item.inQueueSinceString)}
" style="white-space: normal;">
<j:set var="stuck" value="${item.isStuck()}"/>
<j:set var="stuck" value="${item.isStuck()}"/>
<j:choose>
<j:choose>
<j:when test="${h.hasPermission(item.task,item.task.READ)}">
<j:when test="${h.hasPermission(item.task,item.task.READ)}">
...
...
core/src/main/resources/lib/hudson/queue.properties
0 → 100644
浏览文件 @
42dbb2d0
WaitingSince
=
Waiting since {0}
\ No newline at end of file
core/src/main/resources/lib/hudson/queue_de.properties
浏览文件 @
42dbb2d0
...
@@ -25,3 +25,4 @@ No\ builds\ in\ the\ queue.=Keine Builds geplant
...
@@ -25,3 +25,4 @@ No\ builds\ in\ the\ queue.=Keine Builds geplant
Jenkins\
is\
going\
to\
shut\
down.\
No\
further\
builds\
will\
be\
performed.
=
Jenkins fährt gerade herunter. Es werden keine weiteren Builds ausgeführt.
Jenkins\
is\
going\
to\
shut\
down.\
No\
further\
builds\
will\
be\
performed.
=
Jenkins fährt gerade herunter. Es werden keine weiteren Builds ausgeführt.
cancel
=
Abbrechen
cancel
=
Abbrechen
Unknown\
Task
=
Unbekannter Task
Unknown\
Task
=
Unbekannter Task
WaitingSince
=
Wartet seit {0}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录