Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
凌波微步_大先生
dashboard
提交
202c8ba5
D
dashboard
项目概览
凌波微步_大先生
/
dashboard
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dashboard
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
202c8ba5
编写于
1月 20, 2016
作者:
P
Piotr Bryk
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #267 from bryk/http-path-prefix
Remove leading slash from all XHR calls
上级
993b479e
e315f237
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
16 addition
and
16 deletion
+16
-16
src/app/frontend/deploy/createnamespace_controller.js
src/app/frontend/deploy/createnamespace_controller.js
+1
-1
src/app/frontend/deploy/deploy_stateconfig.js
src/app/frontend/deploy/deploy_stateconfig.js
+1
-1
src/app/frontend/deploy/deployfromsettings_controller.js
src/app/frontend/deploy/deployfromsettings_controller.js
+1
-1
src/app/frontend/deploy/uniquename_directive.js
src/app/frontend/deploy/uniquename_directive.js
+1
-1
src/app/frontend/logs/logs_stateconfig.js
src/app/frontend/logs/logs_stateconfig.js
+2
-2
src/app/frontend/replicasetdetail/replicasetdetail_stateconfig.js
...frontend/replicasetdetail/replicasetdetail_stateconfig.js
+3
-3
src/app/frontend/replicasetlist/logsmenu_controller.js
src/app/frontend/replicasetlist/logsmenu_controller.js
+1
-1
src/app/frontend/replicasetlist/replicasetlist_stateconfig.js
...app/frontend/replicasetlist/replicasetlist_stateconfig.js
+1
-1
src/test/frontend/deploy/uniquename_directive_test.js
src/test/frontend/deploy/uniquename_directive_test.js
+3
-3
src/test/frontend/replicasetdetail/deletereplicaset_service_test.js
...rontend/replicasetdetail/deletereplicaset_service_test.js
+2
-2
未找到文件。
src/app/frontend/deploy/createnamespace_controller.js
浏览文件 @
202c8ba5
...
...
@@ -92,7 +92,7 @@ export default class NamespaceDialogController {
let
namespaceSpec
=
{
name
:
this
.
namespace
};
/** @type {!angular.Resource<!backendApi.NamespaceSpec>} */
let
resource
=
this
.
resource_
(
'
/
api/namespaces
'
);
let
resource
=
this
.
resource_
(
'
api/namespaces
'
);
resource
.
save
(
namespaceSpec
,
...
...
src/app/frontend/deploy/deploy_stateconfig.js
浏览文件 @
202c8ba5
...
...
@@ -40,7 +40,7 @@ export default function stateConfig($stateProvider) {
*/
function
resolveNamespaces
(
$resource
)
{
/** @type {!angular.Resource<!backendApi.NamespaceList>} */
let
resource
=
$resource
(
'
/
api/namespaces
'
);
let
resource
=
$resource
(
'
api/namespaces
'
);
return
resource
.
get
().
$promise
;
}
src/app/frontend/deploy/deployfromsettings_controller.js
浏览文件 @
202c8ba5
...
...
@@ -167,7 +167,7 @@ export default class DeployFromSettingsController {
let
defer
=
this
.
q_
.
defer
();
/** @type {!angular.Resource<!backendApi.AppDeploymentSpec>} */
let
resource
=
this
.
resource_
(
'
/
api/appdeployments
'
);
let
resource
=
this
.
resource_
(
'
api/appdeployments
'
);
resource
.
save
(
appDeploymentSpec
,
(
savedConfig
)
=>
{
...
...
src/app/frontend/deploy/uniquename_directive.js
浏览文件 @
202c8ba5
...
...
@@ -53,7 +53,7 @@ function validate(name, namespace, resource, q) {
let
deferred
=
q
.
defer
();
/** @type {!angular.Resource<!backendApi.AppNameValiditySpec>} */
let
resourceClass
=
resource
(
'
/
api/appdeployments/validate/name
'
);
let
resourceClass
=
resource
(
'
api/appdeployments/validate/name
'
);
/** @type {!backendApi.AppNameValiditySpec} */
let
spec
=
{
name
:
name
,
namespace
:
namespace
};
resourceClass
.
save
(
...
...
src/app/frontend/logs/logs_stateconfig.js
浏览文件 @
202c8ba5
...
...
@@ -56,7 +56,7 @@ export default function stateConfig($stateProvider) {
function
resolveReplicaSetPods
(
$stateParams
,
$resource
)
{
/** @type {!angular.Resource<!backendApi.ReplicaSetPods>} */
let
resource
=
$resource
(
`
/
api/replicasets/pods/
${
$stateParams
.
namespace
}
/
${
$stateParams
.
replicaSet
}
`
);
$resource
(
`api/replicasets/pods/
${
$stateParams
.
namespace
}
/
${
$stateParams
.
replicaSet
}
`
);
return
resource
.
get
().
$promise
;
}
...
...
@@ -69,7 +69,7 @@ function resolveReplicaSetPods($stateParams, $resource) {
*/
function
resolvePodLogs
(
$stateParams
,
$resource
)
{
/** @type {!angular.Resource<!backendApi.Logs>} */
let
resource
=
$resource
(
`
/
api/logs/
${
$stateParams
.
namespace
}
/
${
$stateParams
.
podId
}
/
${
$stateParams
.
container
}
`
);
let
resource
=
$resource
(
`api/logs/
${
$stateParams
.
namespace
}
/
${
$stateParams
.
podId
}
/
${
$stateParams
.
container
}
`
);
return
resource
.
get
().
$promise
;
}
src/app/frontend/replicasetdetail/replicasetdetail_stateconfig.js
浏览文件 @
202c8ba5
...
...
@@ -43,7 +43,7 @@ export default function stateConfig($stateProvider) {
* @ngInject
*/
export
function
getReplicaSetDetailsResource
(
$stateParams
,
$resource
)
{
return
$resource
(
'
/api/replicasets/:namespace/:replicaSet
'
,
$stateParams
);
return
$resource
(
`api/replicasets/
${
$stateParams
.
namespace
}
/
${
$stateParams
.
replicaSet
}
`
);
}
/**
...
...
@@ -53,7 +53,7 @@ export function getReplicaSetDetailsResource($stateParams, $resource) {
* @ngInject
*/
function
getReplicaSetSpecPodsResource
(
$stateParams
,
$resource
)
{
return
$resource
(
'
/api/replicasets/:namespace/:replicaSet/update/pods
'
,
$stateParams
);
return
$resource
(
`api/replicasets/
${
$stateParams
.
namespace
}
/
${
$stateParams
.
replicaSet
}
/update/pods`
);
}
/**
...
...
@@ -73,7 +73,7 @@ function resolveReplicaSetDetails(replicaSetDetailResource) {
*/
function
resolveReplicaSetEvents
(
$stateParams
,
$resource
)
{
/** @type {!angular.Resource<!backendApi.Events>} */
let
resource
=
$resource
(
'
/api/events/:namespace/:replicaSet
'
,
$stateParams
);
let
resource
=
$resource
(
`api/events/
${
$stateParams
.
namespace
}
/
${
$stateParams
.
replicaSet
}
`
);
return
resource
.
get
().
$promise
;
}
src/app/frontend/replicasetlist/logsmenu_controller.js
浏览文件 @
202c8ba5
...
...
@@ -78,7 +78,7 @@ export default class LogsMenuController {
getReplicaSetPods_
()
{
/** @type {!angular.Resource<!backendApi.ReplicaSetPods>} */
let
resource
=
this
.
resource_
(
`
/
api/replicasets/pods/
${
this
.
namespace
}
/
${
this
.
replicaSetName
}
?limit=10`
);
this
.
resource_
(
`api/replicasets/pods/
${
this
.
namespace
}
/
${
this
.
replicaSetName
}
?limit=10`
);
resource
.
get
(
(
replicaSetPods
)
=>
{
...
...
src/app/frontend/replicasetlist/replicasetlist_stateconfig.js
浏览文件 @
202c8ba5
...
...
@@ -70,7 +70,7 @@ function redirectIfNeeded($state, $timeout, replicaSets) {
*/
function
resolveReplicaSets
(
$resource
)
{
/** @type {!angular.Resource<!backendApi.ReplicaSetList>} */
let
resource
=
$resource
(
'
/
api/replicasets
'
);
let
resource
=
$resource
(
'
api/replicasets
'
);
return
resource
.
get
().
$promise
;
}
src/test/frontend/deploy/uniquename_directive_test.js
浏览文件 @
202c8ba5
...
...
@@ -35,7 +35,7 @@ describe('DeployFromSettings controller', () => {
it
(
'
should validate name asynchronosuly
'
,
()
=>
{
scope
.
name
=
'
foo-name
'
;
scope
.
namespace
=
'
foo-namespace
'
;
let
endpoint
=
httpBackend
.
when
(
'
POST
'
,
'
/
api/appdeployments/validate/name
'
);
let
endpoint
=
httpBackend
.
when
(
'
POST
'
,
'
api/appdeployments/validate/name
'
);
let
elem
=
compileFn
(
scope
)[
0
];
expect
(
elem
.
classList
).
toContain
(
'
ng-valid
'
);
...
...
@@ -67,7 +67,7 @@ describe('DeployFromSettings controller', () => {
scope
.
namespace
=
'
foo-namespace
'
;
let
elem
=
compileFn
(
scope
)[
0
];
httpBackend
.
when
(
'
POST
'
,
'
/
api/appdeployments/validate/name
'
).
respond
({
httpBackend
.
when
(
'
POST
'
,
'
api/appdeployments/validate/name
'
).
respond
({
valid
:
false
,
});
httpBackend
.
flush
();
...
...
@@ -83,7 +83,7 @@ describe('DeployFromSettings controller', () => {
scope
.
namespace
=
'
foo-namespace
'
;
let
elem
=
compileFn
(
scope
)[
0
];
httpBackend
.
when
(
'
POST
'
,
'
/
api/appdeployments/validate/name
'
).
respond
(
503
,
''
);
httpBackend
.
when
(
'
POST
'
,
'
api/appdeployments/validate/name
'
).
respond
(
503
,
''
);
httpBackend
.
flush
();
expect
(
elem
.
classList
).
not
.
toContain
(
'
ng-pending
'
);
expect
(
elem
.
classList
).
toContain
(
'
ng-invalid
'
);
...
...
src/test/frontend/replicasetdetail/deletereplicaset_service_test.js
浏览文件 @
202c8ba5
...
...
@@ -39,7 +39,7 @@ describe('Delete replica set service', () => {
// given
let
deferred
=
q
.
defer
();
spyOn
(
mdDialog
,
'
show
'
).
and
.
returnValue
(
deferred
.
promise
);
httpBackend
.
when
(
'
DELETE
'
,
'
/
api/replicasets/foo-namespace/foo-name
'
).
respond
({});
httpBackend
.
when
(
'
DELETE
'
,
'
api/replicasets/foo-namespace/foo-name
'
).
respond
({});
// when
let
promise
=
service
.
showDeleteDialog
(
'
foo-namespace
'
,
'
foo-name
'
);
...
...
@@ -54,7 +54,7 @@ describe('Delete replica set service', () => {
// given
let
deferred
=
q
.
defer
();
spyOn
(
mdDialog
,
'
show
'
).
and
.
returnValue
(
deferred
.
promise
);
httpBackend
.
when
(
'
DELETE
'
,
'
/
api/replicasets/foo-namespace/foo-name
'
).
respond
(
404
,
'
Error
'
);
httpBackend
.
when
(
'
DELETE
'
,
'
api/replicasets/foo-namespace/foo-name
'
).
respond
(
404
,
'
Error
'
);
// when
let
promise
=
service
.
showDeleteDialog
(
'
foo-namespace
'
,
'
foo-name
'
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录