Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
凌波微步_大先生
dashboard
提交
b0b04d67
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,体验更适合开发者的 AI 搜索 >>
提交
b0b04d67
编写于
6月 22, 2016
作者:
S
Sebastian Florek
提交者:
GitHub
6月 22, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix external endpoints and add node port information to service details (#940)
上级
bb513461
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
55 addition
and
13 deletion
+55
-13
src/app/backend/resource/common/serviceport.go
src/app/backend/resource/common/serviceport.go
+4
-1
src/app/frontend/common/components/endpoint/endpoint.scss
src/app/frontend/common/components/endpoint/endpoint.scss
+20
-0
src/app/frontend/common/components/endpoint/externalendpoint.html
...frontend/common/components/endpoint/externalendpoint.html
+21
-8
src/app/frontend/common/components/endpoint/externalendpoint_component.js
.../common/components/endpoint/externalendpoint_component.js
+2
-2
src/app/frontend/common/components/endpoint/internalendpoint.html
...frontend/common/components/endpoint/internalendpoint.html
+5
-0
src/app/frontend/servicedetail/servicedetailinfo.html
src/app/frontend/servicedetail/servicedetailinfo.html
+3
-2
未找到文件。
src/app/backend/resource/common/serviceport.go
浏览文件 @
b0b04d67
...
...
@@ -25,13 +25,16 @@ type ServicePort struct {
// Protocol name, e.g., TCP or UDP.
Protocol
api
.
Protocol
`json:"protocol"`
// The port on each node on which service is exposed.
NodePort
int32
`json:"nodePort"`
}
// GetServicePorts returns human readable name for the given service ports list.
func
GetServicePorts
(
apiPorts
[]
api
.
ServicePort
)
[]
ServicePort
{
var
ports
[]
ServicePort
for
_
,
port
:=
range
apiPorts
{
ports
=
append
(
ports
,
ServicePort
{
port
.
Port
,
port
.
Protocol
})
ports
=
append
(
ports
,
ServicePort
{
port
.
Port
,
port
.
Protocol
,
port
.
NodePort
})
}
return
ports
}
src/app/frontend/common/components/endpoint/endpoint.scss
0 → 100644
浏览文件 @
b0b04d67
// Copyright 2015 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
.kd-endpoint-icon
{
font-size
:
inherit
;
height
:
inherit
;
margin
:
0
;
vertical-align
:
middle
;
}
src/app/frontend/common/components/endpoint/externalendpoint.html
浏览文件 @
b0b04d67
...
...
@@ -20,13 +20,26 @@ limitations under the License.
Link is always shown independent of the endpoint capabilities to support HTTP.
-->
<div>
<div
ng-repeat=
"port in ::$ctrl.endpoint.ports"
>
<a
href=
"http://{{::$ctrl.endpoint.host}}:{{::port.port}}"
target=
"_blank"
layout
layout-align=
"start center"
>
<kd-middle-ellipsis
display-string=
"{{::$ctrl.endpoint.host}}:{{::port.port}}"
>
</kd-middle-ellipsis>
<i
class=
"material-icons kd-text-icon"
>
open_in_new
</i>
</a>
<div
ng-repeat=
"endpoint in ::$ctrl.endpoints"
>
<div
ng-repeat=
"port in ::endpoint.ports"
>
<div>
<a
href=
"http://{{::endpoint.host}}:{{::port.port}}"
target=
"_blank"
layout
layout-align=
"start center"
>
<kd-middle-ellipsis
display-string=
"{{::endpoint.host}}:{{::port.port}}"
>
</kd-middle-ellipsis>
<md-icon
class=
"kd-endpoint-icon"
>
open_in_new
</md-icon>
</a>
</div>
<div>
<a
href=
"http://{{::endpoint.host}}:{{::port.nodePort}}"
target=
"_blank"
layout
layout-align=
"start center"
>
<kd-middle-ellipsis
display-string=
"{{::endpoint.host}}:{{::port.nodePort}}"
>
</kd-middle-ellipsis>
<md-icon
class=
"kd-endpoint-icon"
>
open_in_new
</md-icon>
</a>
</div>
</div>
</div>
</div>
src/app/frontend/common/components/endpoint/externalendpoint_component.js
浏览文件 @
b0b04d67
...
...
@@ -20,7 +20,7 @@
export
const
externalEndpointComponent
=
{
templateUrl
:
'
common/components/endpoint/externalendpoint.html
'
,
bindings
:
{
/** {
backendApi.Endpoint
} */
'
endpoint
'
:
'
<
'
,
/** {
!Array<!backendApi.Endpoint>
} */
'
endpoint
s
'
:
'
<
'
,
},
};
src/app/frontend/common/components/endpoint/internalendpoint.html
浏览文件 @
b0b04d67
...
...
@@ -21,5 +21,10 @@ limitations under the License.
display-string=
"{{::$ctrl.endpoint.host}}:{{::port.port}} {{::port.protocol}}"
>
</kd-middle-ellipsis>
</div>
<div>
<kd-middle-ellipsis
display-string=
"{{::$ctrl.endpoint.host}}:{{::port.nodePort}} {{::port.protocol}}"
>
</kd-middle-ellipsis>
</div>
</div>
</div>
src/app/frontend/servicedetail/servicedetailinfo.html
浏览文件 @
b0b04d67
...
...
@@ -51,8 +51,9 @@ limitations under the License.
<kd-info-card-entry
title=
"{{::$ctrl.i18n.MSG_SERVICE_DETAIL_INTERNAL_ENDPOINTS_LABEL}}"
ng-if=
"::$ctrl.service.internalEndpoint"
>
<kd-internal-endpoint
endpoint=
"::$ctrl.service.internalEndpoint"
></kd-internal-endpoint>
</kd-info-card-entry>
<kd-info-card-entry
title=
"{{::$ctrl.i18n.MSG_SERVICE_DETAIL_EXTERNAL_ENDPOINTS_LABEL}}"
ng-if=
"::$ctrl.detail.externalEndpoints"
>
<kd-external-endpoint
endpoint=
"::$ctrl.service.internalEndpoint"
></kd-external-endpoint>
<kd-info-card-entry
title=
"{{::$ctrl.i18n.MSG_SERVICE_DETAIL_EXTERNAL_ENDPOINTS_LABEL}}"
ng-if=
"::$ctrl.service.externalEndpoints"
>
<kd-external-endpoint
endpoints=
"::$ctrl.service.externalEndpoints"
></kd-external-endpoint>
</kd-info-card-entry>
</kd-info-card-section>
</kd-info-card>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录