Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
凌波微步_大先生
dashboard
提交
e657a9a3
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,发现更多精彩内容 >>
提交
e657a9a3
编写于
1月 05, 2016
作者:
P
Piotr Bryk
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #217 from bryk/styling
Style replica set list page
上级
d943f170
ea4a2513
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
132 addition
and
72 deletion
+132
-72
src/app/frontend/_variables.scss
src/app/frontend/_variables.scss
+7
-0
src/app/frontend/common/filters/filters_module.js
src/app/frontend/common/filters/filters_module.js
+25
-0
src/app/frontend/replicasetlist/logsmenu.html
src/app/frontend/replicasetlist/logsmenu.html
+18
-19
src/app/frontend/replicasetlist/replicasetcard.html
src/app/frontend/replicasetlist/replicasetcard.html
+28
-23
src/app/frontend/replicasetlist/replicasetcard.scss
src/app/frontend/replicasetlist/replicasetcard.scss
+52
-28
src/app/frontend/replicasetlist/replicasetlist_module.js
src/app/frontend/replicasetlist/replicasetlist_module.js
+2
-2
未找到文件。
src/app/frontend/_variables.scss
浏览文件 @
e657a9a3
...
@@ -20,6 +20,8 @@
...
@@ -20,6 +20,8 @@
}
}
$subhead-font-size-base
:
rem
(
1
.6
)
!
default
;
$subhead-font-size-base
:
rem
(
1
.6
)
!
default
;
$body-font-size-base
:
rem
(
1
.4
)
!
default
;
$caption-font-size-base
:
rem
(
1
.2
)
!
default
;
$primary
:
#326de6
;
$primary
:
#326de6
;
$delicate
:
#aaa
;
$delicate
:
#aaa
;
...
@@ -30,6 +32,11 @@ $emphasis: #000;
...
@@ -30,6 +32,11 @@ $emphasis: #000;
$content-background
:
#fff
;
$content-background
:
#fff
;
// TODO(bryk): Get those variables from Angular Material scss files.
// TODO(bryk): Get those variables from Angular Material scss files.
$foreground-1
:
rgba
(
0
,
0
,
0
,
.87
);
$foreground-2
:
rgba
(
0
,
0
,
0
,
.54
);
$title-font-weight
:
400
;
$layout-breakpoint-lg
:
1280px
;
$layout-breakpoint-lg
:
1280px
;
$whiteframe-shadow-1dp
:
0
1px
3px
0
rgba
(
0
,
0
,
0
,
.2
)
,
0
1px
1px
0
rgba
(
0
,
0
,
0
,
.14
)
,
0
2px
1px
-1px
rgba
(
0
,
0
,
0
,
.12
);
$whiteframe-shadow-1dp
:
0
1px
3px
0
rgba
(
0
,
0
,
0
,
.2
)
,
0
1px
1px
0
rgba
(
0
,
0
,
0
,
.14
)
,
0
2px
1px
-1px
rgba
(
0
,
0
,
0
,
.12
);
$baseline-grid
:
8px
;
$baseline-grid
:
8px
;
src/app/frontend/common/filters/filters_module.js
0 → 100644
浏览文件 @
e657a9a3
// 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.
import
middleEllipsisFilter
from
'
./middleellipsis_filter
'
;
/**
* Module containing common filters for the application.
*/
export
default
angular
.
module
(
'
kubernetesDashboard.common.flters
'
,
[
'
ngMaterial
'
,
])
.
filter
(
'
middleEllipsis
'
,
middleEllipsisFilter
);
src/app/frontend/replicasetlist/logsmenu.html
浏览文件 @
e657a9a3
...
@@ -15,34 +15,33 @@ limitations under the License.
...
@@ -15,34 +15,33 @@ limitations under the License.
-->
-->
<md-menu>
<md-menu>
<md-button
ng-click=
"ctrl.openMenu($mdOpenMenu, $event)"
class=
"kd-replicaset-card-logs"
>
Logs
</md-button>
<md-button
ng-click=
"ctrl.openMenu($mdOpenMenu, $event)"
class=
"kd-replicaset-card-logs
-button
"
>
Logs
</md-button>
<md-menu-content
width=
"6"
>
<md-menu-content>
<md-menu-item
class=
"kd-menu-logs-md-menu-item"
>
<md-menu-item
class=
"kd-menu-logs-md-menu-item"
>
<div
flex=
"33"
>
Logs
</div>
<div>
Logs
</div>
</md-menu-item>
</md-menu-item>
<md-menu-item
class=
"kd-menu-logs-md-menu-item"
>
<md-menu-item
class=
"kd-menu-logs-md-menu-item"
>
<div
flex
class=
"kd-menu-logs-item-header
"
>
Pod
</div>
<div
class=
"kd-menu-logs-item-header kd-menu-logs-item-pods
"
>
Pod
</div>
<div
flex=
"50"
class=
"kd-menu-logs-item-header
"
>
Running since
</div>
<div
class=
"kd-menu-logs-item-header kd-menu-logs-item-since
"
>
Running since
</div>
<div
flex
class=
"kd-menu-logs-item-heade
r"
>
Prior restart
</div>
<div
class=
"kd-menu-logs-item-header kd-menu-logs-item-prio
r"
>
Prior restart
</div>
</md-menu-item>
</md-menu-item>
<md-menu-item
ng-repeat=
"pod in ctrl.replicaSetPodsList"
class=
"kd-menu-logs-md-menu-item"
>
<md-menu-item
ng-repeat=
"pod in ::ctrl.replicaSetPodsList"
class=
"kd-menu-logs-md-menu-item"
>
<div
flex
class=
"kd-menu-logs-item"
>
{{pod.name | middleEllipsis:10}}
</div>
<div
class=
"kd-menu-logs-item kd-menu-logs-item-pods"
>
<div
flex=
"50"
class=
"kd-menu-logs-item"
ng-if=
"ctrl.podContainerExists(pod)"
>
{{::(pod.name | middleEllipsis:10)}}
<a
ng-href=
"{{::ctrl.getLogsHref(pod.name, pod.podContainers[0].name)}}"
>
</div>
{{pod.startTime}}
<i
<div
class=
"kd-menu-logs-item kd-menu-logs-item-since"
>
<a
ng-href=
"{{::ctrl.getLogsHref(pod.name, pod.podContainers[0].name)}}"
ng-if=
"::ctrl.podContainerExists(pod)"
>
{{pod.startTime | date:"short"}}
<i
class=
"material-icons kd-menu-logs-link-icon"
>
open_in_new
</i>
class=
"material-icons kd-menu-logs-link-icon"
>
open_in_new
</i>
</a>
</a>
<span
ng-if=
"::!ctrl.podContainerExists(pod)"
>
-
</span>
</div>
</div>
<div
flex=
"50"
class=
"kd-menu-logs-item"
ng-if=
"!ctrl.podContainerExists(pod)"
>
<div
class=
"kd-menu-logs-item kd-menu-logs-item-prior"
>
-
<a
ng-if=
"::ctrl.podContainersRestarted(pod)"
>
</div>
<div
flex
class=
"kd-menu-logs-item"
ng-if=
"ctrl.podContainersRestarted(pod)"
>
<a>
Logs
<i
class=
"material-icons kd-menu-logs-link-icon"
>
open_in_new
</i>
Logs
<i
class=
"material-icons kd-menu-logs-link-icon"
>
open_in_new
</i>
</a>
</a>
</div>
<span
ng-if=
"::!ctrl.podContainersRestarted(pod)"
>
-
</span>
<div
flex
class=
"kd-menu-logs-item"
ng-if=
"!ctrl.podContainersRestarted(pod)"
>
-
</div>
</div>
</md-menu-item>
</md-menu-item>
</md-menu-content>
</md-menu-content>
...
...
src/app/frontend/replicasetlist/replicasetcard.html
浏览文件 @
e657a9a3
...
@@ -16,24 +16,28 @@ limitations under the License.
...
@@ -16,24 +16,28 @@ limitations under the License.
<md-card
class=
"kd-replicaset-card"
>
<md-card
class=
"kd-replicaset-card"
>
<md-card-content>
<md-card-content>
<div
layout=
"row"
layout-align=
"space-between center"
>
<div
layout=
"column"
>
<div
flex
layout=
"column"
>
<div
flex
layout=
"row"
layout-align=
"space-between center"
<a
ng-href=
"{{::ctrl.getReplicaSetDetailHref()}}"
flex
>
class=
"kd-replicaset-card-title-row"
>
{{::ctrl.replicaSet.name}}
<h3
class=
"md-title kd-replicaset-card-title"
>
</a>
<a
ng-href=
"{{::ctrl.getReplicaSetDetailHref()}}"
class=
"kd-replicaset-card-name"
flex
>
<div
flex
class=
"md-caption"
>
{{::ctrl.replicaSet.name}}
<span
ng-repeat=
"(label, value) in ::ctrl.replicaSet.labels"
</a>
class=
"kd-replicaset-card-label"
>
</h3>
{{::label}}:{{::value}}
</span>
<md-button
class=
"md-icon-button kd-replicaset-card-menu-button"
>
</div>
<md-icon
md-font-library=
"material-icons"
>
more_vert
</md-icon>
</md-button>
</div>
<div
flex
class=
"md-caption"
>
<span
ng-repeat=
"(label, value) in ::ctrl.replicaSet.labels"
class=
"kd-replicaset-card-label"
>
{{::label}}:{{::value}}
</span>
</div>
</div>
<md-button
class=
"md-icon-button"
>
<md-icon
md-font-library=
"material-icons"
>
more_vert
</md-icon>
</md-button>
</div>
</div>
<div
class=
"md-caption"
>
<div
class=
"md-caption"
>
<div
layout=
"row"
>
<div
layout=
"row"
layout-align=
"center end"
>
<span
flex=
"60"
>
<span
flex=
"60"
>
{{::ctrl.replicaSet.podsRunning}} pods running, {{::ctrl.replicaSet.podsPending}} pending
{{::ctrl.replicaSet.podsRunning}} pods running, {{::ctrl.replicaSet.podsPending}} pending
</span>
</span>
...
@@ -41,33 +45,34 @@ limitations under the License.
...
@@ -41,33 +45,34 @@ limitations under the License.
replica-set-name=
"::ctrl.replicaSet.name"
>
replica-set-name=
"::ctrl.replicaSet.name"
>
</logs-menu>
</logs-menu>
</div>
</div>
<
hr
class=
"kd-replicaset-card-divider"
></h
r>
<
md-divider
class=
"kd-replicaset-card-divider"
></md-divide
r>
<div
layout=
"row"
layout-wrap
>
<div
layout=
"row"
layout-wrap
>
<div
ng-if=
"::ctrl.replicaSet.description"
flex=
"100"
layout=
"column"
<div
ng-if=
"::ctrl.replicaSet.description"
flex=
"100"
layout=
"column"
class=
"kd-replicaset-card-section"
>
class=
"kd-replicaset-card-section"
>
<span
flex
>
Description
</span>
<span
flex
class=
"kd-replicaset-card-section-title"
>
Description
</span>
<div
flex
>
<div
flex
>
{{::ctrl.replicaSet.description}}
{{::ctrl.replicaSet.description}}
</div>
</div>
</div>
</div>
<div
flex=
"60"
layout=
"column"
class=
"kd-replicaset-card-section"
>
<div
flex=
"60"
layout=
"column"
class=
"kd-replicaset-card-section"
>
<span
flex
>
Image
</span>
<span
flex
class=
"kd-replicaset-card-section-title"
>
Image
</span>
<div
flex
>
<div
flex
>
<div
ng-repeat=
"image in ::ctrl.replicaSet.containerImages track by $index"
<div
ng-repeat=
"image in ::ctrl.replicaSet.containerImages track by $index"
class=
"kd-replicaset-card-section-image"
>
class=
"kd-replicaset-card-section-image"
>
{{::image}}
<md-tooltip>
{{::image}}
</md-tooltip>
{{::(image | middleEllipsis:32)}}
</div>
</div>
</div>
</div>
</div>
</div>
<div
flex=
"40"
layout=
"column"
class=
"kd-replicaset-card-section"
>
<div
flex=
"40"
layout=
"column"
class=
"kd-replicaset-card-section"
>
<span
flex=
"initial"
>
Creation time
</span>
<span
flex=
"initial"
class=
"kd-replicaset-card-section-title"
>
Creation time
</span>
<span
flex
>
{{::
ctrl.replicaSet.creationTime
}}
</span>
<span
flex
>
{{::
(ctrl.replicaSet.creationTime | date:'short')
}}
</span>
</div>
</div>
<div
flex=
"60"
layout=
"column"
class=
"kd-replicaset-card-section"
>
<div
flex=
"60"
layout=
"column"
class=
"kd-replicaset-card-section"
>
<span
flex=
"initial"
>
Internal Endpoint
</span>
<span
flex=
"initial"
class=
"kd-replicaset-card-section-title"
>
Internal Endpoint
</span>
<div
flex
>
<div
flex
>
<div
ng-repeat=
"endpoint in ::ctrl.replicaSet.internalEndpoints track by $index"
>
<div
ng-repeat=
"endpoint in ::ctrl.replicaSet.internalEndpoints track by $index"
>
<kd-service-endpoint
endpoint=
"::endpoint"
></kd-service-endpoint>
<kd-service-endpoint
endpoint=
"::endpoint"
></kd-service-endpoint>
...
@@ -79,7 +84,7 @@ limitations under the License.
...
@@ -79,7 +84,7 @@ limitations under the License.
</div>
</div>
<div
flex=
"40"
layout=
"column"
class=
"kd-replicaset-card-section"
>
<div
flex=
"40"
layout=
"column"
class=
"kd-replicaset-card-section"
>
<span
flex=
"initial"
>
External Endpoint
</span>
<span
flex=
"initial"
class=
"kd-replicaset-card-section-title"
>
External Endpoint
</span>
<div
flex
>
<div
flex
>
<div
ng-repeat=
"endpoint in ::ctrl.replicaSet.externalEndpoints track by $index"
>
<div
ng-repeat=
"endpoint in ::ctrl.replicaSet.externalEndpoints track by $index"
>
<kd-service-endpoint
endpoint=
"::endpoint"
></kd-service-endpoint>
<kd-service-endpoint
endpoint=
"::endpoint"
></kd-service-endpoint>
...
...
src/app/frontend/replicasetlist/replicasetcard.scss
浏览文件 @
e657a9a3
...
@@ -19,37 +19,53 @@
...
@@ -19,37 +19,53 @@
width
:
(
$layout-breakpoint-lg
-
(
2
*
$baseline-grid
)
*
2
)
/
3
;
width
:
(
$layout-breakpoint-lg
-
(
2
*
$baseline-grid
)
*
2
)
/
3
;
}
}
// This override button style to make it look like a link.
.kd-replicaset-card-name
{
.kd-replicaset-card-logs
{
border-radius
:
inherit
;
color
:
inherit
;
color
:
inherit
;
font-size
:
inherit
;
display
:
inline-block
;
font-weight
:
inherit
;
font-weight
:
$title-font-weight
;
line-height
:
0
;
margin
:
inherit
;
min-height
:
inherit
;
min-width
:
inherit
;
padding
:
inherit
;
text-decoration
:
none
;
text-decoration
:
none
;
text-transform
:
inherit
;
}
&
:after
{
.kd-replicaset-card-title
{
content
:
'\25BC'
;
margin
:
0
;
}
}
.kd-replicaset-card-title-row
{
margin-top
:
-
$baseline-grid
-
2px
;
}
}
.kd-replicaset-card-divider
{
.kd-replicaset-card-divider
{
border
:
0
;
margin-top
:
$baseline-grid
;
border-top
:
1px
solid
;
}
// This override button style to make it look like a link.
.md-button
{
&
.kd-replicaset-card-logs-button
{
font-size
:
inherit
;
font-weight
:
inherit
;
line-height
:
0
;
margin
:
0
;
min-height
:
inherit
;
min-width
:
inherit
;
padding
:
$baseline-grid
0
;
text-decoration
:
none
;
text-transform
:
inherit
;
&
:after
{
content
:
' \25BE'
;
}
}
}
}
.kd-replicaset-card-section
{
.kd-replicaset-card-section
{
margin-top
:
2
*
$baseline-grid
;
margin-top
:
2
*
$baseline-grid
;
}
}
.kd-replicaset-card-section-title
{
color
:
$foreground-2
;
}
.kd-replicaset-card-section-image
{
.kd-replicaset-card-section-image
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
white-space
:
nowrap
;
}
}
...
@@ -57,24 +73,32 @@
...
@@ -57,24 +73,32 @@
margin-right
:
2
*
$baseline-grid
;
margin-right
:
2
*
$baseline-grid
;
}
}
.kd-menu-logs-md-menu-item
{
height
:
30px
;
min-height
:
30px
;
}
.kd-menu-logs-item-header
{
.kd-menu-logs-item-header
{
color
:
$muted
;
box-sizing
:
inherit
;
font-size
:
.8em
;
color
:
$foreground-2
;
font-size
:
$body-font-size-base
;
white-space
:
nowrap
;
white-space
:
nowrap
;
}
}
.kd-menu-logs-item
{
.kd-menu-logs-item
{
font-size
:
.8em
;
box-sizing
:
inherit
;
overflow
:
hidden
;
font-size
:
$body-font-size-base
;
white-space
:
nowrap
;
white-space
:
nowrap
;
}
}
.kd-menu-logs-item-pods
{
width
:
10
*
$baseline-grid
;
}
.kd-menu-logs-item-prior
{
width
:
10
*
$baseline-grid
;
}
.kd-menu-logs-item-since
{
width
:
15
*
$baseline-grid
;
}
.kd-menu-logs-link-icon
{
.kd-menu-logs-link-icon
{
font-size
:
1em
;
font-size
:
$subhead-font-size-base
;
margin-left
:
$baseline-grid
;
margin-left
:
$baseline-grid
;
}
}
src/app/frontend/replicasetlist/replicasetlist_module.js
浏览文件 @
e657a9a3
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
import
stateConfig
from
'
./replicasetlist_stateconfig
'
;
import
stateConfig
from
'
./replicasetlist_stateconfig
'
;
import
logsMenuDirective
from
'
./logsmenu_directive
'
;
import
logsMenuDirective
from
'
./logsmenu_directive
'
;
import
middleEllipsisFilter
from
'
common/filters/middleellipsis_filter
'
;
import
filtersModule
from
'
common/filters/filters_module
'
;
import
replicaSetCardDirective
from
'
./replicasetcard_directive
'
;
import
replicaSetCardDirective
from
'
./replicasetcard_directive
'
;
import
replicaSetDetailModule
from
'
replicasetdetail/replicasetdetail_module
'
;
import
replicaSetDetailModule
from
'
replicasetdetail/replicasetdetail_module
'
;
import
replicaSetListContainer
from
'
./replicasetlistcontainer_directive
'
;
import
replicaSetListContainer
from
'
./replicasetlistcontainer_directive
'
;
...
@@ -31,9 +31,9 @@ export default angular.module(
...
@@ -31,9 +31,9 @@ export default angular.module(
'
ngResource
'
,
'
ngResource
'
,
'
ui.router
'
,
'
ui.router
'
,
replicaSetDetailModule
.
name
,
replicaSetDetailModule
.
name
,
filtersModule
.
name
,
])
])
.
config
(
stateConfig
)
.
config
(
stateConfig
)
.
filter
(
'
middleEllipsis
'
,
middleEllipsisFilter
)
.
directive
(
'
logsMenu
'
,
logsMenuDirective
)
.
directive
(
'
logsMenu
'
,
logsMenuDirective
)
.
directive
(
'
kdReplicaSetListContainer
'
,
replicaSetListContainer
)
.
directive
(
'
kdReplicaSetListContainer
'
,
replicaSetListContainer
)
.
directive
(
'
kdReplicaSetCard
'
,
replicaSetCardDirective
);
.
directive
(
'
kdReplicaSetCard
'
,
replicaSetCardDirective
);
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录