Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
LinuxSuRen
jenkins
提交
a4172953
J
jenkins
项目概览
LinuxSuRen
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
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,发现更多精彩内容 >>
提交
a4172953
编写于
7月 26, 2012
作者:
K
Kohsuke Kawaguchi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added "manage Jenkins" as a sub-menu to the Jenkins context menu.
上级
d0dbd3b8
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
25 addition
and
5 deletion
+25
-5
changelog.html
changelog.html
+2
-0
core/src/main/java/jenkins/model/Jenkins.java
core/src/main/java/jenkins/model/Jenkins.java
+8
-1
core/src/main/java/jenkins/model/ModelObjectWithContextMenu.java
...c/main/java/jenkins/model/ModelObjectWithContextMenu.java
+5
-1
core/src/main/resources/jenkins/model/Jenkins/manage.jelly
core/src/main/resources/jenkins/model/Jenkins/manage.jelly
+5
-1
core/src/main/resources/lib/layout/breadcrumbs.js
core/src/main/resources/lib/layout/breadcrumbs.js
+5
-2
未找到文件。
changelog.html
浏览文件 @
a4172953
...
...
@@ -84,6 +84,8 @@ Upcoming changes</a>
Added REST API for view manipulation
<li
class=
"rfe"
>
OS X installer now has an Uninstall tool (in /Library/Application Support/Jenkins).
<li
class=
rfe
>
Added "manage Jenkins" as a sub-menu to the Jenkins context menu.
<li
class=
rfe
>
Executor is exposed to the remote API
(
<a
href=
"https://github.com/jenkinsci/jenkins/pull/520"
>
pull 520
</a>
)
...
...
core/src/main/java/jenkins/model/Jenkins.java
浏览文件 @
a4172953
...
...
@@ -3024,7 +3024,14 @@ public class Jenkins extends AbstractCIBase implements ModifiableItemGroup<TopLe
}
public
ContextMenu
doContextMenu
(
StaplerRequest
request
,
StaplerResponse
response
)
throws
IOException
,
JellyException
{
return
new
ContextMenu
().
from
(
this
,
request
,
response
);
ContextMenu
menu
=
new
ContextMenu
().
from
(
this
,
request
,
response
);
for
(
MenuItem
i
:
menu
.
items
)
{
if
(
i
.
url
.
equals
(
"/manage"
))
{
// add "Manage Jenkins" subitems
i
.
subMenu
=
new
ContextMenu
().
from
(
this
,
request
,
response
,
"manage"
);
}
}
return
menu
;
}
/**
...
...
core/src/main/java/jenkins/model/ModelObjectWithContextMenu.java
浏览文件 @
a4172953
...
...
@@ -110,8 +110,12 @@ public interface ModelObjectWithContextMenu extends ModelObject {
* directly to provide alternative semantics.
*/
public
ContextMenu
from
(
ModelObjectWithContextMenu
self
,
StaplerRequest
request
,
StaplerResponse
response
)
throws
JellyException
,
IOException
{
return
from
(
self
,
request
,
response
,
"sidepanel"
);
}
public
ContextMenu
from
(
ModelObjectWithContextMenu
self
,
StaplerRequest
request
,
StaplerResponse
response
,
String
view
)
throws
JellyException
,
IOException
{
WebApp
webApp
=
WebApp
.
getCurrent
();
final
Script
s
=
webApp
.
getMetaClass
(
self
).
getTearOff
(
JellyClassTearOff
.
class
).
findScript
(
"sidepanel"
);
final
Script
s
=
webApp
.
getMetaClass
(
self
).
getTearOff
(
JellyClassTearOff
.
class
).
findScript
(
view
);
if
(
s
!=
null
)
{
JellyFacet
facet
=
webApp
.
getFacet
(
JellyFacet
.
class
);
request
.
setAttribute
(
"taskTags"
,
this
);
// <l:task> will look for this variable and populate us
...
...
core/src/main/resources/jenkins/model/Jenkins/manage.jelly
浏览文件 @
a4172953
...
...
@@ -31,6 +31,8 @@ THE SOFTWARE.
<d:taglib uri="local">
<!-- table to show a map -->
<d:tag name="feature">
<j:set var="iconUrl" value="${icon.startsWith('/') ? resURL+icon : imagesURL+'/48x48/'+icon}"/>
${taskTags!=null and attrs.contextMenu!='false' ? taskTags.add(href,iconUrl,title) : null}
<t:summary icon="${icon}"
href="${href}" iconOnly="true">
<div class="link"><a href="${href}">${title}</a></div>
...
...
@@ -41,7 +43,9 @@ THE SOFTWARE.
</d:tag>
</d:taglib>
<st:include page="sidepanel.jelly" />
<j:if test="${!taskTags}">
<st:include page="sidepanel.jelly" />
</j:if>
<l:main-panel>
<h1>${%Manage Jenkins}</h1>
<j:if test="${it.checkURIEncodingEnabled}">
...
...
core/src/main/resources/lib/layout/breadcrumbs.js
浏览文件 @
a4172953
...
...
@@ -102,9 +102,12 @@ var breadcrumbs = (function() {
xhr
=
new
Ajax
.
Request
(
combinePath
(
e
.
getAttribute
(
"
href
"
),
"
contextMenu
"
),
{
onComplete
:
function
(
x
)
{
var
a
=
x
.
responseText
.
evalJSON
().
items
;
a
.
each
(
function
(
e
)
{
function
fillMenuItem
(
e
)
{
e
.
text
=
makeMenuHtml
(
e
.
icon
,
e
.
displayName
);
});
if
(
e
.
subMenu
!=
null
)
e
.
subMenu
=
{
id
:
"
submenu
"
+
(
iota
++
),
itemdata
:
e
.
subMenu
.
items
.
each
(
fillMenuItem
)};
}
a
.
each
(
fillMenuItem
);
e
.
items
=
function
()
{
return
a
};
showMenu
(
a
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录