Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
jenkins
提交
92fbb8fa
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,发现更多精彩内容 >>
提交
92fbb8fa
编写于
2月 02, 2011
作者:
B
Brian Atkinson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix CLRF
上级
c6198ee2
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
131 addition
and
131 deletion
+131
-131
core/src/main/java/hudson/util/ComboBoxModel.java
core/src/main/java/hudson/util/ComboBoxModel.java
+69
-69
core/src/main/resources/hudson/tasks/test/MetaTabulatedResult/body_de.properties
.../hudson/tasks/test/MetaTabulatedResult/body_de.properties
+8
-8
core/src/main/resources/hudson/views/LastDurationColumn/columnHeader_zh_CN.properties
...on/views/LastDurationColumn/columnHeader_zh_CN.properties
+1
-1
test/src/test/java/lib/form/NameRefTest.java
test/src/test/java/lib/form/NameRefTest.java
+53
-53
未找到文件。
core/src/main/java/hudson/util/ComboBoxModel.java
浏览文件 @
92fbb8fa
/*
* The MIT License
*
* Copyright (c) 2004-2009, CollabNet
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package
hudson.util
;
import
net.sf.json.JSONArray
;
import
org.kohsuke.stapler.HttpResponse
;
import
org.kohsuke.stapler.StaplerRequest
;
import
org.kohsuke.stapler.StaplerResponse
;
import
org.kohsuke.stapler.export.Flavor
;
import
javax.servlet.ServletException
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
static
java
.
util
.
Arrays
.
asList
;
/**
* Model object for dynamically filed combo box, which is really just {@code ArrayList<String>}
*
* @author Kohsuke Kawaguchi
*/
public
class
ComboBoxModel
extends
ArrayList
<
String
>
implements
HttpResponse
{
public
ComboBoxModel
(
int
initialCapacity
)
{
super
(
initialCapacity
);
}
public
ComboBoxModel
()
{
}
public
ComboBoxModel
(
Collection
<?
extends
String
>
c
)
{
super
(
c
);
}
public
ComboBoxModel
(
String
...
values
)
{
this
(
asList
(
values
));
}
public
void
generateResponse
(
StaplerRequest
req
,
StaplerResponse
rsp
,
Object
node
)
throws
IOException
,
ServletException
{
rsp
.
setContentType
(
Flavor
.
JSON
.
contentType
);
PrintWriter
w
=
rsp
.
getWriter
();
w
.
print
(
'('
);
JSONArray
.
fromObject
(
this
).
write
(
w
);
w
.
print
(
')'
);
}
}
/*
* The MIT License
*
* Copyright (c) 2004-2009, CollabNet
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package
hudson.util
;
import
net.sf.json.JSONArray
;
import
org.kohsuke.stapler.HttpResponse
;
import
org.kohsuke.stapler.StaplerRequest
;
import
org.kohsuke.stapler.StaplerResponse
;
import
org.kohsuke.stapler.export.Flavor
;
import
javax.servlet.ServletException
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
static
java
.
util
.
Arrays
.
asList
;
/**
* Model object for dynamically filed combo box, which is really just {@code ArrayList<String>}
*
* @author Kohsuke Kawaguchi
*/
public
class
ComboBoxModel
extends
ArrayList
<
String
>
implements
HttpResponse
{
public
ComboBoxModel
(
int
initialCapacity
)
{
super
(
initialCapacity
);
}
public
ComboBoxModel
()
{
}
public
ComboBoxModel
(
Collection
<?
extends
String
>
c
)
{
super
(
c
);
}
public
ComboBoxModel
(
String
...
values
)
{
this
(
asList
(
values
));
}
public
void
generateResponse
(
StaplerRequest
req
,
StaplerResponse
rsp
,
Object
node
)
throws
IOException
,
ServletException
{
rsp
.
setContentType
(
Flavor
.
JSON
.
contentType
);
PrintWriter
w
=
rsp
.
getWriter
();
w
.
print
(
'('
);
JSONArray
.
fromObject
(
this
).
write
(
w
);
w
.
print
(
')'
);
}
}
core/src/main/resources/hudson/tasks/test/MetaTabulatedResult/body_de.properties
浏览文件 @
92fbb8fa
...
...
@@ -20,13 +20,13 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
All\
Failed\
Tests
=
Alle fehlgeschlagenen Tests
Test\
Name
=
Testname
Duration
=
Dauer
Age
=
Alter
All\
Tests
=
Alle Tests
Fail
=
Fehlgeschlagen
Skip
=
Übersprungen
All\
Failed\
Tests
=
Alle fehlgeschlagenen Tests
Test\
Name
=
Testname
Duration
=
Dauer
Age
=
Alter
All\
Tests
=
Alle Tests
Fail
=
Fehlgeschlagen
Skip
=
Übersprungen
diff
=
Diff.
Total
=
Summe
Loading...
=
Lade Daten...
Loading...
=
Lade Daten...
core/src/main/resources/hudson/views/LastDurationColumn/columnHeader_zh_CN.properties
浏览文件 @
92fbb8fa
...
...
@@ -20,5 +20,5 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
Last\
Duration
=
\u
4E0A
\u
6B21
\u6301\u
7EED
\u
65F6
\u
95F4
Last\
Duration
=
\u
4E0A
\u
6B21
\u6301\u
7EED
\u
65F6
\u
95F4
test/src/test/java/lib/form/NameRefTest.java
浏览文件 @
92fbb8fa
/*
* The MIT License
*
* Copyright (c) 2004-2010, CollabNet.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package
lib.form
;
import
com.gargoylesoftware.htmlunit.html.HtmlForm
;
import
com.gargoylesoftware.htmlunit.html.HtmlPage
;
import
hudson.util.FormValidation
;
import
net.sf.json.JSONObject
;
import
org.jvnet.hudson.test.HudsonTestCase
;
import
org.kohsuke.stapler.HttpResponse
;
import
org.kohsuke.stapler.HttpResponses
;
import
org.kohsuke.stapler.StaplerRequest
;
/**
* Tests the handling of @nameRef in the form tree.
*
* @author Kohsuke Kawaguchi
*/
public
class
NameRefTest
extends
HudsonTestCase
{
public
void
test1
()
throws
Exception
{
hudson
.
setCrumbIssuer
(
null
);
HtmlPage
p
=
createWebClient
().
goTo
(
"self/test1"
);
submit
(
p
.
getFormByName
(
"config"
));
}
public
HttpResponse
doSubmitTest1
(
StaplerRequest
req
)
throws
Exception
{
JSONObject
f
=
req
.
getSubmittedForm
();
System
.
out
.
println
(
f
);
assertEquals
(
"{\"foo\":{\"bar\":{\"zot\":\"zot\"}}}"
,
f
.
toString
());
return
HttpResponses
.
ok
();
}
}
/*
* The MIT License
*
* Copyright (c) 2004-2010, CollabNet.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package
lib.form
;
import
com.gargoylesoftware.htmlunit.html.HtmlForm
;
import
com.gargoylesoftware.htmlunit.html.HtmlPage
;
import
hudson.util.FormValidation
;
import
net.sf.json.JSONObject
;
import
org.jvnet.hudson.test.HudsonTestCase
;
import
org.kohsuke.stapler.HttpResponse
;
import
org.kohsuke.stapler.HttpResponses
;
import
org.kohsuke.stapler.StaplerRequest
;
/**
* Tests the handling of @nameRef in the form tree.
*
* @author Kohsuke Kawaguchi
*/
public
class
NameRefTest
extends
HudsonTestCase
{
public
void
test1
()
throws
Exception
{
hudson
.
setCrumbIssuer
(
null
);
HtmlPage
p
=
createWebClient
().
goTo
(
"self/test1"
);
submit
(
p
.
getFormByName
(
"config"
));
}
public
HttpResponse
doSubmitTest1
(
StaplerRequest
req
)
throws
Exception
{
JSONObject
f
=
req
.
getSubmittedForm
();
System
.
out
.
println
(
f
);
assertEquals
(
"{\"foo\":{\"bar\":{\"zot\":\"zot\"}}}"
,
f
.
toString
());
return
HttpResponses
.
ok
();
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录