Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
凌波微步_大先生
dashboard
提交
14579751
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 搜索 >>
提交
14579751
编写于
9月 19, 2016
作者:
S
Sebastian Florek
提交者:
Piotr Bryk
9月 19, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix graph sizes and change display policy to show all or none (#1251)
上级
25ac3ea4
变更
20
隐藏空白更改
内联
并排
Showing
20 changed file
with
100 addition
and
76 deletion
+100
-76
src/app/frontend/common/components/graph/graphcard.html
src/app/frontend/common/components/graph/graphcard.html
+1
-1
src/app/frontend/common/components/graph/graphcard.scss
src/app/frontend/common/components/graph/graphcard.scss
+2
-12
src/app/frontend/common/components/graph/graphcard_component.js
...p/frontend/common/components/graph/graphcard_component.js
+4
-3
src/app/frontend/daemonsetdetail/daemonsetdetail.html
src/app/frontend/daemonsetdetail/daemonsetdetail.html
+4
-2
src/app/frontend/daemonsetlist/daemonsetlist.html
src/app/frontend/daemonsetlist/daemonsetlist.html
+6
-4
src/app/frontend/deploymentdetail/deploymentdetail.html
src/app/frontend/deploymentdetail/deploymentdetail.html
+19
-8
src/app/frontend/deploymentdetail/deploymentdetail_controller.js
.../frontend/deploymentdetail/deploymentdetail_controller.js
+2
-0
src/app/frontend/deploymentlist/deploymentlist.html
src/app/frontend/deploymentlist/deploymentlist.html
+6
-4
src/app/frontend/jobdetail/jobdetail.html
src/app/frontend/jobdetail/jobdetail.html
+4
-2
src/app/frontend/joblist/joblist.html
src/app/frontend/joblist/joblist.html
+6
-4
src/app/frontend/petsetdetail/petsetdetail.html
src/app/frontend/petsetdetail/petsetdetail.html
+4
-2
src/app/frontend/petsetlist/petsetlist.html
src/app/frontend/petsetlist/petsetlist.html
+6
-4
src/app/frontend/poddetail/poddetail.html
src/app/frontend/poddetail/poddetail.html
+4
-2
src/app/frontend/podlist/podlist.html
src/app/frontend/podlist/podlist.html
+6
-4
src/app/frontend/replicasetdetail/replicasetdetail.html
src/app/frontend/replicasetdetail/replicasetdetail.html
+4
-2
src/app/frontend/replicasetlist/replicasetlist.html
src/app/frontend/replicasetlist/replicasetlist.html
+6
-4
src/app/frontend/replicationcontrollerdetail/replicationcontrollerdetail.html
...licationcontrollerdetail/replicationcontrollerdetail.html
+4
-2
src/app/frontend/replicationcontrollerlist/replicationcontrollerlist.html
.../replicationcontrollerlist/replicationcontrollerlist.html
+6
-4
src/app/frontend/workloads/workloads.html
src/app/frontend/workloads/workloads.html
+4
-2
src/test/frontend/common/components/graph/graphcard_component_test.js
...ntend/common/components/graph/graphcard_component_test.js
+2
-10
未找到文件。
src/app/frontend/common/components/graph/graphcard.html
浏览文件 @
14579751
...
...
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<kd-content-card
ng-if=
"$ctrl.shouldShowGraph()"
class=
"kd-graph-card"
>
<kd-content-card
ng-if=
"$ctrl.shouldShowGraph()"
>
<kd-title>
{{$ctrl.graphTitle}}
</kd-title>
<kd-content>
<kd-graph
metrics=
"::$ctrl.selectedMetrics"
></kd-graph>
...
...
src/app/frontend/common/components/graph/graphcard.scss
浏览文件 @
14579751
...
...
@@ -14,16 +14,6 @@
@import
'../../../variables'
;
.kd-left-graph
{
.kd-graph-card
{
margin-bottom
:
0
;
margin-right
:
1
.25
*
$baseline-grid
;
}
}
.kd-right-graph
{
.kd-graph-card
{
margin-bottom
:
0
;
margin-left
:
1
.25
*
$baseline-grid
;
}
kd-graph-card
{
flex
:
1
;
}
src/app/frontend/common/components/graph/graphcard_component.js
浏览文件 @
14579751
...
...
@@ -49,14 +49,15 @@ export class GraphCardController {
}
/**
* Hide graph
if at least 1 given metric
do not have 2 or more data points.
* Hide graph
s until all given metrics
do not have 2 or more data points.
*
* @export
* @return {boolean}
*/
shouldShowGraph
()
{
return
this
.
metrics
!==
null
&&
this
.
selectedMetrics
.
filter
((
metric
)
=>
metric
.
dataPoints
.
length
>
1
).
length
>
0
;
return
this
.
metrics
!==
null
&&
this
.
metrics
.
length
>
0
&&
this
.
metrics
.
filter
((
metric
)
=>
metric
.
dataPoints
.
length
>
1
).
length
===
this
.
metrics
.
length
;
}
}
...
...
src/app/frontend/daemonsetdetail/daemonsetdetail.html
浏览文件 @
14579751
...
...
@@ -16,10 +16,12 @@ limitations under the License.
<div
layout=
"row"
>
<kd-graph-card
graph-title=
"::ctrl.i18n.MSG_DAEMON_SET_DETAIL_CPU_GRAPH_CARD_TITLE"
metrics=
"::ctrl.daemonSetDetail.podList.cumulativeMetrics"
selected-metric-names=
"'cpu/usage_rate'"
flex=
"auto"
class=
"kd-left-graph"
>
metrics=
"::ctrl.daemonSetDetail.podList.cumulativeMetrics"
selected-metric-names=
"'cpu/usage_rate'"
>
</kd-graph-card>
<kd-graph-card
graph-title=
"::ctrl.i18n.MSG_DAEMON_SET_DETAIL_MEMORY_GRAPH_CARD_TITLE"
metrics=
"::ctrl.daemonSetDetail.podList.cumulativeMetrics"
selected-metric-names=
"'memory/usage'"
flex=
"auto"
class=
"kd-right-graph"
>
metrics=
"::ctrl.daemonSetDetail.podList.cumulativeMetrics"
selected-metric-names=
"'memory/usage'"
>
</kd-graph-card>
</div>
...
...
src/app/frontend/daemonsetlist/daemonsetlist.html
浏览文件 @
14579751
...
...
@@ -15,11 +15,13 @@ limitations under the License.
-->
<div
layout=
"row"
>
<kd-graph-card
graph-title=
"ctrl.i18n.MSG_DAEMON_SET_LIST_CPU_GRAPH_CARD_TITLE"
metrics=
"ctrl.daemonSetList.cumulativeMetrics"
selected-metric-names=
"'cpu/usage_rate'"
flex=
"auto"
class=
"kd-left-graph"
>
<kd-graph-card
graph-title=
"::ctrl.i18n.MSG_DAEMON_SET_LIST_CPU_GRAPH_CARD_TITLE"
metrics=
"::ctrl.daemonSetList.cumulativeMetrics"
selected-metric-names=
"'cpu/usage_rate'"
>
</kd-graph-card>
<kd-graph-card
graph-title=
"ctrl.i18n.MSG_DAEMON_SET_LIST_MEMORY_GRAPH_CARD_TITLE"
metrics=
"ctrl.daemonSetList.cumulativeMetrics"
selected-metric-names=
"'memory/usage'"
flex=
"auto"
class=
"kd-right-graph"
>
<kd-graph-card
graph-title=
"::ctrl.i18n.MSG_DAEMON_SET_LIST_MEMORY_GRAPH_CARD_TITLE"
metrics=
"::ctrl.daemonSetList.cumulativeMetrics"
selected-metric-names=
"'memory/usage'"
>
</kd-graph-card>
</div>
...
...
src/app/frontend/deploymentdetail/deploymentdetail.html
浏览文件 @
14579751
...
...
@@ -16,10 +16,12 @@ limitations under the License.
<div
layout=
"row"
>
<kd-graph-card
graph-title=
"::ctrl.i18n.MSG_DEPLOYMENT_DETAIL_CPU_GRAPH_CARD_TITLE"
metrics=
"::ctrl.deploymentDetail.podList.cumulativeMetrics"
selected-metric-names=
"'cpu/usage_rate'"
flex=
"auto"
class=
"kd-left-graph"
>
metrics=
"::ctrl.deploymentDetail.podList.cumulativeMetrics"
selected-metric-names=
"'cpu/usage_rate'"
>
</kd-graph-card>
<kd-graph-card
graph-title=
"::ctrl.i18n.MSG_DEPLOYMENT_DETAIL_MEMORY_GRAPH_CARD_TITLE"
metrics=
"::ctrl.deploymentDetail.podList.cumulativeMetrics"
selected-metric-names=
"'memory/usage'"
flex=
"auto"
class=
"kd-right-graph"
>
metrics=
"::ctrl.deploymentDetail.podList.cumulativeMetrics"
selected-metric-names=
"'memory/usage'"
>
</kd-graph-card>
</div>
...
...
@@ -29,12 +31,16 @@ limitations under the License.
<kd-title>
{{::ctrl.i18n.MSG_DEPLOYMENT_DETAIL_NEW_REPLICAS_TITLE}}
</kd-title>
<kd-content>
<kd-replica-set-card-list
ng-show=
"::ctrl.deploymentDetail.newReplicaSet.objectMeta.name"
replica-set-list=
"::ctrl.newReplicaSetList"
>
replica-set-list=
"::ctrl.newReplicaSetList"
>
</kd-replica-set-card-list>
<div
class=
"kd-zerostate-message"
layout-padding
ng-hide=
"::ctrl.deploymentDetail.newReplicaSet.objectMeta.name"
>
<div
class=
"kd-zerostate-title"
>
{{::ctrl.i18n.MSG_DEPLOYMENT_DETAIL_NEW_REPLICAS_ZEROSTATE_TITLE}}
</div>
<div
class=
"kd-zerostate-text"
>
{{::ctrl.i18n.MSG_DEPLOYMENT_DETAIL_NEW_REPLICAS_ZEROSTATE_TEXT}}
</div>
<div
class=
"kd-zerostate-title"
>
{{::ctrl.i18n.MSG_DEPLOYMENT_DETAIL_NEW_REPLICAS_ZEROSTATE_TITLE}}
</div>
<div
class=
"kd-zerostate-text"
>
{{::ctrl.i18n.MSG_DEPLOYMENT_DETAIL_NEW_REPLICAS_ZEROSTATE_TEXT}}
</div>
</div>
</kd-content>
</kd-content-card>
...
...
@@ -49,10 +55,15 @@ limitations under the License.
</kd-replica-set-card-list>
<div
class=
"kd-zerostate-message"
layout-padding
ng-hide=
"::ctrl.deploymentDetail.oldReplicaSetList.replicaSets.length"
>
<div
class=
"kd-zerostate-title"
>
{{::ctrl.i18n.MSG_DEPLOYMENT_DETAIL_OLD_REPLICAS_ZEROSTATE_TITLE}}
</div>
<div
class=
"kd-zerostate-text"
>
{{::ctrl.i18n.MSG_DEPLOYMENT_DETAIL_OLD_REPLICAS_ZEROSTATE_TEXT}}
</div>
<div
class=
"kd-zerostate-title"
>
{{::ctrl.i18n.MSG_DEPLOYMENT_DETAIL_OLD_REPLICAS_ZEROSTATE_TITLE}}
</div>
<div
class=
"kd-zerostate-text"
>
{{::ctrl.i18n.MSG_DEPLOYMENT_DETAIL_OLD_REPLICAS_ZEROSTATE_TEXT}}
</div>
</div>
</kd-content>
</kd-content-card>
<kd-event-card-list
event-list=
"::ctrl.deploymentDetail.eventList"
event-list-resource=
"::ctrl.eventListResource"
></kd-event-card-list>
<kd-event-card-list
event-list=
"::ctrl.deploymentDetail.eventList"
event-list-resource=
"::ctrl.eventListResource"
></kd-event-card-list>
src/app/frontend/deploymentdetail/deploymentdetail_controller.js
浏览文件 @
14579751
...
...
@@ -5,6 +5,8 @@
export
class
DeploymentDetailController
{
/**
* @param {!backendApi.DeploymentDetail} deploymentDetail
* @param {!angular.Resource} kdDeploymentEventsResource
* @param {!angular.Resource} kdDeploymentOldReplicaSetsResource
* @ngInject
*/
constructor
(
deploymentDetail
,
kdDeploymentEventsResource
,
kdDeploymentOldReplicaSetsResource
)
{
...
...
src/app/frontend/deploymentlist/deploymentlist.html
浏览文件 @
14579751
...
...
@@ -15,11 +15,13 @@ limitations under the License.
-->
<div
layout=
"row"
>
<kd-graph-card
graph-title=
"$ctrl.i18n.MSG_DEPLOYMENT_LIST_CPU_GRAPH_CARD_TITLE"
metrics=
"$ctrl.deploymentList.cumulativeMetrics"
selected-metric-names=
"'cpu/usage_rate'"
flex=
"auto"
class=
"kd-left-graph"
>
<kd-graph-card
graph-title=
"::$ctrl.i18n.MSG_DEPLOYMENT_LIST_CPU_GRAPH_CARD_TITLE"
metrics=
"::$ctrl.deploymentList.cumulativeMetrics"
selected-metric-names=
"'cpu/usage_rate'"
>
</kd-graph-card>
<kd-graph-card
graph-title=
"$ctrl.i18n.MSG_DEPLOYMENT_LIST_MEMORY_GRAPH_CARD_TITLE"
metrics=
"$ctrl.deploymentList.cumulativeMetrics"
selected-metric-names=
"'memory/usage'"
flex=
"auto"
class=
"kd-right-graph"
>
<kd-graph-card
graph-title=
"::$ctrl.i18n.MSG_DEPLOYMENT_LIST_MEMORY_GRAPH_CARD_TITLE"
metrics=
"::$ctrl.deploymentList.cumulativeMetrics"
selected-metric-names=
"'memory/usage'"
>
</kd-graph-card>
</div>
...
...
src/app/frontend/jobdetail/jobdetail.html
浏览文件 @
14579751
...
...
@@ -16,10 +16,12 @@ limitations under the License.
<div
layout=
"row"
>
<kd-graph-card
graph-title=
"::ctrl.i18n.MSG_JOB_DETAIL_CPU_GRAPH_CARD_TITLE"
metrics=
"::ctrl.jobDetail.podList.cumulativeMetrics"
selected-metric-names=
"'cpu/usage_rate'"
flex=
"auto"
class=
"kd-left-graph"
>
metrics=
"::ctrl.jobDetail.podList.cumulativeMetrics"
selected-metric-names=
"'cpu/usage_rate'"
>
</kd-graph-card>
<kd-graph-card
graph-title=
"::ctrl.i18n.MSG_JOB_DETAIL_MEMORY_GRAPH_CARD_TITLE"
metrics=
"::ctrl.jobDetail.podList.cumulativeMetrics"
selected-metric-names=
"'memory/usage'"
flex=
"auto"
class=
"kd-right-graph"
>
metrics=
"::ctrl.jobDetail.podList.cumulativeMetrics"
selected-metric-names=
"'memory/usage'"
>
</kd-graph-card>
</div>
...
...
src/app/frontend/joblist/joblist.html
浏览文件 @
14579751
...
...
@@ -15,11 +15,13 @@ limitations under the License.
-->
<div
layout=
"row"
>
<kd-graph-card
graph-title=
"$ctrl.i18n.MSG_JOB_LIST_CPU_GRAPH_CARD_TITLE"
metrics=
"$ctrl.jobList.cumulativeMetrics"
selected-metric-names=
"'cpu/usage_rate'"
flex=
"auto"
class=
"kd-left-graph"
>
<kd-graph-card
graph-title=
"::$ctrl.i18n.MSG_JOB_LIST_CPU_GRAPH_CARD_TITLE"
metrics=
"::$ctrl.jobList.cumulativeMetrics"
selected-metric-names=
"'cpu/usage_rate'"
>
</kd-graph-card>
<kd-graph-card
graph-title=
"$ctrl.i18n.MSG_JOB_LIST_MEMORY_GRAPH_CARD_TITLE"
metrics=
"$ctrl.jobList.cumulativeMetrics"
selected-metric-names=
"'memory/usage'"
flex=
"auto"
class=
"kd-right-graph"
>
<kd-graph-card
graph-title=
"::$ctrl.i18n.MSG_JOB_LIST_MEMORY_GRAPH_CARD_TITLE"
metrics=
"::$ctrl.jobList.cumulativeMetrics"
selected-metric-names=
"'memory/usage'"
>
</kd-graph-card>
</div>
...
...
src/app/frontend/petsetdetail/petsetdetail.html
浏览文件 @
14579751
...
...
@@ -16,10 +16,12 @@ limitations under the License.
<div
layout=
"row"
>
<kd-graph-card
graph-title=
"::ctrl.i18n.MSG_PET_SET_DETAIL_CPU_GRAPH_CARD_TITLE"
metrics=
"::ctrl.petSetDetail.podList.cumulativeMetrics"
selected-metric-names=
"'cpu/usage_rate'"
flex=
"auto"
class=
"kd-left-graph"
>
metrics=
"::ctrl.petSetDetail.podList.cumulativeMetrics"
selected-metric-names=
"'cpu/usage_rate'"
>
</kd-graph-card>
<kd-graph-card
graph-title=
"::ctrl.i18n.MSG_PET_SET_DETAIL_MEMORY_GRAPH_CARD_TITLE"
metrics=
"::ctrl.petSetDetail.podList.cumulativeMetrics"
selected-metric-names=
"'memory/usage'"
flex=
"auto"
class=
"kd-right-graph"
>
metrics=
"::ctrl.petSetDetail.podList.cumulativeMetrics"
selected-metric-names=
"'memory/usage'"
>
</kd-graph-card>
</div>
...
...
src/app/frontend/petsetlist/petsetlist.html
浏览文件 @
14579751
...
...
@@ -15,11 +15,13 @@ limitations under the License.
-->
<div
layout=
"row"
>
<kd-graph-card
graph-title=
"$ctrl.i18n.MSG_PET_SET_LIST_CPU_GRAPH_CARD_TITLE"
metrics=
"$ctrl.petSetList.cumulativeMetrics"
selected-metric-names=
"'cpu/usage_rate'"
flex=
"auto"
class=
"kd-left-graph"
>
<kd-graph-card
graph-title=
"::$ctrl.i18n.MSG_PET_SET_LIST_CPU_GRAPH_CARD_TITLE"
metrics=
"::$ctrl.petSetList.cumulativeMetrics"
selected-metric-names=
"'cpu/usage_rate'"
>
</kd-graph-card>
<kd-graph-card
graph-title=
"$ctrl.i18n.MSG_PET_SET_LIST_MEMORY_GRAPH_CARD_TITLE"
metrics=
"$ctrl.petSetList.cumulativeMetrics"
selected-metric-names=
"'memory/usage'"
flex=
"auto"
class=
"kd-right-graph"
>
<kd-graph-card
graph-title=
"::$ctrl.i18n.MSG_PET_SET_LIST_MEMORY_GRAPH_CARD_TITLE"
metrics=
"::$ctrl.petSetList.cumulativeMetrics"
selected-metric-names=
"'memory/usage'"
>
</kd-graph-card>
</div>
...
...
src/app/frontend/poddetail/poddetail.html
浏览文件 @
14579751
...
...
@@ -16,10 +16,12 @@ limitations under the License.
<div
layout=
"row"
>
<kd-graph-card
graph-title=
"::ctrl.i18n.MSG_POD_DETAIL_CPU_GRAPH_CARD_TITLE"
metrics=
"::ctrl.podDetail.metrics"
selected-metric-names=
"'cpu/usage_rate'"
flex=
"auto"
class=
"kd-left-graph"
>
metrics=
"::ctrl.podDetail.metrics"
selected-metric-names=
"'cpu/usage_rate'"
>
</kd-graph-card>
<kd-graph-card
graph-title=
"::ctrl.i18n.MSG_POD_DETAIL_MEMORY_GRAPH_CARD_TITLE"
metrics=
"::ctrl.podDetail.metrics"
selected-metric-names=
"'memory/usage'"
flex=
"auto"
class=
"kd-right-graph"
>
metrics=
"::ctrl.podDetail.metrics"
selected-metric-names=
"'memory/usage'"
>
</kd-graph-card>
</div>
...
...
src/app/frontend/podlist/podlist.html
浏览文件 @
14579751
...
...
@@ -15,11 +15,13 @@ limitations under the License.
-->
<div
layout=
"row"
>
<kd-graph-card
graph-title=
"$ctrl.i18n.MSG_POD_LIST_CPU_GRAPH_CARD_TITLE"
metrics=
"$ctrl.podList.cumulativeMetrics"
selected-metric-names=
"'cpu/usage_rate'"
flex=
"auto"
class=
"kd-left-graph"
>
<kd-graph-card
graph-title=
"::$ctrl.i18n.MSG_POD_LIST_CPU_GRAPH_CARD_TITLE"
metrics=
"::$ctrl.podList.cumulativeMetrics"
selected-metric-names=
"'cpu/usage_rate'"
>
</kd-graph-card>
<kd-graph-card
graph-title=
"$ctrl.i18n.MSG_POD_LIST_MEMORY_GRAPH_CARD_TITLE"
metrics=
"$ctrl.podList.cumulativeMetrics"
selected-metric-names=
"'memory/usage'"
flex=
"auto"
class=
"kd-right-graph"
>
<kd-graph-card
graph-title=
"::$ctrl.i18n.MSG_POD_LIST_MEMORY_GRAPH_CARD_TITLE"
metrics=
"::$ctrl.podList.cumulativeMetrics"
selected-metric-names=
"'memory/usage'"
>
</kd-graph-card>
</div>
...
...
src/app/frontend/replicasetdetail/replicasetdetail.html
浏览文件 @
14579751
...
...
@@ -16,10 +16,12 @@ limitations under the License.
<div
layout=
"row"
>
<kd-graph-card
graph-title=
"::ctrl.i18n.MSG_REPLICA_SET_DETAIL_CPU_GRAPH_CARD_TITLE"
metrics=
"::ctrl.replicaSetDetail.podList.cumulativeMetrics"
selected-metric-names=
"'cpu/usage_rate'"
flex=
"auto"
class=
"kd-left-graph"
>
metrics=
"::ctrl.replicaSetDetail.podList.cumulativeMetrics"
selected-metric-names=
"'cpu/usage_rate'"
>
</kd-graph-card>
<kd-graph-card
graph-title=
"::ctrl.i18n.MSG_REPLICA_SET_DETAIL_MEMORY_GRAPH_CARD_TITLE"
metrics=
"::ctrl.replicaSetDetail.podList.cumulativeMetrics"
selected-metric-names=
"'memory/usage'"
flex=
"auto"
class=
"kd-right-graph"
>
metrics=
"::ctrl.replicaSetDetail.podList.cumulativeMetrics"
selected-metric-names=
"'memory/usage'"
>
</kd-graph-card>
</div>
...
...
src/app/frontend/replicasetlist/replicasetlist.html
浏览文件 @
14579751
...
...
@@ -15,11 +15,13 @@ limitations under the License.
-->
<div
layout=
"row"
>
<kd-graph-card
graph-title=
"$ctrl.i18n.MSG_REPLICA_SET_LIST_CPU_GRAPH_CARD_TITLE"
metrics=
"$ctrl.replicaSetList.cumulativeMetrics"
selected-metric-names=
"'cpu/usage_rate'"
flex=
"auto"
class=
"kd-left-graph"
>
<kd-graph-card
graph-title=
"::$ctrl.i18n.MSG_REPLICA_SET_LIST_CPU_GRAPH_CARD_TITLE"
metrics=
"::$ctrl.replicaSetList.cumulativeMetrics"
selected-metric-names=
"'cpu/usage_rate'"
>
</kd-graph-card>
<kd-graph-card
graph-title=
"$ctrl.i18n.MSG_REPLICA_SET_LIST_MEMORY_GRAPH_CARD_TITLE"
metrics=
"$ctrl.replicaSetList.cumulativeMetrics"
selected-metric-names=
"'memory/usage'"
flex=
"auto"
class=
"kd-right-graph"
>
<kd-graph-card
graph-title=
"::$ctrl.i18n.MSG_REPLICA_SET_LIST_MEMORY_GRAPH_CARD_TITLE"
metrics=
"::$ctrl.replicaSetList.cumulativeMetrics"
selected-metric-names=
"'memory/usage'"
>
</kd-graph-card>
</div>
...
...
src/app/frontend/replicationcontrollerdetail/replicationcontrollerdetail.html
浏览文件 @
14579751
...
...
@@ -16,10 +16,12 @@ limitations under the License.
<div
layout=
"row"
>
<kd-graph-card
graph-title=
"::$ctrl.i18n.MSG_REPLICATION_CONTROLLER_DETAIL_CPU_GRAPH_CARD_TITLE"
metrics=
"::$ctrl.replicationControllerDetail.podList.cumulativeMetrics"
selected-metric-names=
"'cpu/usage_rate'"
flex=
"auto"
class=
"kd-left-graph"
>
metrics=
"::$ctrl.replicationControllerDetail.podList.cumulativeMetrics"
selected-metric-names=
"'cpu/usage_rate'"
>
</kd-graph-card>
<kd-graph-card
graph-title=
"::$ctrl.i18n.MSG_REPLICATION_CONTROLLER_DETAIL_MEMORY_GRAPH_CARD_TITLE"
metrics=
"::$ctrl.replicationControllerDetail.podList.cumulativeMetrics"
selected-metric-names=
"'memory/usage'"
flex=
"auto"
class=
"kd-right-graph"
>
metrics=
"::$ctrl.replicationControllerDetail.podList.cumulativeMetrics"
selected-metric-names=
"'memory/usage'"
>
</kd-graph-card>
</div>
...
...
src/app/frontend/replicationcontrollerlist/replicationcontrollerlist.html
浏览文件 @
14579751
...
...
@@ -15,11 +15,13 @@ limitations under the License.
-->
<div
layout=
"row"
>
<kd-graph-card
graph-title=
"$ctrl.i18n.MSG_REPLICATION_CONTROLLER_LIST_CPU_GRAPH_CARD_TITLE"
metrics=
"$ctrl.replicationControllerList.cumulativeMetrics"
selected-metric-names=
"'cpu/usage_rate'"
flex=
"auto"
class=
"kd-left-graph"
>
<kd-graph-card
graph-title=
"::$ctrl.i18n.MSG_REPLICATION_CONTROLLER_LIST_CPU_GRAPH_CARD_TITLE"
metrics=
"::$ctrl.replicationControllerList.cumulativeMetrics"
selected-metric-names=
"'cpu/usage_rate'"
>
</kd-graph-card>
<kd-graph-card
graph-title=
"$ctrl.i18n.MSG_REPLICATION_CONTROLLER_LIST_MEMORY_GRAPH_CARD_TITLE"
metrics=
"$ctrl.replicationControllerList.cumulativeMetrics"
selected-metric-names=
"'memory/usage'"
flex=
"auto"
class=
"kd-right-graph"
>
<kd-graph-card
graph-title=
"::$ctrl.i18n.MSG_REPLICATION_CONTROLLER_LIST_MEMORY_GRAPH_CARD_TITLE"
metrics=
"::$ctrl.replicationControllerList.cumulativeMetrics"
selected-metric-names=
"'memory/usage'"
>
</kd-graph-card>
</div>
...
...
src/app/frontend/workloads/workloads.html
浏览文件 @
14579751
...
...
@@ -16,10 +16,12 @@ limitations under the License.
<div
layout=
"row"
>
<kd-graph-card
graph-title=
"::$ctrl.i18n.MSG_WORKLOADS_CPU_GRAPH_CARD_TITLE"
metrics=
"::$ctrl.workloads.podList.cumulativeMetrics"
selected-metric-names=
"'cpu/usage_rate'"
flex=
"auto"
class=
"kd-left-graph"
>
metrics=
"::$ctrl.workloads.podList.cumulativeMetrics"
selected-metric-names=
"'cpu/usage_rate'"
>
</kd-graph-card>
<kd-graph-card
graph-title=
"::$ctrl.i18n.MSG_WORKLOADS_MEMORY_GRAPH_CARD_TITLE"
metrics=
"::$ctrl.workloads.podList.cumulativeMetrics"
selected-metric-names=
"'memory/usage'"
flex=
"auto"
class=
"kd-right-graph"
>
metrics=
"::$ctrl.workloads.podList.cumulativeMetrics"
selected-metric-names=
"'memory/usage'"
>
</kd-graph-card>
</div>
...
...
src/test/frontend/common/components/graph/graphcard_component_test.js
浏览文件 @
14579751
...
...
@@ -44,6 +44,7 @@ let metricsWithTooFewDataPoints = [
{
'
dataPoints
'
:
[
{
'
x
'
:
1472219880
,
'
y
'
:
50
},
{
'
x
'
:
1472219940
,
'
y
'
:
40
},
],
'
metricName
'
:
'
cpu/usage_rate
'
,
'
aggregation
'
:
'
sum
'
,
...
...
@@ -87,6 +88,7 @@ describe('Graph card component controller', () => {
expect
(
expected
).
toBeFalsy
();
});
it
(
'
should hide graph card when metrics were not provided
'
,
()
=>
{
ctrl
.
metrics
=
null
;
ctrl
.
$onInit
();
...
...
@@ -115,14 +117,4 @@ describe('Graph card component controller', () => {
expect
(
expected
).
toEqual
(
2
);
});
it
(
'
should hide graph card when no metric names matched
'
,
()
=>
{
ctrl
.
metrics
=
stdMetrics
;
ctrl
.
selectedMetricNames
=
'
badname1,badname2
'
;
ctrl
.
$onInit
();
let
expected
=
ctrl
.
shouldShowGraph
();
expect
(
expected
).
toBeFalsy
();
});
});
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录