Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
凌波微步_大先生
dashboard
提交
4e2c80a2
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,发现更多精彩内容 >>
提交
4e2c80a2
编写于
11月 17, 2015
作者:
P
Piotr Bryk
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #72 from floreks/zerostate-view
Initial implementation of zerostate view.
上级
48b6a93d
09e65b6b
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
108 addition
and
16 deletion
+108
-16
src/app/frontend/zerostate/zerostate.controller.js
src/app/frontend/zerostate/zerostate.controller.js
+8
-8
src/app/frontend/zerostate/zerostate.html
src/app/frontend/zerostate/zerostate.html
+30
-5
src/app/frontend/zerostate/zerostate.scss
src/app/frontend/zerostate/zerostate.scss
+62
-0
src/test/frontend/zerostate/zerostate.controller.test.js
src/test/frontend/zerostate/zerostate.controller.test.js
+6
-1
src/test/integration/zerostate.po.js
src/test/integration/zerostate.po.js
+1
-1
src/test/integration/zerostate.test.js
src/test/integration/zerostate.test.js
+1
-1
未找到文件。
src/app/frontend/zerostate/zerostate.controller.js
浏览文件 @
4e2c80a2
...
...
@@ -20,15 +20,15 @@
*/
export
default
class
ZeroStateController
{
/**
* @param {!angular.$timeout} $timeout
* @ngInject
*/
constructor
(
$timeout
)
{
/** @export {number} */
this
.
testValue
=
7
;
$timeout
(()
=>
{
this
.
testValue
=
8
;
},
4000
);
constructor
()
{
/** @export {!Array<{title:string, link:string}>} */
this
.
learnMoreLinks
=
[
{
title
:
'
Dashboard Tour
'
,
link
:
"
#
"
},
{
title
:
'
Deploying your App
'
,
link
:
"
#
"
},
{
title
:
'
Monitoring your App
'
,
link
:
"
#
"
},
{
title
:
'
Troubleshooting
'
,
link
:
"
#
"
},
];
}
}
src/app/frontend/zerostate/zerostate.html
浏览文件 @
4e2c80a2
...
...
@@ -14,9 +14,34 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<div
layout=
"vertical"
layout-fill
>
<header>
Zero state page.
<a
ui-sref=
"microservicelist"
>
Go to microservices page
</a>
or
<a
ui-sref=
"deploy"
>
deploy an app
</a>
.
</header>
<div
layout=
"row"
layout-align=
"center center"
layout-padding
class=
"kd-zerostate-content"
>
<md-content
layout
layout-align=
"center"
class=
"kd-content"
>
<md-card
flex=
"50"
class=
"kd-zerostate-deploy-card"
>
<md-toolbar
layout=
"row"
class=
"md-primary kd-zerostate-card-header"
layout-align=
"center center"
flex
>
<md-icon
md-svg-icon=
"assets/images/kubernetes-logo.svg"
class=
"kd-zerostate-card-logo"
></md-icon>
<span
class=
"md-padding"
flex
>
The
<b>
Kubernetes Dashboard
</b>
lets you deploy, monitor
and troubleshoot containerized apps and services
</span>
</md-toolbar>
<md-card-content
layout-align=
"center center"
>
<md-button
ui-sref=
"deploy"
class=
"md-raised md-primary kd-zerostate-deploy-bt"
>
Deploy an
app
</md-button>
</md-card-content>
</md-card>
<md-card
flex=
"15"
class=
"kd-zerostate-lm-card"
>
<md-card-content>
<md-text-float
class=
"kd-zerostate-lm-text"
><b>
Learn more
</b></md-text-float>
<md-list
class=
"kd-zerostate-lm-list"
>
<md-list-item
class=
"kd-zerostate-lm-list-item"
ng-repeat=
"option in ctrl.learnMoreLinks"
>
<a
ui-sref=
"{{option.link}}"
>
{{option.title}}
<i
class=
"material-icons kd-zerostate-ext-link-icon"
>
open_in_new
</i>
</a>
</md-list-item>
</md-list>
</md-card-content>
</md-card>
</md-content>
</div>
src/app/frontend/zerostate/zerostate.scss
0 → 100644
浏览文件 @
4e2c80a2
// 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-zerostate-content
{
position
:
fixed
;
height
:
90%
;
width
:
100%
;
}
.kd-zerostate-card-header
{
font-size
:
1em
;
}
.kd-zerostate-card-logo
{
height
:
80px
;
width
:
80px
;
padding
:
0
0
0
15px
;
}
.kd-zerostate-deploy-card
{
min-width
:
300px
;
color
:
white
;
}
.kd-zerostate-deploy-bt
{
font-size
:
12px
;
min-width
:
120px
;
}
.kd-zerostate-lm-list
{
margin-top
:
10px
;
>
.kd-zerostate-lm-list-item
{
padding
:
0
;
min-height
:
30px
;
color
:
royalblue
;
}
}
.kd-zerostate-ext-link-icon
{
font-size
:
1em
;
}
.kd-zerostate-lm-card
{
min-width
:
200px
;
font-size
:
15px
;
}
.kd-zerostate-lm-text
{
color
:
darkgray
;
}
src/test/frontend/zerostate/zerostate.controller.test.js
浏览文件 @
4e2c80a2
...
...
@@ -23,6 +23,11 @@ describe('Main controller', () => {
}));
it
(
'
should do something
'
,
()
=>
{
expect
(
vm
.
testValue
).
toEqual
(
7
);
expect
(
vm
.
learnMoreLinks
).
toEqual
([
{
title
:
'
Dashboard Tour
'
,
link
:
"
#
"
},
{
title
:
'
Deploying your App
'
,
link
:
"
#
"
},
{
title
:
'
Monitoring your App
'
,
link
:
"
#
"
},
{
title
:
'
Troubleshooting
'
,
link
:
"
#
"
},
]);
});
});
src/test/integration/zerostate.po.js
浏览文件 @
4e2c80a2
...
...
@@ -15,6 +15,6 @@
export
default
class
ZeroStatePageObject
{
constructor
()
{
this
.
header
=
element
(
by
.
css
(
'
header
'
));
this
.
deployButton
=
element
(
by
.
css
(
'
.kd-zerostate-deploy-bt
'
));
}
}
src/test/integration/zerostate.test.js
浏览文件 @
4e2c80a2
...
...
@@ -24,6 +24,6 @@ describe('Zero state view', function () {
});
it
(
'
should do something
'
,
function
()
{
expect
(
page
.
header
.
getText
()).
toContain
(
'
page
'
);
expect
(
page
.
deployButton
.
getText
()).
toContain
(
'
DEPLOY
'
);
});
});
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录