Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FIY695
jenkins
提交
6d4e363e
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,发现更多精彩内容 >>
提交
6d4e363e
编写于
2月 16, 2012
作者:
K
Kohsuke Kawaguchi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Inline html to report the plugin that implemented the feature.
上级
e3cf9858
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
31 addition
and
1 deletion
+31
-1
changelog.html
changelog.html
+2
-0
core/src/main/java/hudson/model/Descriptor.java
core/src/main/java/hudson/model/Descriptor.java
+19
-0
core/src/main/resources/hudson/model/Messages.properties
core/src/main/resources/hudson/model/Messages.properties
+3
-0
war/src/main/webapp/css/style.css
war/src/main/webapp/css/style.css
+5
-0
war/src/main/webapp/scripts/hudson-behavior.js
war/src/main/webapp/scripts/hudson-behavior.js
+2
-1
未找到文件。
changelog.html
浏览文件 @
6d4e363e
...
...
@@ -65,6 +65,8 @@ Upcoming changes</a>
Added UI component to show notification bar at the top of the page
<li
class=
"rfe"
>
Users can configure search to be case insensitive.
<li
class=
"rfe"
>
Inline help now reports the plugin that contributes the said feature.
</ul>
</div>
<!--=TRUNK-END=-->
...
...
core/src/main/java/hudson/model/Descriptor.java
浏览文件 @
6d4e363e
...
...
@@ -24,6 +24,7 @@
package
hudson.model
;
import
hudson.DescriptorExtensionList
;
import
hudson.PluginWrapper
;
import
hudson.RelativePath
;
import
hudson.XmlFile
;
import
hudson.BulkChange
;
...
...
@@ -779,6 +780,16 @@ public abstract class Descriptor<T extends Describable<T>> implements Saveable {
return
new
XmlFile
(
new
File
(
Jenkins
.
getInstance
().
getRootDir
(),
getId
()+
".xml"
));
}
/**
* Returns the plugin in which this descriptor is defined.
*
* @return
* null to indicate that this descriptor came from the core.
*/
protected
PluginWrapper
getPlugin
()
{
return
Jenkins
.
getInstance
().
getPluginManager
().
whichPlugin
(
clazz
);
}
/**
* Serves <tt>help.html</tt> from the resource of {@link #clazz}.
*/
...
...
@@ -788,6 +799,14 @@ public abstract class Descriptor<T extends Describable<T>> implements Saveable {
path
=
path
.
replace
(
'/'
,
'-'
);
PluginWrapper
pw
=
getPlugin
();
if
(
pw
!=
null
)
{
rsp
.
setHeader
(
"X-Plugin-Short-Name"
,
pw
.
getShortName
());
rsp
.
setHeader
(
"X-Plugin-Long-Name"
,
pw
.
getLongName
());
rsp
.
setHeader
(
"X-Plugin-From"
,
Messages
.
Descriptor_From
(
pw
.
getLongName
().
replace
(
"Hudson"
,
"Jenkins"
).
replace
(
"hudson"
,
"jenkins"
),
pw
.
getUrl
()));
}
for
(
Klass
<?>
c
=
getKlass
();
c
!=
null
;
c
=
c
.
getSuperClass
())
{
RequestDispatcher
rd
=
Stapler
.
getCurrentRequest
().
getView
(
c
,
"help"
+
path
);
if
(
rd
!=
null
)
{
// template based help page
...
...
core/src/main/resources/hudson/model/Messages.properties
浏览文件 @
6d4e363e
...
...
@@ -103,6 +103,9 @@ ComputerSet.NoSuchSlave=No such slave: {0}
ComputerSet.SlaveAlreadyExists
=
Slave called ''{0}'' already exists
ComputerSet.SpecifySlaveToCopy
=
Specify which slave to copy
ComputerSet.DisplayName
=
nodes
Descriptor.From
=
(from <a href="{1}">{0}</a>)
Executor.NotAvailable
=
N/A
ExternalJob.DisplayName
=
Monitor an external job
...
...
war/src/main/webapp/css/style.css
浏览文件 @
6d4e363e
...
...
@@ -562,6 +562,11 @@ LABEL.attach-previous {
margin-bottom
:
1em
;
}
.help
.from-plugin
{
text-align
:
right
;
color
:
#666
;
}
.help-area
{
/* this marker class is used by JavaScript to locate the area to display help text. */
}
...
...
war/src/main/webapp/scripts/hudson-behavior.js
浏览文件 @
6d4e363e
...
...
@@ -715,7 +715,8 @@ var hudsonRules = {
new
Ajax
.
Request
(
this
.
getAttribute
(
"
helpURL
"
),
{
method
:
'
get
'
,
onSuccess
:
function
(
x
)
{
div
.
innerHTML
=
x
.
responseText
;
var
from
=
x
.
getResponseHeader
(
"
X-Plugin-From
"
);
div
.
innerHTML
=
x
.
responseText
+
(
from
?
"
<div class='from-plugin'>
"
+
from
+
"
</div>
"
:
""
);
layoutUpdateCallback
.
call
();
},
onFailure
:
function
(
x
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录